fix flatfield results, return correction matrix#4
Conversation
|
|
||
| @task(name="Process Single Flat Frame") | ||
| def process_single_flat_frame(flat_fits_path: str, output_dir: str): | ||
| def process_single_flat_frame(flat_fits_path: str, output_dir: str, save_corrected_flat: bool = False): |
There was a problem hiding this comment.
I don't think there is a use case to correct the flat image itself by the master_flat and save the corrected flat. As far as I know it is not needed for any of the DRP steps. We just need the master flat.
Yashvi-Sharma
left a comment
There was a problem hiding this comment.
I've added some comments. Overall looks good! There are going to be ~5 flat frames (fits files) per CSU mask. So in the batch process function we need to add a step where a list of flat fits files that all belong to the same CSU mask are taken and median-combined, and that median-combined flat frame gets sent to process_single_flat_frame to create the master_flat (correction) for that CSU mask.
I don't think we need the save_flat_fits as a separate function that saves both the correction and can flat-field science images because by its name people won't know that it is the function that applies flat correction to science images. We can directly save the correction in process_single_flat_frame, and have a separate function/task called FlatField (or something similar) that takes as input science images and correction and returns corrected science images (idea being that this task gets called in batch_process_science_frames workflow).
Uh oh!
There was an error while loading. Please reload this page.