IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42267


Ignore:
Timestamp:
Aug 23, 2022, 11:35:52 AM (4 years ago)
Author:
eugene
Message:

add option to use Map instead of Mkron to test for star/galaxy

Location:
branches/eam_branches/ipp-20220316/Ohana/src/relphot
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20220316/Ohana/src/relphot/include/relphot.h

    r42166 r42267  
    470470int    PRESERVE_PS1;
    471471int    REQUIRE_PSFFIT;
     472int    USE_APER_FOR_STARGAL;
    472473int    UPDATE;
    473474int    SAVE_IMAGE_UPDATES;
  • branches/eam_branches/ipp-20220316/Ohana/src/relphot/src/args.c

    r42166 r42267  
    247247    REQUIRE_PSFFIT = TRUE;
    248248  }
     249  USE_APER_FOR_STARGAL = FALSE;
     250  if ((N = get_argument (argc, argv, "-use-aper-for-stargal"))) {
     251    remove_argument (N, &argc, argv);
     252    USE_APER_FOR_STARGAL = TRUE;
     253  }
    249254
    250255  UPDATE = FALSE;
  • branches/eam_branches/ipp-20220316/Ohana/src/relphot/src/bcatalog.c

    r41647 r42267  
    8282      if (DophotSelect && ((catalog[0].measure[offset].photFlags >> 16) != DophotValue)) { Ndophot ++; continue; }
    8383
     84      float Maper = USE_APER_FOR_STARGAL ? catalog[0].measure[offset].Map : catalog[0].measure[offset].Mkron;
     85
    8486      // skip garbage measurements
    8587      if (isnan(catalog[0].measure[offset].psfQF)     || (catalog[0].measure[offset].psfQF < 0.95))     { Npsfqf ++; continue; }
    8688      if (isnan(catalog[0].measure[offset].psfQFperf) || (catalog[0].measure[offset].psfQFperf < 0.95)) { Npsfqf ++; continue; }
    8789      if (isnan(catalog[0].measure[offset].M)) { Nnan ++; continue; }
    88       if (isnan(catalog[0].measure[offset].Mkron)) { Nnan ++; continue; }
     90      if (isnan(Maper)) { Nnan ++; continue; }
    8991
    9092      // require 0x01 in photFlags (fitted with a PSF) -- add to the test data
    9193      if (REQUIRE_PSFFIT && (catalog[0].measure[offset].photFlags & 0x01) == 0) { Nbad ++; continue; }
    9294
    93       // very loose cut on PSF - Kron
    94       float Mkp = catalog[0].measure[offset].M - catalog[0].measure[offset].Mkron;
     95      // very loose cut on PSF - APER mag (Map or Mkron) -- this lightly rejects galaxies & other oddities
     96      float Mkp = catalog[0].measure[offset].M - Maper;
    9597      if (fabs(Mkp) > 1.0) { Nbad ++; continue; }
    9698
     
    101103      if (catalog[0].measure[offset].photFlags & code->photomPoorMask) { Npoor++; continue;}
    102104
    103       // check for galaxies (XXX skip for now)
    104       if (FALSE && !isnan(catalog[0].measure[offset].Map)) {
    105         if (catalog[0].measure[offset].M - catalog[0].measure[offset].Map > 0.15) {
    106           nEXT ++;
    107         } else {
    108           nPSF ++;
    109         }
     105      // weak test for galaxies
     106      if (Mkp > 0.5) {
     107        nEXT ++;
     108      } else {
     109        nPSF ++;
    110110      }
    111111
     
    145145
    146146    // skip object if it is likely to be a galaxy
    147     if (FALSE && (nEXT >= nPSF)) {
     147    if (nEXT >= nPSF) {
    148148      Nmeasure -= Nm;
    149149      Ngalaxy ++;
Note: See TracChangeset for help on using the changeset viewer.