Package wsatools :: Module Calibration
[hide private]

Module Calibration

source code

Calibration routines used by WFAU-product creating scripts and re-calibration scripts.


Author: N.J.G. Cross

Organization: WFAU, IfA, University of Edinburgh

Contributors:  

Classes [hide private]
  IllumTable
Reads in an illumination table and has functions to get dMag
Functions [hide private]
list(tuple(real, real, int))
_findAstromPhotomPairs(intData, deepData, isMosaic, compDict, isRecalMode, isTrialRun=False, poorerZP=[])
?
source code
numpy.array
_getMosaicIntData(intSourcesOfExt)
Produces array of intermediate data to compare to deep mosaic data.
source code
 
calcIllumCorrArray(illumTableData, xiArray, etaArray, frameType)
Calculate illumination correction
source code
dict(int: tuple(real, real, int))
checkAstrometryPhotometry(allIntData, deepData, isMosaic, compDict, isRecalMode=False, isTrialRun=False, poorerZP=[])
Tests whether astrometry and photometry is good enough.
source code
 
getIntermedPhotometry(compID, intPhotCounts, intStackPhotom, extNums, poorPhotList=None)
Calculate the photometry for the multiframe.
source code
Variables [hide private]
  __package__ = 'wsatools'
Function Details [hide private]

_findAstromPhotomPairs(intData, deepData, isMosaic, compDict, isRecalMode, isTrialRun=False, poorerZP=[])

source code 

?

Parameters:
  • intData (tuple(int, dict(int: numpy.array))) - Pair of multiframe ID and dictionary of corresponding FITS intermediate stack arrays (eNum, ra, dec, aMag3, aMag3Err) referenced by extension number.
  • deepData (list(tuple(int, numpy.array))) - List of pairs of extension numbers and corresponding FITS deep stack array (ra, dec, aMag3, aMag3Err).
  • isMosaic (bool) - If True the deep data represents a mosaic.
  • isRecalMode (bool) - Gives additional logging if recalibrating
  • compDict (dict(int, str)) - Dictionary of multiframeID: fileName
  • isTrialRun (bool) - Gives additional logging if trial run
  • poorerZP (list(int, smallint)) - List of lower quality calibrations
Returns: list(tuple(real, real, int))
List of zero-point values as a tuple (bestZP, bestZPErr, medNumZP) for each detector.
To Do:
  • Maybe use pairing code.
  • Mosaic - want to use more data - many ext in int.

_getMosaicIntData(intSourcesOfExt)

source code 

Produces array of intermediate data to compare to deep mosaic data.

Parameters:
  • intSourcesOfExt (dict(int: numpy.array)) - Dictionary of FITS intermediate stack arrays (eNum, ra, dec, aMag3, aMag3Err) referenced by extension number.
Returns: numpy.array
Array of intermediate data to compare to deep mosaic data.

checkAstrometryPhotometry(allIntData, deepData, isMosaic, compDict, isRecalMode=False, isTrialRun=False, poorerZP=[])

source code 

Tests whether astrometry and photometry is good enough.

Parameters:
  • allIntData (list(tuple(int, dict(int: numpy.array)))) - List of pairs of multiframe IDs and dictionaries of corresponding intermediate stack source measurements (ra, dec, aMag3, aMag3Err) referenced by extension number.
  • deepData (list(tuple(int, numpy.array))) - List of pairs of extension numbers and corresponding deep stack source measurements (ra, dec, aMag3, aMag3Err) ordered by extension number.
  • isMosaic (bool) - If True, the deep data represents a mosaic.
  • compDict (dict(int, str)) - Dictionary of multiframeID: fileName
  • isRecalMode (bool) - If True, recalibrating intermediates, else finding ZP for deep.
  • isTrialRun - If True, log additional test info,.
  • poorerZP (list(int, smallint)) - List of lower quality calibrations
  • istrialRun (bool)
Returns: dict(int: tuple(real, real, int))
Dictionary of zero-points (bestZP, bestZPErr, medNumZP) referenced by extension number.

getIntermedPhotometry(compID, intPhotCounts, intStackPhotom, extNums, poorPhotList=None)

source code 

Calculate the photometry for the multiframe.

Parameters:
  • intStackPhotom (numpy.array(tuple)) - Database query results as a numpy array.