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 &parameter_spec)

Parses parameter_spec, which should look like name = value, and sets that parameter value on the profile.

Parameters
  • parameter_spec: The parameter name
Exceptions
  • invalid_parameter: if parameter_spec fails to parse, or the parameter’s value cannot be parsed correctly
  • unknown_parameter: if parameter_spec refers to a parameter not supported by this profile

void parameter(const std::string &name, bool value)

Sets the parameter name to value.

Parameters
  • name: The parameter name
  • value: The parameter value
Exceptions
  • invalid_parameter: if name corresponds with no known parameter on this profile of type bool.

void parameter(const std::string &name, double value)

Sets the parameter name to value.

Parameters
  • name: The parameter name
  • value: The parameter value
Exceptions
  • invalid_parameter: if name corresponds with no known parameter on this profile of type double.

void parameter(const std::string &name, unsigned int value)

Sets the parameter name to value.

Parameters
  • name: The parameter name
  • value: The parameter value
Exceptions
  • invalid_parameter: if name corresponds with no known parameter on this profile of type unsigned int.

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 and re and is calculated as follows at radius r:

\[ \exp \left\{ -b_n \left[ \left(\frac{r}{r_e}\right)^{\frac{1}{n_{ser}}} - 1 \right] \right\} \]

Profile Parameters

double re

The effective radius

double nser

The sersic index

bool rescale_flux

Rescale flux up to rscale_max or not

class MoffatProfile : public profit::RadialProfile

A Moffat profile

The moffat profile has parameters fwhm and con, and is calculated as follows at radius r:

\[ \left[ 1 + \left(\frac{r}{r_d}\right)\right]^{-con} \]

with:

\[ r_d = \frac{fwhm}{2 \sqrt{2^{\frac{1}{con}} - 1}} \]

Profile Parameters

double fwhm

Full-width at half maximum of the profiles across the major axis of the intensity profile.

double con

Profile concentration

class FerrerProfile : public profit::RadialProfile

A Ferrer profile

The ferrer profile has parameters rout, a and b and is calculated as follows at radius r:

\[ \left[ 1 - \left(\frac{r}{r_{out}}\right)^{(2-b)} \right]^{a} \]

Profile Parameters

double rout

The outer truncation radius

double a

The global power-law slope to the profile center

double b

The strength of the truncation as the radius approaches rout.

class CoreSersicProfile : public profit::RadialProfile

A CoreSersic profile

The CoreSersic profile has parameters re, rb, nser, a and b and is calculated as follows at radius r:

\[ \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.

class BrokenExponentialProfile : public profit::RadialProfile

A Broken Exponential profile

The Broken Exponential profile has parameters h1, h2, rb and a is calculated as follows at radius r:

\[ 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)} \]

Profile Parameters

double h1

The inner exponential scale length.

double h2

The outer exponential scale length (must be equal to or less than h1).

double rb

The break radius.

double a

The strength of the truncation as the radius approaches rb.

class KingProfile : public profit::RadialProfile

A King profile

The King profile has parameters rc, rt and a is calculated as follows at radius r:

\[ \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} \]

Profile Parameters

double rc

The effective radius of the Sersic component

double rt

The transition radius of the Sersic profile

double a

The power-law of the King.

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.

Profile Parameters

double xcen

The X center of this profile

double ycen

The Y center of this profile

double mag

The magnitude of this profile, based on the model’s magnitude

class SkyProfile : public profit::Profile

A sky profile.

This profiles simply fills the image with a constant bg value, which is given as a parameter.

Profile Parameters

double bg

The value to fill the image with.

class NullProfile : public profit::Profile

A null profile.

The null profiles has no parameters, and leaves the incoming input image untouched. It is only useful for testing purposes.