IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38899


Ignore:
Timestamp:
Oct 20, 2015, 3:06:03 PM (11 years ago)
Author:
bills
Message:

process the new columns in the PS1_V5 format for smfs produced by the test suite.
(cam_id < 100)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/jython/detectionbatch.py

    r38878 r38899  
    6262           self.logger.errorPair("Could not get", "camera metadata")
    6363           raise
     64
     65       # set a flag indicating that we have the new columns added in version 5 of the
     66       # cmf/smf format. It began around cam_id 982483 apparently.
     67       # if cam_id is small assume that it cam from the test suite.
     68       # XXX: Should be looking for EXTNAME >= "PS1_V5"
     69       if (self.id >= 982483 or self.id < 100):
     70           self.v5cols = 1;
     71       else:
     72           self.v5cols = 0;
    6473
    6574       self.expID = meta[0];
     
    449458        sqlLine.group("xPosErr",          "X_PSF_SIG")                                               
    450459        sqlLine.group("yPosErr",          "Y_PSF_SIG")                                               
    451         if (self.id >= 982483):
     460        if (self.v5cols):
    452461            sqlLine.group("pltScale",     "PLTSCALE")                                     
    453462            sqlLine.group("posAngle",     "POSANGLE")                                     
     
    462471        sqlLine.group("psfFlux",          "PSF_INST_FLUX / " + expTimeString)
    463472        sqlLine.group("psfFluxErr",       "PSF_INST_FLUX_SIG / " + expTimeString)
    464         if (self.id >= 982483):
     473        if (self.v5cols):
    465474            sqlLine.group("psfMajorFWHM", "PSF_FWHM_MAJ * abs(PLTSCALE)")                                               
    466475            sqlLine.group("psfMinorFWHM", "PSF_FWHM_MIN * abs(PLTSCALE)")                                               
     
    480489        sqlLine.group("momentM4C",        "MOMENTS_M4C * PLTSCALE * PLTSCALE")                                             
    481490        sqlLine.group("momentM4S",        "MOMENTS_M4S * PLTSCALE * PLTSCALE")
    482         if (self.id >= 982483):
     491        if (self.v5cols):
    483492            sqlLine.group("apFlux",       "AP_FLUX / " + expTimeString)
    484493            sqlLine.group("apFluxErr",    "AP_FLUX_SIG / " + expTimeString)
     
    9991008        print "my ID: " + str(self.id)
    10001009
    1001         if (self.id < 982483):
     1010        if (not self.v5cols):
    10021011            # XXX EAM NOTE : this is fragile : requires PS1_V4
    10031012            columns = "IPP_IDET X_PSF Y_PSF X_PSF_SIG Y_PSF_SIG                   PSF_INST_FLUX PSF_INST_FLUX_SIG       PSF_MAJOR PSF_MINOR PSF_THETA          PSF_QF PSF_QF_PERFECT PSF_CHISQ EXT_NSIGMA MOMENTS_XX MOMENTS_XY MOMENTS_YY MOMENTS_R1 MOMENTS_RH MOMENTS_M3C MOMENTS_M3S MOMENTS_M4C MOMENTS_M4S                             AP_MAG_RADIUS KRON_FLUX KRON_FLUX_ERR SKY SKY_SIGMA FLAGS FLAGS2"
Note: See TracChangeset for help on using the changeset viewer.