Package helpers :: Module UpdateFitsFileNames
[hide private]

Module UpdateFitsFileNames

source code

Updates fileName and catName in the given databases from the DB 'disk??' value to the given disk.


Author: E. Sutorius

Organization: WFAU, IfA, University of Edinburgh

Classes [hide private]
  UpdateFits
Updates fileName and catName in the given databases.
Functions [hide private]
 
deprecateFileNames(archive, mfIDList)
Deprecate the frames in the multiframeID list.
source code
list(str)
getAvailDBs(archive, mainServer, databases=None)
Get all or selected DBs from given server.
source code
 
updateDBFileNames(archive, mfDict, updateFile)
Update the database entries for fileName and catName.
source code
Variables [hide private]
  __package__ = 'helpers'
Function Details [hide private]

deprecateFileNames(archive, mfIDList)

source code 

Deprecate the frames in the multiframeID list.

Parameters:
  • archive (DbSession) - Connection to database to update.
  • mfIDList (list) - List of MultiframeIDs.

getAvailDBs(archive, mainServer, databases=None)

source code 

Get all or selected DBs from given server.

Parameters:
  • archive (str) - The archive to be updated, e.g. WSA.
  • mainServer (str) - The server to query for databases, can be the name or the synonym, e.g. dbload or dbpub (for all public servers).
  • databases (sequence(str)) - Optionally request specific database names else all are returned.
Returns: list(str)
List of full paths to databases on selected server.

updateDBFileNames(archive, mfDict, updateFile)

source code 

Update the database entries for fileName and catName.

Parameters:
  • archive (DbSession) - Connection to database to update.
  • mfDict (dict(int:list(str))) - Dictionary giving fileName, catName tuples for every MfID.
  • updateFile (File obj) - Write to this file for read only DBs.