Package helpers :: Module RedoFiles
[hide private]

Module RedoFiles

source code

Upload files from CASU, deprecate existing ones, update the databases and create a list for CU2 to 4.


Author: E. Sutorius

Organization: WFAU, IfA, University of Edinburgh

Functions [hide private]
str
getFreeDisk()
Get the disk with the most free disk space.
source code
dict(str, list(str))
getJpgDict(fileDict)
Get a dictionary of jpegs per date directory name.
source code
dict(str: list(str))
readFileList(fileName, casuSysDict)
Read the data from a log file containing FITS file names in CASU format.
source code
dict(str: (str, str))
readVersion(direc, archive, light)
Create a dictionary for each date containing the path and version number at CASU.
source code
 
usage() source code
 
main(argv) source code
Variables [hide private]
  __package__ = 'helpers'
Function Details [hide private]

getFreeDisk()

source code 

Get the disk with the most free disk space.

Returns: str
Disk name.

getJpgDict(fileDict)

source code 

Get a dictionary of jpegs per date directory name.

Parameters:
  • fileDict (dict) - A dictionary containig FITS file names per dateVersDir.
Returns: dict(str, list(str))
Dict containing jpg names for each dateDir.

readFileList(fileName, casuSysDict)

source code 

Read the data from a log file containing FITS file names in CASU format.

Parameters:
  • fileName (str) - Name of the file.
  • casuSysDict (dict) - Dictionary containing CASU dir info.
Returns: dict(str: list(str))
Dict containing the file names for each date.

readVersion(direc, archive, light)

source code 

Create a dictionary for each date containing the path and version number at CASU.

Parameters:
  • direc (str) - CASU directory name.
  • light (bool) - Flag if UKLight is used.
Returns: dict(str: (str, str))
Dict containing path and version number tuples for each directory.