fit_MKZ#

PySeismoSoil.helper_mkz_model.fit_MKZ(curve_data: ndarray, show_fig: bool = False, verbose: bool = False) tuple[numpy.ndarray, numpy.ndarray][source]#

Fit MKZ model to G/Gmax curves.

Parameters:
  • curve_data (np.ndarray) –

    A 2D numpy array that represents G/Gmax and damping curves of each layer, in the following format:

    strain [%]

    G/Gmax

    strain [%]

    damping [%]

    strain [%]

    G/Gmax

    The damping information is neglected in this function, so users can supply some dummy values.

  • show_fig (bool) – Whether to show curve-fitting results.

  • verbose (bool) – Whether to show messages about the calculation progress on the console.

Returns:

  • param (np.ndarray) – The fitted MKZ parameters. Shape: (n_mat, 4), where n_mat is the number of materials implied in curve_data.

  • fitted_curves (np.ndarray) – The fitted curves. Shape: (nr, 4 * n_mat), where nr is the length of the strain array. Currently hard-coded as 109.