pymecht.ParamFitter module

class pymecht.ParamFitter.ParamFitter(sim_func, output, params=None)[source]

Bases: object

A class to fit parameters of a simulation function to a given output

Parameters:
  • sim_func (function) – A function that takes in a dictionary of parameters and returns a numpy array of the same shape as the output

  • output (numpy array) – A numpy array of the same shape as the output of the sim_func to be fitted

  • params (ParamDict) – A dictionary of parameters to be varied

fit()[source]

Perform the fitting

Returns:

The result of the fitting

Return type:

scipy.optimize.OptimizeResult