IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39712


Ignore:
Timestamp:
Sep 22, 2016, 2:33:16 PM (10 years ago)
Author:
eugene
Message:

allow non-gpc1 measurements to be modified

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20160809/Ohana/src/uniphot/src/update_catalog_setphot.c

    r39457 r39712  
    11# include "setphot.h"
     2
     3// XXX I need to add a few things for HSC + MC + GPC1:
     4// * I can generate a zpt table for the MC exposures using the nominal zero points
     5// * for the HSC data, I need to add a function to define Mflat as a function of Xmos, Ymos
    26
    37void update_catalog_setphot (Catalog *catalog, Image *image, off_t *index, off_t Nimage, CamPhotomCorrection *camcorr) {
     
    1418    Measure *measure = &catalog[0].measure[i];
    1519
    16     // only do GPC1 data for now
    17     if (measure[0].photcode < 10000) continue;
    18     if (measure[0].photcode > 10600) continue;
     20    // XXX deprecated 2016.09.22 : only do GPC1 data for now
     21    // if (measure[0].photcode < 10000) continue;
     22    // if (measure[0].photcode > 10600) continue;
    1923     
     24    // only do DEP photcodes (skip REF, etc)
     25    PhotCode *code = GetPhotcodebyCode (measure[0].photcode);
     26    if (!code) continue; // invalid photcode
     27    if (code->type != PHOT_DEP) continue;
     28
    2029    off_t idx = measure[0].imageID;
    2130    if (idx <= 0) continue; // detections with imageID == 0 do not have a valid image (eg, ref photcode)
     
    3342      Mflat = CamPhotomCorrectionValue (camcorr, flat_id, measure[0].Xccd, measure[0].Yccd);
    3443    }
     44
     45# if (0)
     46    // the mosaic lookup is broken : fix it then redo this block
     47    if (radialZP) {
     48      mosaic = MatchMosaicMetadata (measure[0].imageID);
     49      if (mosaic == NULL) break;
     50      double Rm = measure[0].R;
     51      double Dm = measure[0].D;
     52      RD_to_XY (&XMOS_MEAS, &YMOS_MEAS, Rm, Dm, mosaic);
     53      Mflat = RadialZPtrend (XMOS_MEAS, XMOS_MEAS);
     54    }
     55# endif
    3556
    3657    measure[0].Mcal = Mcal;
Note: See TracChangeset for help on using the changeset viewer.