Package invocations :: Package cu7 :: Module cu7 :: Class Cu7
[hide private]

Class Cu7

source code


Create/update merged source catalogue for a given programme.

Nested Classes [hide private]
    Nested Errors and Exceptions

Inherited from wsatools.DbConnect.CuSession.CuSession: CuError

Instance Methods [hide private]
 
_onRun(self)
Create/update merged source catalogue.
source code
SourceMerger.FrameSet
_createFrameSet(self, nextFrameSetID, matchingFrames, availableFrames)
Creates a new frame set with the given frameSetID out of the given list of frames in the same pointing.
source code
list(Frame)
_getAvailableFrames(self, frameSets)
Extract from the programme's associated image frame table all the frames that should have catalogues and are available for merging.
source code
list(SourceMerger.FrameSet)
_makeNewFrameSets(self)
Create lists of frame sets that are new and/or are to be updated.
source code
int
_modalExtNum(self, frameSet)
Returns: The most common extension number in the frame set.
source code
Frame
_pickBestFrame(self, frames, passNum, numEpochs, centrePos)
Returns the most suitable frame, given a list of frames of the same colour.
source code
SourceMerger.FrameSet
_updateFrameSet(self, frameSet, matchingFrames, availableFrames)
Determines whether the given frame set should be updated with the given frames.
source code

Inherited from wsatools.SourceMerger.SourceMerger: deprecateOldFrameSets, mergeSources, reseamSources

Inherited from wsatools.DbConnect.CuSession.CuSession: __del__, __init__, logBrokenFile, run

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

Static Methods [hide private]

Inherited from wsatools.DbConnect.CuSession.CuSession: logException

Class Variables [hide private]
  cuNum = 7
Curation task number.
  epochTolerance = {101: 550, 102: 730, 103: 550}
Minimum duration in days between separate epochs for each programme.
  _matchExtensions = True
Option to match extension numbers when doing the frame association into frame sets.
  createNewTable = False
Destroy the existing source table and start from scratch?
  enableIngest = True
Ingest results into database?
  isMultiEpoch = True
Consider multiple epochs when associating frame sets?
  onlyMerge = False
Only update the source table with newly merged sources without reseaming?
  onlyReseam = False
Only reseam sources?
  prepareOnly = False
Only prepare the framesets and update mergelog, without source merging?
  skipQualityCheck = False
Override quality bit flag check?
  _frameData = None
A complete set of frame data for the current programme as a dictionary referenced by a multiframeID, extNum pair

Inherited from wsatools.SourceMerger.SourceMerger: commencementMessage, continueCompleteReseam, dateRange, doCompleteReseam, freeCacheInterval, minEpochSep, seamErrorBitMask, seamingPairCriterion, swVersion

Inherited from wsatools.DbConnect.CuSession.CuSession: archive, comment, cuEventID, curator, eTypes, isDayStampedLog, onlyNonSurveys, onlySurveys, programme, programmeID, resultsFilePathName, shareFileID, sysc

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

_onRun(self)

source code 

Create/update merged source catalogue.

Overrides: wsatools.DbConnect.CuSession.CuSession._onRun

_createFrameSet(self, nextFrameSetID, matchingFrames, availableFrames)

source code 

Creates a new frame set with the given frameSetID out of the given list of frames in the same pointing. Also, updates availableFrames as required.

Parameters:
  • nextFrameSetID (int) - Unique ID to assign to the new frame set.
  • matchingFrames (list(Frame)) - Candidate frames of the same position to form the frame set from.
  • availableFrames (list(Frame)) - A complete list of frames currently available for merging.
Returns: SourceMerger.FrameSet
The new frame set.

_getAvailableFrames(self, frameSets)

source code 

Extract from the programme's associated image frame table all the frames that should have catalogues and are available for merging. If there exists any deep frames for a given filter then only deep frames will be selected for that filter. Any frames that are part of existing non-deprecated frame-sets will be removed.

Parameters:
  • frameSets (list(FrameSet)) - List of existing non-deprecated frame sets.
Returns: list(Frame)
Frame metadata for mergeable frames.

_makeNewFrameSets(self)

source code 

Create lists of frame sets that are new and/or are to be updated. Checks for updates to existing frame sets, deleting stack items as they are checked off or merged in. Creates new frame sets as appropriate based on available frames, deleting stack items as they are merged in. Reports a warning for all current frames that have not been merged in (for whatever reason); also logs successful integration of frames into frame sets.

Note that since the original versions of this algorithm, new features have been incorporated to give an option for matching detector frame extension numbers in addition to the usual proximity match.

Returns: list(SourceMerger.FrameSet)
List of new frame sets.

_modalExtNum(self, frameSet)

source code 
Parameters:
  • frameSet (list(SourceMerge.FrameSet)) - Merge log record of a frame set
Returns: int
The most common extension number in the frame set.

_pickBestFrame(self, frames, passNum, numEpochs, centrePos)

source code 

Returns the most suitable frame, given a list of frames of the same colour. The frame that is closest to the supplied centre position is returned if only one epoch of observation. Otherwise, for multi-epoch observations, the most recently observed frame is returned.

Parameters:
  • frames (list(Frame)) - List of potential frames, in chronological order.
  • passNum (int) - The pass number (1st, 2nd, ...).
  • numEpochs (int) - The number of passes for this colour.
  • centrePos (tuple(float, float)) - Frame set centre position in degrees (RA, Dec).
Returns: Frame
Frame of most suitable epoch for multiple epoch filters else closest frame to supplied RA and Dec. If there isn't a suitable frame then None is returned.

_updateFrameSet(self, frameSet, matchingFrames, availableFrames)

source code 

Determines whether the given frame set should be updated with the given frames. If so, the updated frame set is returned.

Parameters:
  • frameSet (SourceMerger.FrameSet) - Frame set to update.
  • matchingFrames (list(Frame)) - Candidate frames of the same position to update the frame set with.
  • availableFrames (list(Frame)) - A complete list of frames currently available for merging.
Returns: SourceMerger.FrameSet
The updated frame set, or None.

Class Variable Details [hide private]

epochTolerance

Minimum duration in days between separate epochs for each programme. Normally this would be two years for UKIDSS surveys.

Value:
{101: 550, 102: 730, 103: 550}

_matchExtensions

Option to match extension numbers when doing the frame association into frame sets. Presently, all surveys can use this additional feature to avoid incorrect frame association in the presence of highly non-uniform tiling resulting from guide star limited tile placement in the SDT.

Value:
True