IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39728 for trunk


Ignore:
Timestamp:
Sep 29, 2016, 10:55:56 AM (10 years ago)
Author:
heather
Message:

fixes to stackbatch to make uniq stackToImage entries

File:
1 edited

Legend:

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

    r39649 r39728  
    733733        # sersic fit has an extra parameter
    734734        if (ippModelType == "PS_MODEL_SERSIC"):
    735             sqlLine.group("a." + filter + model + "Nu",    "1 / (2.0 * b.EXT_PAR_07)")
    736             sqlLine.group("a." + filter + model + "NuErr", "'0.1'") # this is not measured at the moment
     735            testSQL = 'show columns FROM rSkyChip_xfit LIKE "EXT_PAR_07"'
     736            have_ext_par_07 = 1
     737            try:
     738                rs = self.scratchDb.execute(sql)
     739            except:
     740                have_ext_par_07 = 0
     741            if have_ext_par_07 == 1:
     742                sqlLine.group("a." + filter + model + "Nu",    "1 / (2.0 * b.EXT_PAR_07)")
     743                sqlLine.group("a." + filter + model + "NuErr", "'0.1'") # this is not measured at the moment
     744
     745            ### I think, if ippModelType = PS_MODEL_SERSIC, and EXT_PAR_07 does not exist, then Nu, Nerr = null
     746           
    737747
    738748        # missing these two fields?
     
    15321542        self.logger.infoPair("populating","StackToFrame")
    15331543        self.populateStackToFrame()
    1534        
     1544        self.logger.infoPair("removing frameID"," duplicates")
     1545        self.scratchDb.execute("ALTER IGNORE TABLE StackToFrame ADD UNIQUE INDEX(frameID)")
     1546
    15351547        self.setMinMaxObjID(["StackObjectThin"])
    15361548
Note: See TracChangeset for help on using the changeset viewer.