Profile classes¶
-
class
Profile
¶ The base profile class
Subclassed by profit::NullProfile, profit::PsfProfile, profit::RadialProfile, profit::SkyProfile
Profile Parameters
-
bool
convolve
¶ Whether the resulting image of this profile should be convolved or not.
Public Functions
-
void
parameter
(const std::string ¶meter_spec)¶ Parses
parameter_spec
, which should look likename = value
, and sets that parameter value on the profile.- Parameters
parameter_spec
: The parameter name
- Exceptions
invalid_parameter
: ifparameter_spec
fails to parse, or the parameter’s value cannot be parsed correctlyunknown_parameter
: ifparameter_spec
refers to a parameter not supported by this profile
-
void
parameter
(const std::string &name, bool value)¶ Sets the parameter
name
tovalue
.- Parameters
name
: The parameter namevalue
: The parameter value
- Exceptions
invalid_parameter
: ifname
corresponds with no known parameter on this profile of typebool
.
-
void
parameter
(const std::string &name, double value)¶ Sets the parameter
name
tovalue
.- Parameters
name
: The parameter namevalue
: The parameter value
- Exceptions
invalid_parameter
: ifname
corresponds with no known parameter on this profile of typedouble
.
-
void
parameter
(const std::string &name, unsigned int value)¶ Sets the parameter
name
tovalue
.- Parameters
name
: The parameter namevalue
: The parameter value
- Exceptions
invalid_parameter
: ifname
corresponds with no known parameter on this profile of typeunsigned int
.
-
bool
-
class
RadialProfile
: public profit::Profile¶ The base class for radial profiles.
This class implements the common aspects of all radial profiles, namely:
- High-level evaluation logic
- Region masking
- Translation, rotation, axis ratio and boxing handling
- Pixel subsampling
Subclasses are expected to implement a handful of methods that convey profile-specific information, such as the evaluation function for an given x/y profile coordinate and the calculation of the total luminosity of the profile, among others.
Subclassed by profit::BrokenExponentialProfile, profit::CoreSersicProfile, profit::FerrerProfile, profit::KingProfile, profit::MoffatProfile, profit::SersicProfile
Profile Parameters
-
double
xcen
¶ The X center of this profile, in image coordinates
-
double
ycen
¶ The Y center of this profile, in image coordinates
-
double
mag
¶ The magnitude of this profile.
-
double
ang
¶ The angle by which this profile is rotated. 0 is north, positive is counterclockwise.
-
double
axrat
¶ The ratio between the two axes, expressed as minor/major.
-
double
box
¶ The boxiness of this profile.
-
bool
rough
¶ Whether perform sub-pixel integration or not.
-
double
acc
¶ Target accuracy to achieve during sub-pixel integration
-
double
rscale_switch
¶ Radius (relative to
rscale
) under which sub-pixel integration should take place
-
unsigned int
resolution
¶ Resolution of the sub-pixel integration: each area to be sub-integrated is divided in
resolution * resolution
cells.
-
unsigned int
max_recursions
¶ Maximum number of recursions that the sub-pixel integration algorithm should undertake.
-
bool
adjust
¶ Whether this profile should adjust the sub-pixel integration parameters automatically based on the profile parameters
-
double
rscale_max
¶ Radius (relative to
rscale
) after which the profile is not evaluated anymore
-
class
SersicProfile
: public profit::RadialProfile¶ A Sersic profile
The sersic profile has parameters
nser
andre
and is calculated as follows at radiusr
:\[ \exp \left\{ -b_n \left[ \left(\frac{r}{r_e}\right)^{\frac{1}{n_{ser}}} - 1 \right] \right\} \]
-
class
MoffatProfile
: public profit::RadialProfile¶ A Moffat profile
The moffat profile has parameters
fwhm
andcon
, and is calculated as follows at radiusr
:\[ \left[ 1 + \left(\frac{r}{r_d}\right)\right]^{-con} \]with:
\[ r_d = \frac{fwhm}{2 \sqrt{2^{\frac{1}{con}} - 1}} \]
-
class
FerrerProfile
: public profit::RadialProfile¶ A Ferrer profile
The ferrer profile has parameters
rout
,a
andb
and is calculated as follows at radiusr
:\[ \left[ 1 - \left(\frac{r}{r_{out}}\right)^{(2-b)} \right]^{a} \]
-
class
CoreSersicProfile
: public profit::RadialProfile¶ A CoreSersic profile
The CoreSersic profile has parameters
re
,rb
,nser
,a
andb
and is calculated as follows at radiusr
:\[ \left[1+\left(\frac{r}{r_b}\right)^{-a}\right]^{\frac{b}{a}} \exp \left[ -b_n \left( \frac{r^a+{r_b}^a}{{r_e}^a}\right)^{\frac{1}{a n_{ser}}} \right] \]Profile Parameters
-
double
re
¶ The effective radius of the Sersic component
-
double
rb
¶ The transition radius of the Sersic profile
-
double
nser
¶ The Sersic index of the Sersic profile
-
double
a
¶ The strength of transition from inner core to outer Sersic
-
double
b
¶ The inner power-law of the Core-Sersic.
-
double
-
class
BrokenExponentialProfile
: public profit::RadialProfile¶ A Broken Exponential profile
The Broken Exponential profile has parameters
h1
,h2
,rb
anda
is calculated as follows at radiusr
:\[ e^{-r/h_1} \left[1 + e^{a (r-r_b)})\right]^{\frac{1}{a} \left(\frac{1}{h_1} - \frac{1}{h_2}\right)} \]
-
class
KingProfile
: public profit::RadialProfile¶ A King profile
The King profile has parameters
rc
,rt
anda
is calculated as follows at radiusr
:\[ \left( \frac{1}{ \left[1 + \left(\frac{r}{r_c}\right)^{2}\right]^{\frac{1}{a}} } - \frac{1}{ \left[1 + \left(\frac{r_t}{r_c}\right)^{2}\right]^{\frac{1}{a}} } \right)^{a} \]
-
class
PsfProfile
: public profit::Profile¶ A PSF profile.
PSF profiles simply add the normalized PSF image (for a given magnitude) in a given position onto the model’s image.