IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37586


Ignore:
Timestamp:
Nov 12, 2014, 12:05:37 PM (12 years ago)
Author:
heather
Message:

small schema tweaks, as well as we now populate stackDetectRowID in
stackObjectThin / stackObjectAttributes tables

Location:
trunk/ippToPsps
Files:
16 edited

Legend:

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

    r37249 r37586  
    9494        <DESCRIPTION>ODM diff object identifier</DESCRIPTION>
    9595      </FIELD>
    96       <FIELD name="diffgcobjID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
    97         <DESCRIPTION>galactic coordinates ODM object identifier</DESCRIPTION>
    98       </FIELD>
    9996      <FIELD name="diffDetID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
    10097        <DESCRIPTION>ODM diff detection identifier</DESCRIPTION>
  • trunk/ippToPsps/config/tables.DO.vot

    r36698 r37586  
    1111      <FIELD name="diffObjID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
    1212        <DESCRIPTION>ODM object identifier index</DESCRIPTION>
    13       </FIELD>
    14       <FIELD name="diffgcobjID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
    15         <DESCRIPTION>galactic coordinates ODM object identifier</DESCRIPTION>
    1613      </FIELD>
    1714      <FIELD name="ippObjID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
  • trunk/ippToPsps/config/tables.FO.vot

    r37475 r37586  
    1212        <DESCRIPTION>unique psps id</DESCRIPTION>
    1313      </FIELD>
    14       <FIELD name="gcobjID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
    15         <DESCRIPTION>galactic coordinates ODM object identifier</DESCRIPTION>
    16       </FIELD>
    1714      <FIELD name="ippObjID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
    1815        <DESCRIPTION>IPP object number</DESCRIPTION>
  • trunk/ippToPsps/config/tables.FW.vot

    r37475 r37586  
    118118        <DESCRIPTION>unique psps id</DESCRIPTION>
    119119      </FIELD>
    120       <FIELD name="gcobjID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
    121         <DESCRIPTION>galactic coordinates ODM object identifier</DESCRIPTION>
    122       </FIELD>
    123120      <FIELD name="detectID" arraysize="1" datatype="long" unit="dimensionless" default="NA">
    124121        <DESCRIPTION>ODM  detection identifier</DESCRIPTION>
  • trunk/ippToPsps/config/tables.P2.vot

    r37475 r37586  
    383383        <DESCRIPTION>ODM object identifier</DESCRIPTION>
    384384      </FIELD>
    385       <FIELD name="unique_psps_ob_id" arraysize="1" datatype="long" unit="dimensionless" default="NA">
     385      <FIELD name="unique_psps_p2_id" arraysize="1" datatype="long" unit="dimensionless" default="NA">
    386386        <DESCRIPTION>unique psps id</DESCRIPTION>
    387387      </FIELD>
  • trunk/ippToPsps/jython/stackbatch.py

    r37577 r37586  
    293293        self.generateRandomIDs()
    294294
     295        self.generateStackDetectRowIDs()
     296
    295297        # add indexes StackObjectThin
    296298        self.scratchDb.createIndex("StackObjectThin", "objID")
     
    382384        self.logger.infoPair("Procesing table", tablename)
    383385        self.insertDvoIDs(tablename, "StackObjectThin")
    384 
     386       
    385387        # if we are going to add a key, do it here so it is useful
    386388        self.scratchDb.createIndex(tablename, "objID")
     
    949951
    950952
     953    def generateStackDetectRowIDs(self):
     954        sql = "UPDATE StackObjectThin join (select @r:=@r+1 rownum, objID from \
     955        (select @r:=0) r, StackObjectThin t) as foo using (objID) set \
     956        stackDetectRowID = ((" + str(self.batchID) + " << 32 ) + rownum)";
     957        try: self.scratchDb.execute(sql)
     958        except:
     959            self.logger.errorPair('failed sql',sql)
     960            return
     961       
     962
    951963    '''
    952964    select objID (psps object ID) from dvo restricted to this set of imageIDs. also insert
     
    10081020            if (i < len(self.filters) - 1):
    10091021                fields += ", "
    1010        
     1022
     1023        if (table == "StackObjectAttributes"):
     1024            fields += "stackDetectRowID, "
    10111025        sql  = "INSERT INTO " + table + " (" + fields + ") "
    10121026        sql += "SELECT " + fields + " FROM " + mainTable
     
    10161030            self.logger.errorPair('failed sql',sql)
    10171031            return
    1018    
     1032
     1033
     1034       
    10191035    '''
    10201036    Does the processing, i.e. pulling stuff from IPP tables into PSPS tables
  • trunk/ippToPsps/pspsschema/SchemaNew19.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/DiffDetObject

    r37474 r37586  
    33diffObjID       dimensionless   BIGINT  8       NA      ODM object identifier index
    44unique_psps_do_id dimentionless BIGINT  8       NA      unique id provided by ipptopsps, based on batch_Id + counter
    5 diffgcObjID     dimensionless   BIGINT  8       NA      ODM galactic coordinates identifier
    65ippObjID        dimensionless   BIGINT  8       NA      IPP object number
    76surveyID        dimensionless   TINYINT 1       255     Survey ID
  • trunk/ippToPsps/pspsschema/SchemaNew19.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/DiffDetObject.txt

    r37474 r37586  
    33diffObjID        = dvo / addstar
    44unique_psps_do_id = ipptopsps
    5 diffgcObjID      = dvo / addstar
    65ippObjID         = dvo / addstar
    76surveyID         = ipptopsps
  • trunk/ippToPsps/pspsschema/SchemaNew19.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/DiffDetection

    r37474 r37586  
    22diffObjID       dimensionless   BIGINT  8       NA      diff object identifier
    33unique_psps_df_id dimensionless BIGINT  8       NA      unique psps id (combination of batch_id, and counter) provided by ipptopsps
    4 diffgcObjID     dimensionless   BIGINT  8       NA      ODM galactic coordinates identifier
    54diffDetID       dimensionless   BIGINT  8       NA      diff detection identifier
    65diffDetMetaID   dimensionless   BIGINT  8       NA      diff detection meta identifier
  • trunk/ippToPsps/pspsschema/SchemaNew19.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/DiffDetection.txt

    r37474 r37586  
    22diffObjID        = dvo / addstar
    33unique_psps_df_id = ipptopsps           
    4 diffgcObjID      = dvo / addstar
    54diffDetID        = dvo / addstar
    65diffDetMetaID    = dvo / addstar
  • trunk/ippToPsps/pspsschema/SchemaNew19.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/ForcedMeanObject

    r37474 r37586  
    22objID           dimensionless   BIGINT   8        NA    ODM object identifier index
    33unique_psps_fo_id dimensionless BIGINT   8        NA    unique id supplied by ipptopsps
    4 gcObjID         dimensionless   BIGINT   8        NA    ODM galactic coordinates identifier
    54ippObjID        dimensionless   BIGINT   8        NA    IPP object identifier
    65nDetections     dimensionless   SMALLINT 2      -999    total number of detection measurements in all filters
  • trunk/ippToPsps/pspsschema/SchemaNew19.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/ForcedMeanObject.txt

    r37524 r37586  
    22objID            = cpt.extID
    33unique_psps_fo_id  = ipptopsps
    4 gcobjID          = remove?
    54ippObjID         = cpt.objID | cpt.catID << 32
    65nDetections      = sql sum of cps.NCODE (xnTotal)
  • trunk/ippToPsps/pspsschema/SchemaNew19.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/ForcedWarpExtended

    r37474 r37586  
    22objID           dimensionless   BIGINT  8       NA      ODM object identifier
    33unique_psps_fw_id dimentionless BIGINT  8       NA      unique id supplied by ipptopsps
    4 gcObjID         dimensionless   BIGINT  8       NA      ODM galactic coordinates identifier
    54detectID        dimensionless   BIGINT  8       NA      ODM detection identifier
    65ippObjID        dimensionless   BIGINT  8       NA      ippobject id generated by IPP
  • trunk/ippToPsps/pspsschema/SchemaNew19.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/ForcedWarpExtended.txt

    r37524 r37586  
    22objID            = cpt.extID (???)
    33unique_psps_fw_id = ipptopsps
    4 gcObjID          = remove?
    54detectID         = cpm.extID (???)
    65ippObjID         = cpx.obj_ID | cpx.cat_ID << 32
  • trunk/ippToPsps/pspsschema/SchemaNew19.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/ForcedWarpMeasurement

    r37474 r37586  
    22objID           dimensionless   BIGINT  8       NA      ODM object identifier
    33unique_psps_fw_id dimensionless BIGINT  8       NA      unique identifier provided by ipptopsps
    4 gcObjID         dimensionless   BIGINT  8       NA      ODM galactic coordinates identifier
    54detectID        dimensionless   BIGINT  8       NA      ODM detection identifier
    65ippObjID        dimensionless   BIGINT  8       NA      ippobject id generated by IPP
  • trunk/ippToPsps/pspsschema/SchemaNew19.0/PSPS_TABLES/Fundamental_IPP_Data_Product_Tables/ForcedWarpMeasurement.txt

    r37524 r37586  
    22objID            = cpt.extID (???)
    33unique_psps_fw_id = ipptopsps
    4 gcObjID          = remove?
    54detectID         = cpm.extID (???)
    65ippObjID         = cpx.obj_id | cps.cat_id << 32
Note: See TracChangeset for help on using the changeset viewer.