LSST Applications g0f08755f38+9c285cab97,g1635faa6d4+13f3999e92,g1653933729+a8ce1bb630,g1a0ca8cf93+bf6eb00ceb,g28da252d5a+0829b12dee,g29321ee8c0+5700dc9eac,g2bbee38e9b+9634bc57db,g2bc492864f+9634bc57db,g2cdde0e794+c2c89b37c4,g3156d2b45e+41e33cbcdc,g347aa1857d+9634bc57db,g35bb328faa+a8ce1bb630,g3a166c0a6a+9634bc57db,g3e281a1b8c+9f2c4e2fc3,g414038480c+077ccc18e7,g41af890bb2+fde0dd39b6,g5fbc88fb19+17cd334064,g781aacb6e4+a8ce1bb630,g80478fca09+55a9465950,g82479be7b0+d730eedb7d,g858d7b2824+9c285cab97,g9125e01d80+a8ce1bb630,g9726552aa6+10f999ec6a,ga5288a1d22+2a84bb7594,gacf8899fa4+c69c5206e8,gae0086650b+a8ce1bb630,gb58c049af0+d64f4d3760,gc28159a63d+9634bc57db,gcf0d15dbbd+4b7d09cae4,gda3e153d99+9c285cab97,gda6a2b7d83+4b7d09cae4,gdaeeff99f8+1711a396fd,ge2409df99d+5e831397f4,ge79ae78c31+9634bc57db,gf0baf85859+147a0692ba,gf3967379c6+41c94011de,gf3fb38a9a8+8f07a9901b,gfb92a5be7c+9c285cab97,w.2024.46
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: