eispac.core.multigaussian_deviates(param, x=None, y=None, error=None, n_gauss=None, n_poly=None, fjac=None, debug=False)[source]

Computes the deviates between a multigaussian model fit and input data.

  • param (array_like) – Model fit parameters. There must be 3*n_gauss + n_poly param values. For each Gaussian component, the parameters are assumed to have the order of [peak, centroid, width] for each Gaussian, followed by the polynomial terms (if any) in INCREASING order (e.g. c0, c1, c2)

  • x (array_like) –

  • x – Independent variable values to evaluate the function at. For EIS data, this will usually correspond to wavelength values.

  • y (array_like) – Measured values. For EIS data, this will usually correspond to intensity observations.

  • error (array_like) – Error values for each measurment.

  • n_gauss (int) – Number of Gaussian components.

  • n_poly (int) – Number of background polynomial terms. Common values are: o (no background), 1 (constant), and 2 (linear).

  • fjac (None) – Used by mpfit. When fjac == None, partial derivatives will NOT be calculated. This is the default for mpfit.

  • debug (boolean, optional) – Toggles ‘debugging mode’. If set to ‘True’, then the code will print an error statement and exit when it encounters invalid inputs or empty data. Default it ‘False’, which will result in just a negative status flag.

Return type:

[status, deviates]