I am now learning lsst.pex.config
When I follow the code Example config class and usage, I got error:
(lsst-scipipe-0.7.0) [yu@localhost ~]$ setup lsst_distrib
(lsst-scipipe-0.7.0) [yu@localhost ~]$ python
Python 3.8.8 | packaged by conda-forge | (default, Feb 20 2021, 16:22:27)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import lsst.pex.config as pexConfig
>>> class IsrTaskConfig(pexConfig.Config):
... doWrite = pexConfig.Field(
... doc="Write output?",
... dtype=bool,
... default=True)
... fwhm = pexConfig.Field(
... doc="FWHM of PSF (arcsec)",
... dtype=float,
... default=1.0)
... saturatedMaskName = pexConfig.Field(
... doc="Name of mask plane to use in saturation detection",
... dtype=str,
... default="SAT")
... flatScalingType = pexConfig.ChoiceField(
... doc="The method for scaling the flat on the fly.",
... dtypye=str,
... default='USER',
... allowed={
... "USER": "User defined scaling",
... "MEAN": "Scale by the inverse of the mean",
... "MEDIAN": "Scale by the inverse of the median",
... })
... keysToRemoveFromAssembledCcd = pexConfig.ListField(
... doc="fields to remove from the metadata of the assembled ccd.",
... dtype=str,
... default=[])
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 14, in IsrTaskConfig
TypeError: __init__() got an unexpected keyword argument 'dtypye'
>>> class IsrTaskConfig(pexConfig.Config):
... flatScalingType = pexConfig.ChoiceField(
... doc="The method for scaling the flat on the fly.",
... dtypye=str,
... default='USER',
... allowed={
... "USER": "User defined scaling",
... "MEAN": "Scale by the inverse of the mean",
... "MEDIAN": "Scale by the inverse of the median",
... })
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 2, in IsrTaskConfig
TypeError: __init__() got an unexpected keyword argument 'dtypye'
Thing is wrong with the flatScalingType, So, What cause it?
Thank you!