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
Histogram.h
Go to the documentation of this file.
1
#ifndef MeasAlgoShapeletHistogram_H
2
#define MeasAlgoShapeletHistogram_H
3
4
#include <vector>
5
#include <iostream>
6
7
namespace
lsst {
8
namespace
meas {
9
namespace
algorithms {
10
namespace
shapelet {
11
12
template
<
typename
T>
13
class
Histogram
{
14
15
public
:
16
17
Histogram
(
double
binSize,
double
minValue,
double
maxValue);
18
~Histogram
() {}
19
20
void
add
(
double
value
,
const
T& ref);
21
double
findPeak
(
double
minVal,
double
maxVal)
const
;
22
bool
hasSinglePeak
(
double
minVal,
double
maxVal)
const
;
23
double
findValley
(
double
minVal,
double
maxVal)
const
;
24
double
findFirstValueAfter
(
double
start)
const
;
25
double
findFirstValleyAfter
(
double
val1,
bool
hasPoissonNoise=
false
)
const
;
26
double
findFirstValleyBefore
(
double
val1,
bool
hasPoissonNoise=
false
)
const
;
27
double
findFirstPeakAfter
(
double
val1,
bool
hasPoissonNoise=
false
)
const
;
28
double
findFirstPeakBefore
(
double
val1,
bool
hasPoissonNoise=
false
)
const
;
29
int
getTotalCountBefore
(
double
val1)
const
;
30
int
getTotalCountAfter
(
double
val1)
const
;
31
int
operator[]
(
double
value
)
const
;
32
double
findThresh
(
double
minVal,
double
maxVal)
const
;
33
std::vector<T>
getRefsInRange
(
double
min,
double
max)
const
;
34
std::vector<double>
getValuesInRange
(
double
min,
double
max)
const
;
35
int
getRefinedPeakCount
(
double
* peak)
const
;
36
int
getRefinedValleyCount
(
double
* valley)
const
;
37
void
print
(std::ostream& fout,
double
val1=-1.e10,
double
val2=1.e10)
const
;
38
39
private
:
40
41
int
getCount
(
int
i)
const
;
42
int
index
(
double
value
)
const
;
43
double
value
(
int
i)
const
;
44
45
double
_binSize
,
_minValue
,
_maxValue
;
46
std::vector<std::vector<T> >
_refs
;
47
std::vector<std::vector<double> >
_values
;
48
};
49
50
}}}}
51
52
#endif
lsst::meas::algorithms::shapelet::Histogram
Definition:
Histogram.h:13
lsst::meas::algorithms::shapelet::Histogram::getRefinedPeakCount
int getRefinedPeakCount(double *peak) const
Definition:
Histogram.cc:271
lsst::meas::algorithms::shapelet::Histogram::hasSinglePeak
bool hasSinglePeak(double minVal, double maxVal) const
Definition:
Histogram.cc:96
lsst::meas::algorithms::shapelet::Histogram::findFirstPeakBefore
double findFirstPeakBefore(double val1, bool hasPoissonNoise=false) const
Definition:
Histogram.cc:226
lsst::meas::algorithms::shapelet::Histogram::operator[]
int operator[](double value) const
Definition:
Histogram.cc:339
lsst::meas::algorithms::shapelet::Histogram::getTotalCountBefore
int getTotalCountBefore(double val1) const
Definition:
Histogram.cc:250
lsst::meas::algorithms::shapelet::Histogram::findFirstValleyAfter
double findFirstValleyAfter(double val1, bool hasPoissonNoise=false) const
Definition:
Histogram.cc:140
lsst::meas::algorithms::shapelet::Histogram::_values
std::vector< std::vector< double > > _values
Definition:
Histogram.h:47
lsst::meas::algorithms::shapelet::Histogram::_minValue
double _minValue
Definition:
Histogram.h:45
lsst::meas::algorithms::shapelet::Histogram::findFirstValleyBefore
double findFirstValleyBefore(double val1, bool hasPoissonNoise=false) const
Definition:
Histogram.cc:167
lsst::meas::algorithms::shapelet::Histogram::Histogram
Histogram(double binSize, double minValue, double maxValue)
Definition:
Histogram.cc:38
lsst::meas::algorithms::shapelet::Histogram::findPeak
double findPeak(double minVal, double maxVal) const
Definition:
Histogram.cc:76
lsst::meas::algorithms::shapelet::Histogram::findFirstPeakAfter
double findFirstPeakAfter(double val1, bool hasPoissonNoise=false) const
Definition:
Histogram.cc:204
lsst::meas::algorithms::shapelet::Histogram::value
double value(int i) const
Definition:
Histogram.cc:510
lsst::meas::algorithms::shapelet::Histogram::getRefsInRange
std::vector< T > getRefsInRange(double min, double max) const
Definition:
Histogram.cc:448
lsst::meas::algorithms::shapelet::Histogram::findValley
double findValley(double minVal, double maxVal) const
Definition:
Histogram.cc:113
lsst::meas::algorithms::shapelet::Histogram::print
void print(std::ostream &fout, double val1=-1.e10, double val2=1.e10) const
Definition:
Histogram.cc:517
lsst::meas::algorithms::shapelet::Histogram::findFirstValueAfter
double findFirstValueAfter(double start) const
Definition:
Histogram.cc:194
lsst::meas::algorithms::shapelet::Histogram::getTotalCountAfter
int getTotalCountAfter(double val1) const
Definition:
Histogram.cc:260
lsst::meas::algorithms::shapelet::Histogram::getRefinedValleyCount
int getRefinedValleyCount(double *valley) const
Definition:
Histogram.cc:302
lsst::meas::algorithms::shapelet::Histogram::index
int index(double value) const
Definition:
Histogram.cc:503
lsst::meas::algorithms::shapelet::Histogram::_maxValue
double _maxValue
Definition:
Histogram.h:45
lsst::meas::algorithms::shapelet::Histogram::getCount
int getCount(int i) const
Definition:
Histogram.cc:68
lsst::meas::algorithms::shapelet::Histogram::~Histogram
~Histogram()
Definition:
Histogram.h:18
lsst::meas::algorithms::shapelet::Histogram::getValuesInRange
std::vector< double > getValuesInRange(double min, double max) const
Definition:
Histogram.cc:482
lsst::meas::algorithms::shapelet::Histogram::add
void add(double value, const T &ref)
Definition:
Histogram.cc:61
lsst::meas::algorithms::shapelet::Histogram::findThresh
double findThresh(double minVal, double maxVal) const
Definition:
Histogram.cc:347
lsst::meas::algorithms::shapelet::Histogram::_binSize
double _binSize
Definition:
Histogram.h:45
lsst::meas::algorithms::shapelet::Histogram::_refs
std::vector< std::vector< T > > _refs
Definition:
Histogram.h:46
Generated on Thu Sep 24 2015 02:29:20 for LSSTApplications by
1.8.5