desihub / redrock

Redshift fitting for spectroperfectionism
BSD 3-Clause "New" or "Revised" License
21 stars 13 forks source link

consider adding a ZWARN bit which identifies significant inter-camera offsets #286

Closed moustakas closed 2 months ago

moustakas commented 4 months ago

I think we should consider adding a new ZWARN bit which flags statistically significant intercamera offsets which are often mistaken by Redrock as spectral breaks.

E.g., here's one example which gets mistaken as a high-redshift QSO:

Screenshot 2024-03-07 at 10 52 00 AM

One simple implementation would be to compute the robust statistics (e.g., the iteratively clipped median and robust sigma) of the edges of each camera, say 50-100 pixels, and then look for an >N-sigma difference in the medians.

I'm certain I haven't thought through all the possible pitfalls, but it may be worth at least discussing something like this.

araichoor commented 4 months ago

for what is worth: wouldn t such cases be easily identified in the sky spectra? like recording the median value (or something fancier) of the sky fibers for each petal and each amplifier (ie splitting the wavelength range in two and the fibers in two sets of 250 each); and turn on some warning if there are significant discrepancies?

moustakas commented 2 months ago

This discussion has moved to https://github.com/desihub/desispec/issues/2193 as a masking, pre-processing, and/or sky-subtraction issue.