|
lsst.pipe.tasks gcf790cdeb6+f6e4da7c1c
|
Public Member Functions | |
| __init__ (self, refObjLoader=None, **kwargs) | |
| setRefObjLoader (self, refObjLoader) | |
| run (self, exposure) | |
| selectSources (self, xvals, yvals, spikeRadii, mask) | |
| maskSources (self, xvals, yvals, spikeRadii, mask) | |
| makeSingleMask (self, x, y, r) | |
| set_diffraction_angle (self, exposure) | |
| calculateReferenceRadius (self, magnitudes) | |
| extractMagnitudes (self, refCat, filterLabel) | |
Public Attributes | |
| refObjLoader = refObjLoader | |
| int | angles |
Static Public Attributes | |
| ConfigClass = DiffractionSpikeMaskConfig | |
Static Protected Attributes | |
| str | _DefaultName = "diffractionSpikeMask" |
Load a reference catalog to identify bright stars that are likely to be
saturated and have visible diffraction spikes that need to be masked.
Attributes
----------
angles : `numpy.ndarray`
Expected angles of diffraction spikes for bright sources.
refObjLoader : `lsst.meas.algorithms.ReferenceObjectLoader`
An instance of a reference object loader.
Definition at line 138 of file diffractionSpikeMask.py.
| lsst.pipe.tasks.diffractionSpikeMask.DiffractionSpikeMaskTask.__init__ | ( | self, | |
| refObjLoader = None, | |||
| ** | kwargs ) |
Definition at line 152 of file diffractionSpikeMask.py.
| lsst.pipe.tasks.diffractionSpikeMask.DiffractionSpikeMaskTask.calculateReferenceRadius | ( | self, | |
| magnitudes ) |
Calculate the size of the region to mask for each bright star.
Parameters
----------
magnitudes : `numpy.ndarray`
Magnitudes of the bright stars.
Returns
-------
radii : `numpy.ndarray`
Array of radius values for the given magnitudes.
Definition at line 336 of file diffractionSpikeMask.py.
| lsst.pipe.tasks.diffractionSpikeMask.DiffractionSpikeMaskTask.extractMagnitudes | ( | self, | |
| refCat, | |||
| filterLabel ) |
Extract magnitude and magnitude error arrays from the given catalog.
Parameters
----------
refCat : `lsst.afw.table.SimpleCatalog`
The input reference catalog.
filterLabel : `str`
Label of filter being calibrated.
Returns
-------
result : `lsst.pipe.base.Struct`
Results as a struct with attributes:
``refMag``
Reference magnitude (`np.array`).
``refMagErr``
Reference magnitude error (`np.array`).
``refFluxFieldList``
A list of field names of the reference catalog used for fluxes (1 or 2 strings) (`list`).
Definition at line 353 of file diffractionSpikeMask.py.
| lsst.pipe.tasks.diffractionSpikeMask.DiffractionSpikeMaskTask.makeSingleMask | ( | self, | |
| x, | |||
| y, | |||
| r ) |
Create a mask plane centered on a single source with the BRIGHT mask
set. This mask does not have to be fully contained in the bounding box
of the mask of the science image.
Parameters
----------
x, y : `float`
Coordinates of the source to be masked.
r : `float`
Expected length of a diffraction spike for a source with a
magnitude
Returns
-------
mask : `lsst.afw.image.Mask`
A mask plane centered on the single source being modeled.
Definition at line 278 of file diffractionSpikeMask.py.
| lsst.pipe.tasks.diffractionSpikeMask.DiffractionSpikeMaskTask.maskSources | ( | self, | |
| xvals, | |||
| yvals, | |||
| spikeRadii, | |||
| mask ) |
Apply the SPIKE mask for a given set of coordinates. The mask plane
will be modified in place.
Parameters
----------
xvals, yvals : `numpy.ndarray`
Array of x- and y-values of bright sources to mask.
spikeRadii : `numpy.ndarray`
Array of radius values for each bright source.
mask : `lsst.afw.image.Mask`
The mask plane of the image to set the SPIKE mask plane.
Definition at line 257 of file diffractionSpikeMask.py.
| lsst.pipe.tasks.diffractionSpikeMask.DiffractionSpikeMaskTask.run | ( | self, | |
| exposure ) |
Load reference objects and mask bright stars on an exposure.
Parameters
----------
exposure : `lsst.afw.image.Exposure`
Science exposure to set the SPIKE plane. Will be modified in place.
Returns
-------
spikeCat : `lsst.afw.table.SimpleCatalog`
The entries from the reference catalog selected as stars with
diffraction spikes.
Definition at line 167 of file diffractionSpikeMask.py.
| lsst.pipe.tasks.diffractionSpikeMask.DiffractionSpikeMaskTask.selectSources | ( | self, | |
| xvals, | |||
| yvals, | |||
| spikeRadii, | |||
| mask ) |
Select saturated sources, and bright sources that are off the image.
Parameters
----------
xvals, yvals : `numpy.ndarray`
Array of x- and y-values of bright sources to mask.
mask : `lsst.afw.image.Mask`
The mask plane of the image to set the SPIKE mask plane.
spikeRadii : `numpy.ndarray`
Predicted lengths in pixels of the diffraction spikes for each
bright source.
Returns
-------
candidates : `numpy.ndarray`
Array of boolean flags indicating whether the given coordinates
should have a diffraction spike mask calculated.
Definition at line 222 of file diffractionSpikeMask.py.
| lsst.pipe.tasks.diffractionSpikeMask.DiffractionSpikeMaskTask.set_diffraction_angle | ( | self, | |
| exposure ) |
Calculate the angle of diffration spikes on the image given the
camera rotation.
Parameters
----------
exposure : `lsst.afw.image.Exposure`
The exposure to calculate the expected angle of diffraction spikes.
Definition at line 322 of file diffractionSpikeMask.py.
| lsst.pipe.tasks.diffractionSpikeMask.DiffractionSpikeMaskTask.setRefObjLoader | ( | self, | |
| refObjLoader ) |
Set the reference object loader for the task.
Parameters
----------
refObjLoader : `lsst.meas.algorithms.ReferenceObjectLoader`
An instance of a reference object loader.
Definition at line 156 of file diffractionSpikeMask.py.
|
staticprotected |
Definition at line 150 of file diffractionSpikeMask.py.
| int lsst.pipe.tasks.diffractionSpikeMask.DiffractionSpikeMaskTask.angles |
Definition at line 297 of file diffractionSpikeMask.py.
|
static |
Definition at line 149 of file diffractionSpikeMask.py.
| lsst.pipe.tasks.diffractionSpikeMask.DiffractionSpikeMaskTask.refObjLoader = refObjLoader |
Definition at line 154 of file diffractionSpikeMask.py.