gcfit.core.FittableModel#

class gcfit.core.FittableModel(theta, observations, **kwargs)#

Model subclass for use in all fitting functions.

A subclass of the base Model, with a simplified and specific initilization signature based on a single theta input containing the main 13 model parameters, in a specific order, and observations which the model should be compared to.

Unless you have a set of parameters theta taken directly from the fitting results, you most likely do not want to use this class directly.

Parameters:
thetadict or list

The model input parameters. Must either be a dict, or a full list of all parameters, in the exact same order as DEFAULT_THETA. The 13 free parameters used here (W0, M, rh, ra, g, delta, a1, a2, a3, BHret, s2, F and d) are key for defining the model structure, mass evolution algorithm and fitting parameters. See Model for further explanation of all possible input parameters.

observationsObservations

The Observations instance corresponding to this cluster. Required at initilization so that the models can be compared to these observations in the most consistent way possible.

**kwargsdict

All other arguments are passed to Model.

Attributes:
thetadict

Dictionary of input parameters. Some parameters may technically also be accessible directly as attributes, but that interface should not be considered stable. This dictionary should be used as the only direct access to any input parameters that make up theta.

Notes

The units of the inputs in theta here do not match those in Model directly. M should be in units of [1e6 Msun] and ra should actually be log10(ra).

All cluster metadata parameters (such as age, vesc, etc.) will be read from the observations, and should not be provided as arguments here.

Methods

__init__(theta, observations, **kwargs)

canonical(W0, M, rh[, imf])

Initialize with an IMF defined by a canonical IMF formulation.

df(*arg)

Returns the value of the normalised DF at a given position in phase space, can only be called after solving Poisson's equation

get_Paz(az_data, R_data, jns)

Computes probability of line of sight acceleration at projected R : P(az|R)

get_visualizer()

Return a analysis.ModelVisualizer instance based on this model.

interp_phi(r)

Returns interpolated potential at r, works on scalar and arrays

isotropic(W0, M, rh, **kw)

Initialize the model with max ra, leading to an isotropic model.

king(W0, M, rh, **kw)

Initialize a King (1966) Model (g=1 and isotropic).

legendre_Ul(l, theta)

michieking(W0, M, rh, **kw)

Initialize a Michie-King (1963) Model (g=1 and anisotropic).

sample(*args, **kwargs)

Return a SampledModel instance based on this model.

wilson(W0, M, rh, **kw)

Initialize a Wilson (1975) Model (g=2 and isotropic).

woolley(W0, M, rh, **kw)

Initialize a Woolley (1954) Model (g=0 and isotropic).