IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 8, 2014, 11:05:28 PM (12 years ago)
Author:
heather
Message:

schema 19

File:
1 edited

Legend:

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

    r37450 r37475  
    161161
    162162       self.dropTableVerbose("StackObjectThin")
    163        self.dropTableVerbose("StackObjectRaw")
     163       self.dropTableVerbose("StackObjectAttributes")
    164164       
    165165       self.dropTableVerbose("StackModelFitExtra")
     
    169169
    170170       self.dropTableVerbose("StackApFlx")
    171        self.dropTableVerbose("StackApFlxFull")
    172        self.dropTableVerbose("StackApFlxFullC1")
    173        self.dropTableVerbose("StackApFlxFullC2")
     171       self.dropTableVerbose("StackApFlxEGUnc")
     172       self.dropTableVerbose("StackApFlxEGCon6")
     173       self.dropTableVerbose("StackApFlxEGCon8")
    174174
    175175       self.dropTableVerbose("StackPetrosian")
     
    374374
    375375    '''
    376     Populates the StackObjectRaw table
    377     '''
    378     def populateStackObjectRaw(self):
    379 
    380         tablename = "StackObjectRaw"
     376    Populates the StackObjectAttributes table
     377    '''
     378    def populateStackObjectAttributes(self):
     379
     380        tablename = "StackObjectAttributes"
    381381
    382382        self.logger.infoPair("Procesing table", tablename)
     
    558558        # insert detection information for each filter based on the
    559559        # DVO contents.  Since I already have extracted
    560         # StackObjectRaw, this is probably faster using that table:
     560        # StackObjectAttributes, this is probably faster using that table:
    561561        sqlLine = sqlUtility("UPDATE " + tablename + " AS a, " + self.scratchDb.dvoDetectionTable + " as b SET")
    562562        sqlLine.group("a." + filter + model + "Mag",       "a." + filter + model + "Mag + b.zp")
     
    592592
    593593        # insert detection information for each filter based on the DVO contents
    594         sqlLine = sqlUtility("UPDATE " + tablename + " AS a, StackObjectThin as b, StackObjectRaw as c SET ")
     594        sqlLine = sqlUtility("UPDATE " + tablename + " AS a, StackObjectThin as b, StackObjectAttributes as c SET ")
    595595        sqlLine.group(extR, rawR + " - (" + extR + " - " + rawX + ")*" + rawS + " / 3600.0 / cos(radians(" + rawD + "))")
    596596        sqlLine.group(extD, rawD + " + (" + extD + " - " + rawY + ")*" + rawS + " / 3600.0")
     
    699699
    700700        for filter in self.filters:
    701             self.populateStackApFlxFilter(tablename, "", filter)
    702             self.populateStackApFlxFilter(tablename, "C1", filter)
    703             self.populateStackApFlxFilter(tablename, "C2", filter)
     701            self.populateStackApFlxFilter(tablename, "Unc", filter)
     702            self.populateStackApFlxFilter(tablename, "Con6", filter)
     703            self.populateStackApFlxFilter(tablename, "Con8", filter)
    704704
    705705        self.deleteRowsWithNoStackData(tablename)
     
    707707
    708708    '''
    709     Populates the StackApFlxFull table
    710     '''
    711     def populateStackApFlxFull(self, version):
    712 
    713         tablename = "StackApFlxFull" + version
     709    Populates the StackApFlxEG table
     710    '''
     711    def populateStackApFlxEG(self, version):
     712
     713        tablename = "StackApFlxEG" + version
    714714
    715715        if self.config.camera == "simtest":
     
    730730
    731731    '''
    732     Updates aperture fluxes for StackApFkx table
     732    Updates aperture fluxes for StackApFlx table
    733733    '''
    734734    def populateStackApFlxFilter(self, tablename, version, filter):
     
    737737
    738738        # order of the 3 convolutions is fixed (raw, C1, C2) = (1, 2, 3)
    739         if version == "":   
     739        if version == "Unc":   
    740740            psfCondition = "(b.table_index % 3 = 1)"
    741741            prefix = ""
    742         if version == "C1":
     742        if version == "Con6":
    743743            psfCondition = "(b.table_index % 3 = 2)"
    744             prefix = "c1"
    745         if version == "C2":
     744            prefix = "c6"
     745        if version == "Con8":
    746746            psfCondition = "(b.table_index % 3 = 0)"
    747             prefix = "c2"
     747            prefix = "c8"
    748748
    749749        if prefix == "none":
     
    10531053        self.populateStackObjectThin()
    10541054
    1055         self.populateStackObjectRaw()
     1055        self.populateStackObjectAttributes()
    10561056
    10571057        if self.stackType != "NIGHTLY_STACK":
     
    10701070            self.populateStackApFlx()
    10711071
    1072             self.populateStackApFlxFull("")
    1073             self.populateStackApFlxFull("C1")
    1074             self.populateStackApFlxFull("C2")
     1072            self.populateStackApFlxEG("Unc")
     1073            self.populateStackApFlxEG("Con6")
     1074            self.populateStackApFlxEG("Con8")
    10751075
    10761076        # delete rows with no content. for the other tables, this is done in
Note: See TracChangeset for help on using the changeset viewer.