IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39119


Ignore:
Timestamp:
Nov 12, 2015, 4:16:35 PM (11 years ago)
Author:
watersc1
Message:

Add update sql call to set XpetRadius and XpetRadiusErr to -999 when
XpetRadius is less than -1e10. This will exclude the -1.56496e+18
-1.56496e+17 values that are showing up in the sastest. The bad
radius measurement is found in the skycal CMF, converted to janskies,
and the error set using the 10% fix.

From old batch:
gippDetectID(7) gstackImageID(9) gpetRadius(10) gpetRadiusErr(11) gpetMag(12) gpetMagErr(13) gpetR50(14)
616 3942577 -1.56496e+18 -1.56496e+17 -999 -999 -999

From CMF:
IPP_IDET(1) PETRO_RADIUS(10) PETRO_RADIUS_ERR(11) PETRO_MAG(8) PETRO_MAG_ERR(9) PETRO_RADIUS_50(12)
616 -6.25985e+18 nan nan nan nan

File:
1 edited

Legend:

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

    r39110 r39119  
    890890
    891891        # modify petRadiusErr if it is not set correctlyu
    892 
    893892        sqlLine = sqlUtility("UPDATE " + tablename + " AS a SET")
    894893        sqlLine.group("a." + filter + "petRadiusErr", "a." + filter + "petRadius * 0.1")
    895894        sql = sqlLine.makeEquals("WHERE a." + filter + "petRadiusErr IS NULL")
    896895
     896        self.scratchDb.execute(sql)
     897
     898        # modify petRadius/petRadiusErr if they have the very wrong values.
     899        # Be conservative and assume all values smaller than -1e10 are very wrong values.
     900        sqlLine = sqlUtility("UPDATE " + tablename + " AS a SET")
     901        sqlLine.group("a." + filter + "petRadius", "-999")
     902        sqlLine.group("a." + filter + "petRadiusErr", "-999")
     903        sql = sqlLine.makeEquals("WHERE a." + filter + "petRadius <= -1e+10")
     904       
    897905        self.scratchDb.execute(sql)
    898906
Note: See TracChangeset for help on using the changeset viewer.