Package invocations :: Package cu2 :: Module CreateJpgThumbs :: Class CreateJpgThumbs
[hide private]

Class CreateJpgThumbs

source code


Create JPG thumbnails pages for (external) QC.

Nested Classes [hide private]

Inherited from wsatools.DbConnect.IngCuSession.IngCuSession: IngCuError

Instance Methods [hide private]
 
__init__(self, curator='rsc', database='WSA', beginDate=False, endDate=False, versionStr=False, surveyNames=False, cleanUp=False, fromFile=False, numThreads=False, isTrialRun=False, comment='A useful comment')
Initialises data members for all database state flags and details for this curation session.
source code
 
_onRun(self)
Create thumbnails.
source code
 
_getJpgDict(self, startDate, endDate, versionStr)
Create a dictionary of JPGs per day and survey.
source code
 
_createThumbs(self, jpgDateDict)
Create thumbnails from existing JPGs.
source code
 
_createHtml(self, semester) source code
 
_getRating(self, fileName) source code
 
_startPage(self, htmlFileName, pageCounter, dataLength, progName, date, htmlLink) source code
 
_endPage(self, htmlFile, pageLinks) source code
 
_createTopHtml(self, webPageDict, semester, versionList) source code
 
_createPageLinks(self, currentPage, dataLengthDict) source code
 
_cleanUp(self, nameRegExp) source code

Inherited from wsatools.DbConnect.IngCuSession.IngCuSession: __del__, attributesFromArguments, createFileList, createLogFileName, createMonthlyDetSchema, createWorkingDir, getDetTable, getErrorFileName, getMultiframeIDs, getProcessOrder, getProgramIDs, makeSysCmd, removeWorkingDir, run, runSysCmd, setupDetectionTable, testForProgs, translateProgID, writeErrorFiles, writeIngestList

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]

Inherited from wsatools.DbConnect.IngCuSession.IngCuSession: createFilePrefix

Class Variables [hide private]
  overwrite = False
hash(x)
  onlyHTML = False
hash(x)
  _surveyNameDef = 'ukidss'
  _jpgThumbPath = '/disk08/%s/products/jpgthumbs'
  _thSize = 192
  _thPerPage = 100
  fitsRatings = {'science': 50, 'sciconf': 55, 'stack': 10, 'con...
  fitsTypes = {'basic': ['misc', 'calib'], 'conf': ['_conf', 'st...

Inherited from wsatools.DbConnect.IngCuSession.IngCuSession: beginDateDef, endDateDef, keepWorkDir, reqWorkDir, sysc

Instance Variables [hide private]
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, curator='rsc', database='WSA', beginDate=False, endDate=False, versionStr=False, surveyNames=False, cleanUp=False, fromFile=False, numThreads=False, isTrialRun=False, comment='A useful comment')
(Constructor)

source code 

Initialises data members for all database state flags and details for this curation session. Writes a database lock and opens a connection. Also initiates a Programme table object.

Parameters:
  • beginDate (int) - First date to process, eg. 20050101.
  • cleanUp (bool) - Remove HTML files before processing.
  • comment (str) - Descriptive comment as to why curation task is being performed.
  • endDate (int) - Last date to process, eg. 20050131.
  • fromFile (str) - Pickled list of existing JPGs.
  • isTrialRun (bool) - If True, do not perform database modifications.
  • numThreads (int) - Number of multiprocessing threads.
  • surveyNames (list(str)) - List of surveys to process
  • versionStr (str) - Version number of the data or 'all' or 'last'.
Overrides: object.__init__

_onRun(self)

source code 

Create thumbnails.

Overrides: wsatools.DbConnect.IngCuSession.IngCuSession._onRun

Class Variable Details [hide private]

fitsRatings

Value:
{'science': 50, 'sciconf': 55, 'stack': 10, 'conf': 30, 'basic': 90}

fitsTypes

Value:
{'basic': ['misc', 'calib'],
 'conf': ['_conf', 'stack conf'],
 'sciconf': ['_conf', 'normal conf'],
 'science': ['w20', 'normal'],
 'stack': ['_st', 'stack']}