LSST Applications g0265f82a02+d6b5cd48b5,g02d81e74bb+80768bd682,g04242d3e92+8eaa23c173,g06b2ea86fd+734f9505a2,g2079a07aa2+14824f138e,g212a7c68fe+5f4fc2ea00,g2305ad1205+293ab1327e,g2bbee38e9b+d6b5cd48b5,g337abbeb29+d6b5cd48b5,g3ddfee87b4+8eaa23c173,g487adcacf7+abec5a19c5,g50ff169b8f+5929b3527e,g52b1c1532d+a6fc98d2e7,g591dd9f2cf+97ef3b4495,g5a732f18d5+66d966b544,g5d7b63bc56+636c3c3fd8,g64a986408d+80768bd682,g858d7b2824+80768bd682,g8a8a8dda67+a6fc98d2e7,g99cad8db69+6282a5f541,g9ddcbc5298+d4bad12328,ga1e77700b3+246acaaf9c,ga8c6da7877+9e3c062e8e,gb0e22166c9+3863383f4c,gb6a65358fc+d6b5cd48b5,gba4ed39666+9664299f35,gbb8dafda3b+60f904e7bc,gc120e1dc64+1bf26d0180,gc28159a63d+d6b5cd48b5,gcf0d15dbbd+8eaa23c173,gd2a12a3803+f8351bc914,gdaeeff99f8+a38ce5ea23,ge79ae78c31+d6b5cd48b5,gee10cc3b42+a6fc98d2e7,gf1cff7945b+80768bd682,v24.1.5.rc1
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 518 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 623 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 663 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 714 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 641 of file maskStreaks.py.
lsst.pipe.tasks.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 540 of file maskStreaks.py.
lsst.pipe.tasks.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.maskedImage` The image in which to search for streaks. The mask detection plane corresponding to `config.detectedMaskPlane` must be set with the detected pixels. 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 587 of file maskStreaks.py.
|
staticprotected |
Definition at line 537 of file maskStreaks.py.
|
static |
Definition at line 536 of file maskStreaks.py.
lsst.pipe.tasks.maskStreaks.MaskStreaksTask.edges |
Definition at line 565 of file maskStreaks.py.
lsst.pipe.tasks.maskStreaks.MaskStreaksTask.lines |
Definition at line 566 of file maskStreaks.py.