NCAR / comp-pipeline

Pipeline code for CoMP
Other
1 stars 2 forks source link

Update flat threshold in comp_make_flat #158

Open mgalloy opened 1 month ago

mgalloy commented 1 month ago

The calculation of the minimum threshold for the median of flats is currently computed via line 337 of comp_make_flat.pro:

threshold = (norm - min_flat_median_offset) * expose / 250.0 / transmission_correction

where norm is the transmission computed for the day with comp_transmission and min_flat_median_offset is an epoch value that is currently always 20.0.

But the median of the flat image has been normalized already, so norm - min_flat_median_offset shouldn't be a function of date. So the threshold should be computed:

threshold = min_flat_median * expose / 250.0 / transmission_correction

where min_flat_median_offset has a constant value. We need to find this value through analysis of the flat medians.

Note, by 20110622, there are not as many flats currently marked as bad, and the bad ones are just barely bad, from the logs from 20110622:

  38.60 (flat median) < 38.86 (minimum theshold)
  38.82 (flat median) < 38.86 (minimum theshold)
  38.85 (flat median) < 38.86 (minimum theshold)

Tasks

mgalloy commented 1 month ago

Below is the most recent flat medians plot.

flat-medians-20201222.pdf

mgalloy commented 1 month ago

Before 2016, 70.0 should be minimum transmission corrected values. After 2016, 60.0 should be good.

mgalloy commented 3 weeks ago

I have the code ready to create all the darks/flats again and log differences in the passing by the old and new thresholds. I will need to untar each month of raw data as the processing progresses.