Skip to content

burstfit.model

[view_source]

Model Objects

class Model()

[view_source]

Wrapper class for spectra and profile functions.

Arguments:

  • function - Fitting function
  • param_names - List of parameter names
  • params - list of parameter values

evaluate

 | def evaluate(x, *params)

[view_source]

Evaluate the function at input parameters

Arguments:

  • x - input x values to evaluate function
  • *params - params to use in the function

Returns:

get_param_dict

 | def get_param_dict(*params, *, keys="params")

[view_source]

Convert input param list to a dictionary with param_names

Arguments:

  • *params - parameter list

Returns:

nparams

 | @property
 | def nparams()

[view_source]

Returns:

number of parameters

SgramModel Objects

class SgramModel()

[view_source]

Wrapper class for spectrogram model

Arguments:

  • pulse_model - Model instance of pulse function
  • spectra_model - Model instance of spectra function
  • sgram_fn - Spectrogram function
  • metadata - Metadata for sgram function
  • param_names - names of sgram parameters
  • clip_fac - clipping factor

nparams

 | @property
 | def nparams()

[view_source]

Returns:

number of parameters

evaluate

 | def evaluate(x, *params)

[view_source]

Function to evaluate sgram_function at input parameters

Arguments:

  • x - Dummy input. Not used.
  • *params - Parameters to evaluate sgram_function at.

Returns:

  • model - 2D array of model