LSST Applications g063fba187b+fee0456c91,g0f08755f38+ea96e5a5a3,g1653933729+a8ce1bb630,g168dd56ebc+a8ce1bb630,g1a2382251a+90257ff92a,g20f6ffc8e0+ea96e5a5a3,g217e2c1bcf+937a289c59,g28da252d5a+daa7da44eb,g2bbee38e9b+253935c60e,g2bc492864f+253935c60e,g3156d2b45e+6e55a43351,g32e5bea42b+31359a2a7a,g347aa1857d+253935c60e,g35bb328faa+a8ce1bb630,g3a166c0a6a+253935c60e,g3b1af351f3+a8ce1bb630,g3e281a1b8c+c5dd892a6c,g414038480c+416496e02f,g41af890bb2+afe91b1188,g599934f4f4+0db33f7991,g7af13505b9+e36de7bce6,g80478fca09+da231ba887,g82479be7b0+a4516e59e3,g858d7b2824+ea96e5a5a3,g89c8672015+f4add4ffd5,g9125e01d80+a8ce1bb630,ga5288a1d22+bc6ab8dfbd,gb58c049af0+d64f4d3760,gc28159a63d+253935c60e,gcab2d0539d+3f2b72788c,gcf0d15dbbd+4ea9c45075,gda6a2b7d83+4ea9c45075,gdaeeff99f8+1711a396fd,ge79ae78c31+253935c60e,gef2f8181fd+3031e3cf99,gf0baf85859+c1f95f4921,gfa517265be+ea96e5a5a3,gfa999e8aa5+17cd334064,w.2024.50
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.meas.extensions.piff.piffPsfDeterminer.PiffPsfDeterminerConfig Class Reference
Inheritance diagram for lsst.meas.extensions.piff.piffPsfDeterminer.PiffPsfDeterminerConfig:

Public Member Functions

 setDefaults (self)
 
 validate (self)
 

Public Attributes

 stampSize
 

Static Public Attributes

 spatialOrder
 
 samplingSize
 
 modelSize
 
 outlierNSigma
 
 outlierMaxRemove
 
 maxSNR
 
 zeroWeightMaskBits
 
 minimumUnmaskedFraction
 
 interpolant
 
 debugStarData
 
 useCoordinates
 
 piffLoggingLevel
 
 piffPsfConfigYaml
 

Detailed Description

Definition at line 74 of file piffPsfDeterminer.py.

Member Function Documentation

◆ setDefaults()

lsst.meas.extensions.piff.piffPsfDeterminer.PiffPsfDeterminerConfig.setDefaults ( self)

Definition at line 151 of file piffPsfDeterminer.py.

151 def setDefaults(self):
152 super().setDefaults()
153 # stampSize should be at least 25 so that
154 # i) aperture flux with 12 pixel radius can be compared to PSF flux.
155 # ii) fake sources injected to match the 12 pixel aperture flux get
156 # measured correctly
157 # stampSize should also be at least sqrt(2)*modelSize/samplingSize so
158 # that rotated images have support in the model
159
160 self.stampSize = 25
161 # Resize the stamp to accommodate the model, but only if necessary.
162 if self.useCoordinates == "sky":
163 self.stampSize = max(25, 2*int(0.5*self.modelSize*np.sqrt(2)/self.samplingSize) + 1)
164
int max

◆ validate()

lsst.meas.extensions.piff.piffPsfDeterminer.PiffPsfDeterminerConfig.validate ( self)

Definition at line 165 of file piffPsfDeterminer.py.

165 def validate(self):
166 super().validate()
167
168 if (stamp_size := self.stampSize) is not None:
169 model_size = self.modelSize
170 sampling_size = self.samplingSize
171 if self.useCoordinates == 'sky':
172 min_stamp_size = int(np.sqrt(2) * model_size / sampling_size)
173 else:
174 min_stamp_size = int(model_size / sampling_size)
175
176 if stamp_size < min_stamp_size:
177 msg = (f"PIFF model size of {model_size} is too large for stamp size {stamp_size}. "
178 f"Set stampSize >= {min_stamp_size}"
179 )
180 raise pexConfig.FieldValidationError(self.__class__.modelSize, self, msg)
181
182

Member Data Documentation

◆ debugStarData

lsst.meas.extensions.piff.piffPsfDeterminer.PiffPsfDeterminerConfig.debugStarData
static
Initial value:
= pexConfig.Field[bool](
doc="Include star images used for fitting in PSF model object.",
default=False
)

Definition at line 123 of file piffPsfDeterminer.py.

◆ interpolant

lsst.meas.extensions.piff.piffPsfDeterminer.PiffPsfDeterminerConfig.interpolant
static
Initial value:
= pexConfig.Field[str](
doc="GalSim interpolant name for Piff to use. "
"Options include 'Lanczos(N)', where N is an integer, along with "
"galsim.Cubic, galsim.Delta, galsim.Linear, galsim.Nearest, "
"galsim.Quintic, and galsim.SincInterpolant. Ignored if "
"piffPsfConfigYaml is set.",
check=_validateGalsimInterpolant,
default="Lanczos(11)",
)

Definition at line 114 of file piffPsfDeterminer.py.

◆ maxSNR

lsst.meas.extensions.piff.piffPsfDeterminer.PiffPsfDeterminerConfig.maxSNR
static
Initial value:
= pexConfig.Field[float](
doc="Rescale the weight of bright stars such that their SNR is less "
"than this value.",
default=200.0
)

Definition at line 101 of file piffPsfDeterminer.py.

◆ minimumUnmaskedFraction

lsst.meas.extensions.piff.piffPsfDeterminer.PiffPsfDeterminerConfig.minimumUnmaskedFraction
static
Initial value:
= pexConfig.Field[float](
doc="Minimum fraction of unmasked pixels required to use star.",
default=0.5
)

Definition at line 110 of file piffPsfDeterminer.py.

◆ modelSize

lsst.meas.extensions.piff.piffPsfDeterminer.PiffPsfDeterminerConfig.modelSize
static
Initial value:
= pexConfig.Field[int](
doc="Internal model size for PIFF (typically odd, but not enforced). "
"Partially ignored if piffPsfConfigYaml is set.",
default=25,
)

Definition at line 86 of file piffPsfDeterminer.py.

◆ outlierMaxRemove

lsst.meas.extensions.piff.piffPsfDeterminer.PiffPsfDeterminerConfig.outlierMaxRemove
static
Initial value:
= pexConfig.Field[float](
doc="Max fraction of stars to remove as outliers each iteration. "
"Ignored if piffPsfConfigYaml is set.",
default=0.05
)

Definition at line 96 of file piffPsfDeterminer.py.

◆ outlierNSigma

lsst.meas.extensions.piff.piffPsfDeterminer.PiffPsfDeterminerConfig.outlierNSigma
static
Initial value:
= pexConfig.Field[float](
doc="n sigma for chisq outlier rejection. "
"Ignored if piffPsfConfigYaml is set.",
default=4.0
)

Definition at line 91 of file piffPsfDeterminer.py.

◆ piffLoggingLevel

lsst.meas.extensions.piff.piffPsfDeterminer.PiffPsfDeterminerConfig.piffLoggingLevel
static
Initial value:
= pexConfig.RangeField[int](
doc="PIFF-specific logging level, from 0 (least chatty) to 3 (very verbose); "
"note that logs will come out with unrelated notations (e.g. WARNING does "
"not imply a warning.)",
default=0,
min=0,
max=3,
)

Definition at line 136 of file piffPsfDeterminer.py.

◆ piffPsfConfigYaml

lsst.meas.extensions.piff.piffPsfDeterminer.PiffPsfDeterminerConfig.piffPsfConfigYaml
static
Initial value:
= pexConfig.Field[str](
doc="Configuration file for PIFF in YAML format. This overrides many "
"other settings in this config and is not validated ahead of runtime.",
default=None,
optional=True,
)

Definition at line 144 of file piffPsfDeterminer.py.

◆ samplingSize

lsst.meas.extensions.piff.piffPsfDeterminer.PiffPsfDeterminerConfig.samplingSize
static
Initial value:
= pexConfig.Field[float](
doc="Resolution of the internal PSF model relative to the pixel size; "
"e.g. 0.5 is equal to 2x oversampling. This affects only the size of "
"the PSF model stamp if piffPsfConfigYaml is set.",
default=1,
)

Definition at line 80 of file piffPsfDeterminer.py.

◆ spatialOrder

lsst.meas.extensions.piff.piffPsfDeterminer.PiffPsfDeterminerConfig.spatialOrder
static
Initial value:
= pexConfig.Field[int](
doc="Spatial order for PSF kernel creation. "
"Ignored if piffPsfConfigYaml is set.",
default=2,
)

Definition at line 75 of file piffPsfDeterminer.py.

◆ stampSize

lsst.meas.extensions.piff.piffPsfDeterminer.PiffPsfDeterminerConfig.stampSize

Definition at line 160 of file piffPsfDeterminer.py.

◆ useCoordinates

lsst.meas.extensions.piff.piffPsfDeterminer.PiffPsfDeterminerConfig.useCoordinates
static
Initial value:
= pexConfig.ChoiceField[str](
doc="Which spatial coordinates to regress against in PSF modeling.",
allowed=dict(
pixel='Regress against pixel coordinates',
field='Regress against field angles',
sky='Regress against RA/Dec'
),
default='pixel'
)

Definition at line 127 of file piffPsfDeterminer.py.

◆ zeroWeightMaskBits

lsst.meas.extensions.piff.piffPsfDeterminer.PiffPsfDeterminerConfig.zeroWeightMaskBits
static
Initial value:
= pexConfig.ListField[str](
doc="List of mask bits for which to set pixel weights to zero.",
default=['BAD', 'CR', 'INTRP', 'SAT', 'SUSPECT', 'NO_DATA']
)

Definition at line 106 of file piffPsfDeterminer.py.


The documentation for this class was generated from the following file: