IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 9, 2015, 5:55:53 PM (11 years ago)
Author:
eugene
Message:

2.5log(exptime) should be added, not subtracted, from deteff; fix the assignment of skycell/projection/tess ID in diff and forcedwarp; get zpImage from header for Diffs (dvo does NOT calculate); apply platescale to GalShape sizes; remove StackDetectRowID

File:
1 edited

Legend:

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

    r39065 r39094  
    269269        sqlLine.group("photoZero",      zpImage)
    270270
    271         # photoColor -- how do I set this? it's also not set in stack meta
    272271        sqlLine.group("ctype1",         self.getKeyValue(header, 'CTYPE1'));
    273272        sqlLine.group("ctype2",         self.getKeyValue(header, 'CTYPE2'));
     
    482481        sqlLine = sqlUtility("INSERT INTO " + pspsTableName + " (")
    483482        sqlLine.group("ippDetectID",     "IPP_IDET")
    484         sqlLine.group("flxR5", "APER_FLUX_3")
    485         sqlLine.group("flxR5Err", "APER_FLUX_ERR_3" )
    486         sqlLine.group("flxR5Std", "APER_FLUX_STDEV_3")
    487         sqlLine.group("flxR5Fill", "APER_FILL_3")
    488         sqlLine.group("flxR6", "APER_FLUX_4")
    489         sqlLine.group("flxR6Err", "APER_FLUX_ERR_4" )
    490         sqlLine.group("flxR6Std", "APER_FLUX_STDEV_4")
    491         sqlLine.group("flxR6Fill", "APER_FILL_4")
    492         sqlLine.group("flxR7", "APER_FLUX_5")
    493         sqlLine.group("flxR7Err", "APER_FLUX_ERR_5" )
    494         sqlLine.group("flxR7Std", "APER_FLUX_STDEV_5")
    495         sqlLine.group("flxR7Fill", "APER_FILL_5")
     483        sqlLine.group("flxR5",           "APER_FLUX_3")
     484        sqlLine.group("flxR5Err",        "APER_FLUX_ERR_3" )
     485        sqlLine.group("flxR5Std",        "APER_FLUX_STDEV_3")
     486        sqlLine.group("flxR5Fill",       "APER_FILL_3")
     487        sqlLine.group("flxR6",           "APER_FLUX_4")
     488        sqlLine.group("flxR6Err",        "APER_FLUX_ERR_4" )
     489        sqlLine.group("flxR6Std",        "APER_FLUX_STDEV_4")
     490        sqlLine.group("flxR6Fill",       "APER_FILL_4")
     491        sqlLine.group("flxR7",           "APER_FLUX_5")
     492        sqlLine.group("flxR7Err",        "APER_FLUX_ERR_5" )
     493        sqlLine.group("flxR7Std",        "APER_FLUX_STDEV_5")
     494        sqlLine.group("flxR7Fill",       "APER_FILL_5")
    496495
    497496        sql = sqlLine.makeRaw(") SELECT ", " FROM " + ippTableName)
     
    501500        self.logger.infoPair("adding objID, etc from", fMeasTableName)
    502501        sqlLine = sqlUtility("UPDATE " + pspsTableName + " as a, " + fMeasTableName + " as b SET ")
    503         sqlLine.group("a.objID","b.objID")
     502        sqlLine.group("a.objID",         "b.objID")
    504503        sqlLine.group("a.uniquePspsFWid","b.uniquePspsFWid")
    505         sqlLine.group("a.detectID","b.detectID")
    506         sqlLine.group("a.ippObjID","b.ippObjID")
    507         sqlLine.group("a.filterID","b.filterID")
    508         sqlLine.group("a.surveyID","b.surveyID")
    509         sqlLine.group("a.forcedWarpID","b.forcedWarpID")
    510         sqlLine.group("a.randomWarpID","b.randomWarpID")
    511         sqlLine.group("a.skycellID","b.skycellID")
    512         sqlLine.group("a.dvoRegionID","b.dvoRegionID")
    513         sqlLine.group("a.obsTime","b.obsTime")
    514         sql = sqlLine.makeEquals("Where a.ippDetectID = b.ippDetectID")
     504        sqlLine.group("a.detectID",      "b.detectID")
     505        sqlLine.group("a.ippObjID",      "b.ippObjID")
     506        sqlLine.group("a.filterID",      "b.filterID")
     507        sqlLine.group("a.surveyID",      "b.surveyID")
     508        sqlLine.group("a.forcedWarpID",  "b.forcedWarpID")
     509        sqlLine.group("a.randomWarpID",  "b.randomWarpID")
     510        sqlLine.group("a.tessID",        "b.tessID")
     511        sqlLine.group("a.projectionID",  "b.projectionID")
     512        sqlLine.group("a.skycellID",     "b.skycellID")
     513        sqlLine.group("a.dvoRegionID",   "b.dvoRegionID")
     514        sqlLine.group("a.obsTime",       "b.obsTime")
     515        sql = sqlLine.makeEquals("WHERE a.ippDetectID = b.ippDetectID")
    515516        self.scratchDb.execute(sql)
    516517       
     
    539540        sqlLine.group("lensObjSmearX12", "LENS_X12_SM_OBJ")
    540541        sqlLine.group("lensObjSmearX22", "LENS_X22_SM_OBJ")
    541         sqlLine.group("lensObjSmearE1", "LENS_E1_SM_OBJ")
    542         sqlLine.group("lensObjSmearE2", "LENS_E2_SM_OBJ")
     542        sqlLine.group("lensObjSmearE1",  "LENS_E1_SM_OBJ")
     543        sqlLine.group("lensObjSmearE2",  "LENS_E2_SM_OBJ")
    543544        sqlLine.group("lensObjShearX11", "LENS_X11_SH_OBJ")
    544545        sqlLine.group("lensObjShearX12", "LENS_X12_SH_OBJ")
    545546        sqlLine.group("lensObjShearX22", "LENS_X22_SH_OBJ")
    546         sqlLine.group("lensObjShearE1", "LENS_E1_SH_OBJ")
    547         sqlLine.group("lensObjShearE2", "LENS_E2_SH_OBJ")
     547        sqlLine.group("lensObjShearE1",  "LENS_E1_SH_OBJ")
     548        sqlLine.group("lensObjShearE2",  "LENS_E2_SH_OBJ")
    548549        sqlLine.group("lensPSFSmearX11", "LENS_X11_SM_PSF")
    549550        sqlLine.group("lensPSFSmearX12", "LENS_X12_SM_PSF")
    550551        sqlLine.group("lensPSFSmearX22", "LENS_X22_SM_PSF")
    551         sqlLine.group("lensPSFSmearE1", "LENS_E1_SM_PSF")
    552         sqlLine.group("lensPSFSmearE2", "LENS_E2_SM_PSF")
     552        sqlLine.group("lensPSFSmearE1",  "LENS_E1_SM_PSF")
     553        sqlLine.group("lensPSFSmearE2",  "LENS_E2_SM_PSF")
    553554        sqlLine.group("lensPSFShearX11", "LENS_X11_SH_PSF")
    554555        sqlLine.group("lensPSFShearX12", "LENS_X12_SH_PSF")
    555556        sqlLine.group("lensPSFShearX22", "LENS_X22_SH_PSF")
    556         sqlLine.group("lensPSFShearE1", "LENS_E1_SH_PSF")
    557         sqlLine.group("lensPSFShearE2", "LENS_E2_SH_PSF")
    558         sqlLine.group("psfE1", "LENS_E1_PSF")
    559         sqlLine.group("psfE2", "LENS_E2_PSF")
     557        sqlLine.group("lensPSFShearE1",  "LENS_E1_SH_PSF")
     558        sqlLine.group("lensPSFShearE2",  "LENS_E2_SH_PSF")
     559        sqlLine.group("psfE1",           "LENS_E1_PSF")
     560        sqlLine.group("psfE2",           "LENS_E2_PSF")
    560561
    561562        sql = sqlLine.makeRaw(") SELECT ", " FROM " + ippTableName)
     
    565566        self.logger.infoPair("inserting objID,etc from", fMeasTableName)
    566567        sqlLine = sqlUtility("UPDATE " + pspsTableName + " as a, " + fMeasTableName + " as b SET ")
    567         sqlLine.group("a.objID","b.objID")
    568         sqlLine.group("a.uniquePspsFWid","b.uniquePspsFWid")
    569         sqlLine.group("a.detectID","b.detectID")
    570         sqlLine.group("a.ippObjID","b.ippObjID")
    571         sqlLine.group("a.filterID","b.filterID")
    572         sqlLine.group("a.surveyID","b.surveyID")
    573         sqlLine.group("a.forcedWarpID","b.forcedWarpID")
    574         sqlLine.group("a.randomWarpID","b.randomWarpID")
    575         sqlLine.group("a.skycellID","b.skycellID")
    576         sqlLine.group("a.dvoRegionID","b.dvoRegionID")
    577         sqlLine.group("a.obsTime","b.obsTime")
    578 
    579         sql = sqlLine.makeEquals("Where a.ippDetectID = b.ippDetectID")
     568        sqlLine.group("a.objID",          "b.objID")
     569        sqlLine.group("a.uniquePspsFWid", "b.uniquePspsFWid")
     570        sqlLine.group("a.detectID",       "b.detectID")
     571        sqlLine.group("a.ippObjID",       "b.ippObjID")
     572        sqlLine.group("a.filterID",       "b.filterID")
     573        sqlLine.group("a.surveyID",       "b.surveyID")
     574        sqlLine.group("a.forcedWarpID",   "b.forcedWarpID")
     575        sqlLine.group("a.randomWarpID",   "b.randomWarpID")
     576        sqlLine.group("a.tessID",         "b.tessID")
     577        sqlLine.group("a.projectionID",   "b.projectionID")
     578        sqlLine.group("a.skycellID",      "b.skycellID")
     579        sqlLine.group("a.dvoRegionID",    "b.dvoRegionID")
     580        sqlLine.group("a.obsTime",        "b.obsTime")
     581
     582        sql = sqlLine.makeEquals("WHERE a.ippDetectID = b.ippDetectID")
    580583        self.scratchDb.execute(sql)
    581584
Note: See TracChangeset for help on using the changeset viewer.