serialize_params_to_array#
- PySeismoSoil.helper_mkz_model.serialize_params_to_array(param: dict[str, float], to_files: bool = False) ndarray [source]#
Convert the MKZ parameters from a dictionary to an array, according to this order:
gamma_ref, s, beta, Gmax
- Parameters:
param (dict[str, float]) – A dictionary containing the parameters of the MKZ model.
to_files (bool) – Whether the result is for writing to files. If so, the last parameter, Gmax, is removed, and a dummy parameter, b, which is always 0, is inserted between gamma_ref and s. This is for historical reasons: the text files recognizable by MATLAB and Fortran functions have the convention of “gamma_ref, 0.0, s, beta”.
- Returns:
param_array – A numpy array of shape (9,) containing the parameters of the MKZ model in the order specified above.
- Return type:
np.ndarray