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
Loading...
Searching...
No Matches
Public Member Functions | List of all members
lsst::afw::math::BackgroundControl Class Reference

Pass parameters to a Background object. More...

#include <Background.h>

Public Member Functions

 BackgroundControl (int const nxSample, int const nySample, StatisticsControl const sctrl=StatisticsControl(), Property const prop=MEANCLIP, ApproximateControl const actrl=ApproximateControl(ApproximateControl::UNKNOWN, 1))
 
 BackgroundControl (int const nxSample, int const nySample, StatisticsControl const &sctrl, std::string const &prop, ApproximateControl const actrl=ApproximateControl(ApproximateControl::UNKNOWN, 1))
 Overload constructor to handle string for statistical operator.
 
 BackgroundControl (Interpolate::Style const style, int const nxSample=10, int const nySample=10, UndersampleStyle const undersampleStyle=THROW_EXCEPTION, StatisticsControl const sctrl=StatisticsControl(), Property const prop=MEANCLIP, ApproximateControl const actrl=ApproximateControl(ApproximateControl::UNKNOWN, 1))
 Overload constructor to provide interp style.
 
 BackgroundControl (std::string const &style, int const nxSample=10, int const nySample=10, std::string const &undersampleStyle="THROW_EXCEPTION", StatisticsControl const sctrl=StatisticsControl(), std::string const &prop="MEANCLIP", ApproximateControl const actrl=ApproximateControl(ApproximateControl::UNKNOWN, 1))
 Overload constructor to handle strings for both interp and undersample styles.
 
 BackgroundControl (BackgroundControl const &)=default
 
 BackgroundControl (BackgroundControl &&)=default
 
BackgroundControloperator= (BackgroundControl const &)=default
 
BackgroundControloperator= (BackgroundControl &&)=default
 
 ~BackgroundControl ()=default
 
void setNxSample (int nxSample)
 
void setNySample (int nySample)
 
void setInterpStyle (Interpolate::Style const style)
 
void setInterpStyle (std::string const &style)
 
void setUndersampleStyle (UndersampleStyle const undersampleStyle)
 
void setUndersampleStyle (std::string const &undersampleStyle)
 
int getNxSample () const
 
int getNySample () const
 
Interpolate::Style getInterpStyle () const
 
UndersampleStyle getUndersampleStyle () const
 
std::shared_ptr< StatisticsControlgetStatisticsControl ()
 
std::shared_ptr< StatisticsControl const > getStatisticsControl () const
 
Property getStatisticsProperty () const
 
void setStatisticsProperty (Property prop)
 
void setStatisticsProperty (std::string prop)
 
void setApproximateControl (std::shared_ptr< ApproximateControl > actrl)
 
std::shared_ptr< ApproximateControlgetApproximateControl ()
 
std::shared_ptr< ApproximateControl const > getApproximateControl () const
 

Detailed Description

Pass parameters to a Background object.

Definition at line 56 of file Background.h.

Constructor & Destructor Documentation

◆ BackgroundControl() [1/6]

lsst::afw::math::BackgroundControl::BackgroundControl ( int const nxSample,
int const nySample,
StatisticsControl const sctrl = StatisticsControl(),
Property const prop = MEANCLIP,
ApproximateControl const actrl = ApproximateControl(ApproximateControl::UNKNOWN, 1) )
inline
Parameters
nxSampleNum. grid samples in x
nySampleNum. grid samples in y
sctrlConfiguration for Stats to be computed
propstatistical property to use for grid points
actrlconfiguration for approx to be computed

Definition at line 65 of file Background.h.

69 _nxSample(nxSample),
70 _nySample(nySample),
71 _undersampleStyle(THROW_EXCEPTION),
72 _sctrl(new StatisticsControl(sctrl)),
73 _prop(prop),
74 _actrl(new ApproximateControl(actrl)) {
75 if (nxSample <= 0 || nySample <= 0) {
77 str(boost::format("You must specify at least one point, not %dx%d") % nxSample %
78 nySample));
79 }
80 }
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition Exception.h:48
Reports attempts to exceed implementation-defined length limits for some classes.
Definition Runtime.h:76

◆ BackgroundControl() [2/6]

lsst::afw::math::BackgroundControl::BackgroundControl ( int const nxSample,
int const nySample,
StatisticsControl const & sctrl,
std::string const & prop,
ApproximateControl const actrl = ApproximateControl(ApproximateControl::UNKNOWN, 1) )
inline

Overload constructor to handle string for statistical operator.

Parameters
nxSamplenum. grid samples in x
nySamplenum. grid samples in y
sctrlconfiguration for stats to be computed
propstatistical property to use for grid points
actrlconfiguration for approx to be computed

Definition at line 91 of file Background.h.

95 _nxSample(nxSample),
96 _nySample(nySample),
97 _undersampleStyle(THROW_EXCEPTION),
98 _sctrl(new StatisticsControl(sctrl)),
99 _prop(stringToStatisticsProperty(prop)),
100 _actrl(new ApproximateControl(actrl)) {
101 if (nxSample <= 0 || nySample <= 0) {
103 str(boost::format("You must specify at least one point, not %dx%d") % nxSample %
104 nySample));
105 }
106 }
Property stringToStatisticsProperty(std::string const property)
Conversion function to switch a string to a Property (see Statistics.h)

◆ BackgroundControl() [3/6]

lsst::afw::math::BackgroundControl::BackgroundControl ( Interpolate::Style const style,
int const nxSample = 10,
int const nySample = 10,
UndersampleStyle const undersampleStyle = THROW_EXCEPTION,
StatisticsControl const sctrl = StatisticsControl(),
Property const prop = MEANCLIP,
ApproximateControl const actrl = ApproximateControl(ApproximateControl::UNKNOWN, 1) )
inline

Overload constructor to provide interp style.

Parameters
styleStyle of the interpolation
nxSampleNum. grid samples in x
nySampleNum. grid samples in y
undersampleStyleBehaviour if there are too few points
sctrlConfiguration for Stats to be computed
propstatistical property to use for grid points
actrlconfiguration for approx to be computed

Definition at line 118 of file Background.h.

124 : _style(style),
125 _nxSample(nxSample),
126 _nySample(nySample),
127 _undersampleStyle(undersampleStyle),
128 _sctrl(new StatisticsControl(sctrl)),
129 _prop(prop),
130 _actrl(new ApproximateControl(actrl)) {
131 if (nxSample <= 0 || nySample <= 0) {
133 str(boost::format("You must specify at least one point, not %dx%d") % nxSample %
134 nySample));
135 }
136 }

◆ BackgroundControl() [4/6]

lsst::afw::math::BackgroundControl::BackgroundControl ( std::string const & style,
int const nxSample = 10,
int const nySample = 10,
std::string const & undersampleStyle = "THROW_EXCEPTION",
StatisticsControl const sctrl = StatisticsControl(),
std::string const & prop = "MEANCLIP",
ApproximateControl const actrl = ApproximateControl(ApproximateControl::UNKNOWN, 1) )
inline

Overload constructor to handle strings for both interp and undersample styles.

Parameters
styleStyle of the interpolation
nxSamplenum. grid samples in x
nySamplenum. grid samples in y
undersampleStylebehaviour if there are too few points
sctrlconfiguration for stats to be computed
propstatistical property to use for grid points
actrlconfiguration for approx to be computed

Definition at line 149 of file Background.h.

154 : _style(math::stringToInterpStyle(style)),
155 _nxSample(nxSample),
156 _nySample(nySample),
157 _undersampleStyle(math::stringToUndersampleStyle(undersampleStyle)),
158 _sctrl(new StatisticsControl(sctrl)),
159 _prop(stringToStatisticsProperty(prop)),
160 _actrl(new ApproximateControl(actrl)) {
161 if (nxSample <= 0 || nySample <= 0) {
163 str(boost::format("You must specify at least one point, not %dx%d") % nxSample %
164 nySample));
165 }
166 }
Interpolate::Style stringToInterpStyle(std::string const &style)
Conversion function to switch a string to an Interpolate::Style.
UndersampleStyle stringToUndersampleStyle(std::string const &style)
Conversion function to switch a string to an UndersampleStyle.

◆ BackgroundControl() [5/6]

lsst::afw::math::BackgroundControl::BackgroundControl ( BackgroundControl const & )
default

◆ BackgroundControl() [6/6]

lsst::afw::math::BackgroundControl::BackgroundControl ( BackgroundControl && )
default

◆ ~BackgroundControl()

lsst::afw::math::BackgroundControl::~BackgroundControl ( )
default

Member Function Documentation

◆ getApproximateControl() [1/2]

std::shared_ptr< ApproximateControl > lsst::afw::math::BackgroundControl::getApproximateControl ( )
inline

Definition at line 219 of file Background.h.

219{ return _actrl; }

◆ getApproximateControl() [2/2]

std::shared_ptr< ApproximateControl const > lsst::afw::math::BackgroundControl::getApproximateControl ( ) const
inline

Definition at line 220 of file Background.h.

220{ return _actrl; }

◆ getInterpStyle()

Interpolate::Style lsst::afw::math::BackgroundControl::getInterpStyle ( ) const
inline

Definition at line 203 of file Background.h.

203 {
204 if (_style < 0 || _style >= Interpolate::NUM_STYLES) {
206 str(boost::format("Style %d is invalid") % _style));
207 }
208 return _style;
209 }
Reports invalid arguments.
Definition Runtime.h:66

◆ getNxSample()

int lsst::afw::math::BackgroundControl::getNxSample ( ) const
inline

Definition at line 201 of file Background.h.

201{ return _nxSample; }

◆ getNySample()

int lsst::afw::math::BackgroundControl::getNySample ( ) const
inline

Definition at line 202 of file Background.h.

202{ return _nySample; }

◆ getStatisticsControl() [1/2]

std::shared_ptr< StatisticsControl > lsst::afw::math::BackgroundControl::getStatisticsControl ( )
inline

Definition at line 211 of file Background.h.

211{ return _sctrl; }

◆ getStatisticsControl() [2/2]

std::shared_ptr< StatisticsControl const > lsst::afw::math::BackgroundControl::getStatisticsControl ( ) const
inline

Definition at line 212 of file Background.h.

212{ return _sctrl; }

◆ getStatisticsProperty()

Property lsst::afw::math::BackgroundControl::getStatisticsProperty ( ) const
inline

Definition at line 214 of file Background.h.

214{ return _prop; }

◆ getUndersampleStyle()

UndersampleStyle lsst::afw::math::BackgroundControl::getUndersampleStyle ( ) const
inline

Definition at line 210 of file Background.h.

210{ return _undersampleStyle; }

◆ operator=() [1/2]

BackgroundControl & lsst::afw::math::BackgroundControl::operator= ( BackgroundControl && )
default

◆ operator=() [2/2]

BackgroundControl & lsst::afw::math::BackgroundControl::operator= ( BackgroundControl const & )
default

◆ setApproximateControl()

void lsst::afw::math::BackgroundControl::setApproximateControl ( std::shared_ptr< ApproximateControl > actrl)
inline

Definition at line 218 of file Background.h.

218{ _actrl = actrl; }

◆ setInterpStyle() [1/2]

void lsst::afw::math::BackgroundControl::setInterpStyle ( Interpolate::Style const style)
inline

Definition at line 189 of file Background.h.

189{ _style = style; }

◆ setInterpStyle() [2/2]

void lsst::afw::math::BackgroundControl::setInterpStyle ( std::string const & style)
inline

Definition at line 191 of file Background.h.

191{ _style = math::stringToInterpStyle(style); }

◆ setNxSample()

void lsst::afw::math::BackgroundControl::setNxSample ( int nxSample)
inline

Definition at line 174 of file Background.h.

174 {
175 if (nxSample <= 0) {
177 str(boost::format("nxSample must be position, not %d") % nxSample));
178 }
179 _nxSample = nxSample;
180 }

◆ setNySample()

void lsst::afw::math::BackgroundControl::setNySample ( int nySample)
inline

Definition at line 181 of file Background.h.

181 {
182 if (nySample <= 0) {
184 str(boost::format("nySample must be position, not %d") % nySample));
185 }
186 _nySample = nySample;
187 }

◆ setStatisticsProperty() [1/2]

void lsst::afw::math::BackgroundControl::setStatisticsProperty ( Property prop)
inline

Definition at line 215 of file Background.h.

215{ _prop = prop; }

◆ setStatisticsProperty() [2/2]

void lsst::afw::math::BackgroundControl::setStatisticsProperty ( std::string prop)
inline

Definition at line 216 of file Background.h.

216{ _prop = stringToStatisticsProperty(prop); }

◆ setUndersampleStyle() [1/2]

void lsst::afw::math::BackgroundControl::setUndersampleStyle ( std::string const & undersampleStyle)
inline

Definition at line 197 of file Background.h.

197 {
198 _undersampleStyle = math::stringToUndersampleStyle(undersampleStyle);
199 }

◆ setUndersampleStyle() [2/2]

void lsst::afw::math::BackgroundControl::setUndersampleStyle ( UndersampleStyle const undersampleStyle)
inline

Definition at line 193 of file Background.h.

193 {
194 _undersampleStyle = undersampleStyle;
195 }

The documentation for this class was generated from the following file: