Common database queries used by many CUs.
Note:
Please put all newly added functions in alphabetical order for ease
of maintenance.
Author:
N.C. Hambly & I.A. Bond
Organization:
WFAU, IfA, University of Edinburgh
Contributors:
J. Bryant, R.S. Collins, N.J.G. Cross, E. Sutorius
|
|
dict(str: list(int))
|
|
list(str)
|
getAllDBs(serverName,
includeTestDBs=False,
archive=' ALL ' )
Retrieves the list of all released databases on a given server. |
source code
|
|
set(int)
|
getAllFieldObs(db,
ra,
dec,
dlRaDec,
filterID,
programmeID,
frameType,
dateRange=DateRange(begin=<mx.DateTime.DateTime object for '1753-01-01 0... ,
nustep=None,
offsetPos=-1,
deprecated=' deprecated IN (0, 50, 51) ' ,
noDeeps=False,
onlyTileComps=False,
getConfToo=False)
Selects a list of multiframeIDs of given frame type in a certain
direction, through a certain filter and in a certain programmeID. |
source code
|
|
set(int)
|
getAllFieldObsProd(db,
productList,
programmeID,
frameType,
dateRange=DateRange(begin=<mx.DateTime.DateTime object for '1753-01-01 0... ,
deprecated=' deprecated IN (0, 50, 51) ' ,
noDeeps=False,
onlyTileComps=False,
getConfToo=False)
Selects a list of multiframeIDs of given frame type in a certain
direction, through a certain filter and in a certain programmeID. |
source code
|
|
str
|
getBBFilter(db,
nbFilterName,
programmeID)
Retrieves broad band filter that overlaps the given narrow band
filter. |
source code
|
|
|
getFieldID(db,
frameSetID,
progTable)
Find fieldID of given frame set. |
source code
|
|
|
getFrameSetID(db,
fieldID,
progTable)
Find fieldID of given frame set. |
source code
|
|
tuple(str, list(str))
|
getFrameSelection(imageType,
noDeeps=False,
deepOnly=False,
alias='
' ,
selType=' %stack ' )
Returns:
Frame type selections for image types. |
source code
|
|
|
getFrameSetGroups(programme,
frameSets,
otherDB=None)
Group frame sets into those that share the same files. |
source code
|
|
|
|
set(int)
|
getIntStacks(db,
progID,
reqProdIDs,
prodType,
dateRange,
allNuStep=True,
intFrameType=' stack ' ,
returnAsProdIDDict=False,
getConfToo=False)
Retrieves multiframe IDs for the intermediate stacks that will form
the given range of deep products over the given time frame. |
source code
|
|
SelectSQL
|
getMultiframes(programme,
dateRange,
fieldIDs=None,
deprecated=' deprecated IN (0, 50, 51) ' ,
prodType=' all ' ,
useDeeps=True,
otherDB=None)
Returns SQL query to select multiframe IDs of images of a particular
type from a given programme, with the option of restricting to
certain field IDs. |
source code
|
|
SelectSQL
|
getFrameSetIDs(programme,
fieldIDs=None,
otherDB=None)
Returns SQL query to select all frame set IDs of a given programme,
with the option of restricting to certain field IDs. |
source code
|
|
SelectSQL
|
getSourceIDs(programme,
fieldIDs,
otherDB=None)
Returns SQL query to select all source IDs of a given programme, with
the option of restricting to certain field IDs. |
source code
|
|
SelectSQL
|
getSynFrameSetIDs(programme,
dateRange,
fieldIDs=None,
otherDB=None)
Returns SQL query to select all synoptic frame set IDs of a given
programme, with the option of restricting to certain field IDs. |
source code
|
|
|
|
tuple(set, set)
|
|
tuple(set, set)
|
|
dict(str: bool)
|
getRedoStatus(db,
programmeID,
redoProducts)
Works out the redo status, based on the list of products to be redone
and their descendants. |
source code
|
|
list(int)
|
getRequiredProductIDs(programme,
minProdID=None,
maxProdID=None,
reqProdIDs=None,
fieldIDs=None,
productType=None,
whereStr='
' ,
otherDB=None)
Find required products of given type. |
source code
|
|
set(int) or tuple(set(tuple), set(int))
|
getStacks(db,
programmeID,
inputImages,
prodID,
onlyMfIDs=False,
number=None,
nonDepOnly=True,
productMfID=None)
Queries database for combined stacks for all the given normal images. |
source code
|
|