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/GridOps.c

    r41607 r41608  
    188188        if (isnan(Mmos)) continue;
    189189
     190        float Mflat = getMflat (nm, nc, catalog);
     191        if (isnan(Mflat)) continue;
     192
    190193        // Mrel* is the average magnitude for this star.  For PS1 stacks, we have too much
    191194        // PSF variability.  We need to calibrate the PSF magnitudes separately from the
     
    200203        if (isnan(MsysPSF)) continue;
    201204
    202         // what about Mflat?
    203         float Moff =  Mcal + Mgrp + Mmos;
     205        float Moff =  Mcal + Mgrp + Mmos + Mflat;
    204206
    205207        // Msys = Mrel + Moff + Mgrid
     
    307309  for (off_t j = 0; j < catalog->Nmeasure; j++) {
    308310    float Mgrid = getMgrid (&catalog->measure[j]);
    309     catalog->measure[j].Mflat -= Mgrid;
    310   }
    311 }
    312 
     311    catalog->measure[j].Mflat += Mgrid;
     312  }
     313}
     314
Note: See TracChangeset for help on using the changeset viewer.