mirapy.fitting.models

Module Contents

class mirapy.fitting.models.Model1D

Base class for 1-D model.

__call__(self, x)

Return the value of evaluate function by calling it.

Parameters

x – Array of 1-D input values.

Returns

Return the output of the evaluate function.

evaluate(self, x)

Return the value of a model of the given input.

Parameters

x – Array of 1-D input values.

Returns

Return the output of the model.

set_params_from_array(self, params)

Sets the parameters of the model from an array.

Parameters

params – Array of parameter values.

get_params_as_array(self)

Returns the parameters of the model as an array.

class mirapy.fitting.models.Gaussian1D(amplitude=1.0, mean=0.0, stddev=1.0)

Bases: mirapy.fitting.models.Model1D

One dimensional Gaussian model.

Parameters
  • amplitude – Amplitude.

  • mean – Mean.

  • stddev – Standard deviation.

evaluate(self, x)

Return the value of Gaussian model of the given input.

Parameters

x – Array of 1-D input values.

Returns

Return the output of the model.

set_params_from_array(self, params)

Sets the parameters of the model from an array.

Parameters

params – Array of parameter values.

get_params_as_array(self)

Returns the parameters of the model as an array.