Experiment#
- pylit.experiment.prepare(config)#
Prepare input data and compute quantities required for performing the inverse Laplace transform.
This function loads the imaginary-time correlation function \(F(q, \tau)\) and the default model \(D(q, \omega)\) for the dynamic structure factor \(S(q, \omega)\) from CSV files specified in the configuration, processes them, and computes the quantities required for performing the inverse Laplace transform.
Steps performed#
Load \(F(q, \tau)\) from the specified path
Determine the inverse temperature \(\beta = \max(\tau)\),
Scale \(F(q, \tau)\) by its maximum value in \(\tau\).
Load \(D(q, \omega)\) from the specified path
Optionally enforce non-negativity,
Optionally apply detailed balance \(D(-\omega) = e^{-\beta \omega} D(\omega)\).
Compute the following quantities
Integrals \(\int D(q, \omega)\, d\omega\) (trapezoidal rule),
Normalize the default model \(\widehat{D}(q, \omega)\) by its integrals in \(\omega\),
Expected value \(\mu(D)\),
Standard deviation \(\sigma(D)\),
Statistical moments \(\mu_\alpha(D)\) for predefined orders \(\alpha\),
Forward Laplace transform \(\widehat{D}(\tau)\),
Absolute error \(|\widehat{D}(\tau) - F_{\text{scaled}}(\tau)|\),
Maximal error across all \(\tau\).
Store all results in a
Preparation
object.
- type config:
- param config:
Configuration object containing file paths and flags controlling data preprocessing (e.g., enforcing non-negativity, detailed balance).
- returns:
Data container holding both raw and processed quantities.
- rtype:
Preparation
Notes
If
config.path_prep
is provided, thePreparation
object is serialized and saved to JSON.