IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 41561


Ignore:
Timestamp:
Apr 29, 2021, 1:52:30 PM (5 years ago)
Author:
eugene
Message:

add comment on MAG_RESID definition; turn off test image output; exclude detections without psf photometry fits or reasonable PSF - Kron mags

Location:
trunk/Ohana/src/relphot/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/relphot/src/MagResidSave.c

    r41557 r41561  
    251251    float Moff = Mcal + Mmos + Mgrp + Mgrid;
    252252
     253    // Mrel is the true average apparent magnitude of this star
     254    // Msys is the observed apparent magnitude, with nominal corrections, ie, the instrumental magnitude plus a constant
     255    // yVector (dMag) = Msys - Mrel - Moff
     256    // as the clouds come and go, Mrel is constant.  As the clouds increase, the observed
     257    // star is fainter, so Msys gets larger, and the value of Moff also gets larger to compensate
     258    // in other words:
     259    // Mapp = Minst + ZP
     260    // is equivalent to:
     261    // Mrel = Msys - Moff, so a larger Moff means a smaller ZP and increase clouds (decreased transmission)
    253262    psfStars->alldata-> yVector[Nref] = MsysPSF - MrelPSF - Moff;
    254263    psfStars->alldata->dyVector[Nref] = MAX (catalog[c].measureT[m].dM, MIN_ERROR);
  • trunk/Ohana/src/relphot/src/TGroupOps.c

    r41559 r41561  
    802802  // for testing, supply the MJD of a night or nights here to dump the full list of measurements
    803803  int testImage = FALSE;
    804   testImage |= (abs(mjdStart - 58064) < 0.1);
    805   testImage |= (abs(mjdStart - 58082) < 0.1);
    806   testImage |= (abs(mjdStart - 58770) < 0.1);
    807   testImage |= (abs(mjdStart - 55843) < 0.1);
    808   testImage |= (abs(mjdStart - 56967) < 0.1);
    809   testImage |= (abs(mjdStart - 57329) < 0.1);
    810   testImage |= (abs(mjdStart - 56614) < 0.1);
     804  // testImage |= (abs(mjdStart - 56586) < 0.1);
     805  // testImage |= (abs(mjdStart - 57974) < 0.1);
     806  // testImage |= (abs(mjdStart - 57975) < 0.1);
     807  // testImage |= (abs(mjdStart - 57977) < 0.1);
     808  // testImage |= (abs(mjdStart - 57981) < 0.1);
     809  // testImage |= (abs(mjdStart - 58710) < 0.1);
    811810
    812811  FILE *fout = NULL;
     
    975974
    976975  TGTimes *mygroup = (TGTimes *) myTGroup->parent;
    977   fprintf (stderr, "TGroup Stats %f,%d : %d %d %6.3f %6.3f %6.3f %d\n", ohana_sec_to_mjd(mygroup->start), myTGroup->photcode, (int) N, (int) myTGroup->Nmeasure, psfStars->bSaveArray[0][0], stats.median, altSigma, useMgrp);
     976  fprintf (stderr, "TGroup Stats %f,%d : %d %d %6.3f %6.3f %6.3f %f %d\n", ohana_sec_to_mjd(mygroup->start), myTGroup->photcode, (int) N, (int) myTGroup->Nmeasure, psfStars->bSaveArray[0][0], stats.median, altSigma, myTGroup->McalChiSq, useMgrp);
    978977
    979978  if (testImage) {
  • trunk/Ohana/src/relphot/src/bcatalog.c

    r41557 r41561  
    109109      if (isnan(catalog[0].measure[offset].psfQFperf) || (catalog[0].measure[offset].psfQFperf < 0.95)) { Npsfqf ++; continue; }
    110110      if (isnan(catalog[0].measure[offset].M)) { Nnan ++; continue; }
     111      if (isnan(catalog[0].measure[offset].Mkron)) { Nnan ++; continue; }
     112
     113      // require 0x01 in photFlags (fitted with a PSF)
     114      if ((catalog[0].measure[offset].photFlags & 0x01) == 0) { Nbad ++; continue; }
     115
     116      // very loose cut on PSF - Kron
     117      float Mkp = catalog[0].measure[offset].M - catalog[0].measure[offset].Mkron;
     118      if (fabs(Mkp) > 1.0) { Nbad ++; continue; }
    111119
    112120      if (catalog[0].measure[offset].photFlags & code->photomBadMask) {
  • trunk/Ohana/src/relphot/src/setMrelCatalog.c

    r41557 r41561  
    5858}
    5959
    60 FILE *TESTFILE = NULL;
    61 
    6260int useOLS = TRUE; // chosen based on iteration below
    6361
     
    7371  SetMrelInfoReset (results); // reset the counters
    7472
    75   TESTFILE = fopen ("mytest.dat", "w");
    76  
    7773  useOLS = UseStandardOLS (ZPT_STARS);
    7874  for (j = 0; j < catalog[Nc].Naverage; j++) {
     
    9288    }
    9389  }
    94 
    95   fclose (TESTFILE);
    9690  return (TRUE);
    9791}
     
    427421      secfilt[Nsec].dMpsfChp = psfstats->error;
    428422      secfilt[Nsec].Mchisq   = (psfstats->Nmeas > 1) ? psfstats->chisq : NAN;
    429       fprintf (TESTFILE, "%d %d : %d : %f %f : %f\n", cat, (int) ave, NrankingPSF, psfstats->mean, psfstats->median, psfstats->mean - psfstats->median);
    430423    }
    431424
Note: See TracChangeset for help on using the changeset viewer.