add 4 pulse ste

This commit is contained in:
Dominik Demuth
2024-11-30 16:15:38 +01:00
parent d844aac0e8
commit 60ef1b0bcf
5 changed files with 36 additions and 22 deletions

View File

@ -5,6 +5,7 @@ import re
import subprocess
from itertools import product
def prepare_rw_parameter(parameter: dict) -> list:
"""
Converts a dictionary of iterables to list of dictionaries

View File

@ -59,12 +59,12 @@ def fit_decay(x: np.ndarray, y: np.ndarray, tevo: np.ndarray, verbose: bool = Tr
return tau_fit, beta_fit, finfty_fit
def fit_and_save_ste(
def fit_ste(
parameter_file: pathlib.Path,
prefix: str,
plot_decays: bool = True,
verbose: bool = True,
) -> tuple[str, np.ndarray, np.ndarray, np.ndarray]:
) -> tuple[str, np.ndarray, np.ndarray, np.ndarray]:
# read simulation parameters
parameter = read_parameter_file(parameter_file)
@ -89,9 +89,4 @@ def fit_and_save_ste(
print(f'Fit {prefix}')
tau, beta, finfty = fit_decay(t_mix, decay, tevo, verbose=verbose)
np.savetxt(f'tau_{prefix}_{varied_string}.dat', tau)
np.savetxt(f'beta_{prefix}_{varied_string}.dat', beta)
np.savetxt(f'finfty_{prefix}_{varied_string}.dat', finfty)
return varied_string, tau, beta, finfty