LSST Applications g0fba68d861+bb7a7cfa1f,g1ec0fe41b4+f536777771,g1fd858c14a+470a99fdf4,g216c3ac8a7+0d4d80193f,g35bb328faa+fcb1d3bbc8,g4d2262a081+23bd310d1b,g53246c7159+fcb1d3bbc8,g56a49b3a55+369644a549,g5a012ec0e7+3632fc3ff3,g60b5630c4e+3bfb9058a5,g67b6fd64d1+ed4b5058f4,g78460c75b0+2f9a1b4bcd,g786e29fd12+cf7ec2a62a,g8180f54f50+60bd39f3b6,g8352419a5c+fcb1d3bbc8,g87d29937c9+57a68d035f,g8852436030+4699110379,g89139ef638+ed4b5058f4,g9125e01d80+fcb1d3bbc8,g94187f82dc+3bfb9058a5,g989de1cb63+ed4b5058f4,g9ccd5d7f00+b7cae620c0,g9d31334357+3bfb9058a5,g9f33ca652e+00883ace41,gabe3b4be73+1e0a283bba,gabf8522325+fa80ff7197,gb1101e3267+27b24065a3,gb58c049af0+f03b321e39,gb89ab40317+ed4b5058f4,gc0af124501+708fe67c54,gcf25f946ba+4699110379,gd6cbbdb0b4+bb83cc51f8,gde0f65d7ad+acd5afb0eb,ge1ad929117+3bfb9058a5,ge278dab8ac+d65b3c2b70,ge410e46f29+ed4b5058f4,gf5e32f922b+fcb1d3bbc8,gf67bdafdda+ed4b5058f4,w.2025.17
LSST Data Management Base Package
|
Public Member Functions | |
__init__ (self, ampNames=[], ptcFitType=None, covMatrixSide=1, covMatrixSideFullCovFit=None, **kwargs) | |
setAmpValuesPartialDataset (self, ampName, inputExpIdPair=(-1, -1), inputExpPairMjdStart=np.nan, rawExpTime=np.nan, rawMean=np.nan, rawVar=np.nan, rowMeanVariance=np.nan, photoCharge=np.nan, ampOffset=np.nan, expIdMask=False, covariance=None, covSqrtWeights=None, gain=np.nan, noise=np.nan, overscanMedianLevel=np.nan, histVar=np.nan, histChi2Dof=np.nan, kspValue=0.0) | |
setAuxValuesPartialDataset (self, auxDict) | |
updateMetadata (self, **kwargs) | |
fromDict (cls, dictionary) | |
toDict (self) | |
fromTable (cls, tableList) | |
toTable (self) | |
fromDetector (self, detector) | |
appendPartialPtc (self, partialPtc) | |
sort (self, sortIndex) | |
getExpIdsUsed (self, ampName) | |
getGoodAmps (self) | |
getGoodPoints (self, ampName) | |
validateGainNoiseTurnoffValues (self, ampName, doWarn=False) | |
evalPtcModel (self, mu) | |
requiredAttributes (self) | |
requiredAttributes (self, value) | |
__str__ (self) | |
__eq__ (self, other) | |
metadata (self) | |
getMetadata (self) | |
setMetadata (self, metadata) | |
updateMetadataFromExposures (self, exposures) | |
calibInfoFromDict (self, dictionary) | |
determineCalibClass (cls, metadata, message) | |
readText (cls, filename, **kwargs) | |
writeText (self, filename, format="auto") | |
readFits (cls, filename, **kwargs) | |
writeFits (self, filename) | |
validate (self, other=None) | |
apply (self, target) | |
Public Attributes | |
str | ptcFitType = ptcFitType |
ampNames = ampNames | |
covMatrixSide = covMatrixSide | |
covMatrixSideFullCovFit = covMatrixSide | |
list | badAmps = [] |
dict | inputExpIdPairs = {ampName: [] for ampName in ampNames} |
dict | inputExpPairMjdStartList = {ampName: np.array([]) for ampName in ampNames} |
dict | expIdMask = {ampName: np.array([], dtype=bool) for ampName in ampNames} |
dict | rawExpTimes = {ampName: np.array([]) for ampName in ampNames} |
dict | rawMeans = {ampName: np.array([]) for ampName in ampNames} |
dict | rawVars = {ampName: np.array([]) for ampName in ampNames} |
dict | rowMeanVariance = {ampName: np.array([]) for ampName in ampNames} |
dict | photoCharges = {ampName: np.array([]) for ampName in ampNames} |
dict | ampOffsets = {ampName: np.array([]) for ampName in ampNames} |
dict | gain = {ampName: np.nan for ampName in ampNames} |
dict | gainUnadjusted = {ampName: np.nan for ampName in ampNames} |
dict | gainErr = {ampName: np.nan for ampName in ampNames} |
dict | gainList = {ampName: np.array([]) for ampName in ampNames} |
dict | overscanMedianLevelList = {ampName: np.array([]) for ampName in ampNames} |
dict | overscanMedian = {ampName: np.nan for ampName in ampNames} |
dict | overscanMedianSigma = {ampName: np.nan for ampName in ampNames} |
dict | noiseList = {ampName: np.array([]) for ampName in ampNames} |
dict | noise = {ampName: np.nan for ampName in ampNames} |
dict | noiseErr = {ampName: np.nan for ampName in ampNames} |
dict | histVars = {ampName: np.array([]) for ampName in ampNames} |
dict | histChi2Dofs = {ampName: np.array([]) for ampName in ampNames} |
dict | kspValues = {ampName: np.array([]) for ampName in ampNames} |
dict | ptcFitPars = {ampName: np.array([]) for ampName in ampNames} |
dict | ptcFitParsError = {ampName: np.array([]) for ampName in ampNames} |
dict | ptcFitChiSq = {ampName: np.nan for ampName in ampNames} |
dict | ptcTurnoff = {ampName: np.nan for ampName in ampNames} |
dict | ptcTurnoffSamplingError = {ampName: np.nan for ampName in ampNames} |
dict | covariances = {ampName: np.array([]) for ampName in ampNames} |
dict | covariancesModel = {ampName: np.array([]) for ampName in ampNames} |
dict | covariancesSqrtWeights = {ampName: np.array([]) for ampName in ampNames} |
dict | aMatrix = {ampName: np.array([]) for ampName in ampNames} |
dict | bMatrix = {ampName: np.array([]) for ampName in ampNames} |
dict | noiseMatrix = {ampName: np.array([]) for ampName in ampNames} |
dict | finalVars = {ampName: np.array([]) for ampName in ampNames} |
dict | finalModelVars = {ampName: np.array([]) for ampName in ampNames} |
dict | finalMeans = {ampName: np.array([]) for ampName in ampNames} |
dict | auxValues = {} |
requiredAttributes = set(["_OBSTYPE", "_SCHEMA", "_VERSION"]) | |
log = log if log else logging.getLogger(__name__) | |
Protected Member Functions | |
_validateCovarianceMatrizSizes (self) | |
Protected Attributes | |
_instrument = None | |
_raftName = None | |
_slotName = None | |
_detectorName = None | |
_detectorSerial = None | |
_detectorId = None | |
_filter = None | |
str | _calibId = None |
_seqfile = None | |
_seqname = None | |
_seqcksum = None | |
_metadata = PropertyList() | |
_requiredAttributes | |
Static Protected Attributes | |
str | _OBSTYPE = "generic" |
str | _SCHEMA = "NO SCHEMA" |
int | _VERSION = 0 |
A simple class to hold the output data from the PTC task. The dataset is made up of a dictionary for each item, keyed by the amplifiers' names, which much be supplied at construction time. New items cannot be added to the class to save accidentally saving to the wrong property, and the class can be frozen if desired. inputExpIdPairs records the exposures used to produce the data. When fitPtc() or fitCovariancesAstier() is run, a mask is built up, which is by definition always the same length as inputExpIdPairs, rawExpTimes, rawMeans and rawVars, and is a list of bools, which are incrementally set to False as points are discarded from the fits. PTC fit parameters for polynomials are stored in a list in ascending order of polynomial term, i.e. par[0]*x^0 + par[1]*x + par[2]*x^2 etc with the length of the list corresponding to the order of the polynomial plus one. Parameters ---------- ampNames : `list` List with the names of the amplifiers of the detector at hand. ptcFitType : `str`, optional Type of model fitted to the PTC: "POLYNOMIAL", "EXPAPPROXIMATION", or "FULLCOVARIANCE". covMatrixSide : `int`, optional Maximum lag of measured covariances (size of square covariance matrices). covMatrixSideFullCovFit : `int`, optional Maximum covariances lag for FULLCOVARIANCE fit. It should be less or equal than covMatrixSide. kwargs : `dict`, optional Other keyword arguments to pass to the parent init. Notes ----- The stored attributes are: badAmps : `list` [`str`] List with bad amplifiers names. inputExpIdPairs : `dict`, [`str`, `list`] Dictionary keyed by amp names containing the input exposures IDs. inputExpPairMjdStartList : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing the start mjd from the first exposure in each flat pair. expIdMask : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing the mask produced after outlier rejection. The mask produced by the "FULLCOVARIANCE" option may differ from the one produced in the other two PTC fit types. rawExpTimes : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing the unmasked exposure times. rawMeans : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing the unmasked average of the means of the exposures in each flat pair (units: adu). rawVars : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing the variance of the difference image of the exposures in each flat pair (units: adu^2). rowMeanVariance : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing the variance of the means of the rows of the difference image of the exposures in each flat pair (units: adu^2). histVars : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing the variance of the difference image of the exposures in each flat pair estimated by fitting a Gaussian model. histChi2Dofs : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing the chi-squared per degree of freedom fitting the difference image to a Gaussian model. kspValues : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing the KS test p-value from fitting the difference image to a Gaussian model. gain : `dict`, [`str`, `float`] Dictionary keyed by amp names containing the fitted gains. May be adjusted by amp-offset gain ratios if configured in PTC solver. gainUnadjusted : `dict`, [`str`, `float`] Dictionary keyed by amp names containing unadjusted (raw) fit gain values. May be the same as gain values if amp-offset adjustment is not turned on. gainErr : `dict`, [`str`, `float`] Dictionary keyed by amp names containing the errors on the fitted gains. gainList : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing the gain estimated from each flat pair. overscanMedianLevelList : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing the median overscan level from each input flat pair (units: adu). overscanMedian : `dict `, [`str`, `float`] Dictionary keyed by amp names containing the median of overscanMedianLevelList[expIdMask] (units: adu). overscanMedianSigma : `dict `, [`str`, `float`] Dictionary keyed by amp names containing the median absolute deviation of overscanMedianLevelList[expIdMask] (units: adu). noiseList : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing the mean overscan standard deviation from each flat pair (units: adu). noise : `dict`, [`str`, `float`] Dictionary keyed by amp names containing the fitted noise (units: electron). noiseErr : `dict`, [`str`, `float`] Dictionary keyed by amp names containing the errors on the fitted noise (units: electron). ampOffsets : `dict`, [`str`, `float`] Dictionary keyed by amp names containing amp-to-amp offsets (units: adu). ptcFitPars : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing the fitted parameters of the PTC model for ptcFitType in ["POLYNOMIAL", "EXPAPPROXIMATION"]. ptcFitParsError : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing the errors on the fitted parameters of the PTC model for ptcFitType in ["POLYNOMIAL", "EXPAPPROXIMATION"]. ptcFitChiSq : `dict`, [`str`, `float`] Dictionary keyed by amp names containing the reduced chi squared of the fit for ptcFitType in ["POLYNOMIAL", "EXPAPPROXIMATION"]. ptcTurnoff : `dict` [`str, `float`] Flux value (in adu) where the variance of the PTC curve starts decreasing consistently. ptcTurnoffSamplingError : `dict` [`str`, `float`] ``Sampling`` error on the ptcTurnoff, based on the flux sampling of the input PTC (units: adu). covariances : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing a list of measured covariances per mean flux (units: adu^2). covariancesModel : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containinging covariances model (Eq. 20 of Astier+19) per mean flux (units: adu^2). covariancesSqrtWeights : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containinging sqrt. of covariances weights (units: 1/adu). aMatrix : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing the "a" parameters from the model in Eq. 20 of Astier+19 (units: 1/electron). bMatrix : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing the "b" parameters from the model in Eq. 20 of Astier+19 (units: 1/electron). noiseMatrix : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing the "noise" parameters from the model in Eq. 20 of Astier+19 (units: electron^2). covariancesModelNoB : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing covariances model (with 'b'=0 in Eq. 20 of Astier+19) per mean flux (units: adu^2). Will be removed after v29. aMatrixNoB : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing the "a" parameters from the model in Eq. 20 of Astier+19 (and 'b' = 0) (units: 1/electron). Will be removed after v29. noiseMatrixNoB : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing the "noise" parameters from the model in Eq. 20 of Astier+19, with 'b' = 0 (units: electron^2). Will be removed after v29. finalVars : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing the masked variance of the difference image of each flat pair. If needed, each array will be right-padded with np.nan to match the length of rawExpTimes. finalModelVars : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing the masked modeled variance of the difference image of each flat pair. If needed, each array will be right-padded with np.nan to match the length of rawExpTimes. finalMeans : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing the masked average of the means of the exposures in each flat pair. If needed, each array will be right-padded with np.nan to match the length of rawExpTimes. photoCharges : `dict`, [`str`, `np.ndarray`] Dictionary keyed by amp names containing the integrated photocharge for linearity calibration. auxValues : `dict`, [`str`, `np.ndarray`] Dictionary of per-detector auxiliary header values that can be used for PTC, linearity computation. Version 1.1 adds the `ptcTurnoff` attribute. Version 1.2 adds the `histVars`, `histChi2Dofs`, and `kspValues` attributes. Version 1.3 adds the `noiseMatrix` and `noiseMatrixNoB` attributes. Version 1.4 adds the `auxValues` attribute. Version 1.5 adds the `covMatrixSideFullCovFit` attribute. Version 1.6 adds the `rowMeanVariance` attribute. Version 1.7 adds the `noiseList` attribute. Version 1.8 adds the `ptcTurnoffSamplingError` attribute. Version 1.9 standardizes PTC noise units to electron. Version 2.0 adds the `ampOffsets`, `gainUnadjusted`, and `gainList` attributes. Version 2.1 deprecates the `covariancesModelNoB`, `aMatrixNoB`, and `noiseMatrixNoB` attributes. Version 2.2 adds the `overscanMedianLevelList` and `inputExpPairMjdStartList` attributes. Version 2.3 adds the `overscanMedian` and `overscanMedianSigma` attrbutes.
Definition at line 65 of file ptcDataset.py.
lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.__init__ | ( | self, | |
ampNames = [], | |||
ptcFitType = None, | |||
covMatrixSide = 1, | |||
covMatrixSideFullCovFit = None, | |||
** | kwargs ) |
Definition at line 276 of file ptcDataset.py.
|
inherited |
Calibration equivalence. Running ``calib.log.setLevel(0)`` enables debug statements to identify problematic fields.
Definition at line 103 of file calibType.py.
|
inherited |
Definition at line 100 of file calibType.py.
|
protected |
Ensure covMatrixSideFullCovFit <= covMatrixSide.
Definition at line 1349 of file ptcDataset.py.
lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.appendPartialPtc | ( | self, | |
partialPtc ) |
Append a partial PTC dataset to this dataset. Parameters ---------- partialPtc : `lsst.ip.isr.PhotonTransferCurveDataset` Partial PTC to append. Should only have one element.
Definition at line 990 of file ptcDataset.py.
|
inherited |
Method to apply the calibration to the target object. Parameters ---------- target : `object` Thing to validate against. Returns ------- valid : `bool` Returns true if the calibration was applied correctly. Raises ------ NotImplementedError Raised if not implemented.
Definition at line 685 of file calibType.py.
|
inherited |
Handle common keywords. This isn't an ideal solution, but until all calibrations expect to find everything in the metadata, they still need to search through dictionaries. Parameters ---------- dictionary : `dict` or `lsst.daf.base.PropertyList` Source for the common keywords. Raises ------ RuntimeError Raised if the dictionary does not match the expected OBSTYPE.
Definition at line 322 of file calibType.py.
|
inherited |
Attempt to find calibration class in metadata. Parameters ---------- metadata : `dict` or `lsst.daf.base.PropertyList` Metadata possibly containing a calibration class entry. message : `str` Message to include in any errors. Returns ------- calibClass : `object` The class to use to read the file contents. Should be an `lsst.ip.isr.IsrCalib` subclass. Raises ------ ValueError Raised if the resulting calibClass is the base `lsst.ip.isr.IsrClass` (which does not implement the content methods).
Definition at line 388 of file calibType.py.
lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.evalPtcModel | ( | self, | |
mu ) |
Computes the covariance model at specific signal levels. Parameters ---------- mu : `numpy.array`, (N,) List of mean signals in ADU. Raises ------ RuntimeError Raised if ptcFitType is invalid. Returns ------- covModel : `numpy.array`, (N, M, M) Covariances model at mu (in ADU^2). Notes ----- Computes the covModel for all mu, and it returns cov[N, M, M], where the variance model is cov[:,0,0]. Both mu and cov are in ADUs and ADUs squared. This routine evaulates the n-degree polynomial model (defined by polynomialFitDegree) if self.ptcFitType == POLYNOMIAL, the approximation in Eq. 16 of Astier+19 (1905.08677) if self.ptcFitType == EXPAPPROXIMATION, and Eq. 20 of Astier+19 if self.ptcFitType == FULLCOVARIANCE. The POLYNOMIAL model and the EXPAPPROXIMATION model (Eq. 16 of Astier+19) are only approximations for the variance (cov[0,0]), so the function returns covModel of shape (N,), representing an array of [C_{00}] if self.ptcFitType == EXPAPPROXIMATION or self.ptcFitType == POLYNOMAIL.
Definition at line 1243 of file ptcDataset.py.
lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.fromDetector | ( | self, | |
detector ) |
Read metadata parameters from a detector. Parameters ---------- detector : `lsst.afw.cameraGeom.detector` Input detector with parameters to use. Returns ------- calib : `lsst.ip.isr.PhotonTransferCurveDataset` The calibration constructed from the detector.
Reimplemented from lsst.ip.isr.calibType.IsrCalib.
Definition at line 974 of file ptcDataset.py.
lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.fromDict | ( | cls, | |
dictionary ) |
Construct a calibration from a dictionary of properties. Must be implemented by the specific calibration subclasses. Parameters ---------- dictionary : `dict` Dictionary of properties. Returns ------- calib : `lsst.ip.isr.PhotonTransferCurveDataset` Constructed calibration. Raises ------ RuntimeError Raised if the supplied dictionary is for a different calibration.
Reimplemented from lsst.ip.isr.calibType.IsrCalib.
Definition at line 494 of file ptcDataset.py.
lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.fromTable | ( | cls, | |
tableList ) |
Construct calibration from a list of tables. This method uses the `fromDict` method to create the calibration, after constructing an appropriate dictionary from the input tables. Parameters ---------- tableList : `list` [`lsst.afw.table.Table`] List of tables to use to construct the datasetPtc. Returns ------- calib : `lsst.ip.isr.PhotonTransferCurveDataset` The calibration defined in the tables.
Reimplemented from lsst.ip.isr.calibType.IsrCalib.
Definition at line 683 of file ptcDataset.py.
lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.getExpIdsUsed | ( | self, | |
ampName ) |
Get the exposures used, i.e. not discarded, for a given amp. If no mask has been created yet, all exposures are returned. Parameters ---------- ampName : `str` Returns ------- expIdsUsed : `list` [`tuple`] List of pairs of exposure ids used in PTC.
Definition at line 1151 of file ptcDataset.py.
lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.getGoodAmps | ( | self | ) |
Get the good amps from this PTC.
Definition at line 1185 of file ptcDataset.py.
lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.getGoodPoints | ( | self, | |
ampName ) |
Get the good points used for a given amp in the PTC. Parameters ---------- ampName : `str` Amplifier's name. Returns ------- goodPoints : `np.ndarray` Boolean array of good points used in PTC.
Definition at line 1189 of file ptcDataset.py.
|
inherited |
Retrieve metadata associated with this calibration. Returns ------- meta : `lsst.daf.base.PropertyList` Metadata. The returned `~lsst.daf.base.PropertyList` can be modified by the caller and the changes will be written to external files.
Definition at line 171 of file calibType.py.
|
inherited |
Definition at line 168 of file calibType.py.
|
inherited |
Read calibration data from a FITS file. Parameters ---------- filename : `str` Filename to read data from. kwargs : `dict` or collections.abc.Mapping`, optional Set of key=value pairs to pass to the ``fromTable`` method. Returns ------- calib : `lsst.ip.isr.IsrCalib` Calibration contained within the file.
Definition at line 505 of file calibType.py.
|
inherited |
Read calibration representation from a yaml/ecsv file. Parameters ---------- filename : `str` Name of the file containing the calibration definition. kwargs : `dict` or collections.abc.Mapping`, optional Set of key=value pairs to pass to the ``fromDict`` or ``fromTable`` methods. Returns ------- calib : `~lsst.ip.isr.IsrCalibType` Calibration class. Raises ------ RuntimeError Raised if the filename does not end in ".ecsv" or ".yaml".
Definition at line 418 of file calibType.py.
|
inherited |
Definition at line 159 of file calibType.py.
|
inherited |
Definition at line 163 of file calibType.py.
lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.setAmpValuesPartialDataset | ( | self, | |
ampName, | |||
inputExpIdPair = (-1, -1), | |||
inputExpPairMjdStart = np.nan, | |||
rawExpTime = np.nan, | |||
rawMean = np.nan, | |||
rawVar = np.nan, | |||
rowMeanVariance = np.nan, | |||
photoCharge = np.nan, | |||
ampOffset = np.nan, | |||
expIdMask = False, | |||
covariance = None, | |||
covSqrtWeights = None, | |||
gain = np.nan, | |||
noise = np.nan, | |||
overscanMedianLevel = np.nan, | |||
histVar = np.nan, | |||
histChi2Dof = np.nan, | |||
kspValue = 0.0 ) |
Set the amp values for a partial PTC Dataset (from cpExtractPtcTask). Parameters ---------- ampName : `str` Name of the amp to set the values. inputExpIdPair : `tuple` [`int`] Exposure IDs of input pair. inputExpPairMjdStart : `float`, optional The start MJD of first exposure in the flat pair. rawExpTime : `float`, optional Exposure time for this exposure pair (units: sec). rawMean : `float`, optional Average of the means of the exposures in this pair (units: adu). rawVar : `float`, optional Variance of the difference of the exposures in this pair (units: adu^2). rowMeanVariance : `float`, optional Variance of the means of the rows in the difference image of the exposures in this pair (units: adu^2). photoCharge : `float`, optional Integrated photocharge for flat pair for linearity calibration (units: electron). ampOffset : `float`, optional Amp offset for this amplifier. expIdMask : `bool`, optional Flag setting if this exposure pair should be used (True) or not used (False). covariance : `np.ndarray` or None, optional Measured covariance for this exposure pair (units: adu^2). covSqrtWeights : `np.ndarray` or None, optional Measured sqrt of covariance weights in this exposure pair (units: 1/adu). gain : `float`, optional Estimated gain for this exposure pair (units: electron/adu). noise : `float`, optional Estimated read noise for this exposure pair (units: electron). overscanMedianLevel : `float`, optional Average of the median overscan levels for this exposure pair. (units: adu) histVar : `float`, optional Variance estimated from fitting a histogram with a Gaussian model (units: adu). histChi2Dof : `float`, optional Chi-squared per degree of freedom from Gaussian histogram fit. kspValue : `float`, optional KS test p-value from the Gaussian histogram fit.
Definition at line 349 of file ptcDataset.py.
lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.setAuxValuesPartialDataset | ( | self, | |
auxDict ) |
Set a dictionary of auxiliary values for a partial dataset. Parameters ---------- auxDict : `dict` [`str`, `float`] Dictionary of float values.
Definition at line 461 of file ptcDataset.py.
|
inherited |
Store a copy of the supplied metadata with this calibration. Parameters ---------- metadata : `lsst.daf.base.PropertyList` Metadata to associate with the calibration. Will be copied and overwrite existing metadata.
Reimplemented in lsst.ip.isr.transmissionCurve.IntermediateTransmissionCurve.
Definition at line 183 of file calibType.py.
lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.sort | ( | self, | |
sortIndex ) |
Sort the components of the PTC by a given sort index. The PTC is sorted in-place. Parameters ---------- sortIndex : `list` or `np.ndarray` The sorting index, which must be the same length as the number of elements of the PTC.
Definition at line 1091 of file ptcDataset.py.
lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.toDict | ( | self | ) |
Return a dictionary containing the calibration properties. The dictionary should be able to be round-tripped through `fromDict`. Returns ------- dictionary : `dict` Dictionary of properties.
Reimplemented from lsst.ip.isr.calibType.IsrCalib.
Definition at line 614 of file ptcDataset.py.
lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.toTable | ( | self | ) |
Construct a list of tables containing the information in this calibration. The list of tables should create an identical calibration after being passed to this class's fromTable method. Returns ------- tableList : `list` [`astropy.table.Table`] List of tables containing the linearity calibration information.
Reimplemented from lsst.ip.isr.calibType.IsrCalib.
Definition at line 894 of file ptcDataset.py.
lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.updateMetadata | ( | self, | |
** | kwargs ) |
Update calibration metadata. This calls the base class's method after ensuring the required calibration keywords will be saved. Parameters ---------- setDate : `bool`, optional Update the CALIBDATE fields in the metadata to the current time. Defaults to False. kwargs : Other keyword parameters to set in the metadata.
Reimplemented from lsst.ip.isr.calibType.IsrCalib.
Definition at line 478 of file ptcDataset.py.
|
inherited |
Extract and unify metadata information. Parameters ---------- exposures : `list` Exposures or other calibrations to scan.
Definition at line 291 of file calibType.py.
|
inherited |
Validate that this calibration is defined and can be used. Parameters ---------- other : `object`, optional Thing to validate against. Returns ------- valid : `bool` Returns true if the calibration is valid and appropriate.
Reimplemented in lsst.ip.isr.linearize.Linearizer, and lsst.ip.isr.photodiodeCorrection.PhotodiodeCorrection.
Definition at line 670 of file calibType.py.
lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.validateGainNoiseTurnoffValues | ( | self, | |
ampName, | |||
doWarn = False ) |
Ensure the gain, read noise, and PTC turnoff have sensible values. Parameters ---------- ampName : `str` Amplifier's name.
Definition at line 1204 of file ptcDataset.py.
|
inherited |
Write calibration data to a FITS file. Parameters ---------- filename : `str` Filename to write data to. Returns ------- used : `str` The name of the file used to write the data.
Reimplemented in lsst.ip.isr.transmissionCurve.IntermediateTransmissionCurve.
Definition at line 544 of file calibType.py.
|
inherited |
Write the calibration data to a text file. Parameters ---------- filename : `str` Name of the file to write. format : `str` Format to write the file as. Supported values are: ``"auto"`` : Determine filetype from filename. ``"yaml"`` : Write as yaml. ``"ecsv"`` : Write as ecsv. Returns ------- used : `str` The name of the file used to write the data. This may differ from the input if the format is explicitly chosen. Raises ------ RuntimeError Raised if filename does not end in a known extension, or if all information cannot be written. Notes ----- The file is written to YAML/ECSV format and will include any associated metadata.
Definition at line 451 of file calibType.py.
|
protectedinherited |
Definition at line 74 of file calibType.py.
|
protectedinherited |
Definition at line 72 of file calibType.py.
|
protectedinherited |
Definition at line 70 of file calibType.py.
|
protectedinherited |
Definition at line 71 of file calibType.py.
|
protectedinherited |
Definition at line 73 of file calibType.py.
|
protectedinherited |
Definition at line 67 of file calibType.py.
|
protectedinherited |
Definition at line 78 of file calibType.py.
|
staticprotectedinherited |
Definition at line 62 of file calibType.py.
|
protectedinherited |
Definition at line 68 of file calibType.py.
|
protectedinherited |
Definition at line 113 of file calibType.py.
|
staticprotectedinherited |
Definition at line 63 of file calibType.py.
|
protectedinherited |
Definition at line 77 of file calibType.py.
|
protectedinherited |
Definition at line 75 of file calibType.py.
|
protectedinherited |
Definition at line 76 of file calibType.py.
|
protectedinherited |
Definition at line 69 of file calibType.py.
|
staticprotectedinherited |
Definition at line 64 of file calibType.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.aMatrix = {ampName: np.array([]) for ampName in ampNames} |
Definition at line 322 of file ptcDataset.py.
lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.ampNames = ampNames |
Definition at line 279 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.ampOffsets = {ampName: np.array([]) for ampName in ampNames} |
Definition at line 296 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.auxValues = {} |
Definition at line 331 of file ptcDataset.py.
list lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.badAmps = [] |
Definition at line 286 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.bMatrix = {ampName: np.array([]) for ampName in ampNames} |
Definition at line 323 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.covariances = {ampName: np.array([]) for ampName in ampNames} |
Definition at line 319 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.covariancesModel = {ampName: np.array([]) for ampName in ampNames} |
Definition at line 320 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.covariancesSqrtWeights = {ampName: np.array([]) for ampName in ampNames} |
Definition at line 321 of file ptcDataset.py.
lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.covMatrixSide = covMatrixSide |
Definition at line 280 of file ptcDataset.py.
lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.covMatrixSideFullCovFit = covMatrixSide |
Definition at line 282 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.expIdMask = {ampName: np.array([], dtype=bool) for ampName in ampNames} |
Definition at line 290 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.finalMeans = {ampName: np.array([]) for ampName in ampNames} |
Definition at line 328 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.finalModelVars = {ampName: np.array([]) for ampName in ampNames} |
Definition at line 327 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.finalVars = {ampName: np.array([]) for ampName in ampNames} |
Definition at line 326 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.gain = {ampName: np.nan for ampName in ampNames} |
Definition at line 298 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.gainErr = {ampName: np.nan for ampName in ampNames} |
Definition at line 300 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.gainList = {ampName: np.array([]) for ampName in ampNames} |
Definition at line 301 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.gainUnadjusted = {ampName: np.nan for ampName in ampNames} |
Definition at line 299 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.histChi2Dofs = {ampName: np.array([]) for ampName in ampNames} |
Definition at line 310 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.histVars = {ampName: np.array([]) for ampName in ampNames} |
Definition at line 309 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.inputExpIdPairs = {ampName: [] for ampName in ampNames} |
Definition at line 288 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.inputExpPairMjdStartList = {ampName: np.array([]) for ampName in ampNames} |
Definition at line 289 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.kspValues = {ampName: np.array([]) for ampName in ampNames} |
Definition at line 311 of file ptcDataset.py.
|
inherited |
Definition at line 94 of file calibType.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.noise = {ampName: np.nan for ampName in ampNames} |
Definition at line 306 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.noiseErr = {ampName: np.nan for ampName in ampNames} |
Definition at line 307 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.noiseList = {ampName: np.array([]) for ampName in ampNames} |
Definition at line 305 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.noiseMatrix = {ampName: np.array([]) for ampName in ampNames} |
Definition at line 324 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.overscanMedian = {ampName: np.nan for ampName in ampNames} |
Definition at line 303 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.overscanMedianLevelList = {ampName: np.array([]) for ampName in ampNames} |
Definition at line 302 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.overscanMedianSigma = {ampName: np.nan for ampName in ampNames} |
Definition at line 304 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.photoCharges = {ampName: np.array([]) for ampName in ampNames} |
Definition at line 295 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.ptcFitChiSq = {ampName: np.nan for ampName in ampNames} |
Definition at line 315 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.ptcFitPars = {ampName: np.array([]) for ampName in ampNames} |
Definition at line 313 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.ptcFitParsError = {ampName: np.array([]) for ampName in ampNames} |
Definition at line 314 of file ptcDataset.py.
lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.ptcFitType = ptcFitType |
Definition at line 278 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.ptcTurnoff = {ampName: np.nan for ampName in ampNames} |
Definition at line 316 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.ptcTurnoffSamplingError = {ampName: np.nan for ampName in ampNames} |
Definition at line 317 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.rawExpTimes = {ampName: np.array([]) for ampName in ampNames} |
Definition at line 291 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.rawMeans = {ampName: np.array([]) for ampName in ampNames} |
Definition at line 292 of file ptcDataset.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.rawVars = {ampName: np.array([]) for ampName in ampNames} |
Definition at line 293 of file ptcDataset.py.
|
inherited |
Definition at line 88 of file calibType.py.
dict lsst.ip.isr.ptcDataset.PhotonTransferCurveDataset.rowMeanVariance = {ampName: np.array([]) for ampName in ampNames} |
Definition at line 294 of file ptcDataset.py.