LSST Applications g063fba187b+cac8b7c890,g0f08755f38+6aee506743,g1653933729+a8ce1bb630,g168dd56ebc+a8ce1bb630,g1a2382251a+b4475c5878,g1dcb35cd9c+8f9bc1652e,g20f6ffc8e0+6aee506743,g217e2c1bcf+73dee94bd0,g28da252d5a+1f19c529b9,g2bbee38e9b+3f2625acfc,g2bc492864f+3f2625acfc,g3156d2b45e+6e55a43351,g32e5bea42b+1bb94961c2,g347aa1857d+3f2625acfc,g35bb328faa+a8ce1bb630,g3a166c0a6a+3f2625acfc,g3e281a1b8c+c5dd892a6c,g3e8969e208+a8ce1bb630,g414038480c+5927e1bc1e,g41af890bb2+8a9e676b2a,g7af13505b9+809c143d88,g80478fca09+6ef8b1810f,g82479be7b0+f568feb641,g858d7b2824+6aee506743,g89c8672015+f4add4ffd5,g9125e01d80+a8ce1bb630,ga5288a1d22+2903d499ea,gb58c049af0+d64f4d3760,gc28159a63d+3f2625acfc,gcab2d0539d+b12535109e,gcf0d15dbbd+46a3f46ba9,gda6a2b7d83+46a3f46ba9,gdaeeff99f8+1711a396fd,ge79ae78c31+3f2625acfc,gef2f8181fd+0a71e47438,gf0baf85859+c1f95f4921,gfa517265be+6aee506743,gfa999e8aa5+17cd334064,w.2024.51
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: