lsst.meas.extensions.trailedSources g9b9dfce982+0fdee8fa3c
|
Public Member Functions | |
getExecutionOrder (cls) | |
__init__ (self, config, name, schema, metadata, logName=None) | |
measure (self, measRecord, exposure) | |
check_trail (self, measRecord, exposure, x0, y0, x1, y1, length) | |
fail (self, measRecord, error=None) | |
findLength (cls, Ixx, Iyy) | |
Static Public Member Functions | |
computeLength (Ixx, Iyy) | |
computeRaDec (exposure, x, y) | |
Static Public Attributes | |
ConfigClass = SingleFrameNaiveTrailConfig | |
Static Protected Member Functions | |
_computeSecondMomentDiff (z, c) | |
_gradFindLength (Ixx, Iyy, z, c) | |
Naive trailed source measurement plugin Measures the length, angle from +x-axis, and end points of an extended source using the second moments. Parameters ---------- config: `SingleFrameNaiveTrailConfig` Plugin configuration. name: `str` Plugin name. schema: `lsst.afw.table.Schema` Schema for the output catalog. metadata: `lsst.daf.base.PropertySet` Metadata to be attached to output catalog. Notes ----- This measurement plugin aims to utilize the already measured adaptive second moments to naively estimate the length and angle, and thus end-points, of a fast-moving, trailed source. The length is solved for via finding the root of the difference between the numerical (stack computed) and the analytic adaptive second moments. The angle, theta, from the x-axis is also computed via adaptive moments: theta = arctan(2*Ixy/(Ixx - Iyy))/2. The end points of the trail are then given by (xc +/- (length/2)*cos(theta) and yc +/- (length/2)*sin(theta)), with xc and yc being the centroid coordinates. See also -------- lsst.meas.base.SingleFramePlugin
Definition at line 48 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.__init__ | ( | self, | |
config, | |||
name, | |||
schema, | |||
metadata, | |||
logName = None ) |
Definition at line 90 of file NaivePlugin.py.
|
staticprotected |
Compute difference of the numerical and analytic second moments. Parameters ---------- z : `float` Proportional to the length of the trail. (see notes) c : `float` Constant (see notes) Returns ------- diff : `float` Difference in numerical and analytic second moments. Notes ----- This is a simplified expression for the difference between the stack computed adaptive second-moment and the analytic solution. The variable z is proportional to the length such that length=2*z*sqrt(2*(Ixx+Iyy)), and c is a constant (c = 4*Ixx/((Ixx+Iyy)*sqrt(pi))). Both have been defined to avoid unnecessary floating-point operations in the root finder.
Definition at line 364 of file NaivePlugin.py.
|
staticprotected |
Compute the gradient of the findLength function.
Definition at line 430 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.check_trail | ( | self, | |
measRecord, | |||
exposure, | |||
x0, | |||
y0, | |||
x1, | |||
y1, | |||
length ) |
Set flags for edge pixels, off chip, and nan trail coordinates and flag if trail length is three times larger than psf. Check if the coordinates of the beginning and ending of the trail fall inside the exposures bounding box. If not, set the off_chip flag. If the beginning or ending falls within a pixel marked as edge, set the edge flag. If any of the coordinates happens to fall on a nan, then set the nan flag. Additionally, check if the trail is three times larger than the psf. If so, set the suspect trail flag. Parameters ---------- measRecord: `lsst.afw.MeasurementRecord` Record describing the object being measured. exposure: `lsst.afw.Exposure` Pixel data to be measured. x0: `float` x coordinate of the beginning of the trail. y0: `float` y coordinate of the beginning of the trail. x1: `float` x coordinate of the end of the trail. y1: `float` y coordinate of the end of the trail.
Definition at line 278 of file NaivePlugin.py.
|
static |
Compute the length of a trail, given unweighted second-moments.
Definition at line 456 of file NaivePlugin.py.
|
static |
Convert pixel coordinates to RA and Dec. Parameters ---------- exposure : `lsst.afw.image.ExposureF` Exposure object containing the WCS. x : `float` x coordinate of the trail centroid y : `float` y coodinate of the trail centroid Returns ------- ra : `float` Right ascension. dec : `float` Declination.
Definition at line 468 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.fail | ( | self, | |
measRecord, | |||
error = None ) |
Record failure See also -------- lsst.meas.base.SingleFramePlugin.fail
Definition at line 351 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.findLength | ( | cls, | |
Ixx, | |||
Iyy ) |
Find the length of a trail, given adaptive second-moments. Uses a root finder to compute the length of a trail corresponding to the adaptive second-moments computed by previous measurements (ie. SdssShape). Parameters ---------- Ixx : `float` Adaptive second-moment along x-axis. Iyy : `float` Adaptive second-moment along y-axis. Returns ------- length : `float` Length of the trail. results : `scipy.optimize.RootResults` Contains messages about convergence from the root finder.
Definition at line 393 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.getExecutionOrder | ( | cls | ) |
Definition at line 85 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.measure | ( | self, | |
measRecord, | |||
exposure ) |
Run the Naive trailed source measurement algorithm. Parameters ---------- measRecord : `lsst.afw.table.SourceRecord` Record describing the object being measured. exposure : `lsst.afw.image.Exposure` Pixel data to be measured. See also -------- lsst.meas.base.SingleFramePlugin.measure
Definition at line 137 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.centroidExtractor |
Definition at line 134 of file NaivePlugin.py.
|
static |
Definition at line 82 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.EDGE |
Definition at line 127 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.FAILURE |
Definition at line 122 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.flagHandler |
Definition at line 132 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.keyAngle |
Definition at line 104 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.keyAngleErr |
Definition at line 119 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.keyDec |
Definition at line 97 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.keyFlux |
Definition at line 102 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.keyFluxErr |
Definition at line 115 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.keyLength |
Definition at line 103 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.keyLengthErr |
Definition at line 117 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.keyRa |
Definition at line 96 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.keyX0 |
Definition at line 98 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.keyX0Err |
Definition at line 107 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.keyX1 |
Definition at line 100 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.keyX1Err |
Definition at line 111 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.keyY0 |
Definition at line 99 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.keyY0Err |
Definition at line 109 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.keyY1 |
Definition at line 101 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.keyY1Err |
Definition at line 113 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.log |
Definition at line 135 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.NAN |
Definition at line 129 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.NO_CONVERGE |
Definition at line 124 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.NO_FLUX |
Definition at line 123 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.NO_SIGMA |
Definition at line 125 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.OFFIMAGE |
Definition at line 128 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.SAFE_CENTROID |
Definition at line 126 of file NaivePlugin.py.
lsst.meas.extensions.trailedSources.NaivePlugin.SingleFrameNaiveTrailPlugin.SUSPECT_LONG_TRAIL |
Definition at line 130 of file NaivePlugin.py.