Skip to content

Commit

Permalink
reformatted
Browse files Browse the repository at this point in the history
reformatted
  • Loading branch information
vlnistor authored and DinoBektesevic committed Aug 6, 2024
1 parent 0ad7aa8 commit 866cfaf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/kbmod/reprojection.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,12 @@ def _reproject_work_unit(work_unit, common_wcs, frame="original"):
unique_obstimes, unique_obstime_indices = work_unit.get_unique_obstimes_and_indices()

stack = ImageStack()
for time in tqdm(unique_obstimes, bar_format=TQDMUtils.DEFAULT_TQDM_BAR_FORMAT, desc="Reprojecting"):
indices = list(np.where(obstimes == time)[0])
per_image_indices.append(indices)

for time, indices in tqdm(
zip(unique_obstimes, unique_obstime_indices),
bar_format=TQDMUtils.DEFAULT_TQDM_BAR_FORMAT,
desc="Reprojecting",
):

science_add = np.zeros(common_wcs.array_shape, dtype=np.float32)
variance_add = np.zeros(common_wcs.array_shape, dtype=np.float32)
Expand Down
4 changes: 3 additions & 1 deletion src/kbmod/work_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,9 @@ def from_fits(cls, filename):

per_image_indices = []
# Read in all the image files.
for i in tqdm(range(num_images), bar_format=TQDMUtils.DEFAULT_TQDM_BAR_FORMAT, desc="Loading images"):
for i in tqdm(
range(num_images), bar_format=TQDMUtils.DEFAULT_TQDM_BAR_FORMAT, desc="Loading images"
):
sci_hdu = hdul[f"SCI_{i}"]

# Read in the layered image from different extensions.
Expand Down

0 comments on commit 866cfaf

Please sign in to comment.