Index: trunk/ippToPsps/jython/batch.py
===================================================================
--- trunk/ippToPsps/jython/batch.py	(revision 31348)
+++ trunk/ippToPsps/jython/batch.py	(revision 31350)
@@ -363,7 +363,7 @@
 
     '''
-    Exports PSPS tables from the database to FITS format
+    Exports PSPS tables from the database to FITS format. Optional regex if you want to alter table names prior to export
     '''    
-    def exportPspsTablesToFits(self):
+    def exportPspsTablesToFits(self, regex="(.*)"):
 
         self.logger.info("Exporting all PSPS tables to FITS")
@@ -384,6 +384,9 @@
            _table = stilts.tpipe(_table, cmd='replaceval "" -999 *')
 
+           match = re.match(regex, table)
+           newTableName = match.group(1)
+
            # change table names
-           _table = stilts.tpipe(_table, cmd='tablename ' + table)
+           _table = stilts.tpipe(_table, cmd='tablename ' + newTableName)
            _tables.append(_table)
 
