LSST Applications 27.0.0,g0265f82a02+469cd937ee,g02d81e74bb+21ad69e7e1,g1470d8bcf6+cbe83ee85a,g2079a07aa2+e67c6346a6,g212a7c68fe+04a9158687,g2305ad1205+94392ce272,g295015adf3+81dd352a9d,g2bbee38e9b+469cd937ee,g337abbeb29+469cd937ee,g3939d97d7f+72a9f7b576,g487adcacf7+71499e7cba,g50ff169b8f+5929b3527e,g52b1c1532d+a6fc98d2e7,g591dd9f2cf+df404f777f,g5a732f18d5+be83d3ecdb,g64a986408d+21ad69e7e1,g858d7b2824+21ad69e7e1,g8a8a8dda67+a6fc98d2e7,g99cad8db69+f62e5b0af5,g9ddcbc5298+d4bad12328,ga1e77700b3+9c366c4306,ga8c6da7877+71e4819109,gb0e22166c9+25ba2f69a1,gb6a65358fc+469cd937ee,gbb8dafda3b+69d3c0e320,gc07e1c2157+a98bf949bb,gc120e1dc64+615ec43309,gc28159a63d+469cd937ee,gcf0d15dbbd+72a9f7b576,gdaeeff99f8+a38ce5ea23,ge6526c86ff+3a7c1ac5f1,ge79ae78c31+469cd937ee,gee10cc3b42+a6fc98d2e7,gf1cff7945b+21ad69e7e1,gfbcc870c63+9a11dc8c8f
LSST Data Management Base Package
|
Public Member Functions | |
__init__ (self, config, *display=None, **kwargs) | |
run (self, exp, *donutDiameter=None, doDisplay=False) | |
Static Public Member Functions | |
detectObjectsInExp (exp, nSigma, nPixMin, grow=0) | |
checkResult (exp, centroid, srcNum, percentile) | |
Public Attributes | |
display | |
centroidName | |
shapeName | |
schema | |
control | |
centroider | |
sdssShape | |
shaper | |
apFluxControl | |
apFluxer | |
table | |
plateScale | |
Static Public Attributes | |
ConfigClass = QuickFrameMeasurementTaskConfig | |
Protected Member Functions | |
_calcBrightestObjSrcNum (self, objData) | |
_measureFp (self, fp, exp) | |
_getDataFromSrcRecord (self, src) | |
_run (self, exp, *donutDiameter=None, doDisplay=False) | |
Static Protected Member Functions | |
_calcMedianXxYy (objData) | |
_getCenterOfMass (exp, nominalCentroid, boxSize) | |
_getDataFromFootprintOnly (fp, exp) | |
_measurementResultToDict (measurementResult) | |
_makeEmptyReturnStruct () | |
Static Protected Attributes | |
str | _DefaultName = 'quickFrameMeasurementTask' |
WARNING: An experimental new task with changable API! Do not rely on yet! This task finds the centroid of the brightest source in a given CCD-image and returns its centroid and a rough estimate of the seeing/PSF. It is designed for speed, such that it can be used in observing scripts to provide pointing offsets, allowing subsequent pointings to place a source at an exact pixel position. The approach taken here is deliberately sub-optimal in the detection and measurement sense, with all optimisation being done for speed and robustness of the result. A small set of unit tests exist for this task, which run automatically if afwdata is setup. These, however, are stricky unit tests, and will not catch algorithmic regressions. TODO: DM-29038 exists to merge a regression real test which runs against 1,000 LATISS images, but is therefore slow and requires access to the data. Parameters ---------- config : `lsst.pipe.tasks.quickFrameMeasurement.QuickFrameMeasurementTaskConfig` Configuration class for the QuickFrameMeasurementTask. display : `lsst.afw.display.Display`, optional The display to use for showing the images, detections and centroids. Returns ------- result : `lsst.pipe.base.Struct` Return strucure containing whether the task was successful, the main source's centroid, its the aperture fluxes, the ixx and iyy of the source, and the median ixx, iyy of the detections in the exposure. See run() method for further details. Raises ------ This task should *never* raise, as the run() method is enclosed in an except Exception block, so that it will never fail during observing. Failure modes should be limited to returning a return Struct() with the same structure as the success case, with all value set to np.nan but with result.success=False.
Definition at line 98 of file quickFrameMeasurement.py.
lsst.pipe.tasks.quickFrameMeasurement.QuickFrameMeasurementTask.__init__ | ( | self, | |
config, | |||
* | display = None, | ||
** | kwargs ) |
Definition at line 144 of file quickFrameMeasurement.py.
|
protected |
Find the brightest source which passes the cuts among the sources. Parameters ---------- objData : `dict` of `dict` Dictionary, keyed by source number, containing the measurements. Returns ------- srcNum : `int` The source number of the brightest source which passes the cuts.
Definition at line 270 of file quickFrameMeasurement.py.
|
staticprotected |
Return the median ixx and iyy for object in the image.
Definition at line 229 of file quickFrameMeasurement.py.
|
staticprotected |
Get the centre of mass around a point in the image. Parameters ---------- exp : `lsst.afw.image.Exposure` The exposure in question. nominalCentroid : `tuple` of `float` Nominal location of the centroid in pixel coordinates. boxSize : `int` The size of the box around the nominalCentroid in which to measure the centre of mass. Returns ------- com : `tuple` of `float` The locaiton of the centre of mass of the brightest source in pixel coordinates.
Definition at line 237 of file quickFrameMeasurement.py.
|
staticprotected |
Get the shape, centroid and flux from a footprint. Parameters ---------- fp : `lsst.afw.detection.Footprint` The footprint to measure. exp : `lsst.afw.image.Exposure` The footprint's parent exposure. Returns ------- srcData : `lsst.pipe.base.Struct` The struct containing the extracted measurements.
Definition at line 382 of file quickFrameMeasurement.py.
|
protected |
Extract the shapes and centroids from a source record. Parameters ---------- src : `lsst.afw.table.SourceRecord` The source record from which to extract the measurements. Returns ------- srcData : `lsst.pipe.base.Struct` The struct containing the extracted measurements.
Definition at line 353 of file quickFrameMeasurement.py.
|
staticprotected |
Make the default/template return struct, with defaults to False/nan. Returns ------- objData : `lsst.pipe.base.Struct` The default template return structure.
Definition at line 433 of file quickFrameMeasurement.py.
|
protected |
Run the measurements on a footprint. Parameters ---------- fp : `lsst.afw.detection.Footprint` The footprint to measure. exp : `lsst.afw.image.Exposure` The footprint's parent exposure. Returns ------- src : `lsst.afw.table.SourceRecord` The source record containing the measurements.
Definition at line 331 of file quickFrameMeasurement.py.
|
staticprotected |
Convenience function to repackage measurement results to a dict. Parameters ---------- measurementResult : `lsst.afw.table.SourceRecord` The source record to convert to a dict. Returns ------- objData : `dict` The dict containing the extracted data.
Definition at line 410 of file quickFrameMeasurement.py.
|
protected |
The actual run method, called by run() Behaviour is documented in detail in the main run().
Definition at line 498 of file quickFrameMeasurement.py.
|
static |
Perform a final check that centroid location is actually bright. Parameters ---------- exp : `lsst.afw.image.Exposure` The exposure on which to operate centroid : `tuple` of `float` Location of the centroid in pixel coordinates scrNum : `int` Number of the source in the source catalog. Only used if the check is failed, for debug purposes. percentile : `float` Image's percentile above which the pixel containing the centroid must be in order to pass the check. Raises ------ ValueError Raised if the centroid's pixel is not above the percentile threshold
Definition at line 198 of file quickFrameMeasurement.py.
|
static |
Run a very basic but fast threshold-based object detection on an exposure Return the footPrintSet for the objects in a postISR exposure. Parameters ---------- exp : `lsst.afw.image.Exposure` Image in which to detect objects. nSigma : `float` nSigma above image's stddev at which to set the detection threshold. nPixMin : `int` Minimum number of pixels for detection. grow : `int` Grow the detected footprint by this many pixels. Returns ------- footPrintSet : `lsst.afw.detection.FootprintSet` FootprintSet containing the detections.
Definition at line 170 of file quickFrameMeasurement.py.
lsst.pipe.tasks.quickFrameMeasurement.QuickFrameMeasurementTask.run | ( | self, | |
exp, | |||
* | donutDiameter = None, | ||
doDisplay = False ) |
Calculate position, flux and shape of the brightest star in an image. Given an an assembled (and at least minimally ISRed exposure), quickly and robustly calculate the centroid of the brightest star in the image. Parameters ---------- exp : `lsst.afw.image.Exposure` The exposure in which to find and measure the brightest star. donutDiameter : `int` or `float`, optional The expected diameter of donuts in pixels for use in the centre of mass centroid measurement. If None is provided, the config option is used. doDisplay : `bool` Display the image and found sources. A diplay object must have been passed to the task constructor. Returns ------- result : `lsst.pipe.base.Struct` Struct containing: Whether the task ran successfully and found the object (bool) The object's centroid (float, float) The object's ixx, iyy (float, float) The object's 70 pixel aperture flux (float) The object's 25 pixel aperture flux (float) The images's median ixx, iyy (float, float) If unsuccessful, the success field is False and all other results are np.nan of the expected shape. Notes ----- Because of this task's involvement in observing scripts, the run method should *never* raise. Failure modes are noted by returning a Struct with the same structure as the success case, with all value set to np.nan and result.success=False.
Definition at line 451 of file quickFrameMeasurement.py.
|
staticprotected |
Definition at line 142 of file quickFrameMeasurement.py.
lsst.pipe.tasks.quickFrameMeasurement.QuickFrameMeasurementTask.apFluxControl |
Definition at line 162 of file quickFrameMeasurement.py.
lsst.pipe.tasks.quickFrameMeasurement.QuickFrameMeasurementTask.apFluxer |
Definition at line 164 of file quickFrameMeasurement.py.
lsst.pipe.tasks.quickFrameMeasurement.QuickFrameMeasurementTask.centroider |
Definition at line 159 of file quickFrameMeasurement.py.
lsst.pipe.tasks.quickFrameMeasurement.QuickFrameMeasurementTask.centroidName |
Definition at line 152 of file quickFrameMeasurement.py.
|
static |
Definition at line 141 of file quickFrameMeasurement.py.
lsst.pipe.tasks.quickFrameMeasurement.QuickFrameMeasurementTask.control |
Definition at line 157 of file quickFrameMeasurement.py.
lsst.pipe.tasks.quickFrameMeasurement.QuickFrameMeasurementTask.display |
Definition at line 148 of file quickFrameMeasurement.py.
lsst.pipe.tasks.quickFrameMeasurement.QuickFrameMeasurementTask.plateScale |
Definition at line 506 of file quickFrameMeasurement.py.
lsst.pipe.tasks.quickFrameMeasurement.QuickFrameMeasurementTask.schema |
Definition at line 154 of file quickFrameMeasurement.py.
lsst.pipe.tasks.quickFrameMeasurement.QuickFrameMeasurementTask.sdssShape |
Definition at line 160 of file quickFrameMeasurement.py.
lsst.pipe.tasks.quickFrameMeasurement.QuickFrameMeasurementTask.shapeName |
Definition at line 153 of file quickFrameMeasurement.py.
lsst.pipe.tasks.quickFrameMeasurement.QuickFrameMeasurementTask.shaper |
Definition at line 161 of file quickFrameMeasurement.py.
lsst.pipe.tasks.quickFrameMeasurement.QuickFrameMeasurementTask.table |
Definition at line 167 of file quickFrameMeasurement.py.