mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
Find stars in an image by SNR thresholding.
Definition at line 45 of file sourceFinder.hpp.
#include <improc/sourceFinder.hpp>
Public Types | |
typedef _realT | realT |
The real valued type in which to do calculations. More... | |
typedef std::pair< int, int > | pixelT |
Pixel coordinates. More... | |
Public Member Functions | |
sourceFinder () | |
Default c'tor. More... | |
sourceFinder (realT thresh, realT minsep) | |
Constructor to set up the algorithm. More... | |
void | clear () |
Clear the working memory. More... | |
void | treshold (const realT &thresh) |
Set the SNR threshold. More... | |
realT | threshold () |
Get the SNR threshold. More... | |
void | minsep (const realT &msep) |
Set the minimum separation. More... | |
realT | minsep () |
Get the minimum separation between stars. More... | |
void | useMedian (const bool &useMed) |
Set the useMedian flag. More... | |
bool | useMedian () |
Get the useMedian flag. More... | |
std::vector< pixelT > | operator() (const eigenImage< realT > &im) |
Find stars in an image. More... | |
Protected Attributes | |
realT | m_threshold {5} |
The SNR threshold to use. More... | |
realT | m_minsep {2} |
The minimum separation between stars. Closer SNR detections are treated as the same star. More... | |
bool | m_useMedian {true} |
If true, then the median is used for standard deviation calculation. The mean is used otherwise. More... | |
typedef std::pair<int,int> mx::improc::sourceFinder< _realT >::pixelT |
Pixel coordinates.
Definition at line 51 of file sourceFinder.hpp.
typedef _realT mx::improc::sourceFinder< _realT >::realT |
The real valued type in which to do calculations.
Definition at line 49 of file sourceFinder.hpp.
mx::improc::sourceFinder< realT >::sourceFinder |
Default c'tor.
Definition at line 113 of file sourceFinder.hpp.
mx::improc::sourceFinder< realT >::sourceFinder | ( | realT | thresh, |
realT | minsep | ||
) |
Constructor to set up the algorithm.
[in] | thresh | |
[in] | minsep |
Definition at line 118 of file sourceFinder.hpp.
void mx::improc::sourceFinder< realT >::clear |
Clear the working memory.
Definition at line 131 of file sourceFinder.hpp.
realT mx::improc::sourceFinder< realT >::minsep |
Get the minimum separation between stars.
Definition at line 151 of file sourceFinder.hpp.
void mx::improc::sourceFinder< realT >::minsep | ( | const realT & | msep | ) |
Set the minimum separation.
[in] | msep | the new minimum separation |
Definition at line 145 of file sourceFinder.hpp.
std::vector< typename sourceFinder< realT >::pixelT > mx::improc::sourceFinder< realT >::operator() | ( | const eigenImage< realT > & | im | ) |
Find stars in an image.
Returns the coordinates as (row, col) of the highest SNR pixel in each unique star.
[in] | im | the image to search for stars |
Definition at line 169 of file sourceFinder.hpp.
References mx::math::vectorMean(), mx::math::vectorMedian(), and mx::math::vectorVariance().
realT mx::improc::sourceFinder< realT >::threshold |
Get the SNR threshold.
Definition at line 139 of file sourceFinder.hpp.
void mx::improc::sourceFinder< realT >::treshold | ( | const realT & | thresh | ) |
Set the SNR threshold.
[in] | thresh | the new threshold |
Definition at line 125 of file sourceFinder.hpp.
bool mx::improc::sourceFinder< realT >::useMedian |
Get the useMedian flag.
Definition at line 163 of file sourceFinder.hpp.
void mx::improc::sourceFinder< realT >::useMedian | ( | const bool & | useMed | ) |
Set the useMedian flag.
[in] | useMed | the new useMedian flag value |
Definition at line 157 of file sourceFinder.hpp.
|
protected |
The minimum separation between stars. Closer SNR detections are treated as the same star.
Definition at line 57 of file sourceFinder.hpp.
|
protected |
The SNR threshold to use.
Definition at line 55 of file sourceFinder.hpp.
|
protected |
If true, then the median is used for standard deviation calculation. The mean is used otherwise.
Definition at line 59 of file sourceFinder.hpp.