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
|
#include <pybind11/pybind11.h>
#include <pybind11/numpy.h>
#include <pybind11/stl.h>
#include <pybind11/eigen.h>
#include <math.h>
#include <algorithm>
Go to the source code of this file.
Classes | |
class | Peak |
A Peak in a Footprint This class is meant to keep track of both the position and flux at the location of a maximum in a Footprint. More... | |
class | Footprint |
Typedefs | |
typedef Eigen::Array< int, 4, 1 > | Bounds |
typedef Eigen::Matrix< bool, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > | MatrixB |
Functions | |
template<typename M > | |
void | get_connected_pixels (const int i, const int j, Eigen::Ref< const M > image, Eigen::Ref< MatrixB, 0, Eigen::Stride< Eigen::Dynamic, Eigen::Dynamic > > unchecked, Eigen::Ref< MatrixB, 0, Eigen::Stride< Eigen::Dynamic, Eigen::Dynamic > > footprint, Eigen::Ref< Bounds, 0, Eigen::Stride< 4, 1 > > bounds, const double thresh=0) |
template<typename M > | |
MatrixB | get_connected_multipeak (Eigen::Ref< const M > image, const std::vector< std::vector< int > > centers, const double thresh=0) |
Proximal operator to trim pixels not connected to one of the source centers. | |
bool | sortBrightness (Peak a, Peak b) |
Sort two peaks, placing the brightest peak first. | |
template<typename M > | |
std::vector< Peak > | get_peaks (M &image, const double min_separation, const int y0, const int x0) |
template<typename M > | |
void | maskImage (Eigen::Ref< M, 0, Eigen::Stride< Eigen::Dynamic, Eigen::Dynamic > > image, Eigen::Ref< MatrixB, 0, Eigen::Stride< Eigen::Dynamic, Eigen::Dynamic > > footprint) |
template<typename M , typename P > | |
std::vector< Footprint > | get_footprints (Eigen::Ref< const M > image, const double min_separation, const int min_area, const double thresh, const bool find_peaks=true) |
PYBIND11_MODULE (detect_pybind11, mod) | |
typedef Eigen::Array<int, 4, 1> Bounds |
Definition at line 11 of file detect_pybind11.cc.
typedef Eigen::Matrix<bool, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> MatrixB |
Definition at line 12 of file detect_pybind11.cc.
MatrixB get_connected_multipeak | ( | Eigen::Ref< const M > | image, |
const std::vector< std::vector< int > > | centers, | ||
const double | thresh = 0 ) |
Proximal operator to trim pixels not connected to one of the source centers.
Definition at line 64 of file detect_pybind11.cc.
void get_connected_pixels | ( | const int | i, |
const int | j, | ||
Eigen::Ref< const M > | image, | ||
Eigen::Ref< MatrixB, 0, Eigen::Stride< Eigen::Dynamic, Eigen::Dynamic > > | unchecked, | ||
Eigen::Ref< MatrixB, 0, Eigen::Stride< Eigen::Dynamic, Eigen::Dynamic > > | footprint, | ||
Eigen::Ref< Bounds, 0, Eigen::Stride< 4, 1 > > | bounds, | ||
const double | thresh = 0 ) |
Definition at line 18 of file detect_pybind11.cc.
std::vector< Footprint > get_footprints | ( | Eigen::Ref< const M > | image, |
const double | min_separation, | ||
const int | min_area, | ||
const double | thresh, | ||
const bool | find_peaks = true ) |
Definition at line 246 of file detect_pybind11.cc.
std::vector< Peak > get_peaks | ( | M & | image, |
const double | min_separation, | ||
const int | y0, | ||
const int | x0 ) |
Sort the peaks in the footprint so that the brightest are first
Definition at line 128 of file detect_pybind11.cc.
void maskImage | ( | Eigen::Ref< M, 0, Eigen::Stride< Eigen::Dynamic, Eigen::Dynamic > > | image, |
Eigen::Ref< MatrixB, 0, Eigen::Stride< Eigen::Dynamic, Eigen::Dynamic > > | footprint ) |
Definition at line 228 of file detect_pybind11.cc.
PYBIND11_MODULE | ( | detect_pybind11 | , |
mod | ) |
Definition at line 293 of file detect_pybind11.cc.
Sort two peaks, placing the brightest peak first.
Definition at line 117 of file detect_pybind11.cc.