Skip to content

Commit 866cfaf

Browse files
vlnistorDinoBektesevic
authored andcommitted
reformatted
reformatted
1 parent 0ad7aa8 commit 866cfaf

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/kbmod/reprojection.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,12 @@ def _reproject_work_unit(work_unit, common_wcs, frame="original"):
124124
unique_obstimes, unique_obstime_indices = work_unit.get_unique_obstimes_and_indices()
125125

126126
stack = ImageStack()
127-
for time in tqdm(unique_obstimes, bar_format=TQDMUtils.DEFAULT_TQDM_BAR_FORMAT, desc="Reprojecting"):
128-
indices = list(np.where(obstimes == time)[0])
129-
per_image_indices.append(indices)
127+
128+
for time, indices in tqdm(
129+
zip(unique_obstimes, unique_obstime_indices),
130+
bar_format=TQDMUtils.DEFAULT_TQDM_BAR_FORMAT,
131+
desc="Reprojecting",
132+
):
130133

131134
science_add = np.zeros(common_wcs.array_shape, dtype=np.float32)
132135
variance_add = np.zeros(common_wcs.array_shape, dtype=np.float32)

src/kbmod/work_unit.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,9 @@ def from_fits(cls, filename):
289289

290290
per_image_indices = []
291291
# Read in all the image files.
292-
for i in tqdm(range(num_images), bar_format=TQDMUtils.DEFAULT_TQDM_BAR_FORMAT, desc="Loading images"):
292+
for i in tqdm(
293+
range(num_images), bar_format=TQDMUtils.DEFAULT_TQDM_BAR_FORMAT, desc="Loading images"
294+
):
293295
sci_hdu = hdul[f"SCI_{i}"]
294296

295297
# Read in the layered image from different extensions.

0 commit comments

Comments
 (0)