LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
Measurement of Sources, specifically ones from difference images, for characterization as dipoles. More...
Public Member Functions | |
def | __init__ |
Create the Task, and add Task-specific fields to the provided measurement table schema. More... | |
def | classify |
Create the records needed for dipole classification, and run classifier. More... | |
def | run |
Run dipole measurement and classification. More... | |
Public Attributes | |
dipoleAnalysis | |
Static Public Attributes | |
ConfigClass = DipoleMeasurementConfig | |
Static Private Attributes | |
string | _DefaultName = "dipoleMeasurement" |
string | _ClassificationFlag = "classification_dipole" |
Measurement of Sources, specifically ones from difference images, for characterization as dipoles.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This class provies a specialized set of Source measurements that allow the user to test the hypothesis that the Source is a dipole. This includes a set of measurements derived from intermediate base classes DipoleCentroidAlgorithm and DipoleFluxAlgorithm. Their respective algorithm control classes are defined in DipoleCentroidControl and DipoleFluxControl. Each centroid and flux measurement will have .neg (negative) and .pos (positive lobe) fields.
The first set of measurements uses a "naive" alrogithm for centroid and flux measurements, implemented in NaiveDipoleCentroidControl and NaiveDipoleFluxControl. The algorithm uses a naive 3x3 weighted moment around the nominal centroids of each peak in the Source Footprint. These algorithms fill the table fields centroid.dipole.naive.* and flux.dipole.naive.*.
The second set of measurements undertakes a joint-Psf model on the negative and positive lobe simultaneously. This fit simultaneously solves for the negative and positive lobe centroids and fluxes using non-linear least squares minimization. The fields are stored in table elements flux.dipole.psf.*.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Create the Task, and add Task-specific fields to the provided measurement table schema.
[in,out] | schema | Schema object for measurement fields; modified in-place. |
[in,out] | algMetadata | Passed to MeasureSources object to be filled with metadata by algorithms (e.g. radii for aperture photometry). |
**kwds | Passed to Task.__init__. |
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Run dipole measurement and classification.
sources | diaSources that will be measured using dipole measurement |
exposure | Exposure on which the diaSources were detected |
**kwds | Sent to SingleFrameMeasurementTask |
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
See DipoleMeasurementConfig and DipoleClassificationConfig
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
No specific values are set in the Task metadata. However, the Source schema are modified to store the results of the dipole-specific measurements. These additional fields include:
. classification.dipole : probability of being a dipole
. centroid.dipole.naive.pos : unweighted 3x3 first moment centroid
. centroid.dipole.naive.pos.err : covariance matrix for centroid.dipole.naive.pos
. centroid.dipole.naive.pos.flags : set if the centroid.dipole.naive.pos measurement did not fully succeed
. centroid.dipole.naive.neg : unweighted 3x3 first moment centroid
. centroid.dipole.naive.neg.err : covariance matrix for centroid.dipole.naive.neg
. centroid.dipole.naive.neg.flags : set if the centroid.dipole.naive.neg measurement did not fully succeed
. flux.dipole.naive.pos : raw flux counts
. flux.dipole.naive.pos.err : uncertainty for flux.dipole.naive.pos
. flux.dipole.naive.pos.flags : set if the flux.dipole.naive.pos measurement failed
. flux.dipole.naive.neg : raw flux counts
. flux.dipole.naive.neg.err : uncertainty for flux.dipole.naive.neg
. flux.dipole.naive.neg.flags : set if the flux.dipole.naive.neg measurement failed
. flux.dipole.naive.npos : number of positive pixels
. flux.dipole.naive.nneg : number of negative pixels
. flux.dipole.psf.pos : jointly fitted psf flux counts
. flux.dipole.psf.pos.err : uncertainty for flux.dipole.psf.pos
. flux.dipole.psf.pos.flags : set if the flux.dipole.psf.pos measurement failed
. flux.dipole.psf.neg : jointly fitted psf flux counts
. flux.dipole.psf.neg.err : uncertainty for flux.dipole.psf.neg
. flux.dipole.psf.neg.flags : set if the flux.dipole.psf.neg measurement failed
. flux.dipole.psf.chi2dof : chi2 per degree of freedom of fit
. flux.dipole.psf.centroid : average of the postive and negative lobe positions
. flux.dipole.psf.centroid.err : covariance matrix for flux.dipole.psf.centroid
. flux.dipole.psf.centroid.flags : set if the flux.dipole.psf.centroid measurement did not fully succeed
. flux.dipole.psf.neg.centroid : psf fitted center of negative lobe
. flux.dipole.psf.neg.centroid.err : covariance matrix for flux.dipole.psf.neg.centroid
. flux.dipole.psf.neg.centroid.flags : set if the flux.dipole.psf.neg.centroid measurement did not fully succeed
. flux.dipole.psf.pos.centroid : psf fitted center of positive lobe
. flux.dipole.psf.pos.centroid.err : covariance matrix for flux.dipole.psf.pos.centroid
. flux.dipole.psf.pos.centroid.flags : set if the flux.dipole.psf.pos.centroid measurement did not fully succeed
. flux.dipole.psf.flags.maxpix : set if too large a footprint was sent to the algorithm
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
The command line task interface supports a flag -d/–debug
to import debug.py from your PYTHONPATH
. The relevant contents of debug.py for this Task include:
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This code is dipoleMeasTask.py in the examples directory, and can be run as e.g.
Create a default source schema that we will append fields to as we add more algorithms:
Create the detection and measurement Tasks, with some minor tweaking of their configs:
Having fully initialied the schema, we create a Source table from it:
Run detection:
Because we are looking for dipoles, we need to merge the positive and negative detections:
Finally, perform measurement (both standard and dipole-specialized) on the merged sources:
Optionally display debugging information:
Definition at line 74 of file dipoleMeasurement.py.
def lsst.ip.diffim.dipoleMeasurement.DipoleMeasurementTask.__init__ | ( | self, | |
schema, | |||
algMetadata = None , |
|||
kwds | |||
) |
Create the Task, and add Task-specific fields to the provided measurement table schema.
[in,out] | schema | Schema object for measurement fields; modified in-place. |
[in,out] | algMetadata | Passed to MeasureSources object to be filled with metadata by algorithms (e.g. radii for aperture photometry). |
**kwds | Passed to Task.__init__. |
Definition at line 277 of file dipoleMeasurement.py.
def lsst.ip.diffim.dipoleMeasurement.DipoleMeasurementTask.classify | ( | self, | |
sources | |||
) |
Create the records needed for dipole classification, and run classifier.
[in,out] | sources | The diaSources to run classification on; modified in in-place |
Definition at line 289 of file dipoleMeasurement.py.
def lsst.ip.diffim.dipoleMeasurement.DipoleMeasurementTask.run | ( | self, | |
sources, | |||
exposure, | |||
kwds | |||
) |
Run dipole measurement and classification.
sources | diaSources that will be measured using dipole measurement |
exposure | Exposure on which the diaSources were detected |
**kwds | Sent to SingleFrameMeasurementTask |
Definition at line 321 of file dipoleMeasurement.py.
|
staticprivate |
Definition at line 275 of file dipoleMeasurement.py.
|
staticprivate |
Definition at line 274 of file dipoleMeasurement.py.
|
static |
Definition at line 273 of file dipoleMeasurement.py.
lsst.ip.diffim.dipoleMeasurement.DipoleMeasurementTask.dipoleAnalysis |
Definition at line 286 of file dipoleMeasurement.py.