IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 22, 2011, 1:37:34 PM (15 years ago)
Author:
rhenders
Message:

added ability to change table names prior to export to FITS using a regex

File:
1 edited

Legend:

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

    r31348 r31350  
    363363
    364364    '''
    365     Exports PSPS tables from the database to FITS format
     365    Exports PSPS tables from the database to FITS format. Optional regex if you want to alter table names prior to export
    366366    '''   
    367     def exportPspsTablesToFits(self):
     367    def exportPspsTablesToFits(self, regex="(.*)"):
    368368
    369369        self.logger.info("Exporting all PSPS tables to FITS")
     
    384384           _table = stilts.tpipe(_table, cmd='replaceval "" -999 *')
    385385
     386           match = re.match(regex, table)
     387           newTableName = match.group(1)
     388
    386389           # change table names
    387            _table = stilts.tpipe(_table, cmd='tablename ' + table)
     390           _table = stilts.tpipe(_table, cmd='tablename ' + newTableName)
    388391           _tables.append(_table)
    389392
Note: See TracChangeset for help on using the changeset viewer.