LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
home
lsstsw
stack
Linux64
meas_algorithms
11.0-2-gb8b8ce7
include
lsst
meas
algorithms
shapelet
SizeMagnitudeStarSelectorAlgo.h
Go to the documentation of this file.
1
#ifndef MeasAlgoShapeletSizeMagnitudeStarSelectorAlgo_H
2
#define MeasAlgoShapeletSizeMagnitudeStarSelectorAlgo_H
3
4
#include <vector>
5
#include <stdexcept>
6
#include "
lsst/meas/algorithms/shapelet/ConfigFile.h
"
7
#include "
lsst/meas/algorithms/shapelet/Function2D.h
"
8
#include "
lsst/meas/algorithms/shapelet/PotentialStar.h
"
9
10
namespace
lsst {
11
namespace
meas {
12
namespace
algorithms {
13
namespace
shapelet {
14
15
class
SizeMagnitudeStarSelectorException
:
16
public
std::runtime_error
17
{
18
public
:
19
SizeMagnitudeStarSelectorException
(
const
std::string&
m
) : std::runtime_error(m) {};
20
};
21
22
class
SizeMagnitudeStarSelectorAlgo
23
{
24
public
:
25
SizeMagnitudeStarSelectorAlgo
(
const
ConfigFile
& params, std::string keyPrefix);
26
27
std::vector<PotentialStar*>
findStars
(
28
std::vector<PotentialStar*>& allObj);
29
30
void
findMinMax
(
31
const
std::vector<PotentialStar*>& list,
32
double
*min,
double
*max,
const
Function2D
& f);
33
34
void
rejectOutliers
(
35
std::vector<PotentialStar*>& list,
36
double
nSigma,
double
minSigma,
const
Function2D
& f);
37
38
std::vector<PotentialStar*>
getPeakList
(
39
const
std::vector<PotentialStar*>& objList,
40
double
binSize,
double
minSize,
double
maxSize,
41
int
nStart,
int
minIter,
double
magStep,
double
maxSignifRatio,
42
bool
isFirstPass,
const
Function2D
& f);
43
44
void
fitStellarSizes
(
45
Function2D
*f,
int
order,
double
sigClip,
46
const
std::vector<PotentialStar*>& starList,
double
*outSigma);
47
48
void
roughlyFitBrightStars
(
49
const
std::vector<PotentialStar*>& objList,
50
Function2D
*f,
double
*outSigma);
51
52
void
setParams
(
53
const
ConfigFile
& params, std::string keyPrefix,
54
bool
mustExist=
false
);
55
56
bool
isOkSize
(
const
double
size)
57
{
return
size >=
_minSize
&& size <=
_maxSize
; }
58
59
bool
isOkMag
(
const
double
mag)
60
{
return
mag >=
_minMag
&& mag <=
_maxMag
; }
61
62
bool
isOkOutputMag
(
const
double
mag)
63
{
return
mag >=
_minMag
&& mag <=
_maxOutMag
; }
64
65
double
convertToLogSize
(
const
double
size)
66
{
return
_isSizeLog
? size :
std::log
(size); }
67
68
double
getMinSize
()
const
{
return
_minSize
; }
69
double
getMaxSize
()
const
{
return
_maxSize
; }
70
double
getMinMag
()
const
{
return
_minMag
; }
71
double
getMaxMag
()
const
{
return
_maxMag
; }
72
73
private
:
74
75
double
_minSize
;
// The min and max size to consider
76
double
_maxSize
;
77
bool
_isSizeLog
;
// true if sizes are already log(size)
78
double
_minMag
;
// The min and max magnitude to consider
79
double
_maxMag
;
80
double
_maxOutMag
;
81
int
_nDivX
;
// Divide the image into nx by ny subsections
82
int
_nDivY
;
83
84
// Parameters when finding stars in each subdivision
85
double
_nStart1
;
// # objects to start with on first pass
86
double
_starFrac
;
// Of these, how many are probably stars?
87
double
_magStep1
;
// Step size in mag for each successive pass
88
double
_reject1
;
// nsigma rejection. (actually n x quartile size)
89
double
_maxRatio1
;
// max ratio of count in valley / count in peak
90
double
_binSize1
;
// binsize of histogram
91
int
_okValCount
;
// if valley count <= this, ok no matter what peak is
92
int
_minIter1
;
// min number of mag steps to take
93
double
_maxRms
;
// in initial linear fit, max rms to allow
94
95
// Parameters for last pass of whole image
96
double
_nStart2
;
// # objects to start with
97
double
_magStep2
;
// Step size in mag
98
double
_minBinSize
;
// Min width of histogram bins
99
double
_reject2
;
// n quartile rejection
100
double
_purityRatio
;
// max ratio of count in valley / count in peak
101
int
_minIter2
;
// min number of mag steps to take
102
103
// Parameters for fitting results of subsections
104
int
_starsPerBin
;
// How many stars per subsection?
105
int
_fitOrder
;
// order of fit for size(x,y)
106
double
_fitSigClip
;
// nsigma rejection in this fit
107
int
_maxRefitIter
;
// max number of times to refit whole image
108
109
bool
_shouldOutputDesQa
;
// Output warnings in DES QA format
110
111
};
112
113
}}}}
114
#endif
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_nStart2
double _nStart2
Definition:
SizeMagnitudeStarSelectorAlgo.h:96
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_reject1
double _reject1
Definition:
SizeMagnitudeStarSelectorAlgo.h:88
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_maxRms
double _maxRms
Definition:
SizeMagnitudeStarSelectorAlgo.h:93
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_reject2
double _reject2
Definition:
SizeMagnitudeStarSelectorAlgo.h:99
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_minIter1
int _minIter1
Definition:
SizeMagnitudeStarSelectorAlgo.h:92
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::setParams
void setParams(const ConfigFile ¶ms, std::string keyPrefix, bool mustExist=false)
Definition:
SizeMagnitudeStarSelectorAlgo.cc:58
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo
Definition:
SizeMagnitudeStarSelectorAlgo.h:22
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::fitStellarSizes
void fitStellarSizes(Function2D *f, int order, double sigClip, const std::vector< PotentialStar * > &starList, double *outSigma)
Definition:
SizeMagnitudeStarSelectorAlgo.cc:627
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::isOkOutputMag
bool isOkOutputMag(const double mag)
Definition:
SizeMagnitudeStarSelectorAlgo.h:62
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::findStars
std::vector< PotentialStar * > findStars(std::vector< PotentialStar * > &allObj)
Definition:
SizeMagnitudeStarSelectorAlgo.cc:113
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_fitOrder
int _fitOrder
Definition:
SizeMagnitudeStarSelectorAlgo.h:105
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_fitSigClip
double _fitSigClip
Definition:
SizeMagnitudeStarSelectorAlgo.h:106
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::getMinSize
double getMinSize() const
Definition:
SizeMagnitudeStarSelectorAlgo.h:68
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::SizeMagnitudeStarSelectorAlgo
SizeMagnitudeStarSelectorAlgo(const ConfigFile ¶ms, std::string keyPrefix)
Definition:
SizeMagnitudeStarSelectorAlgo.cc:94
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::getPeakList
std::vector< PotentialStar * > getPeakList(const std::vector< PotentialStar * > &objList, double binSize, double minSize, double maxSize, int nStart, int minIter, double magStep, double maxSignifRatio, bool isFirstPass, const Function2D &f)
Definition:
SizeMagnitudeStarSelectorAlgo.cc:387
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::rejectOutliers
void rejectOutliers(std::vector< PotentialStar * > &list, double nSigma, double minSigma, const Function2D &f)
Definition:
SizeMagnitudeStarSelectorAlgo.cc:343
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_nDivX
int _nDivX
Definition:
SizeMagnitudeStarSelectorAlgo.h:81
PotentialStar.h
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_binSize1
double _binSize1
Definition:
SizeMagnitudeStarSelectorAlgo.h:90
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::getMaxSize
double getMaxSize() const
Definition:
SizeMagnitudeStarSelectorAlgo.h:69
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::getMinMag
double getMinMag() const
Definition:
SizeMagnitudeStarSelectorAlgo.h:70
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::isOkSize
bool isOkSize(const double size)
Definition:
SizeMagnitudeStarSelectorAlgo.h:56
lsst.log.log.log
def log
Definition:
log.py:85
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_nDivY
int _nDivY
Definition:
SizeMagnitudeStarSelectorAlgo.h:82
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_isSizeLog
bool _isSizeLog
Definition:
SizeMagnitudeStarSelectorAlgo.h:77
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_shouldOutputDesQa
bool _shouldOutputDesQa
Definition:
SizeMagnitudeStarSelectorAlgo.h:109
Function2D.h
lsst::meas::algorithms::shapelet::Function2D
Definition:
Function2D.h:31
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_minSize
double _minSize
Definition:
SizeMagnitudeStarSelectorAlgo.h:75
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_magStep1
double _magStep1
Definition:
SizeMagnitudeStarSelectorAlgo.h:87
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_minMag
double _minMag
Definition:
SizeMagnitudeStarSelectorAlgo.h:78
ConfigFile.h
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_starFrac
double _starFrac
Definition:
SizeMagnitudeStarSelectorAlgo.h:86
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorException::SizeMagnitudeStarSelectorException
SizeMagnitudeStarSelectorException(const std::string &m)
Definition:
SizeMagnitudeStarSelectorAlgo.h:19
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_magStep2
double _magStep2
Definition:
SizeMagnitudeStarSelectorAlgo.h:97
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_maxSize
double _maxSize
Definition:
SizeMagnitudeStarSelectorAlgo.h:76
lsstimport.m
tuple m
Definition:
lsstimport.py:48
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::isOkMag
bool isOkMag(const double mag)
Definition:
SizeMagnitudeStarSelectorAlgo.h:59
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_starsPerBin
int _starsPerBin
Definition:
SizeMagnitudeStarSelectorAlgo.h:104
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_maxMag
double _maxMag
Definition:
SizeMagnitudeStarSelectorAlgo.h:79
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_maxRefitIter
int _maxRefitIter
Definition:
SizeMagnitudeStarSelectorAlgo.h:107
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_maxRatio1
double _maxRatio1
Definition:
SizeMagnitudeStarSelectorAlgo.h:89
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_maxOutMag
double _maxOutMag
Definition:
SizeMagnitudeStarSelectorAlgo.h:80
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorException
Definition:
SizeMagnitudeStarSelectorAlgo.h:15
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::roughlyFitBrightStars
void roughlyFitBrightStars(const std::vector< PotentialStar * > &objList, Function2D *f, double *outSigma)
Definition:
SizeMagnitudeStarSelectorAlgo.cc:663
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_okValCount
int _okValCount
Definition:
SizeMagnitudeStarSelectorAlgo.h:91
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_purityRatio
double _purityRatio
Definition:
SizeMagnitudeStarSelectorAlgo.h:100
lsst::meas::algorithms::shapelet::ConfigFile
Definition:
ConfigFile.h:239
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_nStart1
double _nStart1
Definition:
SizeMagnitudeStarSelectorAlgo.h:85
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_minBinSize
double _minBinSize
Definition:
SizeMagnitudeStarSelectorAlgo.h:98
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::getMaxMag
double getMaxMag() const
Definition:
SizeMagnitudeStarSelectorAlgo.h:71
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::_minIter2
int _minIter2
Definition:
SizeMagnitudeStarSelectorAlgo.h:101
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::convertToLogSize
double convertToLogSize(const double size)
Definition:
SizeMagnitudeStarSelectorAlgo.h:65
lsst::meas::algorithms::shapelet::SizeMagnitudeStarSelectorAlgo::findMinMax
void findMinMax(const std::vector< PotentialStar * > &list, double *min, double *max, const Function2D &f)
Definition:
SizeMagnitudeStarSelectorAlgo.cc:327
Generated on Thu Sep 24 2015 02:29:20 for LSSTApplications by
1.8.5