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

Verify assumptions about aperture radii #251

Open rknop opened 2 months ago

rknop commented 2 months ago

The following lines in alignment.py:


                flux, dflux = source_sources.apfluxadu()
                datatab['MAG'] = -2.5 * np.log10( flux ) + source_zp.zp
                datatab['MAG'] += source_zp.get_aper_cor( source_sources.aper_rads[0] )
                datatab['MAGERR'] = 1.0857 * dflux / flux

make the assumption that the apfluxadu in the sources table come from aperture 0 in the list of aper rads for the sources. A recent PR (#236) rearranged the order of aperture photometry so that the last one is performed first.

While it doesn't really matter for this specific use (we're not doing photometry, we just need something vaguely right for purposes of scamp matching), there may be other placesin the code that make assumptions about which aperture is the default aperture that are no longer corret. Go through, find all places where apreture sizes are used (esp. if they have hardcoded indexes like here), and verify that it's all done consistently.

guynir42 commented 2 months ago

I think I've returned the apertures to be stored in logical order (from small to big). But I will leave this in the backlog to check that we are indeed not making assumptions.