roman-corgi / corgidrp

Data Reduction Pipeline for the Roman Coronagraph Instrument
4 stars 2 forks source link

Improve Cosmic Ray modeling and rejection #72

Open bnemati opened 2 months ago

bnemati commented 2 months ago

This was an issue under https://jira.jpl.nasa.gov/browse/WFIRST-3062

The goal is to use the TVAC data to create more realistic models of the cosmic ray hits, and also to improve cosmic ray masking and rejection in the ground software.

bnemati commented 2 months ago

The current CGI frame processing code (L1-L2a) masks out the entire remainder of the row. Also the current simulation in emccd_detect makes tails that are notional but need added fidelity to resemble true cosmic ray tails.

Better simulation on the one hand and better image processing on the other hand can improve both the accuracy of the simulated fringes and the efficiency of the processing.

Particularly, the cosmic ray tails, after cleanup, can be significantly shortened and the masks can be shrunk accordingly.

Here is a basic outline of the steps needed:

  1. characterize the cosmic ray characteristics/parameters as a function of the EM gain
  1. Verify that the cleanup of the CR tails does not in fact hurt the image quality. Previous study showed that
maxwellmb commented 3 weeks ago

See Kevin's comment in #91 as well. I think these are duplicates: we can do better CR rejection and should implement it sometime.

kjl0025 commented 3 weeks ago

Bijan's issue is related from to what I said in #91 , but not quite the same thing. That issue was basically a reminder to myself to update the cosmic ray removal code to the most up-to-date version of GSW, which includes better masking due to additional user inputs which can widen the mask of the cosmic head and can shorten the tail mask, but no modeling of the cosmic ray is actually done to determine those parameters. The masking of cosmic rays using the GSW tool that II&T open-sourced was not sufficient to create good noise maps (arrays of dark current, CIC, and FPN per pixel in the image area) when applied to TVAC data. It has since been updated and delivered and does lead to good-quality noise maps.

maxwellmb commented 3 weeks ago

Sorry @kjl0025! I've re-opened the issue.