c3-time-domain / SeeChange

A time-domain data reduction pipeline (e.g., for handling images->lightcurves) for surveys like DECam and LS4
BSD 3-Clause "New" or "Revised" License
0 stars 4 forks source link

Get all non-detections #323

Open guynir42 opened 6 days ago

guynir42 commented 6 days ago

This will be an important part of the alert package. We need to be able to pull out, for each detection's location in the sky, the previous associated detections (this is already done using the Object->Measurements relationship) but also all the non-detections.

First order approximation for the limiting magnitude in case of a non-detection is the global image's lim_mag_estimate. So you'd need to load all images for that sky position (use target+section ID or ra/dec).

You can improve this by checking what was the background noise (relative to the bkg_rms_estimate) but if you are going to load a full background image for each Image object, you may as well pull up the image data and do forced photometry and get real limits.

It could be useful to look at the reference data in each location and find the noise (inverse weight, which should be higher than the background noise estimate), as that can be a lot higher at the spot you're looking at than in the general image (since it can be on a galaxy). Limiting magnitudes on galaxies have much lower sensitivity!

Another thing that is probably much more accurate is to do simulation injections on all images as a matter of course. This, if you do it well and keep track of the results (including what the limiting magnitude for detection is over different brightnesses of the the reference pixels, as in when on or off a galaxy) will give you much more accurate results.