-
Notifications
You must be signed in to change notification settings - Fork 2
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
Create master flats #384
Comments
Joan can you please double check if the steps below look right to you to create a master flat:
Is there any other correction, e.g. camera non-linearity correction, that I missed? If this works, since the flats are already normalized by vdimref, when we apply it to the dark corrected data in the crescent moon, we simply need to divide those pixels by vdimref at the time of the image and for the master flat. |
Here is a better histogram of when the KCor flats (cover="out" and darkshut="out" and diffuser="in" and calpol="out") were taken: Found using the query: select date_obs, cover, darkshut, diffuser, calpol from kcor_cal where cover="out"
and darkshut="out" and diffuser="in" and calpol="out" order by date_obs; |
Thank you Mike for the histogram. This is encouraging. We may have enough images to cover more of the detector. |
Only use the master flat for the pixels in the "crescent moon", i.e., the difference in the change in the location of the occulters of the flat vs. the science image. |
Add a label that records the number of pixels in the "crescent moon" so we know how many pixels do not have the closest flat. |
I can combined gains in a cal epoch. Below, I combine the gains from the cal files I had available from cal epoch 10 (bold indicates the 5 latest versions of the files that were used):
The number of images used by pixel: The master gain: And the standard deviation: From Joan: 20150319 18:39:57 to 18:52:05 The biggest motion is coming from the moving camera stages. These were replaced Jun 18-19, 2015. |
The master gain does not look right. Something went wrong. Let's go over the logic tomorrow, we are doing something wrong. update from January 21 2025 KCor discussion: Joan also noted that we are currently averaging flats taken the same day even if they are hours apart. This is source of a separate problem that also needs to be addressed. |
Mike - it would be helpful if we had access to the master fits array so we can look at the numbers ourselves. Do you have a master flat on one of the MLSO servers that we can look at? |
It's |
Try to overoccult by 1 pixel. |
The flats in KCor (and COMP) are taken with the occulter in. Science data and flats do not have the flats necessarily in the same position as the occulter moves over the course of the day. As a result, there is a region of pixels around the occulter for which we cannot performa a proper flat-fielding. I think an average flat value is used for that area in the KCor pipeline.
A way to improve this and avoid artifacts is to create a master flat. The idea is that by combining many flats together which do not have the occulter in the same location, we can cover a larger area of the detector and can flat-field every pixels in a science image.
The way to do this is to use all the good flats available for each cal_epoch and create a 3D array. Flats must be dark-corrected and scaled using vdimref. We will then compute the median flat value for each pixel in the detector that is not under the occulter using all flats. We can also compute the sigma to test flat stability over time.
Since flats tend to be taken around the same time every day, I am not sure that the occulter moves enough from one flat to the next to cover all the area of the detector that we need. I will take a look at the period 20220316.103744 to 20220830.123347 to test this. If the flats we already have do not cover enough area of the detector, when we reopen MLSO, we can take flats at different times of the day to acquire the data we need. Another option is to take flats without the occulter, which I think it is possible for KCor, but stray light could be different in the two configurations, so we need to test how they compare.
The project is pretty simple. The time consuming part is to collect the flats and darks to process for each epoch.
The text was updated successfully, but these errors were encountered: