Skip to content

Commit

Permalink
continue operation even if all files can't be aligned
Browse files Browse the repository at this point in the history
  • Loading branch information
LTDakin committed Feb 6, 2025
1 parent ffbb461 commit c240b62
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions datalab/datalab_session/data_operations/rgb_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,9 @@ def _align_images(self, fits_files: list[str]) -> list[str]:
aligned_images.append(aligned_img)

if len(aligned_images) != self.REQUIRED_INPUTS:
raise ClientAlertException('Failed to align all images')
log.info('could not align all images')
return fits_files

self.set_operation_progress(self.PROGRESS_STEPS['ALIGNMENT'])

return aligned_images

# Currently storing the output fits SCI HDU as a 3D ndarray consisting of each input's SCI data
Expand All @@ -132,6 +131,7 @@ def operate(self):
fits_files = [handler.fits_file for handler in input_handlers]

aligned_images = self._align_images(fits_files)
self.set_operation_progress(self.PROGRESS_STEPS['ALIGNMENT'])

with create_jpgs(self.cache_key, aligned_images, color=True, zmin=zmin_list, zmax=zmax_list) as (large_jpg_path, small_jpg_path):
stacked_ndarray = self._create_3d_array(input_handlers)
Expand Down

0 comments on commit c240b62

Please sign in to comment.