IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 21, 2021, 10:03:06 AM (5 years ago)
Author:
eugene
Message:

major revision of the photometric flat-field correction / grid analysis; strip out code which uses astrometric information to define the grid

File:
1 edited

Legend:

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

    r41562 r41603  
    853853      continue;
    854854    }
    855     float Mgrid = getMgrid (m, c);
     855    float Mgrid = getMgridTiny (&catalog[c].measureT[m]);
    856856    if (isnan(Mgrid)) {
    857857      info->Ngrid ++;
     
    10131013    float Mmos     = getMmos  (m, c);                    // mosaic zero point
    10141014
    1015     float Mgrid    = getMgrid (m, c);                    // camera offset (deprecated?)
     1015    float Mgrid    = getMgridTiny (&catalog[c].measureT[m]);                    // camera offset (deprecated?)
    10161016    float MrelPSF  = getMrel  (catalog, m, c, MAG_CLASS_PSF, MAG_SRC_CHP); // average magnitude
    10171017    float Mflat    = getMflat (m, c, flatcorr, catalog); // flat-field correction
     
    11241124  free (threadinfo);
    11251125
     1126  // XXX not allocated SetMgrpInfoFree (&summary);
     1127
    11261128  npass_output ++;
    11271129
     
    12681270
    12691271static float MinMaxChiSq = NAN;
     1272static float MaxMaxChiSq = 6.0;
    12701273static float MinMaxScatter = NAN;
     1274static float MaxMaxScatter = 0.1;
    12711275
    12721276void clean_tgroups () {
     
    13011305  float ChiSqUpper90 = stats.Upper90;
    13021306  if (isnan (MinMaxChiSq)) MinMaxChiSq = 2.0*stats.median;
    1303   float MaxChiSq = MAX (MinMaxChiSq, ChiSqUpper90);
     1307  float MaxChiSq = MIN(MaxMaxChiSq, MAX (MinMaxChiSq, ChiSqUpper90)); // the upper limit should be between MinMaxChiSq and MaxMaxChiSq
    13041308
    13051309  liststats (slist, NULL, NULL, N, &stats);
    13061310  float ScatterUpper90 = stats.Upper90;
    13071311  if (isnan (MinMaxScatter)) MinMaxScatter = 2.0*stats.median;
    1308   float MaxScatter = MAX (MinMaxScatter, ScatterUpper90);
     1312  float MaxScatter = MIN(MaxMaxScatter, MAX (MinMaxScatter, ScatterUpper90));
    13091313
    13101314  fprintf (stderr, "TGROUPS: Max ChiSq: %f, Max Scatter: %f | ChiSquare Upper 90: %f, Scatter Upper 90: %f\n", MaxChiSq, MaxScatter, ChiSqUpper90, ScatterUpper90);
     
    15011505
    15021506        float MrelPSF  = getMrel  (catalog, m, c, MAG_CLASS_PSF, MAG_SRC_CHP); // average magnitude
    1503         // float Mgrid    = getMgrid (m, c);                    // camera offset (deprecated?)
     1507        // float Mgrid    = getMgridTiny (&catalog[c].measureT[m]); // camera offset (deprecated?)
    15041508        // float Mflat    = getMflat (m, c, flatcorr, catalog); // flat-field correction
    15051509
Note: See TracChangeset for help on using the changeset viewer.