Closed gully closed 3 years ago
Ok, we have added this functionality as an init: FPADataset( inpaint_cosmic_rays = True)
This seems to work fine! It's a bit slow, adding about 10 seconds to load the dataset for only two AB nods, but the performance is pretty good. Ultimately what we should do is retain the masks and then apply those when comparing the model to data. For now we will leave them as inpainted.
Note: a side effect of this step is that it multiples the raw signal by the GAIN. We should multiply by the same scalar to data that is not inpainted. Alternatively we could call the gain 1.0, but the cosmic ray algorithm uses the gain when determining the SNR, so best to do things in terms of electrons if possible.
The cosmic rays tend to bloat the genuine spectral traces. Consider an optional cosmic-ray pre-processing step embedded into the dataset
__init__
stage.