IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 2, 2011, 11:09:19 PM (15 years ago)
Author:
rhenders
Message:

Added regular expression filter to IPP table import method

File:
1 edited

Legend:

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

    r31114 r31117  
    163163    '''
    164164    Imports IPP tables from FITS file
    165     '''
    166     def importIppTables(self):
     165
     166    Accepts a regular expression filter so not all tabls need to be imported
     167    '''
     168    def importIppTables(self, filter):
    167169
    168170      tables = stilts.treads(self.inputFitsPath)
    169171
     172      count = 0
    170173      for table in tables:
     174
     175          match = re.match(filter, table.name)
     176          if not match: continue
    171177          self.log("Creating IPP table " + table.name)
    172178          table = stilts.tpipe(table, cmd='explodeall')
     
    176182              self.log("ERROR problem writing table '" + table.name + "' to the database")
    177183
     184          count = count + 1
     185
     186      self.log("Imported %d tables from '%s' " % (count, self.inputFitsPath))
     187
    178188      self.indexIppTables()
    179189
Note: See TracChangeset for help on using the changeset viewer.