NCAR / comp-pipeline

Pipeline code for CoMP
Other
1 stars 2 forks source link

Improve the radius determination for the field mask #146

Open detoma opened 5 months ago

detoma commented 5 months ago

In 2012 (and likely in 2011) the field mask and occulter were not always co-centered.

Our centering routine does not find a reliable center for field mask and this introduced artifact in the data and must be improved before reprocessing 2011. We also need to reprocess some 2012 days when the center was incorrect.

This may be caused by the initial center guess that is based on a first simple estimate of the occulter center. I would start by increasing the range for the inflection point search for the file mask to see if finds the center better.

We can also try changing the fixed 250 threshold as described in issue #145

To further debug this and issue #132, I would like to run intermediate products for 2012 05 17.

Tasks

detoma commented 5 months ago

The radius-guess for the field mask should change before and after 2012 Dec 9, because the plate scale changed from 4.46 arcsec/pixel to 4.35 arcsec/pixel. The values should be stored in the epoch file.

The code use a field radius guess to find the circle in the flats, then the values in the flat is used as guess for the science images. The old values used in the code for after 2012 was 297 but checking several random files, it seems the values of the field radius is always slightly larger, i.e. ~300 pixels, so I am changing this to a higher number

The radius guess for the field stop should be:

mgalloy commented 4 months ago

Processing 20120517 with intermediate products has started. Results will appear on process.intermediate and should be completed by Saturday morning if all goes well (there are a lot of untested changes in the current pipeline).

mgalloy commented 4 months ago

The intermediate products are in engineering.intermediate/2012/05/17 with names like 20120517.143132.comp.pre-combine.p0.w0.sav.

detoma commented 4 months ago

I looked at the four images (on and off band for the two beams) before they are combined. They look misaligned, so it is not the beam combination nor the continuum subtraction that causes the problem. I attach an example

Screenshot 2024-02-06 at 3 37 32 PM

Changing the flat center guess did not help. Images look even worse than during the original 2012 processing.

detoma commented 4 months ago

The raw data look fine and aligned.

The problem is the flat. It is not finding the right center for two flats early in the day. This is one of the flat in the engineering directory. The centering is totally off.

Screenshot 2024-02-06 at 4 14 32 PM
detoma commented 4 months ago

The new guesses for the occulter radius and field stop radius chosen for the epoch before 2012 12 09 work well.

We need to improve the threshold for the first guess of the center. I hope this will fix the issue. I modified it to:

threshold = 10*median(flat-dark)