Open londumas opened 5 years ago
Updated results using 50 zeros: [1159,1208]
:
x = 54, y = 778
; it hat has a strange behavior (large variance?).From @julienguy, maybe the answer is in updating the hardcodded parameters of the gradient: https://github.com/desihub/desispec/blob/36e5b82d40f06841cccd6a7a293d61c1c89fee77/py/desispec/cosmics.py#L364
I worked a bit on this for the purpose of studying cosmics in MOSAIC CCDs. This is in branch improve_cosmics.
The following plot shows from top to bottom the fraction of remaining unmasked cosmic ray pixels, the rejection efficiency, and the signal masking rate that we want to keep as low as possible.
The following shows the example for the NIR CCD image which combines exposure #1284 which is a 20min dark, with exposure #1450 and #1451 which are 10s and 1s arc lamp exposures. The first image is the data, the second the data with masked pixels in gray, and the last image the mask. One can see that most cosmics are masked while the data (the spectral lines) are not.
The following data are using SP2, but the results are similar for SP0. I preproc using the following for the series of 10 zeros (
199,200,201,202,203,204,205,207,208,209
), i.e. not using the206
:Here is the histograms of data. You can clearly see that there are a lot of unflagged cosmics, spetially in r2 and z2.
Looking at the images, most of them seem to be associated with flagged cosmics. Some are isolated though. In white good data with
value<40
, in violet masked data, in color the log of the value of the unflagged cosmics.With the following code:
[EDIT] Adding the code to reproduce results.