IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38602 for trunk


Ignore:
Timestamp:
Jul 18, 2015, 9:55:43 PM (11 years ago)
Author:
heather
Message:

SAS39 final tweaks (added infoFlag3)

Location:
trunk/ippToPsps
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/config/tables.DF.vot

    r38397 r38602  
    283283        <DESCRIPTION>flag indicating provenance information</DESCRIPTION>
    284284      </FIELD>
     285      <FIELD name="infoFlag3" arraysize="1" datatype="long" unit="dimensionless" default="-999">
     286        <DESCRIPTION>flag indicating provenance information</DESCRIPTION>
     287      </FIELD>
    285288      <FIELD name="dataRelease" arraysize="1" datatype="unsignedByte" unit="dimensionless" default="NA">
    286289        <DESCRIPTION>Data release when this detection was originally taken. Recalibrations do not affect this value.</DESCRIPTION>
  • trunk/ippToPsps/config/tables.FW.vot

    r38397 r38602  
    251251        <DESCRIPTION>combination of cmf and dvo flags</DESCRIPTION>
    252252      </FIELD>
     253       <FIELD name="infoFlag3" arraysize="1" datatype="long" unit="dimensionless" default="-999">
     254        <DESCRIPTION>combination of cmf and dvo flags</DESCRIPTION>
     255      </FIELD>
    253256      <FIELD name="dataRelease" arraysize="1" datatype="unsignedByte" unit="dimensionless" default="NA">
    254257        <DESCRIPTION>Data release when this detection was originally taken. Recalibrations do not affect this value.</DESCRIPTION>
  • trunk/ippToPsps/config/tables.P2.vot

    r38397 r38602  
    548548        <DESCRIPTION>flag indicating provenance information</DESCRIPTION>
    549549      </FIELD>
     550      <FIELD name="infoFlag3" arraysize="1" datatype="int" unit="dimensionless" default="-999">
     551        <DESCRIPTION>flag indicating provenance information</DESCRIPTION>
     552      </FIELD>
    550553      <FIELD name="dataRelease" arraysize="1" datatype="unsignedByte" unit="dimensionless" default="NA">
    551554        <DESCRIPTION>Data release when this detection was originally taken. Recalibrations do not affect this value.</DESCRIPTION>
  • trunk/ippToPsps/config/tables.ST.vot

    r38397 r38602  
    213213        <DESCRIPTION>informational bits</DESCRIPTION>
    214214      </FIELD>
     215      <FIELD name="ginfoFlag3" arraysize="1" datatype="int" unit="dimensionless" default="0">
     216        <DESCRIPTION>informational bits</DESCRIPTION>
     217      </FIELD>
    215218      <FIELD name="gnFrames" arraysize="1" datatype="int" unit="dimensionless" default="-999">
    216219        <DESCRIPTION>number of frames contributing to source</DESCRIPTION>
     
    263266        <DESCRIPTION>informational bits</DESCRIPTION>
    264267      </FIELD>
     268      <FIELD name="rinfoFlag3" arraysize="1" datatype="int" unit="dimensionless" default="0">
     269        <DESCRIPTION>informational bits</DESCRIPTION>
     270      </FIELD>
    265271      <FIELD name="rnFrames" arraysize="1" datatype="int" unit="dimensionless" default="-999">
    266272        <DESCRIPTION>number of frames contributing to source</DESCRIPTION>
     
    313319        <DESCRIPTION>informational bits</DESCRIPTION>
    314320      </FIELD>
     321      <FIELD name="iinfoFlag3" arraysize="1" datatype="int" unit="dimensionless" default="0">
     322        <DESCRIPTION>informational bits</DESCRIPTION>
     323      </FIELD>
    315324      <FIELD name="inFrames" arraysize="1" datatype="int" unit="dimensionless" default="-999">
    316325        <DESCRIPTION>number of frames contributing to source</DESCRIPTION>
     
    363372        <DESCRIPTION>informational bits</DESCRIPTION>
    364373      </FIELD>
     374      <FIELD name="zinfoFlag3" arraysize="1" datatype="int" unit="dimensionless" default="0">
     375        <DESCRIPTION>informational bits</DESCRIPTION>
     376      </FIELD>
    365377      <FIELD name="znFrames" arraysize="1" datatype="int" unit="dimensionless" default="-999">
    366378        <DESCRIPTION>number of frames contributing to source</DESCRIPTION>
     
    411423      </FIELD>
    412424      <FIELD name="yinfoFlag2" arraysize="1" datatype="int" unit="dimensionless" default="0">
     425        <DESCRIPTION>informational bits</DESCRIPTION>
     426      </FIELD>
     427      <FIELD name="yinfoFlag3" arraysize="1" datatype="int" unit="dimensionless" default="0">
    413428        <DESCRIPTION>informational bits</DESCRIPTION>
    414429      </FIELD>
  • trunk/ippToPsps/jython/batch.py

    r37754 r38602  
    414414    '''   
    415415    def createEmptyPspsTables(self):
    416 
     416         print "THIS SUCKS"
    417417         self.pspsTables = stilts.treads(self.pspsVoTableFilePath)
    418418         for table in self.pspsTables:
    419419             self.logger.debug("Creating PSPS table: " + table.name)
     420             self.logger.infoPair("creating psps table ",table.name)
    420421             table.write(self.scratchDb.url + '#' + table.name)
    421422             self.tablesToExport.append(table.name)
     
    592593
    593594        # creates the empty PSPS tables
     595        self.logger.infoPair("creating","empty psps tables")
    594596        if not self.createEmptyPspsTables():
    595597            self.logger.errorPair("Aborting this batch", "could not create empty PSPS tables")
  • trunk/ippToPsps/jython/detectionbatch.py

    r38397 r38602  
    413413        sqlLine.group("ippDetectID",     "IPP_IDET")                                               
    414414#        sqlLine.group("randomDetID",     "FLOOR(RAND("+str(self.batchID)+")*9223372036854775807)")                       
    415         sqlLine.group("randomDetID",     "(RAND("+str(self.batchID)+")")                       
     415        sqlLine.group("randomDetID",     "RAND("+str(self.batchID)+")")                       
    416416        sqlLine.group("filterID",        str(self.filterID))                                       
    417417        sqlLine.group("surveyID",        str(self.surveyID))                                       
     
    672672    '''
    673673    def updateDvoIDs(self, table, externID):
    674 
     674        self.logger.info("getting imge id")
    675675        imageID = self.scratchDb.getImageIDFromExternID(externID)
    676         self.logger.debug("Updating table '" + table + "' with DVO IDs using imageID = %d" % imageID)
     676        self.logger.info("Updating table '" + table + "' with DVO IDs using imageID = %d" % imageID)
    677677
    678678        sql = "UPDATE IGNORE " + table + " AS a, " + self.scratchDb.dvoDetectionTable + " AS b SET \
     
    686686               a.telluricExt  = b.telluricExt, \
    687687               a.airmass      = b.airmass, \
    688                a.expTime      = b.expTime, \
    689                a.infoFlag2    = (b.flags << 13) | a.infoFlag2 \
     688               a.infoFlag3    = b.flags, \
     689               a.expTime      = b.expTime \
    690690               WHERE a.ippDetectID = b.ippDetectID \
    691691               AND b.imageID = " + str(imageID)
    692692
    693         try: self.scratchDb.execute(sql)
    694         except:
    695             self.logger.InfoPair("failed sql",sql)
     693        print sql
     694        try: self.scratchDb.execute(sql)
     695        except:
     696            self.logger.infoPair("failed sql",sql)
    696697            raise
    697698    '''
     
    740741        #detection has a primary index, so don't add, use this one
    741742        self.scratchDb.addRowCountColumnNoKey("Detection_"+chipname, "row")
     743        self.logger.info("added row")
    742744        self.updateDvoIDs("Detection_" + chipname, self.imageIDs[chipname])
    743         #self.logger.info("updated dvoids")
     745        self.logger.info("updated dvoids")
    744746        results['NULLOBJID'] = self.scratchDb.reportAndDeleteRowsWithNULLS("Detection_" + chipname, "objID")
    745         #self.logger.info("deleted nulls")
     747        self.logger.info("deleted nulls")
    746748
    747749        ota = x*10+y
  • trunk/ippToPsps/jython/diffbatch.py

    r38397 r38602  
    163163     
    164164       # make some generic tables
    165            sql = "CREATE TABLE DiffMeta_"+str(num)+" like DiffMeta"
    166            try: self.scratchDb.execute(sql)
    167            except: raise
    168            sql = "CREATE TABLE DiffToImage_"+str(num)+" like DiffToImage"
    169            try: self.scratchDb.execute(sql)
    170            except: raise
    171            sql = "CREATE TABLE DiffDetection_"+str(num)+" like DiffDetection"
    172            try: self.scratchDb.execute(sql)
    173            except: raise
     165           #sql = "CREATE TABLE DiffMeta_"+str(num)+" like DiffMeta"
     166           #try: self.scratchDb.execute(sql)
     167           #except: raise
     168           #sql = "CREATE TABLE DiffToImage_"+str(num)+" like DiffToImage"
     169           #try: self.scratchDb.execute(sql)
     170           #except: raise
     171           #sql = "CREATE TABLE DiffDetection_"+str(num)+" like DiffDetection"
     172           #try: self.scratchDb.execute(sql)
     173           #except: raise
    174174
    175175
     
    199199        diffSkyFileID = self.number[num]
    200200        self.logger.infoPair("Proccesing table", "DiffMeta_"+str(num))
     201
     202        sql = "CREATE TABLE DiffMeta_"+str(num)+" like DiffMeta"
     203        try: self.scratchDb.execute(sql)
     204        except: raise
    201205
    202206        sqlLine = sqlUtility("INSERT INTO DiffMeta_"+str(num)+" (")
     
    246250        ippTableName =  "SkyChip_psf_"+str(num)
    247251        diffSkyFileID = self.number[num]
     252        sql = "CREATE TABLE DiffDetection_"+str(num)+" like DiffDetection"
     253        try: self.scratchDb.execute(sql)
     254        except: raise
    248255        #results['ORIGINALTOTAL'] = self.scratchDb.getRowCount(ippTableName)
    249256
     
    405412        self.logger.infoPair("Procesing table", "DiffToImage")
    406413
     414        sql = "CREATE TABLE DiffToImage_"+str(num)+" like DiffToImage"
     415        try: self.scratchDb.execute(sql)
     416        except: raise
     417        #sql = "CREATE TABLE DiffDetection_"+str(num)+" like DiffDetection"
     418        #try: self.scratchDb.execute(sql)
     419        #except: raise
    407420        imageIDs = self.gpc1Db.getImageIDsForThisDiffID(int(diffSkyFileID))
    408421
     
    481494               a.airmass      = b.airmass, \
    482495               a.expTime      = b.expTime, \
    483                a.infoFlag2    = (b.flags << 13) | a.infoFlag2 \
     496               a.infoFlag3    = b.flags \
    484497               WHERE a.ippDetectID = b.ippDetectID \
    485498               AND b.imageID = " + str(imageID)
  • trunk/ippToPsps/jython/forcedwarpbatch.py

    r38397 r38602  
    408408        sqlLine.group("a.telluricExt","b.telluricExt")
    409409        sqlLine.group("a.airmass","b.airmass")
     410        sqlLine.group("a.infoFlag3","b.flags")
    410411        sql = sqlLine.makeEquals("WHERE a.ippDetectID = b.ippDetectID AND b.imageID = " +str( imageID))
    411412        try: self.scratchDb.execute(sql)
  • trunk/ippToPsps/jython/stackbatch.py

    r38397 r38602  
    344344          #  sqlLine.group("a."+filter+"telluricExt",   "b.telluricExt")
    345345
    346             sqlLine.group("a."+filter+"infoFlag2",     "(b.flags << 13)")
     346            sqlLine.group("a."+filter+"infoFlag3",     "b.flags")
    347347            sql = sqlLine.makeEquals("WHERE a.objID = b.objID AND b.imageID = " + str(imageID) + " and a." + filter + "ippDetectID=b.ippDetectID")
    348348
  • trunk/ippToPsps/pspsschema/SchemaNew21.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/Detection

    r38397 r38602  
    5757infoFlag        dimensionless   INT     4       -999    flag indicating provenance information
    5858infoFlag2       dimensionless   INT     4       -999    flag indicating provenance information
     59infoFlag3       dimensionless   INT     4       -999    flag indicating provenance information
    5960dataRelease     dimensionless   TINYINT 1         NA    Data release when this detection was originally taken. Recalibrations do not affect this value.
    6061--
  • trunk/ippToPsps/pspsschema/SchemaNew21.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/Detection.txt

    r38397 r38602  
    5656skyErr          + smf:SKY_SIGMA / exptime
    5757infoFlag        + smf:FLAGS
    58 infoFlag2       + smf:FLAGS2 | (dvo.measure.flags << 13)
     58infoFlag2       + smf:FLAGS2
     59infoFlag3       + dvo.measure.flags
    5960dataRelease     + ippToPsps : user input (skychunk.dataRelease)
  • trunk/ippToPsps/pspsschema/SchemaNew21.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/DiffDetection

    r38397 r38602  
    6868infoFlag        dimensionless   INT     4       -999    flag indicating provenance information
    6969infoFlag2       dimensionless   INT     4       -999    flag indicating provenance information
     70infoFlag3       dimensionless   INT     4       -999    flag indicating provenance information
    7071dataRelease     dimensionless   TINYINT 1       NA      Data release when this detection was originally taken. Recalibrations do not affect this value.
  • trunk/ippToPsps/pspsschema/SchemaNew21.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/DiffDetection.txt

    r38397 r38602  
    6868infoFlag         = smf
    6969infoFlag2        = smf
     70infoFlag3        = dvo.measure db_flags
    7071dataRelease      = ipptopsps
    7172
  • trunk/ippToPsps/pspsschema/SchemaNew21.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/ForcedWarpMeasurement

    r38397 r38602  
    4949skyErr          adu/sec/pixel   REAL    4       -999    estimated error in sky
    5050infoFlag        dimensionless   BIGINT  8       -999    flag indicating provenance information
    51 infoFlag2        dimensionless   BIGINT  8       -999    FLAG2 | flags << 13
     51infoFlag2        dimensionless   BIGINT  8       -999    FLAG2
     52infoFlag3        dimensionless   BIGINT  8       -999    dvo measure flags
    5253dataRelease     dimensionless   TINYINT 1       NA      Data release when this detection was originally taken. Recalibrations do not affect this value.
    5354
  • trunk/ippToPsps/pspsschema/SchemaNew21.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/ForcedWarpMeasurement.txt

    r38397 r38602  
    4949skyErr           = smf:SKY_SIGMA / exptime
    5050infoFlag         = smf:FLAGS
    51 infoFlag2        = smf:FLAGS2 | (dvo.measure.flags << 13)
     51infoFlag2        = smf:FLAGS2
     52infoFlag3        = dvo.measure.flags
    5253dataRelease      = ipptopsps
  • trunk/ippToPsps/pspsschema/SchemaNew21.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/StackObjectThin

    r38397 r38602  
    3434ginfoFlag         dimensionless   INT      4          0    informational bits
    3535ginfoFlag2        dimensionless   INT      4          0    informational bits
     36ginfoFlag3        dimensionless   INT      4          0    informational bits
    3637gnFrames          dimensionless   INT      4       -999    Number of frames contributing to source
    3738
  • trunk/ippToPsps/pspsschema/SchemaNew21.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/StackObjectThin.txt

    r38397 r38602  
    3535gKronMagErr        + dvo = measure.dMkron
    3636ginfoFlag          + smf : FLAGS
    37 ginfoFlag2         - smf + dvo : FLAGS2 | measure.flags << 13 *** we only include measure.dbflags, not secfilt.flags
     37ginfoFlag2         - smf : FLAGS2
     38ginfoFlag3         - dvo.measure.db_flags
    3839gnFrames           + smf : N_FRAMES
Note: See TracChangeset for help on using the changeset viewer.