Package wsatools :: Module QualityControl :: Class MosaicCrossTalkFlagger
[hide private]

Class MosaicCrossTalkFlagger

source code


Derivation of the CrossTalkFlagger for mosaic images.

Nested Classes [hide private]
  Artefact
A cross-talk artefact defined by its (x, y) position and radius.
  CrossTalk
Definition of cross-talk produced by star of brightness j_m and expected radii (in pixels) of artefacts of each order.
    Errors & Exceptions

Inherited from CrossTalkFlagger: MissingStarError

Instance Methods [hide private]
 
run(self)
Runs the cross-talk flagging algorithm on every mosaic image that has unflagged detections.
source code
list(tuple(int, int))
_getMultiframeList(self)
Finds component multiframes of the mosaic currently being flagged.
source code
list(float)
_calcArtefactRadius(self, j_m, _artErr, xPixSize, _pixFactor)
Returns the radii in degrees for each order of cross-talk artefact for a star of given brightness (j_m).
source code
list(Artefact(tuple(float, float), float))
_createStripList(self, x1, x2, artRad, artSpacing, size, isXY)
Determines the list of artefacts in the one-dimension (both directions) from a given position of a bright star on the detector image.
source code
int
_flagDetector(self, artefacts, mfID, extNum)
Detections from individual component frames of the mosaic are not flagged.
source code
 
_commitMultiframe(self, mfID)
No need to commit individual stack frames for the mosaic flagger.
source code

Inherited from CrossTalkFlagger: __init__

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

Class Variables [hide private]
  artPosErr = 0.2
Fuzziness of artefact positions.
  magLim = 17
2MASS J-band magnitude limit for star to create cross-talk.
  udsArtRads = [CrossTalk(j_m=7.0, radii=[50, 50, 50, 50, 50, 50...
UDS artefact radius grid.
  _mosaicArtefacts = None
Set of artefacts identified in mosaic.
  _mosaicMfID = None
MultiframeID of mosaic currently being flagged.

Inherited from CrossTalkFlagger: avoidDenseFields, bitMask, densityLimit, roundingErr, searchErr

Inherited from CrossTalkFlagger (private): _detTable, _twomass, _updater

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

run(self)

source code 

Runs the cross-talk flagging algorithm on every mosaic image that has unflagged detections.

Overrides: CrossTalkFlagger.run

_getMultiframeList(self)

source code 

Finds component multiframes of the mosaic currently being flagged.

Returns: list(tuple(int, int))
List of multiframeIDs with number of microsteps.
Overrides: CrossTalkFlagger._getMultiframeList

_calcArtefactRadius(self, j_m, _artErr, xPixSize, _pixFactor)

source code 

Returns the radii in degrees for each order of cross-talk artefact for a star of given brightness (j_m). The error in the position of the bright star, artErr, is not considered for the UDS mosaic as this can be too large for bright stars, and the image contains no examples of 2MASS stars decoupled into multiple point sources by WFCAM.

Returns: list(float)
List of radii in degrees for each order of artefact.
Overrides: CrossTalkFlagger._calcArtefactRadius

_createStripList(self, x1, x2, artRad, artSpacing, size, isXY)

source code 

Determines the list of artefacts in the one-dimension (both directions) from a given position of a bright star on the detector image. The algorithm keeps appending cross-talk artefact positions to the list until the edge of each the detector quadrant is reached.

Parameters:
  • x1 (float) - Position of bright cross-talk producing star in the dimension along-which artefacts will be produced for this position on the detector.
  • x2 (float) - Position of bright cross-talk producing star in the other dimension.
  • artRad (list(float)) - List of cross-talk artefact radii (pixels) of each order.
  • artSpacing (float) - Absolute spacing in pixels between artefacts in this detector image.
  • size (float) - Width of the detector image along the x1-dimension.
  • isXY (bool) - If True, then x1=x, x2=y, to find cross-talk artefacts along the x-dimension of the detector, otherwise x1=y, x2=x to find artefacts along the y-dimension.
Returns: list(Artefact(tuple(float, float), float))
List of artefact (x, y) positions and radii (degrees) for a single one-dimensional strip.
Overrides: CrossTalkFlagger._createStripList

_flagDetector(self, artefacts, mfID, extNum)

source code 

Detections from individual component frames of the mosaic are not flagged. So this function just maintains a grand total list of artefact positions on mosaic image to be updated. All positions from the same detector are converted from pixel (X, Y) to sky (RA, Dec) coordinates (for that detector's WCS values), which are used to flag the mosaic detections.

Returns: int
Number of detections flagged.
Overrides: CrossTalkFlagger._flagDetector

_commitMultiframe(self, mfID)

source code 

No need to commit individual stack frames for the mosaic flagger.

Overrides: CrossTalkFlagger._commitMultiframe

Class Variable Details [hide private]

artPosErr

Fuzziness of artefact positions. This is used to overcome rounding errors in artefact positions, so that an artefact at the same position and size from many frames is not duplicated. This reduces the length of the SQL statement required to update all mosaic artefact positions. This shouldn't be too large else the flagging becomes inaccurate, and so is empirically determined by reducing precision until the reduction in the number of duplicate artefacts becomes small and the change in the number of flagged artefacts is minimised.

Value:
0.2

udsArtRads

UDS artefact radius grid. Radius in pixels for given j_m.

Value:
[CrossTalk(j_m=7.0, radii=[50, 50, 50, 50, 50, 50, 50]),
 CrossTalk(j_m=8.5, radii=[30, 25, 25, 25, 25, 25, 25]),
 CrossTalk(j_m=9.5, radii=[20, 15, 15, 15, 15, 15, 15]),
 CrossTalk(j_m=11.5, radii=[15, 10, 10, 6, 6, 6, 6]),
 CrossTalk(j_m=12.5, radii=[12, 6, 6, 6, 6, 3, 3]),
 CrossTalk(j_m=13.0, radii=[10, 6, 6, 3, 3, 3, 0]),
 CrossTalk(j_m=13.5, radii=[10, 6, 3, 3, 3, 0, 0]),
 CrossTalk(j_m=14.0, radii=[8, 6, 3, 3, 0, 0, 0]),
...