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 | |
find (self, maskedImage) | |
run (self, maskedImage) | |
Public Attributes | |
edges | |
lines | |
Static Public Attributes | |
ConfigClass = MaskStreaksConfig | |
Protected Member Functions | |
_cannyFilter (self, image) | |
_runKHT (self, image) | |
_findClusters (self, lines) | |
_fitProfile (self, lines, maskedImage) | |
Static Protected Attributes | |
str | _DefaultName = "maskStreaks" |
Find streaks or other straight lines in image data. Nearby objects passing through the field of view of the telescope leave a bright trail in images. This class uses the Kernel Hough Transform (KHT) (Fernandes and Oliveira, 2007), implemented in `lsst.houghtransform`. The procedure works by taking a binary image, either provided as put or produced from the input data image, using a Canny filter to make an image of the edges in the original image, then running the KHT on the edge image. The KHT identifies clusters of non-zero points, breaks those clusters of points into straight lines, keeps clusters with a size greater than the user-set threshold, then performs a voting procedure to find the best-fit coordinates of any straight lines. Given the results of the KHT algorithm, clusters of lines are identified and grouped (generally these correspond to the two edges of a strea) and a profile is fit to the streak in the original (non-binary) image.
Definition at line 435 of file maskStreaks.py.
|
protected |
Apply a canny filter to the data in order to detect edges. Parameters ---------- image : `np.ndarray` 2-d image data on which to run filter. Returns ------- cannyData : `np.ndarray` 2-d image of edges found in input image.
Definition at line 542 of file maskStreaks.py.
|
protected |
Group lines that are close in parameter space and likely describe the same streak. Parameters ---------- lines : `LineCollection` Collection of lines to group into clusters. Returns ------- result : `LineCollection` Average `Line` for each cluster of `Line`s in the input `LineCollection`.
Definition at line 582 of file maskStreaks.py.
|
protected |
Fit the profile of the streak. Given the initial parameters of detected lines, fit a model for the streak to the original (non-binary image). The assumed model is a straight line with a Moffat profile. Parameters ---------- lines : `LineCollection` Collection of guesses for `Line`s detected in the image. maskedImage : `lsst.afw.image.maskedImage` Original image to be used to fit profile of streak. Returns ------- lineFits : `LineCollection` Collection of `Line` profiles fit to the data. finalMask : `np.ndarray` 2d mask array with detected streaks=1.
Definition at line 633 of file maskStreaks.py.
|
protected |
Run Kernel Hough Transform on image. Parameters ---------- image : `np.ndarray` 2-d image data on which to detect lines. Returns ------- result : `LineCollection` Collection of detected lines, with their detected rho and theta coordinates.
Definition at line 560 of file maskStreaks.py.
lsst.meas.algorithms.maskStreaks.MaskStreaksTask.find | ( | self, | |
maskedImage ) |
Find streaks in a masked image. Parameters ---------- maskedImage : `lsst.afw.image.maskedImage` The image in which to search for streaks. Returns ------- result : `lsst.pipe.base.Struct` Results as a struct with attributes: ``originalLines`` Lines identified by kernel hough transform. ``lineClusters`` Lines grouped into clusters in rho-theta space. ``lines`` Final result for lines after line-profile fit. ``mask`` 2-d boolean mask where detected lines are True.
Definition at line 457 of file maskStreaks.py.
lsst.meas.algorithms.maskStreaks.MaskStreaksTask.run | ( | self, | |
maskedImage ) |
Find and mask streaks in a masked image. Finds streaks in the image and modifies maskedImage in place by adding a mask plane with any identified streaks. Parameters ---------- maskedImage : `lsst.afw.image.Exposure` or `lsst.afw.image.maskedImage` The image in which to search for streaks. The mask detection plane corresponding to `config.detectedMaskPlane` must be set with the detected pixels. The mask will have a plane added with any detected streaks, and with the mask plane name set by self.config.streaksMaskPlane. Returns ------- result : `lsst.pipe.base.Struct` Results as a struct with attributes: ``originalLines`` Lines identified by kernel hough transform. ``lineClusters`` Lines grouped into clusters in rho-theta space. ``lines`` Final result for lines after line-profile fit.
Definition at line 504 of file maskStreaks.py.
|
staticprotected |
Definition at line 454 of file maskStreaks.py.
|
static |
Definition at line 453 of file maskStreaks.py.
lsst.meas.algorithms.maskStreaks.MaskStreaksTask.edges |
Definition at line 482 of file maskStreaks.py.
lsst.meas.algorithms.maskStreaks.MaskStreaksTask.lines |
Definition at line 483 of file maskStreaks.py.