Skip to content

Commit 4d0db71

Browse files
committed
add tqdm for gridding progress
1 parent 75ab224 commit 4d0db71

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
[project]
7-
dependencies = [ "numpy>=2", "scipy>=1.16", "astropy>=7", "healpy>=1.18" ]
7+
dependencies = [ "numpy>=2", "scipy>=1.16", "astropy>=7", "healpy>=1.18", "tqdm>=4.67.1" ]
88
name = "py21cmwedge"
99
dynamic = [ "version" ]
1010
authors = [ { name = "Matthew Kolopanis" } ]

src/py21cmwedge/uvgridder.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import numpy as np
55
from astropy import constants as const
66
from scipy.signal import fftconvolve
7+
from tqdm import tqdm
78

89
from . import dft
910

@@ -349,7 +350,7 @@ def grid_uvw(self, convolve_beam=True, spatial_function="triangle"):
349350
self.uvf_cube = np.zeros(
350351
(self.freqs.size, self.uv_size, self.uv_size), dtype=complex
351352
)
352-
for uv_key in self.uvbins.keys():
353+
for uv_key in tqdm(self.uvbins.keys(), unit="Baseline"):
353354
self.__sum_uv__(uv_key, spatial_function=spatial_function)
354355

355356
if convolve_beam:

uv.lock

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)