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

What is our convention for storing x and y? #341

Open rknop opened 2 months ago

rknop commented 2 months ago

x and y may show up in a few different places. We use at least two different software packages (SExtractor and sep) to measure things on images. (SExtractor is used for general source extraction; sep is used to measure things with the zogy subtraction.) We need to make sure that we're consistent with x-y ordering (standard numpy indices are backwards from the FITS order!), and with 1-offset or 0-offset (numpy uses 0-offset, FITS uses 1-offset). We should pick a standard for all internal uses, and document what the standard is for each different sort of save file we have.

To investigate this, figure out what sep does by running it and sextractor on the same test image with nice bright centroided gaussians. Also, look at the code that creates and writes detections in zogy, and any code that reads or writes source lists for sextractor.

Ideally, all of this should be handled internally in the source list save_file and load_file method. Indeed, it may already all be fine, but we should check that. Still, though, it would be good to document it all, in case (e.g. in the webap) we read a source list file without using the SeeChange classes.