IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 22, 2021, 1:44:24 PM (5 years ago)
Author:
eugene
Message:

fix inconsistency between Mgrid and Mflat

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/relphot.20210521/src/TGroupOps.c

    r41606 r41608  
    874874    // apply that offset as well here for this image (in other words, each detection is
    875875    // being compared to the model, excluding the zero point, Mcal.  The model includes
    876     // the flat-correction.  NOTE the sign of Mflat (Image.Mcal = Measure.Mcal - Mflat)
     876    // the flat-correction.  NOTE the sign of Mflat (Image.Mcal = Measure.Mcal + Mflat)
     877    // this was inconsistent with PhotRel pre-r41606
    877878
    878879    float Mflat = getMflat (m, c, catalog);
     
    899900    assert (Nbright >= 0);
    900901
    901     float Moff =  Mcal + Mmos + Mgrid - Mflat;
     902    float Moff =  Mcal + Mmos + Mgrid + Mflat;
    902903
    903904    psfStars->alldata-> yVector[N] = MsysPSF - MrelPSF - Moff;
     
    10221023
    10231024    // for historical reasons, Mflat is defined with the wrong sign
    1024     float delta = MsysPSF - MrelPSF - Mcal - Mmos - Mgrid + Mflat - myTGroup->McalPSF;
     1025    float delta = MsysPSF - MrelPSF - Mcal - Mmos - Mgrid - Mflat - myTGroup->McalPSF;
    10251026
    10261027    int isBad = (catalog[c].measureT[m].dbFlags & MEAS_BAD);
     
    15031504        float MrelPSF  = getMrel  (catalog, m, c, MAG_CLASS_PSF, MAG_SRC_CHP); // average magnitude
    15041505        // float Mgrid    = getMgridTiny (&catalog[c].measureT[m]); // camera offset (deprecated?)
    1505         // float Mflat    = getMflat (m, c, catalog); // flat-field correction
     1506        float Mflat    = getMflat (m, c, catalog); // flat-field correction
    15061507
    15071508        off_t n = catalog[c].measureT[m].averef;
     
    15111512
    15121513        // for historical reasons, Mflat is defined with the wrong sign
    1513         float delta = MsysPSF - MrelPSF - Mcal - Mmos - Mgrp;
     1514        float delta = MsysPSF - MrelPSF - Mcal - Mmos - Mgrp - Mflat;
    15141515
    15151516        fprintf (fout, "%f %f : %f %f : %f %f %f  : %f %f\n", catalog[c].averageT[n].R, catalog[c].averageT[n].D, MsysPSF, MrelPSF, Mcal, Mmos, Mgrp, catalog[c].measureT[m].airmass, delta);
Note: See TracChangeset for help on using the changeset viewer.