IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40245


Ignore:
Timestamp:
Dec 5, 2017, 6:24:37 AM (9 years ago)
Author:
eugene
Message:

use McalAPER for stack aperture-like measurements, McalPSF for chip and warp

Location:
branches/eam_branches/ohana.20170822/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20170822/src/libdvo/include/dvodb.h

    r40243 r40245  
    377377      IMAGE_XM,
    378378      IMAGE_AIRMASS,
    379       IMAGE_MCAL,
     379      IMAGE_MCAL_PSF,
     380      IMAGE_MCAL_APER,
    380381      IMAGE_dMCAL,
    381382      IMAGE_PHOTCODE,
  • branches/eam_branches/ohana.20170822/src/libdvo/src/dbExtractImages.c

    r40211 r40245  
    219219      break;
    220220
    221     case IMAGE_MCAL:
    222       // XXX : note add McalAPER methods
     221    case IMAGE_MCAL_PSF:
    223222      value.Flt = image[N].McalPSF;
     223      break;
     224    case IMAGE_MCAL_APER:
     225      value.Flt = image[N].McalAPER;
    224226      break;
    225227    case IMAGE_dMCAL:
  • branches/eam_branches/ohana.20170822/src/libdvo/src/dbFields.c

    r40243 r40245  
    847847  if (!strcasecmp (fieldName, "dapresid" )) ESCAPE (IMAGE_DAPRESID,  OPIHI_FLT);
    848848
    849   if (!strcasecmp (fieldName, "Mcal"     )) ESCAPE (IMAGE_MCAL,      OPIHI_FLT);
    850   if (!strcasecmp (fieldName, "dMcal"    )) ESCAPE (IMAGE_dMCAL,     OPIHI_FLT);
    851   if (!strcasecmp (fieldName, "Xm"       )) ESCAPE (IMAGE_XM,        OPIHI_FLT);
    852   if (!strcasecmp (fieldName, "photcode" )) ESCAPE (IMAGE_PHOTCODE,  OPIHI_INT);
    853   if (!strcasecmp (fieldName, "exptime"  )) ESCAPE (IMAGE_EXPTIME,   OPIHI_FLT);
     849  if (!strcasecmp (fieldName, "Mcal"     )) ESCAPE (IMAGE_MCAL_PSF,     OPIHI_FLT);
     850  if (!strcasecmp (fieldName, "McalPSF"  )) ESCAPE (IMAGE_MCAL_APER,    OPIHI_FLT);
     851  if (!strcasecmp (fieldName, "McalAPER" )) ESCAPE (IMAGE_MCAL_APER,    OPIHI_FLT);
     852  if (!strcasecmp (fieldName, "McalAPERTURE")) ESCAPE (IMAGE_MCAL_APER, OPIHI_FLT);
     853  if (!strcasecmp (fieldName, "dMcal"    )) ESCAPE (IMAGE_dMCAL,        OPIHI_FLT);
     854  if (!strcasecmp (fieldName, "Xm"       )) ESCAPE (IMAGE_XM,           OPIHI_FLT);
     855  if (!strcasecmp (fieldName, "photcode" )) ESCAPE (IMAGE_PHOTCODE,     OPIHI_INT);
     856  if (!strcasecmp (fieldName, "exptime"  )) ESCAPE (IMAGE_EXPTIME,      OPIHI_FLT);
    854857  if (!strcasecmp (fieldName, "expname"  )) ESCAPE (IMAGE_EXPNAME_AS_INT, OPIHI_INT);
    855858  if (!strcasecmp (fieldName, "sidtime"  )) ESCAPE (IMAGE_SIDTIME,   OPIHI_FLT);
  • branches/eam_branches/ohana.20170822/src/relphot/src/StarOps.c

    r40244 r40245  
    491491        if (isnan(Mgrid)) continue;
    492492
    493         // XXX note that this operation is setting measure->McalAPER to image->McalAPER
    494         // regardless of how the average value was calculate.
    495         // IF average.Mkron (e.g.) is calculated using image.McalPSF, we should store McalPSF for both
    496         // of these items below
     493        // Note that this operation is setting measure->McalAPER to image->McalAPER only
     494        // for the stacks.  Elsewhere (setMrelCatalog) we are using image->McalPSF for all
     495        // types of measurements EXCEPT stacks.
     496
     497        // we need to use McalAPER for stacks (and only stacks)
     498        int isStack = isGPC1stack(catalog[i].measureT[m].photcode);
    497499
    498500        // note that measurements for which the image is not selected will not be modified
     
    501503        // set the output calibration
    502504        catalog[i].measure[m].McalPSF  = McalPSF  + Mmos + Mgrid;
    503         catalog[i].measure[m].McalAPER = McalAPER + Mmos + Mgrid;
     505        catalog[i].measure[m].McalAPER = isStack ? McalAPER + Mmos + Mgrid : McalPSF + Mmos + Mgrid;
    504506
    505507        if (catalog[i].measureT[m].dbFlags & ID_MEAS_PHOTOM_UBERCAL) {
  • branches/eam_branches/ohana.20170822/src/relphot/src/setMrelCatalog.c

    r40244 r40245  
    103103// 4) some reference photcode of some kind can be specified as fixed and have a high weight
    104104
    105 // Although I calculate McalAPER for exposures, I am only using McalPSF for exposures
    106 // XXX this means that a query of the database for mag:rel:kron will be inconsistent if there
    107 // is any significant difference
     105// Although I calculate McalAPER for exposures, I am only using McalPSF for chips.  Note
     106// in StarOps.c:setMcalOutput I am setting measure->McalAPER to image->McalPSF for chips
     107// and warps, but not stacks
    108108
    109109// set mean of chip measurements (selected by photcode range for now):
     
    527527
    528528// I calculate McalAPER and McalPSF independently for stacks.  I use McalAPER for Mkron
    529 // and Map, and McalPSF for Mpsf.  A query of the database for mag:rel:kron will be
    530 // inconsistent if there is any significant difference
     529// and Map, and McalPSF for Mpsf.  Note in StarOps.c:setMcalOutput I am setting
     530// measure->McalAPER to image->McalPSF for chips and warps, but not stacks
    531531
    532532int setMrelAverageStack (Catalog *catalog, int cat, off_t ave, int Nsecfilt, FlatCorrectionTable *flatcorr) {
     
    801801// analysis is done on flux, not mags (as the faintest objects will be nearly insignificant)
    802802
    803 // Although I calculate McalAPER for exposures, I am only using McalPSF for exposures
    804 // XXX this means that a query of the database for mag:rel:kron will be inconsistent if there
    805 // is any significant difference
     803// Although I calculate McalAPER for exposures, I am only using McalPSF for warps..
     804// Note in StarOps.c:setMcalOutput I am setting measure->McalAPER to image->McalPSF for
     805// chips and warps, but not stacks
    806806
    807807int setMrelAverageForcedWarp (Catalog *catalog, int cat, off_t ave, int Nsecfilt, FlatCorrectionTable *flatcorr, SetMrelInfo *results) {
Note: See TracChangeset for help on using the changeset viewer.