IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36147


Ignore:
Timestamp:
Sep 24, 2013, 8:58:16 AM (13 years ago)
Author:
heather
Message:

sets limit of 1000 for petro_mag_err, if it is bigger it defaults to null

File:
1 edited

Legend:

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

    r35780 r36147  
    645645        ,petRadiusErr=b.PETRO_RADIUS_ERR \
    646646        ,petFlux=POW(10.0, -0.4 * b.PETRO_MAG) /" + str(self.expTime) + " \
    647         ,petFluxErr=ABS(b.PETRO_MAG_ERR) * POW(10.0, (-0.4*b.PETRO_MAG)) / " + str(self.expTime) + " / 1.085736  \
     647        ,petFluxErr=-999  \
    648648        ,petR50=b.PETRO_RADIUS_50 \
    649649        ,petR50Err=b.PETRO_RADIUS_50_ERR \
     
    653653        WHERE a.ippDetectID=b.IPP_IDET"
    654654        self.scratchDb.execute(sql)
     655
     656        self.logger.infoPair("Adding", "petFluxErr for non nulls")
     657        sql = "UPDATE StackApFlx as a, SkyChip_xsrc AS b SET \
     658        petFluxErr=ABS(b.PETRO_MAG_ERR) * POW(10.0, (-0.4*b.PETRO_MAG)) / " + str(self.expTime) + " / 1.085736  \
     659        WHERE a.ippDetectID=b.IPP_IDET \
     660        AND (b.PETRO_MAG_ERR is not NULL AND b.PETRO_MAG is not NULL AND PETRO_MAG_ERR < 1000.0)"
     661        # added this because when the petromagerr is crazy large (10^29 it out of ranges the flux err calc)
     662        self.logger.infoPair("sql", sql)
     663        self.scratchDb.execute(sql)
     664
     665
    655666
    656667        self.logger.infoPair("adding"," PrimaryF to stackApFlx")
Note: See TracChangeset for help on using the changeset viewer.