Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update flat threshold in comp_make_flat #158

Open
3 of 4 tasks
mgalloy opened this issue May 22, 2024 · 3 comments
Open
3 of 4 tasks

Update flat threshold in comp_make_flat #158

mgalloy opened this issue May 22, 2024 · 3 comments
Assignees
Labels
bug Fix for existing functionality of the pipeline level 1 Affects level1 products

Comments

@mgalloy
Copy link
Member

mgalloy commented May 22, 2024

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

  • update equation for calculation of minimum threshold for flats — min_flat_median should 70.0 before 2016 and 60.0 after
  • analyze statistical properties of the normalized (corrected by comp_transmission) median flat values — they should be roughly constant over the mission
  • determine new min_flat_median_offset value (min_flat_median of 70 before 2016, 60 after 2016)
  • create all flats for the mission with both old and new criteria, and warn when criteria disagree (log filename, median value of the flat, median of flat before converting to millionths, and both criteria thresholds, and maybe median(flat - dark) if possible)
@mgalloy mgalloy added bug Fix for existing functionality of the pipeline level 1 Affects level1 products labels May 22, 2024
@mgalloy mgalloy added this to the Decommissioning reprocessing milestone May 22, 2024
@mgalloy mgalloy self-assigned this May 22, 2024
@mgalloy
Copy link
Member Author

mgalloy commented May 22, 2024

Below is the most recent flat medians plot.

flat-medians-20201222.pdf

@mgalloy
Copy link
Member Author

mgalloy commented May 29, 2024

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

@mgalloy mgalloy changed the title Update flat threshold in ucomp_make_flat Update flat threshold in comp_make_flat May 29, 2024
@mgalloy
Copy link
Member Author

mgalloy commented Jun 4, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fix for existing functionality of the pipeline level 1 Affects level1 products
Projects
None yet
Development

No branches or pull requests

1 participant