#include <SersicFunction.hpp>
Public Member Functions | |
SersicFunction (double n) | |
double | inverseMass (const double M) const |
double | mass (const double s) const |
double | operator() (const double s) const |
Private Attributes | |
Array | _Mv |
Array | _sv |
Array | _Sv |
The SersicFunction class represents the Sersic function
where
Its value can conveniently be approximated as
as derived by Ciotti & Bertin (1999, A&A 352, 447–451). Given
The solution of this integral equation can be written as
As a C++ class, the SersicFunction class contains a vector with the values of
is stored on the same grid.
SersicFunction::SersicFunction | ( | double | n | ) |
Constructor for the SersicFunction class. It creates a logarithmic grid of
with
double SersicFunction::inverseMass | ( | const double | M | ) | const |
The function returns the inverse function of the cumulative mass function; it solves the equation
for
double SersicFunction::mass | ( | const double | s | ) | const |
The function returns the cumulative mass function
at the dimensionless radius
double SersicFunction::operator() | ( | const double | s | ) | const |
The function returns the Sersic function