Skip to content

Commit

Permalink
improved normalization loading feel
Browse files Browse the repository at this point in the history
  • Loading branch information
LTDakin committed Oct 4, 2024
1 parent 69ae917 commit 9564803
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions datalab/datalab_session/data_operations/normalization.py
Original file line number Diff line number Diff line change
@@ -47,14 +47,13 @@ def operate(self):
image_data_list = self.get_fits_npdata(input)

output_files = []
for index, image in enumerate(image_data_list):
for index, image in enumerate(image_data_list, start=1):
median = np.median(image)
normalized_image = image / median

output = create_output(self.cache_key, normalized_image, index=index, comment=f'Product of Datalab Normalization on file {input[index]["basename"]}')
output_files.append(output)

self.set_operation_progress(0.80)
self.set_operation_progress(0.5 + index/len(image_data_list) * 0.4)

self.set_output(output_files)
log.info(f'Normalization output: {self.get_output()}')

0 comments on commit 9564803

Please sign in to comment.