Instrument¶
- class lsst.ts.wep.cwfs.Instrument¶
Bases:
object
Instrument class to have the instrument information used in the Algorithm class to solve the TIE.
Attributes Summary
The aperture diameter in meters.
The defocal distance offset in meters.
The dimension of the donut image size on the sensor in pixels.
The focal length of telescope in meters.
Dictionary of the instrument configuration parameters.
The mask off-axis correction.
Obscuration (inner_radius / outer_radius of primary mirror).
The camera pixel size in meters.
Methods Summary
Calculate the size of expected donut (diameter).
configFromDict
(configDict, ...[, maskConfigFile])Configure the instrument class from a dictionary.
configFromFile
(dimOfDonutImgOnSensor, camType)Configure the instrument class from a configuration file.
Get the instrument parameter file directory.
Get the marginal focal length in meter.
Get the sensor coordinate.
Get the sensor coordinate with the annular aperature.
Get the sensor factor.
setDefaultMaskParams
(camType[, ...])Load the default mask off-axis corrections.
Attributes Documentation
- apertureDiameter¶
The aperture diameter in meters.
- defocalDisOffsetInM¶
The defocal distance offset in meters.
- dimOfDonutImg¶
The dimension of the donut image size on the sensor in pixels.
- focalLength¶
The focal length of telescope in meters.
- instParams¶
Dictionary of the instrument configuration parameters.
- maskOffAxisCorr¶
The mask off-axis correction.
- obscuration¶
Obscuration (inner_radius / outer_radius of primary mirror).
- pixelSize¶
The camera pixel size in meters.
Methods Documentation
- calcSizeOfDonutExpected()¶
Calculate the size of expected donut (diameter).
- Returns:
- float
Size of expected donut (diameter) in pixel.
- configFromDict(configDict, dimOfDonutImgOnSensor, camType, maskConfigFile=None)¶
Configure the instrument class from a dictionary.
- Parameters:
- configDictdict
Instrument parameter configuration dictionary. Keys needed are: “obscuration”, “focalLength”, “apertureDiameter”, “offset”, “pixelSize”. Dimensions for “offset” are mm, the rest use meters.
- dimOfDonutImgOnSensorint
Dimension of donut image on sensor in pixel.
- camTypeenum ‘CamType’
Camera type.
- maskConfigFilestr or None, optional
Mask migration (off-axis correction) file path. If None will load the default from policy/cwfs folder. (The default is None.)
- Raises:
- AssertionError
ConfigDict keys do not match required keys in self._instParams.
- ValueError
Mask migrate file does not exist.
- configFromFile(dimOfDonutImgOnSensor, camType, instConfigFile=None, maskConfigFile=None)¶
Configure the instrument class from a configuration file.
- Parameters:
- dimOfDonutImgOnSensorint
Dimension of donut image on sensor in pixel.
- camTypeenum ‘CamType’
Camera type.
- instConfigFilestr or None, optional
Instrument parameter configuration file path. This should be an LSST Science Pipelines pipeline task configuration file for one of the WEP pipeline tasks (see defaults in policy/cwfs/instData folder). If set to None will load the default from policy/cwfs folder. (The default is None.)
- maskConfigFilestr or None, optional
Mask migration (off-axis correction) file path. If None will load the default from policy/cwfs folder. (The default is None.)
- Raises:
- ValueError
Instrument configuration file does not exist.
- ValueError
Instrument configuration file does not have expected format.
- ValueError
Mask migrate file does not exist.
- getInstFileDir()¶
Get the instrument parameter file directory.
- Returns:
- str
Instrument parameter file directory.
- getMarginalFocalLength()¶
Get the marginal focal length in meter.
Marginal_focal_length = sqrt(f^2 - (D/2)^2)
- Returns:
- float
Marginal focal length in meter.
- getSensorCoor()¶
Get the sensor coordinate.
- Returns:
- numpy.ndarray
X coordinate.
- numpy.ndarray
Y coordinate.
- getSensorCoorAnnular()¶
Get the sensor coordinate with the annular aperature.
- Returns:
- numpy.ndarray
X coordinate.
- numpy.ndarray
Y coordinate.
- getSensorFactor()¶
Get the sensor factor.
- Returns:
- float
Sensor factor.
- setDefaultMaskParams(camType, maskParamFileName='maskMigrate.yaml')¶
Load the default mask off-axis corrections. Note that there is no such file for auxiliary telescope.
- Parameters:
- camTypeenum ‘CamType’
Camera type.
- maskParamFileNamestr, optional
Mask parameter file name in the policy/cwfs/instData/
instName
directory. (The default is “maskMigrate.yaml”.)