Ts3Mapper¶
-
class
lsst.obs.lsst.ts3.
Ts3Mapper
(inputPolicy=None, **kwargs)¶ Bases:
lsst.obs.lsst.LsstCamMapper
The Mapper for the ts3 camera.
Attributes Summary
packageName
yamlFileList
Methods Summary
Mapper
(cfg)Instantiate a Mapper from a configuration. backup
(datasetType, dataId)Rename any existing object with the given type and dataId. bypass_camera
(datasetType, pythonType, …)Return the (preloaded) camera object. bypass_ccdExposureId
(datasetType, …)bypass_ccdExposureId_bits
(datasetType, …)How many bits are required for the maximum exposure ID bypass_dcrCoaddId
(datasetType, pythonType, …)bypass_dcrCoaddId_bits
(datasetType, …)bypass_dcrMergedCoaddId
(datasetType, …)bypass_dcrMergedCoaddId_bits
(*args, **kwargs)The number of bits used up for patch ID bits. bypass_deepCoaddId
(datasetType, pythonType, …)bypass_deepCoaddId_bits
(*args, **kwargs)The number of bits used up for patch ID bits. bypass_deepMergedCoaddId
(datasetType, …)bypass_deepMergedCoaddId_bits
(*args, **kwargs)The number of bits used up for patch ID bits. bypass_defects
(datasetType, pythonType, …)Return a defect based on the butler location returned by map_defects bypass_expIdInfo
(datasetType, pythonType, …)Hook to retrieve an lsst.obs.base.ExposureIdInfo for an exposure bypass_raw_filename
(*args, **kwargs)Magic method that is called automatically if it exists. bypass_raw_visitInfo
(datasetType, …)canStandardize
(datasetType)Return true if this mapper can standardize an object of the given dataset type. defineFilters
()getCameraName
()Return the name of the camera that this CameraMapper is for. getDatasetTypes
()Return a list of the mappable dataset types. getDefaultLevel
()getDefaultSubLevel
(level)getImageCompressionSettings
(datasetType, dataId)Stuff image compression settings into a daf.base.PropertySet getKeys
(datasetType, level)Return a dict of supported keys and their value types for a given dataset type at a given level of the key hierarchy. getPackageDir
()Return the base directory of this package getPackageName
()Return the name of the package containing this CameraMapper. getRegistry
()Get the registry used by this mapper. getShortCcdName
(ccdName)Convert a CCD name to a form useful as a filename keys
()Return supported keys. map
(datasetType, dataId[, write])Map a data id using the mapping method for its dataset type. map_camera
(dataId[, write])Map a camera dataset. map_defects
(dataId[, write])Map defects dataset. map_expIdInfo
(dataId[, write])map_raw_filename
(*args, **kwargs)Magic method that is called automatically if it exists. map_raw_md
(*args, **kwargs)Magic method that is called automatically if it exists. map_raw_visitInfo
(*args, **kwargs)Magic method that is called automatically if it exists. map_skypolicy
(dataId)Map a sky policy. queryMetadata
(datasetType, format, dataId)Get possible values for keys given a partial data id. query_raw
(*args, **kwargs)Magic method that is called automatically if it exists. query_raw_amp
(format, dataId)Return a list of tuples of values of the fields specified in format, in order. standardize
(datasetType, item, dataId)Standardize an object using the standardization method for its data set type, if it exists. std_bfKernel
(item, dataId)Disable standardization for bfKernel std_raw
(item, dataId[, filter])Standardize a raw dataset by converting it to an Exposure
instead of anImage
.std_raw_amp
(item, dataId)std_skypolicy
(item, dataId)Standardize a sky policy by returning the one we use. validate
(dataId)Validate a dataId’s contents. Attributes Documentation
-
packageName
= 'obs_lsst'¶
-
yamlFileList
= ['ts3/ts3Mapper.yaml', 'auxTel/auxTelMapper.yaml', 'lsstCamMapper.yaml', 'lsstCamMapper.yaml']¶
Methods Documentation
-
static
Mapper
(cfg)¶ Instantiate a Mapper from a configuration. In come cases the cfg may have already been instantiated into a Mapper, this is allowed and the input var is simply returned.
Parameters: cfg – the cfg for this mapper. It is recommended this be created by calling Mapper.cfg() Returns: a Mapper instance
-
backup
(datasetType, dataId)¶ Rename any existing object with the given type and dataId.
The CameraMapper implementation saves objects in a sequence of e.g.:
- foo.fits
- foo.fits~1
- foo.fits~2
All of the backups will be placed in the output repo, however, and will not be removed if they are found elsewhere in the _parent chain. This means that the same file will be stored twice if the previous version was found in an input repo.
-
bypass_camera
(datasetType, pythonType, butlerLocation, dataId)¶ Return the (preloaded) camera object.
-
bypass_ccdExposureId
(datasetType, pythonType, location, dataId)¶
-
bypass_ccdExposureId_bits
(datasetType, pythonType, location, dataId)¶ How many bits are required for the maximum exposure ID
-
bypass_dcrCoaddId
(datasetType, pythonType, location, dataId)¶
-
bypass_dcrCoaddId_bits
(datasetType, pythonType, location, dataId)¶
-
bypass_dcrMergedCoaddId
(datasetType, pythonType, location, dataId)¶
-
bypass_dcrMergedCoaddId_bits
(*args, **kwargs)¶ The number of bits used up for patch ID bits.
-
bypass_deepCoaddId
(datasetType, pythonType, location, dataId)¶
-
bypass_deepCoaddId_bits
(*args, **kwargs)¶ The number of bits used up for patch ID bits.
-
bypass_deepMergedCoaddId
(datasetType, pythonType, location, dataId)¶
-
bypass_deepMergedCoaddId_bits
(*args, **kwargs)¶ The number of bits used up for patch ID bits.
-
bypass_defects
(datasetType, pythonType, butlerLocation, dataId)¶ Return a defect based on the butler location returned by map_defects
Parameters: - butlerLocation :
lsst.daf.persistence.ButlerLocation
locationList = path to defects FITS file
- dataId :
dict
Butler data ID; “ccd” must be set.
- Note: the name “bypass_XXX” means the butler makes no attempt to
- convert the ButlerLocation into an object, which is what we want for
- now, since that conversion is a bit tricky.
- butlerLocation :
-
bypass_expIdInfo
(datasetType, pythonType, location, dataId)¶ Hook to retrieve an lsst.obs.base.ExposureIdInfo for an exposure
-
bypass_raw_filename
(*args, **kwargs)¶ Magic method that is called automatically if it exists.
This code redirects the call to the right place, necessary because of leading underscore on
_raw
.
-
bypass_raw_visitInfo
(datasetType, pythonType, location, dataId)¶
-
canStandardize
(datasetType)¶ Return true if this mapper can standardize an object of the given dataset type.
-
classmethod
defineFilters
()¶
-
classmethod
getCameraName
()¶ Return the name of the camera that this CameraMapper is for.
-
getDatasetTypes
()¶ Return a list of the mappable dataset types.
-
getDefaultLevel
()¶
-
getDefaultSubLevel
(level)¶
-
getImageCompressionSettings
(datasetType, dataId)¶ Stuff image compression settings into a daf.base.PropertySet
This goes into the ButlerLocation’s “additionalData”, which gets passed into the boost::persistence framework.
Parameters: Returns: - additionalData :
lsst.daf.base.PropertySet
Image compression settings.
- additionalData :
-
getKeys
(datasetType, level)¶ Return a dict of supported keys and their value types for a given dataset type at a given level of the key hierarchy.
Parameters: Returns: - `dict`
Keys are strings usable in a dataset identifier, values are their value types.
-
classmethod
getPackageDir
()¶ Return the base directory of this package
-
classmethod
getPackageName
()¶ Return the name of the package containing this CameraMapper.
-
getRegistry
()¶ Get the registry used by this mapper.
Returns: - Registry or None
The registry used by this mapper for this mapper’s repository.
-
static
getShortCcdName
(ccdName)¶ Convert a CCD name to a form useful as a filename
The default implementation converts spaces to underscores.
-
keys
()¶ Return supported keys.
Returns: - iterable
List of keys usable in a dataset identifier
-
map
(datasetType, dataId, write=False)¶ Map a data id using the mapping method for its dataset type.
Parameters: - datasetType : string
The datasetType to map
- dataId : DataId instance
The dataId to use when mapping
- write : bool, optional
Indicates if the map is being performed for a read operation (False) or a write operation (True)
Returns: - ButlerLocation or a list of ButlerLocation
The location(s) found for the map operation. If write is True, a list is returned. If write is False a single ButlerLocation is returned.
Raises: - NoResults
If no locaiton was found for this map operation, the derived mapper class may raise a lsst.daf.persistence.NoResults exception. Butler catches this and will look in the next Repository if there is one.
-
map_camera
(dataId, write=False)¶ Map a camera dataset.
-
map_defects
(dataId, write=False)¶ Map defects dataset.
Returns: - `lsst.daf.butler.ButlerLocation`
Minimal ButlerLocation containing just the locationList field (just enough information that bypass_defects can use it).
-
map_expIdInfo
(dataId, write=False)¶
-
map_raw_filename
(*args, **kwargs)¶ Magic method that is called automatically if it exists.
This code redirects the call to the right place, necessary because of leading underscore on
_raw
.
-
map_raw_md
(*args, **kwargs)¶ Magic method that is called automatically if it exists.
This code redirects the call to the right place, necessary because of leading underscore on
_raw
.
-
map_raw_visitInfo
(*args, **kwargs)¶ Magic method that is called automatically if it exists.
This code redirects the call to the right place, necessary because of leading underscore on
_raw
.
-
map_skypolicy
(dataId)¶ Map a sky policy.
-
queryMetadata
(datasetType, format, dataId)¶ Get possible values for keys given a partial data id.
Parameters: - datasetType – see documentation about the use of datasetType
- key – this is used as the ‘level’ parameter
- format –
- dataId – see documentation about the use of dataId
Returns:
-
query_raw
(*args, **kwargs)¶ Magic method that is called automatically if it exists.
This code redirects the call to the right place, necessary because of leading underscore on
_raw
.
-
query_raw_amp
(format, dataId)¶ Return a list of tuples of values of the fields specified in format, in order.
Parameters: Returns: Raises: - ValueError
The channel number requested in
dataId
is out of range.
-
standardize
(datasetType, item, dataId)¶ Standardize an object using the standardization method for its data set type, if it exists.
-
std_bfKernel
(item, dataId)¶ Disable standardization for bfKernel
bfKernel is a calibration product that is numpy array, unlike other calibration products that are all images; all calibration images are sent through _standardizeExposure due to CalibrationMapping, but we don’t want that to happen to bfKernel
-
std_raw
(item, dataId, filter=True)¶ Standardize a raw dataset by converting it to an
Exposure
instead of anImage
.
-
std_raw_amp
(item, dataId)¶
-
std_skypolicy
(item, dataId)¶ Standardize a sky policy by returning the one we use.
-
validate
(dataId)¶ Validate a dataId’s contents.
If the dataId is valid, return it. If an invalid component can be transformed into a valid one, copy the dataId, fix the component, and return the copy. Otherwise, raise an exception.
-