diff --git a/README.md b/README.md index 6accdc4..0bcd178 100644 --- a/README.md +++ b/README.md @@ -69,17 +69,17 @@ However, you still need to clone the GrainLearning repository to run the tutoria ## Tutorials 1. Linear regression with - the [`run_sim`](https://github.com/GrainLearning/grainLearning/blob/main/tutorials/linear_regression/python_linear_regression_solve.py#L14) + the [`run_sim`](https://github.com/GrainLearning/grainLearning/blob/main/tutorials/simple_regression/linear_regression/python_linear_regression_solve.py#L14) callback function of the [`DynamicSystem`](https://github.com/GrainLearning/grainLearning/blob/main/grainlearning/dynamic_systems.py) class, - in [python_linear_regression_solve.py](https://github.com/GrainLearning/grainLearning/blob/main/tutorials/linear_regression/python_linear_regression_solve.py) + in [python_linear_regression_solve.py](https://github.com/GrainLearning/grainLearning/blob/main/tutorials/simple_regression/linear_regression/python_linear_regression_solve.py) 2. Nonlinear, multivariate regression 3. Interact with the numerical model of your choice - via [`run_sim`](https://github.com/GrainLearning/grainLearning/blob/main/tutorials/linear_regression/linear_regression_solve.py#L11) + via [`run_sim`](https://github.com/GrainLearning/grainLearning/blob/main/tutorials/simple_regression/linear_regression/linear_regression_solve.py#L11) , - in [linear_regression_solve.py](https://github.com/GrainLearning/grainLearning/blob/main/tutorials/linear_regression/linear_regression_solve.py) + in [linear_regression_solve.py](https://github.com/GrainLearning/grainLearning/blob/main/tutorials/simple_regression/linear_regression/linear_regression_solve.py) 4. Load existing simulation data and run GrainLearning for one iteration, in [oedo_load_and_resample.py](https://github.com/GrainLearning/grainLearning/blob/main/tutorials/oedo_compression/oedo_load_and_resample.py) diff --git a/docs/source/bayesian_filtering.rst b/docs/source/bayesian_filtering.rst index 9229b9e..03c7e33 100644 --- a/docs/source/bayesian_filtering.rst +++ b/docs/source/bayesian_filtering.rst @@ -1,44 +1,52 @@ Bayesian filtering ================== -Bayesian filtering is a general framework for state estimation in dynamical systems. -In Bayesian filtering, we aim to estimate the current state of a system based on noisy observations -and a mathematical model of the system dynamics. -The state, sometimes augmented by the system's parameters, is assumed to evolve over time according to a stochastic process, -and the observations are assumed to be corrupted by random (e.g., Gaussian) noise. -The goal of the Bayesian filter is to recursively update the probability distribution of the system's state -as new observations become available, using Bayes' theorem. -The most commonly used Bayesian filters are the Kalman filter and the sequential Monte Carlo filter, also known as particle filter. +Bayesian filtering is a general framework for estimating the *hidden* state of a dynamical system +from partial observations using a predictive model of the system dynamics. + +The state, usually augmented by the system's parameters, changes in time according to a stochastic process, +and the observations are assumed to contain random noise. +The goal of Bayesian filtering is to update the probability distribution of the system's state +whenever new observations become available, using the recursive Bayes' theorem. + +.. In the context of Bayesian calibration for materials, +.. the system dynamics is predicted by a material model and the observations are experimental data. +.. The goal is to estimate the probability distribution of the model's parameters +.. from the experimental data using simulations of material responses. + +This section describes the theoretical background of Bayesian filtering. +Interested in how GrainLearning provides parameter values to your software? +Then browse directly to :ref:`the sampling module `. Bayes' theorem ---------------- Humans are Bayesian machines, constantly using Bayesian reasoning to make decisions and predictions about the world around them. -Bayes' theorem is the mathematical foundation for this process, allowing us to update our beliefs in the face of new evidence. +Bayes' theorem is the mathematical foundation for this process, allowing us to update our beliefs in the face of new evidence, .. math:: p(A|B) = \frac{p(B|A) p(A)}{p(B)}. -Where :math:`p(A|B)` is the **posterior** probability of hypothesis :math:`A` given evidence :math:`B` has been observed, -:math:`p(B|A)` is the **likelihood** of observing evidence :math:`B` given hypothesis :math:`A`, -:math:`p(A)` is the **prior** probability of hypothesis :math:`A`, and -:math:`p(B)` is the **prior** probability of evidence :math:`B`. +.. note:: + - :math:`p(A|B)` is the **posterior** probability of hypothesis :math:`A` given evidence :math:`B` has been observed + - :math:`p(B|A)` is the **likelihood** of observing evidence :math:`B` given hypothesis :math:`A` + - :math:`p(A)` is the **prior** probability of hypothesis :math:`A` + - :math:`p(B)` is a **normalizing** constant that ensures the posterior distribution sums to one At its core, Bayes' theorem is a simple concept: the probability of a hypothesis given some observed evidence is proportional to the product of the prior probability of the hypothesis and the likelihood of the evidence given the hypothesis. -In other words, Bayes' theorem tells us how to update our beliefs in light of new data. -So whether we're deciding what to eat for breakfast or making predictions about the weather, we're all Bayesian at heart. +Check `this video `_ for a more intuitive explanation. The inference module -------------------- The :mod:`.inference` module contains classes that infer the probability -distribution of model parameters from observation data, -also known as `inverse analysis `_ or `data assimilation `_, in many engineering disciplines. -The output of the :mod:`.inference` module is the probability distribution of model states :math:`\vec{x}_t`, -sometimes augmented by the parameters :math:`\vec{\Theta}`, conditioned on observation data :math:`\vec{y}_t` at time :math:`t`. +distribution of model parameters from observation data. +This process is also known as `inverse analysis `_ or `data assimilation `_. +The output of the :mod:`.inference` module is the probability distribution over the model state :math:`\vec{x}_t`, +usually augmented by the parameters :math:`\vec{\Theta}`, conditioned on the observation data :math:`\vec{y}_t` at time :math:`t`. Sequential Monte Carlo `````````````````````` @@ -46,40 +54,44 @@ Sequential Monte Carlo The method currently available for statistical inference is :class:`Sequential Monte Carlo <.SMC>`. It recursively updates the probability distribution of the augmented model state :math:`\hat{\vec{x}}_T=(\vec{x}_T, \vec{\Theta})` from the sequences of observation data -:math:`\hat{\vec{y}}_{0:T}` from time :math:`t = 0` to time :math:`T`. +:math:`\vec{y}_{0:T}` from time :math:`t = 0` to :math:`T`. The posterior distribution of the augmented model state is approximated by a set of samples, -where each sample instantiates a realization of the augmented model state. -The samples are drawn from a proposal density, which can be either informative or non-informative. +where each sample instantiates a realization of the model state. +.. Samples are drawn from a proposal density, which can be either +.. :ref:`informative ` +.. or :ref:`non-informative `. -Via Bayes' rule, the posterior distribution of the augmented model state reads +Via Bayes' rule, the posterior distribution of the *augmented model state* reads .. math:: - p(\hat{\vec{x}}_{0:T}|\hat{\vec{y}}_{1:T}) \propto \prod_{t_i=1}^T p(\hat{\vec{y}}_{t_i}|\hat{\vec{x}}_{t_i}) p(\hat{\vec{x}}_{t_i}|\hat{\vec{x}}_{{t_i}-1}) p(\hat{\vec{x}}_0), + p(\hat{\vec{x}}_{0:T}|\vec{y}_{1:T}) \propto \prod_{t_i=1}^T p(\vec{y}_{t_i}|\hat{\vec{x}}_{t_i}) p(\hat{\vec{x}}_{t_i}|\hat{\vec{x}}_{{t_i}-1}) p(\hat{\vec{x}}_0), -Where :math:`p(\hat{\vec{x}}_0)` is the so-called prior distribution, which is the initial distribution of the model state. +Where :math:`p(\hat{\vec{x}}_0)` is the initial distribution of the model state. We can rewrite this equation in the recursive form, so that the posterior distribution gets updated -at every time step :math:`t`, according to +at every time step :math:`t`. .. math:: - p(\hat{\vec{x}}_{0:t}|\hat{\vec{y}}_{1:t}) \propto p(\hat{\vec{y}}_t|\hat{\vec{x}}_t)p(\hat{\vec{x}}_t|\hat{\vec{x}}_{t-1})p(\hat{\vec{x}}_{1:t-1}|\hat{\vec{y}}_{1:t-1}), + p(\hat{\vec{x}}_{0:t}|\vec{y}_{1:t}) \propto p(\vec{y}_t|\hat{\vec{x}}_t)p(\hat{\vec{x}}_t|\hat{\vec{x}}_{t-1})p(\hat{\vec{x}}_{1:t-1}|\vec{y}_{1:t-1}), -Where :math:`p(\hat{\vec{y}}_t|\hat{\vec{x}}_t)` and :math:`p(\hat{\vec{x}}_t|\hat{\vec{x}}_{t-1})` +Where :math:`p(\vec{y}_t|\hat{\vec{x}}_t)` and :math:`p(\hat{\vec{x}}_t|\hat{\vec{x}}_{t-1})` are the `likelihood `_ distribution and the `transition `_ distribution, respectively. -The likelihood distribution is the probability distribution of the observation data given the model state. -The transition distribution is the probability distribution of the model state at time :math:`t` given the model state at time :math:`t-1`. -We apply no perturbation in the parameters :math:`\vec{\Theta}` nor in the model state :math:`\vec{x}_t` over time, -because most material models describe time or history dependent behavior and are expensive to evaluate. -Therefore, the transition distribution is deterministic. +The likelihood distribution is the probability distribution of observing :math:`\vec{y}_t` given the model state :math:`\hat{\vec{x}}_t`. +The transition distribution is the probability distribution of the model's current state :math:`\hat{\vec{x}}_t` given its previous state :math:`\hat{\vec{x}}_{t-1}`. + +.. note:: + We apply no perturbation in the parameters :math:`\vec{\Theta}` nor in the model states :math:`\vec{x}_{1:T}` + because the model history must be kept intact for path-dependent materials. + This results in a deterministic transition distribution predetermined from the initial state :math:`p(\hat{\vec{x}}_0)`. Importance sampling ::::::::::::::::::: -These distributions can be efficiently evaluated via `importance sampling `_. +The prior, likelihood, and posterior distributions can be evaluated via `importance sampling `_. The idea is to have samples that are more important than others when approximating a target distribution. -The measure of this importance is the so-called **importance weight**. +The measure of this importance is the so-called **importance weight** (see the figure below). .. figure:: ./figs/SIS.png :width: 400 @@ -88,80 +100,78 @@ The measure of this importance is the so-called **importance weight**. Illustration of importance sampling. Therefore, we draw :attr:`samples <.DynamicSystem.param_data>`, :math:`\vec{\Theta}^{(i)} \ (i=1,...,N_p)`, -from a proposal density, leading to an ensemble of :attr:`model states <.DynamicSystem.sim_data>` :math:`\vec{x}_t^{(i)}`. +from a proposal density, leading to an ensemble of the :attr:`model state <.DynamicSystem.sim_data>` :math:`\vec{x}_t^{(i)}`. The :attr:`importance weights <.SMC.posteriors>` :math:`w_t^{(i)}` are updated recursively, via .. math:: - w_t^{(i)} \propto p(\hat{\vec{y}}_t|\hat{\vec{x}}_t^{(i)})p(\hat{\vec{x}}_t^{(i)}|\hat{\vec{x}}_{t-1}^{(i)}) w_{t-1}^{(i)}. + w_t^{(i)} \propto p(\vec{y}_t|\hat{\vec{x}}_t^{(i)})p(\hat{\vec{x}}_t^{(i)}|\hat{\vec{x}}_{t-1}^{(i)}) w_{t-1}^{(i)}. -The :attr:`likelihood <.SMC.likelihoods>` :math:`p(\hat{\vec{y}}_t|\hat{\vec{x}}_t^{(i)})` -can be simply a multivariate Gaussian, which is computed by the function :attr:`~.SMC.get_likelihoods` +The :attr:`likelihood <.SMC.likelihoods>` :math:`p(\vec{y}_t|\hat{\vec{x}}_t^{(i)})` +can be assumed to be a multivariate Gaussian (see the equation below), which is computed by the function :attr:`~.SMC.get_likelihoods` of the :class:`.SMC` class. .. math:: - p(\hat{\vec{y}}_t|\hat{\vec{x}}_t^{(i)}) \propto \exp \{-\frac{1}{2}[\hat{\vec{y}}_t-\mathbf{H}(\vec{x}^{(i)}_t)]^T {\mathbf{\Sigma}_t^D}^{-1} [\hat{\vec{y}}_t-\mathbf{H}(\vec{x}^{(i)}_t)]\}, + p(\vec{y}_t|\hat{\vec{x}}_t^{(i)}) \propto \exp \{-\frac{1}{2}[\vec{y}_t-\mathbf{H}(\vec{x}^{(i)}_t)]^T {\mathbf{\Sigma}_t^D}^{-1} [\vec{y}_t-\mathbf{H}(\vec{x}^{(i)}_t)]\}, where :math:`\mathbf{H}` is the observation model that reduces to a diagonal matrix for uncorrelated observables, -and :math:`\mathbf{\Sigma}_t^D` is the covariance matrix :attr:`.SMC.cov_matrices` -calculated from :math:`\hat{\vec{y}}_t` and the user-defined normalized variance :attr:`.DynamicSystem.sigma_max`, in :attr:`.SMC.get_covariance_matrices`. +and :math:`\mathbf{\Sigma}_t^D` is the covariance matrix :attr:`~.SMC.cov_matrices` +calculated from :math:`\vec{y}_t` and the user-defined normalized variance :attr:`~.DynamicSystem.sigma_max`, in the function :attr:`~.SMC.get_covariance_matrices`. By making use of importance sampling, the posterior distribution -:math:`p(\hat{\vec{y}}_t|\hat{\vec{x}}_t^{(i)})` gets updated over time in :attr:`.SMC.data_assimilation_loop` +:math:`p(\vec{y}_t|\hat{\vec{x}}_t^{(i)})` gets updated over time in :attr:`~.SMC.data_assimilation_loop` --- this is known as `Bayesian updating `_. +Figure below illustrates the evolution of a posterior distribution over time. .. figure:: ./figs/linear_posterior_a.png - :width: 600 - :alt: Sequential Importance Sampling + :width: 500 + :alt: Posterior distribution at various time steps - Time evolution of the importance weights over a model parameter. + Time evolution of the importance weights over model parameter :math:`a`. Ensemble predictions :::::::::::::::::::: Since the importance weight on each sample :math:`\vec{\Theta}^{(i)}` is discrete -and the sample :math:`\vec{\Theta}^{(i)}` and model state :math:`\vec{x}_t^{(i)}` are in a one-to-one relationship, -the ensemble mean :attr:`.DynamicSystem.estimated_params` and variance :attr:`.DynamicSystem.estimated_params_cv` can be computed as +and the sample :math:`\vec{\Theta}^{(i)}` and model state :math:`\vec{x}_t^{(i)}` have one-to-one correspondence, +the ensemble mean and variance of :math:`f_t`, an arbitrary function of the model's augmented state :math:`\hat{\vec{x}}_t`, +can be computed as .. math:: - \mathrm{\widehat{E}}[f_t(\hat{\vec{x}}_t)|\hat{\vec{y}}_{1:t}] & = \sum_{i=1}^{N_p} w_t^{(i)} f_t(\hat{\vec{x}}_t^{(i)}), + \mathrm{\widehat{E}}[f_t(\hat{\vec{x}}_t)|\vec{y}_{1:t}] & = \sum_{i=1}^{N_p} w_t^{(i)} f_t(\hat{\vec{x}}_t^{(i)}), - \mathrm{\widehat{Var}}[f_t(\hat{\vec{x}}_t)|\hat{\vec{y}}_{1:t}] & = \sum_{i=1}^{N_p} w_t^{(i)} (f_t(\hat{\vec{x}}_t^{(i)})-\mathrm{\widehat{E}}[f_t(\hat{\vec{x}}_t)|\hat{\vec{y}}_{1:t}])^2, + \mathrm{\widehat{Var}}[f_t(\hat{\vec{x}}_t)|\vec{y}_{1:t}] & = \sum_{i=1}^{N_p} w_t^{(i)} (f_t(\hat{\vec{x}}_t^{(i)})-\mathrm{\widehat{E}}[f_t(\hat{\vec{x}}_t)|\vec{y}_{1:t}])^2, -where :math:`f_t` describes an arbitrary quantity of interest as a function of the model's state and parameters :math:`\hat{\vec{x}}_t^{(i)}`. +The figure below gives an example of the ensemble prediction in darkred, the top three fits in blue, orange, and green, and the observation data in black. .. figure:: ./figs/linear_obs_and_sim.png - :width: 600 + :width: 500 :alt: simulation versus observation data - Ensemble predictions, top three fits, and the observation data - - The sampling module -------------------- The sampling module allows drawing samples from -- a non-informative uniform distribution -- a proposal density that is designed and optimized to make the inference efficient +- a :ref:`non-informative ` uniform distribution +- an :ref:`informative ` proposal density designed and optimized to make the inference efficient +.. _sec-noninform: Sampling from low-discrepancy sequences ``````````````````````````````````````` Since we typically don't know the prior distribution of model parameters, we start with a non-informative, uniform sampling using `quasi-random `_ or `near-random `_ numbers. -We make use of the `Quasi-Monte Carlo generators of scipy `_ +We make use of the `Quasi-Monte Carlo generators of scipy `_. -You can choose to sample the parameter space from +You can choose one of the sampling methods when initializing a :class:`.IterativeBayesianFilter` object. -- a `Sobol sequence `_, -- a `Halton sequence `_, -- and `a Latin Hypercube `_, - -by specifying the initial sampling method :IterativeBayesianFilter:initial_sampling when initializing the UQ method. +- `"sobol"`: a `Sobol sequence `_ +- `"halton"`: a `Halton sequence `_ +- `"LH"`: a `Latin Hypercube `_ .. code-block:: python :caption: Initialize the Bayesian calibration method @@ -170,39 +180,40 @@ by specifying the initial sampling method :IterativeBayesianFilter:initial_sampl { "inference":{ "ess_target": 0.3, - "scale_cov_with_max": True }, "sampling":{ - "max_num_components": 2 + "max_num_components": 1 } - "initial_sampling": "Halton" + "initial_sampling": "halton" } ) +The figure below shows parameter samples generated using a Halton sequence, a Sobol sequence and a Latin Hypercube in 2D. + .. figure:: ./figs/qmc.png :width: 400 :alt: Quasi-Monte Carlo generator - Samples generated with the Halton sequence, Sobol sequence and Latin Hypercube sampling. - +.. _sec-inform: Sampling from a proposal density function ````````````````````````````````````````` An initial uniform sampling is unbiased, but it can be very inefficient since the correlation structure is not sampled. If we have some vague idea of the posterior distribution, we can come up with a proposal density. -For that, we can use the :class:.GaussianMixtureModel class which is a wrapper of `BayesianGaussianMixture `_ of scikit-learn. -Note that `BayesianGaussianMixture `_ -is based on a variational Bayesian estimation of a Gaussian mixture, -meaning the parameters of a Gaussian mixture distribution are inferred. -For example, the number of components is optimized to fit the data, rather than an input of the Gaussian mixture. +For that, we can use the :class:`.GaussianMixtureModel` class which is a wrapper of `BayesianGaussianMixture `_ of scikit-learn. + +.. note:: + Note that `BayesianGaussianMixture `_ + is based on a variational Bayesian estimation of a Gaussian mixture, + meaning the parameters of a Gaussian mixture distribution are inferred. + For example, the number of components is optimized rather than an input of the Gaussian mixture. -The **non-parametric** :attr:`.GaussianMixtureModel.gmm` model can be trained with previously generated samples -and their importance weights (i.e., an approximation of the posterior distribution) -obtained from :mod:`.inference` to construct a smooth proposal density function. -New samples are then drawn from this proposal density in :attr:`.GaussianMixtureModel.regenerate_params`. +The **non-parametric** :attr:`Gaussian mixture <.GaussianMixtureModel.gmm>` can be trained using the previously generated samples +and their importance weights estimated by the :mod:`.inference` method. +New samples are then drawn from this mixture model that acts as a proposal density in :attr:`~.GaussianMixtureModel.regenerate_params`. .. figure:: figs/gmm.jpg - :width: 600 + :width: 500 :alt: Resampling via a Gaussian mixture Resampling of parameter space via a Gaussian mixture model. @@ -210,25 +221,30 @@ New samples are then drawn from this proposal density in :attr:`.GaussianMixture Iterative Bayesian filter ------------------------- -The `iterative Bayesian filtering algorithm `_ combines sequential Monte Carlo filtering for inference -and non-parametric Gaussian mixtures for (re)sampling. -Sequential Monte Carlo combined with quasi- or near-random sequence sampling -leads to the so-called sequential quasi-Monte Carlo (SQMC) filter with the necessary number of samples proportional to :math:`d\log{d}`. -Although the SQMC filter is unbiased, it is very inefficient and ensured to degenerate as time proceeds. +.. The `iterative Bayesian filtering algorithm `_ combines sequential Monte Carlo filtering for inference +.. and non-parametric Gaussian mixtures for (re)sampling. +.. Sequential Monte Carlo combined with quasi- or near-random sequence sampling +.. leads to the so-called sequential quasi-Monte Carlo (SQMC) filter whose necessary number of samples is proportional to :math:`d\log{d}`. +.. Although the SQMC filter is unbiased, it is highly inefficient and ensured to degenerate. -The idea of iterative Bayesian filtering is to solve the inverse problem all over again, -from time :math:`0` to :math:`T` with new samples drawn from a more sensible proposal density, -effectively performing multi-level resampling to avoid weight degeneracy and improve efficiency. +The idea of `iterative Bayesian filtering algorithm `_ is to solve the inverse problem all over again, with new samples drawn from a more sensible proposal density, +leading to a multi-level resampling strategy to avoid weight degeneracy and improve efficiency. The essential steps include -1. :attr:`.IterativeBayesianFilter.initialize` generates the initial samples using a low-discrepancy sequence. -2. Currently, :attr:`.IterativeBayesianFilter.inference` uses :class:`.SMC` to quantify the evolution of the posterior distribution of model parameters over time. -3. When running :class:`.SMC` filtering via :attr:`.IterativeBayesianFilter.run_inference`, it is crucial to ensure that the effective sample size is large enough, so that the ensemble does not degenerate into a few samples with very large weights and :class:`.GaussianMixtureModel` are trained with sufficient data. -4. :attr:`.IterativeBayesianFilter.run_sampling` generates new samples from :class:`.GaussianMixtureModel` as the proposal density, trained with the previous ensemble (i.e., samples and associated weights). -5. :attr:`.IterativeBayesianFilter.solve` combines the steps above and is used by :mod:`BayesianCalibration` for high-level operations, such as :attr:`.BayesianCalibration.run_one_iteration`, :attr:`.BayesianCalibration.load_and_run_one_iteration`, etc. +1. Generating the initial samples using :attr:`a low-discrepancy sequence <.IterativeBayesianFilter.initialize>`, +2. Running the instances of the predictive (forward) model via a user-defined :ref:`callback function `, +3. Estimating the time evolution of :attr:`the posterior distribution <.IterativeBayesianFilter.run_inference>`, +4. Generateing new samples from :attr:`the proposal density <.IterativeBayesianFilter.run_sampling>`, trained with the previous ensemble (i.e., samples and associated weights), +5. Check whether the posterior expecation of the model parameters has converged to a certain value, and stop the iteration if so. +6. If not, repeating step 1--5 (combined into the function :attr:`.IterativeBayesianFilter.solve`) + +.. warning:: + When running :class:`.SMC` filtering via :attr:`.IterativeBayesianFilter.run_inference`, + it is crucial to ensure that the :attr:`effective sample size <.SMC.ess>` is large enough, + so that the ensemble does not degenerate into few samples with very large weights. + +The figure below illustrates the workflow of iterative Bayesian filtering. .. figure:: ./figs/IBF.png - :width: 600 + :width: 500 :alt: Iterative Bayesian filtering - - Workflow of iterative Bayesian Filtering diff --git a/docs/source/dynamic_systems.rst b/docs/source/dynamic_systems.rst index aa97b32..25f1a6f 100644 --- a/docs/source/dynamic_systems.rst +++ b/docs/source/dynamic_systems.rst @@ -4,15 +4,18 @@ Dynamic systems The dynamic system module ------------------------- -The :mod:`.dynamic_systems` module is essential for GrainLearning to execute computational models -and encapsulate simulation and observation (reference) data in a single :class:`.DynamicSystem` class. +The :mod:`.dynamic_systems` module is essential for GrainLearning to run the predictive model(s) +and encapsulate simulation and observation (or reference) data in a single :class:`.DynamicSystem` class. Currently, the :mod:`.dynamic_systems` module contains -- a :class:`.DynamicSystem` class that executes simulations handles the simulation and observation data in a *Python environment*, -- an :class:`.IODynamicSystem` class that sends instructions to *third-party software* (from the command line) and retrieves simulation data from the output files of the software. +- a :class:`.DynamicSystem` class that handles the simulation and observation data within a *Python environment*, +- an :class:`.IODynamicSystem` class that sends instructions to external *third-party software* (e.g., via the command line) and retrieves simulation data from the output files of the software. -Note that the dynamic system classes defined in GrainLearning are also known as state-space models -that consist of the predicted states :math:`\vec{x}_t` (:attr:`.DynamicSystem.sim_data`) and experimental observables :math:`\vec{y}_t` (:attr:`.DynamicSystem.obs_data`). +.. note:: A dynamic system is also known as a state-space model in the literature. + It describes the time evolution of the state of the model :math:`\vec{x}_t` (:attr:`.DynamicSystem.sim_data`) + and the state of the observables :math:`\vec{y}_t` (:attr:`.DynamicSystem.obs_data`). + Both :math:`\vec{x}_t` and :math:`\vec{y}_t` are random variables + whose distributions are updated by the :mod:`.inference` module. .. math:: @@ -23,46 +26,63 @@ that consist of the predicted states :math:`\vec{x}_t` (:attr:`.DynamicSystem.si \label{eq:obsModel} \end{align} -where :math:`\mathbb{F}` represents the *third-party software* model that +where :math:`\mathbb{F}` represents the **third-party software** model that takes the previous model state :math:`\vec{x}_{t-1}` to make predictions for time :math:`t`. -If all observables :math:`\vec{y}_t` are independent and have a one-to-one relationship with :math:`\vec{y}_t`, -the observation model :math:`\mathbb{H}` reduces to the identity matrix :math:`\mathbf{I}_d`, +If all observables :math:`\vec{y}_t` are independent and have a one-to-one correspondence with :math:`\vec{x}_t`, +(meaning you predict what you observe), +the observation model :math:`\mathbb{H}` reduces to the identity matrix :math:`\mathbb{I}_d`, with :math:`d` being the number of independent observables. The simulation and observation errors :math:`\vec{\nu}_t` and :math:`\vec{\omega}_t` -are random variables and assumed to be normally distributed with zero means. -We consider both errors together in the covariance matrix with :attr:`.SMC.cov_matrices`. -In fact, :math:`\vec{x}_t` and :math:`\vec{y}_t` are also random variables -whose distributions are updated by the :mod:`.inference` module. +are random variables and assumed to be normally distributed around zero means. +We consider both errors together in the covariance matrix :attr:`.SMC.cov_matrices`. -Interact with third-party software ----------------------------------- +Interact with third-party software via callback function +-------------------------------------------------------- -Interaction with external "software" models can be done via the callback of the :class:`.DynamicSystem` class. -You can define your own :attr:`.DynamicSystem.callback` -and pass samples (combinations of parameters) to the **model implemented in Python** or to the software from the **command line**. -The following gives an example of the callback where the "software" model :math:`\mathbb{F}` is a Python function. +Interaction with an external "software" model can be done via the callback function of :class:`.DynamicSystem` or :class:`.IODynamicSystem`. +You can define your own callback function +and pass *samples* (combinations of parameters) to the **model implemented in Python** or to the software from the **command line**. +The figure below shows how the callback function is called in the execution loop of :class:`.BayesianCalibration`. + +.. _execution_loop: +.. image:: ./figs/execution_loop.png + :width: 400 + :alt: How a callback function gets executed + +Interact with Python software +````````````````````````````` + +Let us first look at an example where the predictive model :math:`\mathbb{F}` is implemented in Python. +The following code snippet shows how to define a callback function that runs a linear model. .. code-block:: python - :caption: A callback function implemented in Python + :caption: A linear function implemented in Python - def run_sim(system: Type["DynamicSystem"], **kwargs): + def run_sim(system, **kwargs): data = [] + # loop over parameter samples for params in system.param_data: - # a linear function y = a*x + b + # Run the model: y = a*x + b y_sim = params[0] * system.ctrl_data + params[1] + # Append the simulation data to the list data.append(np.array(y_sim, ndmin=2)) - # assign model output to the dynamic system class - model.set_sim_data(data) + # pass the simulation data to the dynamic system + system.set_sim_data(data) + + +The function `run_sim` is assigned to the :attr:`.DynamicSystem.callback` attribute of the :class:`.DynamicSystem` class +and is is called every time the :attr:`.DynamicSystem.run` function is called (see :ref:`the figure ` above). -The IODynamicSystem class -````````````````````````` +Interact with non-Python software +````````````````````````````````` -The :class:`.IODynamicSystem` inherits from :class:`.DynamicSystem` and is intended to work with third-party software packages. -The :attr:`.IODynamicSystem.run` function overrides the :attr:`.DynamicSystem.run` function of the :class:`.DynamicSystem`. -to write samples in a text file and run the :attr:`.IODynamicSystem.callback` to execute the third-party software model at all sample points. -Below is an example of the callback where parameter samples are passed as command-line arguments to an external executable. +The :class:`.IODynamicSystem` class inherits from :class:`.DynamicSystem` and is intended to work with external software packages +via the command line. +The :attr:`.IODynamicSystem.run` function overrides the :attr:`.DynamicSystem.run` function of the :class:`.DynamicSystem` class. +Parameter samples are written into a text file and used by :attr:`.IODynamicSystem.callback` to execute the third-party software. +Users only need to write a for-loop to pass each parameter sample to this external software, e.g., as command-line arguments (see the example below). .. code-block:: python :caption: A callback function that interacts with external software @@ -77,21 +97,27 @@ Below is an example of the callback where parameter samples are passed as comman curr_iter = kwargs['curr_iter'] # loop over and pass parameter samples to the executable for i, params in enumerate(system.param_data): - description = 'Iter'+str(curr_iter)+'-Sample'+str(i).zfill(mag) - print(" ".join([executable, '%.8e %.8e'%tuple(params), description])) + description = 'Iter'+str(curr_iter)+'_Sample'+str(i).zfill(mag) os.system(' '.join([executable, '%.8e %.8e'%tuple(params), description])) +.. note:: This code snippet can be used as a template to interact with any third-party software. + The only thing you need to do is to replace the executable name and the command-line arguments. + The command-line arguments are passed to the software in the order of the parameter names in :attr:`.IODynamicSystem.param_names`. + The last argument (optional) is a description of the current simulation, which is used to tag the output files. + In this example, the description is `Iter_Sample`. + The output files are read into :attr:`.IODynamicSystem.sim_data` by the function :attr:`.IODynamicSystem.load_sim_data`. + Data format and directory structure -``````````````````````````````````` +::::::::::::::::::::::::::::::::::: -GrainLearning can read .npy (for backward compatibility) and plain text formats. +GrainLearning can read plain text and .npy formats (for backward compatibility). When using :class:`.IODynamicSystem`, the directory :attr:`.IODynamicSystem.sim_data_dir` must exist and contains the observation data file :attr:`.IODynamicSystem.obs_data_file`. Subdirectories with name `iter` will be created in :attr:`.IODynamicSystem.sim_data_dir`. In these subdirectories, you find -- simulation data file: `_Iter-Sample_sim.txt` -- parameter data file: `_Iter-Sample_param.txt`, +- simulation data file: `_Iter_Sample_sim.txt` +- parameter data file: `_Iter_Sample_param.txt`, where is :attr:`.IODynamicSystem.sim_name`, is :attr:`.BayesianCalibration.curr_iter`, and is the index of the :attr:`.IODynamicSystem.param_data` sequence. @@ -101,34 +127,32 @@ For example, the observation data stored in a text file :attr:`.IODynamicSystem. .. code-block:: text # u f - 0 5.0 - 1 5.2 - 2 5.4 - 3 5.6 - 4 5.8 - 5 6.0 + 0 5.0 + 1 5.2 + 2 5.4 + 3 5.6 + 4 5.8 + 5 6.0 -Similarly, in a simulation data file `linear_Iter0-Sample00_sim.txt`, you find +Similarly, in a simulation data file `linear_Iter0_Sample00_sim.txt`, you will find .. code-block:: text # f - 0.741666667 - 1.023635417 - 1.3056041669999998 - 1.587572917 - 1.869541667 - 2.151510417 - -Note the simulation data doesn't contain the :attr:`DynamicSystem.ctrl_data` sequence. - -Therefore, when using :class:`.IODynamicSystem` the user needs to provide the keys to the data sequence -of the **control** and **observation** group. -These keys are also used to extract the corresponding data from the simulation data files. - -.. code-block:: python - - # name of the control variable - "ctrl_name": 'u', - # name of the output variables of the model - "obs_names": ['f'], + 5.0 + 5.2 + 5.4 + 5.6 + 5.8 + 6.0 + +.. note:: The simulation data doesn't contain the sequence of :attr:`DynamicSystem.ctrl_data` at which the outputs are stored. + Therefore, when initializing :class:`.IODynamicSystem` the user needs to provide the keys to the data sequences + that belong to the **control** and the **observation** group. + + .. code-block:: python + + # name of the control variable + "ctrl_name": 'u', + # name of the output variables of the model + "obs_names": ['f'], diff --git a/docs/source/examples.rst b/docs/source/examples.rst index 23a3768..e5d41d5 100644 --- a/docs/source/examples.rst +++ b/docs/source/examples.rst @@ -18,6 +18,15 @@ for running the simulations, the "trials" have to be selected with an optimized Bayesian calibration of DEM models ---------------------------------- + + +Run DEM simulations guided by GrainLearning +``````````````````````````````````````````` + + +Process simulation data with GrainLearning +`````````````````````````````````````````` + In the case of DEM modeling of granular soils, relevant parameters could be Young's modulus, friction coefficient, Poisson's ratio, rolling stiffness, and rolling friction, etc. of a soil particle, as well as structural parameters like a particle size distribution parameterized by its moments. diff --git a/docs/source/figs/linear_obs_and_sim.png b/docs/source/figs/linear_obs_and_sim.png index 9173a16..0dbc799 100644 Binary files a/docs/source/figs/linear_obs_and_sim.png and b/docs/source/figs/linear_obs_and_sim.png differ diff --git a/docs/source/index.rst b/docs/source/index.rst index 2542fcc..dad0a59 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -6,18 +6,17 @@ Welcome to GrainLearning's documentation! ========================================= -GrainLearning is a Bayesian uncertainty quantification and propagation toolbox for computer simulations -of granular materials. -The software is primarily used to infer and quantify parameter uncertainties in computational models of granular materials -from observation data, which is also known as inverse analyses or data assimilation. -Implemented in Python, GrainLearning can be loaded into a Python environment to process the simulation and observation data, -or alternatively, as an independent tool where simulation runs are done separately, e.g., via a shell script. - -If you use GrainLearning, please cite `the version of the GrainLearning software you used `_ and the following paper: - -H. Cheng, T. Shuku, K. Thoeni, P. Tempone, S. Luding, V. Magnanimo. -An iterative Bayesian filtering framework for fast and automated calibration of DEM models. *Comput. Methods Appl. Mech. Eng., 350 (2019)*, pp. 268-294, -`10.1016/j.cma.2019.01.027 `_ +GrainLearning is a Bayesian uncertainty quantification toolbox for computer simulations of granular materials. +The software is primarily used to infer model parameter distributions from observation or reference data, +a process also known as inverse analyses or data assimilation. +Implemented in Python, GrainLearning can be loaded into a Python environment to process your simulation and observation data, +or alternatively, used as an independent tool where simulations are run separately, e.g., from the command line. + +If you use GrainLearning, please cite `the version of the GrainLearning software you used `_. +If you want to know more about how the method works, the following papers can be interesting: + +- H. Cheng, T. Shuku, K. Thoeni, P. Tempone, S. Luding, V. Magnanimo. An iterative Bayesian filtering framework for fast and automated calibration of DEM models. *Comput. Methods Appl. Mech. Eng., 350 (2019)*, pp. 268-294, `10.1016/j.cma.2019.01.027 `_ +- P. Hartmann, H. Cheng, K. Thoeni. Performance study of iterative Bayesian filtering to develop an efficient calibration framework for DEM. *Computers and Geotechnics 141*, 104491, `10.1016/j.compgeo.2021.104491 `_ .. toctree:: :maxdepth: 2 diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 944c8b8..b39e398 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -105,7 +105,7 @@ Online You can check the online documentation `here `_. -Build the documentation +Build the documentation locally ``````````````````````` .. code-block:: bash diff --git a/docs/source/introduction.rst b/docs/source/introduction.rst index 8d957e7..61e2a1a 100644 --- a/docs/source/introduction.rst +++ b/docs/source/introduction.rst @@ -6,46 +6,52 @@ Welcome to GrainLearning! GrainLearning is a toolbox for Bayesian calibration and uncertainty quantification of computer simulations of granular materials. It is designed to make uncertainty quantification, sensitivity analysis, and calibration simple, -for computational models of granular materials, such as soils, rocks, pharmaceutical powders, and food grains. +for computational models of granular materials, such as soils, powders, and food grains. GrainLearning is written in Python and is built on top of the `NumPy `_ and `SciPy `_ libraries. GrainLearning was initially developed for inferring particle- or microstructure-scale parameters in **discrete element method (DEM)** simulations of granular materials. -It is designed to tackle inverse or data assimilation problems, with two meanings behind its name: -(1) physical particle properties are learned from limited observations, -and (2) statistical "particles" are used to achieve inference via `sequential Monte Carlo filtering `_. -GrainLearning can be also used with other empirical, numerical, or data-driven models -that are strongly nonlinear in time. +It is designed to solve **inverse** or **data assimilation** problems, with two meanings behind its name: + +1. physical particle properties are learned from limited observations, + +2. statistical "particles" are used to achieve inference via `sequential Monte Carlo filtering `_. + +GrainLearning is non-intrusive. Computer models used by GrainLearning are blackboxes and therefore can be theoretical, numerical, or data-driven. The most important modules of GrainLearning are :doc:`dynamic systems `, :ref:`inference `, and :ref:`sampling `. An unique feature of GrainLearning is the machine learning (ML) capabilities of the :ref:`samplers ` -to learn complex probability distributions and the :doc:`data-driven emulators ` to learn the physics. +to learn complex **probability distributions** and the :ref:`data-driven emulators ` to learn the physics. Users can combine different classes in these modules to create a variety of Bayesian calibration tools. -Currently, only the :ref:`iterative Bayesian filter ` has been implemented and tested +Currently, only the :ref:`iterative Bayesian filter ` has been implemented, and tested with `DEM models `_ -and `continuum constitutive models `_. -However, the modular design of GrainLearning allows for the implementation of other inference algorithms. +and `theoretical constitutive models `_. +The available data-driven emulator is `Long Short-Term Memory (LSTM) `_ networks +widely used for predicting time series. +However, the modular design of GrainLearning allows for the implementation of other inference algorithms and models. The following figure shows the main modules of GrainLearning and their interconnections. .. figure:: ./figs/gl_modules.png :width: 400 :alt: GrainLearning modules -Linking an external "software" model to GrainLearning can be done either in Python or -via the :attr:`callback function <.IODynamicSystem.callback>` of the :class:`dynamic system <.IODynamicSystem>` class. -Examples of such integration have been implemented for the DEM software packages, e.g., `YADE `_, -and `MercuryDPM `_. -For more information on how to integrate a model into GrainLearning, see :doc:`dynamic systems `. - -While reading this documentation, please keep in mind the following definitions, as they will appear frequently in various sections. - -- **Prior**: the initial knowledge about model state and/or parameter before any data is taken into account, expressed as a probability distribution. -- **Posterior**: the updated knowledge after the evidence is taken into account via Bayes' theorem. -- **Proposal**: the distribution from which we draw new samples. It can be assumed or learned. -- **Samples**: the combination of model parameters drawn from a distribution, leading to certain "randomly" distributed model states. -- **Model evaluation**: the execution of the model at the sample points. -- **Ensemble**: the probability distribution of the model state, represented as a collection of state vectors and their associated weights. +Users only need to write a :attr:`callback function <.IODynamicSystem.callback>` +where parameter samples are sent to an external "software" or Python model. +Examples of this can be found for :ref:`YADE ` +(`Yet Another Dynamic Engine `_). +For more information on how to integrate a predictive model into GrainLearning, see :doc:`dynamic systems `. + +.. note:: + While reading this documentation, keep in mind the following definitions, as they will appear frequently in various sections. + + - **Prior**: the initial knowledge about model state and/or parameter before any data is taken into account, expressed as a probability distribution. + - **Posterior**: the updated knowledge after the evidence is taken into account via Bayes' theorem. + - **Proposal**: the distribution from which we draw new samples. It can be assumed or learned. + - **Samples**: the combination of model parameters drawn from a distribution, leading to certain "randomly" distributed model states. + - **Model evaluation**: the execution of the model at the sample points. + - **Ensemble**: the probability distribution of the model state, represented as a collection of state vectors and their associated weights. + - **Filtering**: the process of updating the ensemble as new data is taken into account. We draw inspiration from the `UQpy `_ and `MUSCLE3 `_ libraries when designing the GrainLearning software and its documentation. diff --git a/docs/source/rnn.rst b/docs/source/rnn.rst index 3da79a2..4cc824c 100644 --- a/docs/source/rnn.rst +++ b/docs/source/rnn.rst @@ -1,9 +1,10 @@ RNN Module ========== -We implemented a `Recurrent Neural Network (RNN) `_ model in the tensorflow framework. For more information about the model go to section `The RNN model`_. +We implemented a `Recurrent Neural Network (RNN) `_ model +in the tensorflow framework. For more information about the model go to section `The RNN model`_. -There are four main usages of RNN module: +There are four main usages of the RNN module: 1. `Train a RNN with your own data`_. 2. `Make a prediction with a pre-trained model`_. @@ -14,7 +15,7 @@ Train a RNN with your own data Get your data to our format ``````````````````````````` -The RNN model of this module considers a specific data format and organization. Our example of data consists of several DEM simulations of Triaxial Compressions of samples having different contact parameters. Such simulations were performed using `YADE `_ that outputs the simulation state to a .npy file every given amount of time steps. The files are stored under the folder structure pressure/experiment_type. +The RNN model of this module considers a specific data format and organization. Our example of data consists of several DEM simulations of Triaxial Compressions of granular material specimens having different contact parameters. Such simulations were performed using `YADE `_ that outputs the simulation state to a .npy file every given amount of time steps. The files are stored under the folder structure pressure/experiment_type. * Prepare your parsing script. We recommend to copy this script locally. * Use ``CONTACT_KEYS``, ``INPUT_KEYS`` and ``OUTPUT_KEYS`` consistent with your dataset. You can modify, add or remove elements of such dictionaries. These will also be stored as :ref:`dataset attributes `. diff --git a/docs/source/tutorials.rst b/docs/source/tutorials.rst index 3cf0620..b98d323 100644 --- a/docs/source/tutorials.rst +++ b/docs/source/tutorials.rst @@ -1,44 +1,66 @@ Tutorials ========= -In this section, we demonstrate how to use GrainLearning through a simple example of linear regression. -With :class:`.DynamicSystem` and :class:`IODynamicSystem` and the utility functions defined in -:class:`.BayesianCalibration`, we show different ways of connecting -GrainLearning to Python or third-party software models, +In this section, we demonstrate the functionalities GrainLearning via a simple example of linear regression. -Linear regression with a Python model -------------------------------------- +.. _sec-use-GL: -For demonstrative purposes, we use a linear function :math:`y = a\times{x}+b` as the numerical model, -implemented as the callback function of the :class:`.DynamicSystem`. +Three ways of using GrainLearning +--------------------------------- -First, we create a synthetic dataset from this linear equation. +We show in the following three different ways of using GrainLearning, -.. code-block:: python +1. with :ref:`a Python model `, +2. with :ref:`a "software" model via the command line `, +3. and as :ref:`a postprocessing tool ` to generate new parameter samples. - x_obs = np.arange(100) - y_obs = 0.2* x_obs + 5.0 +.. _sec-python-model: - # add Gaussian noise (optional) - y_obs += np.random.rand(100) * 2.5 +Linear regression with a Python model +````````````````````````````````````` - def run_sim(system, **kwargs): +To work with GrainLearning in the Python environment, +we need to write a callback function of the :class:`.DynamicSystem` where the model :math:`y = a\times{x}+b` is called. + +.. code-block:: python + + # define a callback function to be passed to the system object + def run_sim(system): data = [] + # loop over the parameter samples for params in system.param_data: + # run the model y = a*x + b y_sim = params[0] * system.ctrl_data + params[1] + # append the data to the list data.append(np.array(y_sim, ndmin=2)) - - model.set_sim_data(data) + # pass the data to the system object + system.set_sim_data(data) + +Let us use :math:`a=0.2` and :math:`b=5.0` to generate some synthetic data and add Gaussian noise to it. + +.. code-block:: python + + # define the true parameters + a = 0.2 + b = 5.0 + # define the control data in the range [0, 100) + x_obs = np.arange(100) + # generate the synthetic data + y_obs = a * x_obs + b + + # add Gaussian noise (optional) + y_obs += np.random.rand(100) * 2.5 A calibration tool can be initialized by defining all the necessary input in a dictionary and passing it to the constructor of :class:`.BayesianCalibration`. +Check out the documentation of :class:`.BayesianCalibration` for more details. .. code-block:: python import numpy as np - from grainlearning import BayesianCalibration + # create a calibration tool calibration = BayesianCalibration.from_dict( { "num_iter": 10, @@ -51,78 +73,64 @@ and passing it to the constructor of :class:`.BayesianCalibration`. "ctrl_data": x_obs, "callback": run_sim, }, - "calibration": { - "inference": {"ess_target": 0.3}, - "sampling": { - "max_num_components": 1, - "seed": 0, + "calibration": { + "inference": {"ess_target": 0.3}, + "sampling": { + "max_num_components": 1, } } "save_fig": 0, } ) - - calibration.run() -Note that we want the SMC algorithm to end with an effective sample size -of no less than 30%. This is achieved by assigning `ess_target = 0.3` when initializing the inference method. -`calibration.run()` will run the Bayesian calibration iteratively -until the termination criterion is met. -By default, no plots are created unless the flag :attr:`.BayesianCalibration.save_fig` is non-negative. + # run the calibration tool + calibration.run() + print(f'The most probable parameter values are {calibration.get_most_prob_params()}') -Click :download:`here <../../tutorials/linear_regression/python_linear_regression_solve.py>` to download the full script. +Note that it is important to keep the effective sample size large enough (e.g., `ess_target = 0.3`) +such that the parameter distribution is not sampled only at the optima. +Another key parameter for the sampling algorithm is `max_num_components`, +which controls the upper bound for the number of components in the parameter distribution. -Linear regression with a "software" model ------------------------------------------ +Click :download:`here <../../tutorials/simple_regression/linear_regression/python_linear_regression_solve.py>` to download the full script. -Because most likely the external software reads in and writes out text files, -its interaction with GrainLearning has to be done with the :class:`.IODynamicSystem` -Now let us look at the same example, with the :class:`.IODynamicSystem` and a linear function implemented in a separate file `LinearModel.py`. -For simplicity, we implement this external "software" in Python, which takes the command line arguments as the model parameters. +.. attention:: + Play with `ess_target` and `max_num_components` to see how they affect the identified most probable parameter values + and the number of iterations needed to reach the termination criterion. -.. code-block:: python +.. _sec-external-model: - #!/usr/bin/env python3 - import sys - import numpy as np +Linear regression with a "software" model +````````````````````````````````````````` - def write_dict_to_file(data, file_name): - """ - write a python dictionary data into a text file - """ - with open (file_name,'w') as f: - keys = data.keys() - f.write('# ' + ' '.join(keys) + '\n') - num = len(data[list(keys)[0]]) - for i in range(num): - f.write(' '.join([str(data[key][i]) for key in keys]) + '\n') - - # define model parameters - a = float(sys.argv[1]) - b = float(sys.argv[2]) - description = sys.argv[3] +Linking GrainLearning with external software is done with the :class:`.IODynamicSystem` +Now let us look at the same example, using the :class:`.IODynamicSystem` and a linear function implemented in a separate file +:download:`linear_model.py <../../tutorials/simple_regression/linear_regression/linear_model.py>`. +This Python "software" will be run from command line by the callback function of a :class:`.IODynamicSystem` object +and take the command-line arguments as model parameters. +Download :download:`this script <../../tutorials/simple_regression/linear_regression/linear_model.py>` +and :download:`the observation data <../../tutorials/simple_regression/linear_regression/linear_obs.dat>`, +open a Python console in the same directory, and copy and paste the following code to run the calibration. - x_obs = np.arange(100) - y_sim = a * x_obs + b +First import the necessary modules. - # write sim data and parameter in text files - data_file_name = 'linear_'+ description + '_sim.txt' - sim_data = {'f': y_sim} - write_dict_to_file(sim_data, data_file_name) +.. code-block:: python - data_param_name = 'linear_'+ description + '_param.txt' - param_data = {'a': [a], 'b': [b]} - write_dict_to_file(param_data, data_param_name) + import os + from math import floor, log + from grainlearning import BayesianCalibration + from grainlearning.dynamic_systems import IODynamicSystem -This Python script is called by the callback `run_sim` from the command line. +Then define the callback function to run the external software. .. code-block:: python - executable = 'python ./tutorials/linear_regression/LinearModel.py' - + executable = f'python ./linear_model.py' + def run_sim(system, **kwargs): - from math import floor, log - import os + """ + Run the external executable and passes the parameter sample to generate the output file. + """ # keep the naming convention consistent between iterations mag = floor(log(system.num_samples, 10)) + 1 curr_iter = kwargs['curr_iter'] @@ -130,18 +138,19 @@ This Python script is called by the callback `run_sim` from the command line. print("*** Running external software... ***\n") # loop over and pass parameter samples to the executable for i, params in enumerate(system.param_data): - description = 'Iter' + str(curr_iter) + '-Sample' + str(i).zfill(mag) - print(" ".join([executable, '%.8e %.8e' % tuple(params), description])) - os.system(' '.join([executable, '%.8e %.8e' % tuple(params), description])) + description = 'Iter' + str(curr_iter) + '_Sample' + str(i).zfill(mag) + print(" ".join([executable, "%.8e %.8e" % tuple(params), system.sim_name, description])) + os.system(' '.join([executable, "%.8e %.8e" % tuple(params), system.sim_name, description])) -When initializing :class:`.IODynamicSystem`, -one has to make sure that `sim_data_dir` and `obs_data_file` exist, `sim_name`, `obs_names` and `ctrl_name` are given, -and `sim_data_file_ext` is correct such that GrainLearning can find the data in the simulation directories. +Now let us define the calibration tool. Note that the system type is changed :class:`.IODynamicSystem`. -.. code-block:: python +.. important:: + Additionally, one has to make sure that `obs_data_file` exist and + `sim_name`, `obs_names`, `sim_data_dir`, and `ctrl_name` are given + such that GrainLearning can find the data in the simulation directories. + Otherwise, an error will be raised. - from grainlearning import BayesianCalibration - from grainlearning.dynamic_systems import IODynamicSystem +.. code-block:: python calibration = BayesianCalibration.from_dict( { @@ -152,11 +161,11 @@ and `sim_data_file_ext` is correct such that GrainLearning can find the data in "param_max": [1, 10], "param_names": ['a', 'b'], "num_samples": 20, - "obs_data_file": 'linear_obs.dat', + "obs_data_file": './linear_obs.dat', "obs_names": ['f'], "ctrl_name": 'u', "sim_name": 'linear', - "sim_data_dir": './tutorials/linear_regression/', + "sim_data_dir": './sim_data/', "sim_data_file_ext": '.txt', "callback": run_sim, }, @@ -164,7 +173,7 @@ and `sim_data_file_ext` is correct such that GrainLearning can find the data in "inference": {"ess_target": 0.3}, "sampling": { "max_num_components": 1, - "seed": 0, + "random_state": 0, } }, "save_fig": 0, @@ -172,53 +181,179 @@ and `sim_data_file_ext` is correct such that GrainLearning can find the data in ) calibration.run() + print(f'The most probable parameter values are {calibration.get_most_prob_params()}') -When running `calibration.run()`, subdirectories with the name `iter` will be created in :attr:`.IODynamicSystem.sim_data_dir`. +For each iteration of `calibration.run()`, +subdirectories with the name `iter` will be created in :attr:`the simulation data directory <.IODynamicSystem.sim_data_dir>`. In these subdirectories, you find -- simulation data file: `_Iter-Sample_sim.txt` -- parameter data file: `_Iter-Sample_param.txt`, +- simulation data file: `_Iter_Sample_sim.>` +- parameter data file: `_Iter_Sample_param.>`, where is :attr:`.IODynamicSystem.sim_name`, is :attr:`.BayesianCalibration.curr_iter`, -and is the index of the :attr:`.IODynamicSystem.param_data` sequence. + is the index of the :attr:`.IODynamicSystem.param_data` sequence, and is :attr:`.IODynamicSystem.sim_data_file_ext`. + +Click :download:`here <../../tutorials/simple_regression/linear_regression/linear_regression_solve.py>` to download the full script. + +.. _sec-standalone: + +GrainLearning as a postprocessing tool +`````````````````````````````````````` + +Want to work outside the GrainLearning calibration loop? +You can simply use GrainLearning as a postprocessing tool to + +1. quantify the posterior distribution from existing simulation data, +2. and draw new samples for the next batch of simulations + +Continuing from :ref:`the previous tutorial `, +there should be subdirectories in `./sim_data` where the simulation data are stored. + +Postprocess simulation data using IODynamicSystem +::::::::::::::::::::::::::::::::::::::::::::::::: + +The following code snippet shows how to load the simulation data and run Bayesian calibration for one iteration. +Open a Python console in the same directory where you executed the previous tutorial and copy and paste the following code. -Click :download:`here <../../tutorials/linear_regression/linear_regression_solve.py>` to download the full script. +.. note:: + Provide the correct `curr_iter`, `sim_data_dir`, and `param_data_file` to load the simulation data. + The file extension of the simulation data sim_data_file_ext` must be given to find the data files. -GrainingLearning as a postprocessing tool ------------------------------------------ +.. code-block:: python + + import os + from grainlearning import BayesianCalibration + from grainlearning.dynamic_systems import IODynamicSystem + + # user input + curr_iter = 0 + sim_data_dir = './sim_data/' + param_data_file = sim_data_dir + f'/iter{curr_iter}/linear_Iter' + str(curr_iter) + '_Samples.txt' + sim_data_file_ext = '.txt' + + # create a calibration tool + calibration = BayesianCalibration.from_dict( + { + "curr_iter": curr_iter, + "num_iter": 0, + "system": { + "system_type": IODynamicSystem, + "param_min": [0.1, 0.1], + "param_max": [1, 10], + "obs_data_file": './linear_obs.dat', + "obs_names": ['f'], + "ctrl_name": 'u', + "sim_name": 'linear', + "param_data_file": param_data_file, + "sim_data_dir": sim_data_dir, + "sim_data_file_ext": sim_data_file_ext, + "param_names": ['a', 'b'], + }, + "calibration": { + "inference": {"ess_target": 0.3}, + "sampling": { + "max_num_components": 1, + }, + }, + "save_fig": 0, + } + ) + + # run GrainLearning for one iteration and generate the resampled parameter values + calibration.load_and_run_one_iteration() -The previous two examples assume no prior knowledge of the probability distribution of the parameters. -However, if you have some prior knowledge and have drawn samples from it, -you can simply use GrainLearning as a postprocessing tool to +This will create and store new parameter samples in a text file named 'linear_Iter_Samples.txt'. +The user may want to continue running the software model using the parameter values stored in this file. -1. quantify the posterior distribution from existing simulation data +.. attention:: + Change `curr_iter` to 1, 2, ..., 4 and run the above code snippet again to see how different iterations can be loaded. -2. draw new samples for the next batch of simulations +Postprocess simulation data using DynamicSystem +::::::::::::::::::::::::::::::::::::::::::::::: -The initialization of the calibration tool is the same as before. -However, you can load the simulation data and run Bayesian calibration for one iteration, with +It is also possible to use :class:`.DynamicSystem` instead. However, it is crucial to make sure that +the elements in the simulation data array have one-to-one correspondence with the elements in parameter data array. +Otherwise, the probability distribution will be incorrect and therefore the resampled parameter values will be wrong. + +Continuing from the previous tutorial, we create a few variables that stores the parameter, observation, and simulation data, +and then create a new `calibration` object using :class:`.DynamicSystem`. .. code-block:: python + from grainlearning.dynamic_systems import DynamicSystem + + param_data = calibration.system.param_data + sim_data = calibration.system.sim_data + ctrl_data = calibration.system.ctrl_data + obs_data = calibration.system.obs_data + + # recreate a calibration tool + calibration = BayesianCalibration.from_dict( + { + "num_iter": 0, + "system": { + "system_type": DynamicSystem, + "param_min": [0.1, 0.1], + "param_max": [1, 10], + "param_names": ['a', 'b'], + "param_data": param_data, + "num_samples": param_data.shape[0], + "ctrl_data": ctrl_data, + "obs_data": obs_data, + "obs_names": ['f'], + "sim_name": 'linear', + "sim_data": sim_data, + "callback": None, + }, + "calibration": { + "inference": {"ess_target": 0.3}, + "sampling": { + "max_num_components": 1, + }, + }, + "save_fig": 0, + } + ) + + # run GrainLearning for one iteration and generate the resampled parameter values calibration.load_and_run_one_iteration() -and store the new parameter table in a text file. +Click :download:`here <../../tutorials/simple_regression/linear_regression/linear_reg_one_iteration.py>` +to download the full script for the tutorials in this section. + +.. _sec-seed: + +Stochastic or deterministic sampling +------------------------------------ + +The sampling algorithm in GrainLearning is stochastic. +However, the random number generator can be seeded to generate reproducible results. +This can be done by setting :attr:`.GaussianMixtureModel.random_state` to a constant integer. .. code-block:: python - resampled_param_data = calibration.resample() - calibration.system.write_to_table(calibration.curr_iter + 1) + # create a calibration tool + "calibration": { + "inference": {"ess_target": 0.3}, + "sampling": { + "max_num_components": 1, + "random_state": 0, + }, + }, + +.. note:: + Insert the above code snippet to the declaration of the calibration tool in the previous tutorials; + observe how the resampled parameter values become deterministic. To visualized the old and new parameter samples, + set :attr:`.BayesianCalibration.save_fig` to a non-negative integer. + +.. _sec-plot: -The parameter table below can be used to run the software model (e.g., YADE). +Visualize the sampling of parameter distribution +------------------------------------------------ -.. code-block:: text +Visualizing the sampling of parameter distribution can be done by setting :attr:`.BayesianCalibration.save_fig` to a non-negative integer. - !OMP_NUM_THREADS description key a b - 8 Iter1-Sample00 0 5.0000000000e-01 3.3333333333e+00 - 8 Iter1-Sample01 1 2.5000000000e-01 6.6666666667e+00 - 8 Iter1-Sample02 2 7.5000000000e-01 1.1111111111e+00 - 8 Iter1-Sample03 3 1.2500000000e-01 4.4444444444e+00 - 8 Iter1-Sample04 4 6.2500000000e-01 7.7777777778e+00 - 8 Iter1-Sample05 5 3.7500000000e-01 2.2222222222e+00 +- `save_fig=0` will only show the figures interactively but will not save them +- `save_fig>0` will save the figures in the directory './' but not show them interactively -Click :download:`here <../../tutorials/linear_regression/linear_reg_one_iteration.py>` to download the full script. +By default, no plots are shown unless the flag :attr:`.BayesianCalibration.save_fig` is set. diff --git a/grainlearning/bayesian_calibration.py b/grainlearning/bayesian_calibration.py index 21c0d3c..d35e7fc 100644 --- a/grainlearning/bayesian_calibration.py +++ b/grainlearning/bayesian_calibration.py @@ -96,7 +96,7 @@ def __init__( self.num_iter = num_iter - self.curr_iter = curr_iter + self.set_curr_iter(curr_iter) self.save_fig = save_fig @@ -114,7 +114,7 @@ def run(self): # Bayesian calibration continue until curr_iter = num_iter or sigma_max < tolerance for _ in range(self.num_iter - 1): - self.curr_iter += 1 + self.increase_curr_iter() print(f"Bayesian calibration iter No. {self.curr_iter}") self.run_one_iteration() if self.system.sigma_max < self.system.sigma_tol: @@ -134,11 +134,10 @@ def run_one_iteration(self, index: int = -1): self.system.num_samples = self.system.param_data.shape[0] # Run the model realizations - self.system.run(curr_iter=self.curr_iter) + self.system.run() # Load model data from disk - if isinstance(self.system, IODynamicSystem): - self.load_system() + self.load_system() # Estimate model parameters as a distribution self.calibration.solve(self.system, ) @@ -150,9 +149,13 @@ def run_one_iteration(self, index: int = -1): def load_system(self): """Load existing simulation data from disk into the dynamic system """ - self.system.load_param_data(self.curr_iter) - self.system.get_sim_data_files(self.curr_iter) - self.system.load_sim_data() + if isinstance(self.system, IODynamicSystem): + self.system.load_param_data() + self.system.get_sim_data_files() + self.system.load_sim_data() + else: + if self.system.param_data is None or self.system.sim_data is None: + raise RuntimeError("The parameter and simulation data are not set up correctly.") def load_and_run_one_iteration(self): """Load existing simulation data and run Bayesian calibration for one iteration @@ -161,7 +164,8 @@ def load_and_run_one_iteration(self): """ self.load_system() self.calibration.add_curr_param_data_to_list(self.system.param_data) - self.calibration.solve(self.system, ) + self.calibration.solve(self.system) + self.system.write_params_to_table() self.calibration.sigma_list.append(self.system.sigma_max) self.plot_uq_in_time() @@ -172,7 +176,7 @@ def load_and_process(self, sigma: float = 0.1): """ self.load_system() self.calibration.add_curr_param_data_to_list(self.system.param_data) - self.calibration.load_proposal_from_file(self.system, self.curr_iter) + self.calibration.load_proposal_from_file(self.system) self.calibration.inference.data_assimilation_loop(sigma, self.system) self.system.compute_estimated_params(self.calibration.inference.posteriors) @@ -185,7 +189,7 @@ def resample(self): self.calibration.posterior = self.calibration.inference.get_posterior_at_time() self.calibration.run_sampling(self.system, ) resampled_param_data = self.calibration.param_data_list[-1] - self.system.write_params_to_table(self.curr_iter + 1) + self.system.write_params_to_table() return resampled_param_data def plot_uq_in_time(self): @@ -243,6 +247,20 @@ def get_most_prob_params(self): most_prob = argmax(self.calibration.posterior) return self.system.param_data[most_prob] + def set_curr_iter(self, curr_iter: int): + """Set the current iteration step + + param curr_iter: Current iteration step + """ + self.system.curr_iter = curr_iter + self.curr_iter = self.system.curr_iter + + def increase_curr_iter(self): + """Increase the current iteration step by one + """ + self.system.curr_iter += 1 + self.curr_iter += 1 + @classmethod def from_dict( cls: Type["BayesianCalibration"], diff --git a/grainlearning/dynamic_systems.py b/grainlearning/dynamic_systems.py index ea46316..a579121 100644 --- a/grainlearning/dynamic_systems.py +++ b/grainlearning/dynamic_systems.py @@ -90,6 +90,7 @@ class DynamicSystem: :param param_min: List of parameter lower bounds :param param_max: List of parameter Upper bounds :param callback: Callback function, defaults to None + :param curr_iter: current iteration ID, defaults to 0 :param ctrl_data: control data (e.g, time), defaults to None, optional :param obs_names: Column names of the observation data, defaults to None, optional :param ctrl_name: Column name of the control data, defaults to None, optional @@ -162,6 +163,9 @@ class DynamicSystem: #: Callback function to run the forward predictions callback: Callable + #: Current iteration ID + curr_iter: int + ##### Uncertainty ##### #: Minimum value of the uncertainty @@ -195,6 +199,7 @@ def __init__( sim_name: str = None, sim_data: np.ndarray = None, callback: Callable = None, + curr_iter: int = 0, param_data: np.ndarray = None, param_names: List[str] = None, sigma_max: float = 1.0e6, @@ -232,6 +237,8 @@ def __init__( self.callback = callback + self.curr_iter = curr_iter + self.param_min = param_min self.param_max = param_max @@ -284,7 +291,7 @@ def from_dict(cls: Type["DynamicSystem"], obj: dict): sigma_tol=obj.get("sigma_tol", 0.001), ) - def run(self, **kwargs): + def run(self): """Run the callback function TODO design a better wrapper to avoid kwargs? @@ -294,7 +301,7 @@ def run(self, **kwargs): if self.callback is None: raise ValueError("No callback function defined") - self.callback(self, **kwargs) + self.callback(self) def set_sim_data(self, data: list): """Set the simulation data @@ -303,6 +310,13 @@ def set_sim_data(self, data: list): """ self.sim_data = np.array(data) + def set_param_data(self, data: list): + """Set the simulation data + + :param data: parameter data of shape (num_samples, num_params) + """ + self.param_data = np.array(data) + def compute_inv_normalized_sigma(self): """Compute the inverse of the matrix that apply different weights on the observables""" inv_obs_weight = np.diagflat(self.inv_obs_weight) @@ -339,11 +353,11 @@ def compute_estimated_params(self, posteriors: np.array): self.estimated_params_cv[stp_id, :]) / self.estimated_params[stp_id, :] @classmethod - def load_param_data(cls: Type["DynamicSystem"], curr_iter: int): + def load_param_data(cls: Type["DynamicSystem"]): """Virtual function to load param data from disk""" @classmethod - def get_sim_data_files(cls: Type["DynamicSystem"], curr_iter: int): + def get_sim_data_files(cls: Type["DynamicSystem"]): """Virtual function to get simulation data files from disk""" @classmethod @@ -351,7 +365,7 @@ def load_sim_data(cls: Type["DynamicSystem"]): """Virtual function to load simulation data""" @classmethod - def write_params_to_table(cls, curr_iter): + def write_params_to_table(cls): """Write the parameter data into a text file""" @classmethod @@ -418,6 +432,7 @@ class IODynamicSystem(DynamicSystem): :param sim_data_dir: Simulation data directory, defaults to './sim_data' :param sim_data_file_ext: Simulation data file extension, defaults to '.npy' :param callback: Callback function, defaults to None + :param curr_iter: Current iteration ID, defaults to 0 :param param_data_file: Parameter data file, defaults to None, optional :param obs_data: observation or reference data, optional :param ctrl_data: Control data (e.g, time), defaults to None, optional @@ -463,6 +478,7 @@ def __init__( inv_obs_weight: List[float] = None, sim_data: np.ndarray = None, callback: Callable = None, + curr_iter: int = 0, param_data_file: str = '', param_data: np.ndarray = None, param_names: List[str] = None, @@ -483,6 +499,7 @@ def __init__( sim_name, sim_data, callback, + curr_iter, param_data, param_names ) @@ -577,10 +594,9 @@ def get_obs_data(self): if len(self.obs_data) == 1: self.obs_data = self.obs_data.reshape([1, self.obs_data.shape[0]]) - def get_sim_data_files(self, curr_iter: int = 0): - """Get the simulation data files from the simulation data directory. - - :param curr_iter: Current iteration number, default to 0. + def get_sim_data_files(self): + """ + Get the simulation data files from the simulation data directory. """ mag = floor(log(self.num_samples, 10)) + 1 self.sim_data_files = [] @@ -590,7 +606,7 @@ def get_sim_data_files(self, curr_iter: int = 0): sim_data_file_ext = '_sim' + self.sim_data_file_ext else: sim_data_file_ext = self.sim_data_file_ext - file_name = self.sim_data_dir.rstrip('/') + f'/iter{curr_iter}/{self.sim_name}*Iter{curr_iter}*' \ + file_name = self.sim_data_dir.rstrip('/') + f'/iter{self.curr_iter}/{self.sim_name}*Iter{self.curr_iter}*' \ + str(i).zfill(mag) + '*' + sim_data_file_ext files = glob(file_name) @@ -623,11 +639,9 @@ def load_sim_data(self): params = np.array([data[key] for key in self.param_names]) np.testing.assert_allclose(params, self.param_data[i, :], rtol=1e-5) - def load_param_data(self, curr_iter: int = 0): + def load_param_data(self): """ Load parameter data from a table written in a text file. - - :param curr_iter: Current iteration number, default to 0. """ if os.path.exists(self.param_data_file): # we assume parameter data are always in the last columns. @@ -635,7 +649,7 @@ def load_param_data(self, curr_iter: int = 0): self.num_samples = self.param_data.shape[0] else: # if param_data_file does not exit, get parameter data from text files - files = glob(self.sim_data_dir + f'/iter{curr_iter}/{self.sim_name}*_param*{self.sim_data_file_ext}') + files = glob(self.sim_data_dir + f'/iter{self.curr_iter}/{self.sim_name}*_param*{self.sim_data_file_ext}') self.num_samples = len(files) self.sim_data_files = sorted(files) self.param_data = np.zeros([self.num_samples, self.num_params]) @@ -647,30 +661,27 @@ def load_param_data(self, curr_iter: int = 0): params = [data[key][0] for key in self.param_names] self.param_data[i, :] = params - def run(self, **kwargs): - """Run the callback function - - TODO design a better wrapper to avoid kwargs? - :param kwargs: keyword arguments to pass to the callback function + def run(self): + """ + Run the callback function """ if self.callback is None: raise ValueError("No callback function defined") # create a directory to store simulation data - curr_iter = kwargs['curr_iter'] sim_data_dir = self.sim_data_dir.rstrip('/') - sim_data_sub_dir = f'{sim_data_dir}/iter{curr_iter}' + sim_data_sub_dir = f'{sim_data_dir}/iter{self.curr_iter}' os.makedirs(sim_data_sub_dir) # write the parameter data into a text file - self.write_params_to_table(curr_iter) + self.write_params_to_table() # run the callback function - self.callback(self, **kwargs) + self.callback(self) # move simulation data files and corresponding parameter table into the directory defined per iteration - files = glob(f'{os.getcwd()}/{self.sim_name}_Iter{curr_iter}*{self.sim_data_file_ext}') + files = glob(f'{os.getcwd()}/{self.sim_name}_Iter{self.curr_iter}*{self.sim_data_file_ext}') for file in files: f_name = os.path.relpath(file, os.getcwd()) os.replace(f'{file}', f'{sim_data_sub_dir}/{f_name}') @@ -678,17 +689,16 @@ def run(self, **kwargs): # redefine the parameter data file since its location is changed self.param_data_file = f'{sim_data_sub_dir}/' + os.path.relpath(self.param_data_file, os.getcwd()) - def write_params_to_table(self, curr_iter: int): + def write_params_to_table(self): """Write the parameter data into a text file. - :param curr_iter: Current iteration number, default to 0. :return param_data_file: The name of the parameter data file """ self.param_data_file = write_to_table( self.sim_name, self.param_data, self.param_names, - curr_iter) + self.curr_iter) def backup_sim_data(self): """Backup simulation data files to a backup directory.""" diff --git a/grainlearning/iterative_bayesian_filter.py b/grainlearning/iterative_bayesian_filter.py index 40930ba..d424c71 100644 --- a/grainlearning/iterative_bayesian_filter.py +++ b/grainlearning/iterative_bayesian_filter.py @@ -149,15 +149,14 @@ def initialize(self, system: Type["DynamicSystem"]): system.param_data = generate_params_qmc(system, system.num_samples, self.initial_sampling) self.param_data_list.append(system.param_data) - def run_inference(self, system: Type["DynamicSystem"], curr_iter: int = 0): + def run_inference(self, system: Type["DynamicSystem"]): """Compute the posterior distribution of model states such that the target effective sample size is reached. :param system: Dynamic system class - :param curr_iter: Current iteration number """ # if the name of proposal data file is given, make use of the proposal density during Bayesian updating if self.proposal_data_file is not None and self.proposal is None: - self.load_proposal_from_file(system, curr_iter=curr_iter) + self.load_proposal_from_file(system) result = optimize.minimize_scalar( self.inference.data_assimilation_loop, @@ -208,11 +207,10 @@ def add_curr_param_data_to_list(self, param_data: np.ndarray): """ self.param_data_list.append(param_data) - def load_proposal_from_file(self, system: Type["IODynamicSystem"], curr_iter: int): + def load_proposal_from_file(self, system: Type["IODynamicSystem"]): """Load the proposal density from a file. :param system: Dynamic system class - :param curr_iter: Current iteration number """ if system.param_data is None: raise RuntimeError("parameter samples not yet loaded...") @@ -221,7 +219,7 @@ def load_proposal_from_file(self, system: Type["IODynamicSystem"], curr_iter: in return # load the proposal density from a file - self.sampling.load_gmm_from_file(f'{system.sim_data_dir}/iter{curr_iter-1}/{self.proposal_data_file}') + self.sampling.load_gmm_from_file(f'{system.sim_data_dir}/iter{system.curr_iter-1}/{self.proposal_data_file}') samples = np.copy(system.param_data) samples /= self.sampling.max_params @@ -235,10 +233,9 @@ def load_proposal_from_file(self, system: Type["IODynamicSystem"], curr_iter: in proposal[np.where(proposal < 0.0)] = min(proposal[np.where(proposal > 0.0)]) self.proposal = proposal / sum(proposal) - def save_proposal_to_file(self, system: Type["IODynamicSystem"], curr_iter: int): + def save_proposal_to_file(self, system: Type["IODynamicSystem"]): """Save the proposal density to a file. :param system: Dynamic system class - :param curr_iter: Current iteration number """ - self.sampling.save_gmm_to_file(f'{system.sim_data_dir}/iter{curr_iter-1}/{self.proposal_data_file}') + self.sampling.save_gmm_to_file(f'{system.sim_data_dir}/iter{system.curr_iter-1}/{self.proposal_data_file}') diff --git a/grainlearning/rnn/trained_models/rnn_triaxial_drained+e0/requirements.txt b/grainlearning/rnn/trained_models/rnn_triaxial_drained+e0/requirements.txt index 3aa8326..7784a89 100644 --- a/grainlearning/rnn/trained_models/rnn_triaxial_drained+e0/requirements.txt +++ b/grainlearning/rnn/trained_models/rnn_triaxial_drained+e0/requirements.txt @@ -311,7 +311,7 @@ ipython==8.5.0 ipytree==0.2.2 ipyurl==0.1.3 ipywidgets==7.7.2 -iris-sample-data==2.4.0 +iris_Sample-data==2.4.0 isodate==0.6.1 isort==5.10.1 itsdangerous==2.1.2 diff --git a/grainlearning/rnn/trained_models/rnn_triaxial_drained/requirements.txt b/grainlearning/rnn/trained_models/rnn_triaxial_drained/requirements.txt index f36bde3..7784a89 100644 --- a/grainlearning/rnn/trained_models/rnn_triaxial_drained/requirements.txt +++ b/grainlearning/rnn/trained_models/rnn_triaxial_drained/requirements.txt @@ -311,7 +311,7 @@ ipython==8.5.0 ipytree==0.2.2 ipyurl==0.1.3 ipywidgets==7.7.2 -iris-sample-data==2.4.0 +iris_Sample-data==2.4.0 isodate==0.6.1 isort==5.10.1 itsdangerous==2.1.2 @@ -943,4 +943,4 @@ zarr==2.13.2 zict==2.2.0 zipp==3.8.1 zope.event==4.5.0 -zope.interface==5.4.0 \ No newline at end of file +zope.interface==5.4.0 diff --git a/grainlearning/rnn/trained_models/rnn_triaxial_undrained+e0/requirements.txt b/grainlearning/rnn/trained_models/rnn_triaxial_undrained+e0/requirements.txt index 3aa8326..7784a89 100644 --- a/grainlearning/rnn/trained_models/rnn_triaxial_undrained+e0/requirements.txt +++ b/grainlearning/rnn/trained_models/rnn_triaxial_undrained+e0/requirements.txt @@ -311,7 +311,7 @@ ipython==8.5.0 ipytree==0.2.2 ipyurl==0.1.3 ipywidgets==7.7.2 -iris-sample-data==2.4.0 +iris_Sample-data==2.4.0 isodate==0.6.1 isort==5.10.1 itsdangerous==2.1.2 diff --git a/grainlearning/rnn/trained_models/rnn_triaxial_undrained/requirements.txt b/grainlearning/rnn/trained_models/rnn_triaxial_undrained/requirements.txt index 7145b4f..881942b 100644 --- a/grainlearning/rnn/trained_models/rnn_triaxial_undrained/requirements.txt +++ b/grainlearning/rnn/trained_models/rnn_triaxial_undrained/requirements.txt @@ -303,7 +303,7 @@ ipython==8.5.0 ipytree==0.2.2 ipyurl==0.1.3 ipywidgets==7.7.2 -iris-sample-data==2.4.0 +iris_Sample-data==2.4.0 isodate==0.6.1 isort==5.10.1 itsdangerous==2.1.2 @@ -924,4 +924,4 @@ zarr==2.13.2 zict==2.2.0 zipp==3.8.1 zope.event==4.5.0 -zope.interface==5.4.0 \ No newline at end of file +zope.interface==5.4.0 diff --git a/grainlearning/tools.py b/grainlearning/tools.py index 7d0ddc9..2c679b7 100644 --- a/grainlearning/tools.py +++ b/grainlearning/tools.py @@ -66,7 +66,7 @@ def write_to_table(sim_name, table, names, curr_iter=0, threads=8): mag = math.floor(math.log(num, 10)) + 1 f_out.write(' '.join(['!OMP_NUM_THREADS', 'description', 'key'] + names + ['\n'])) for j in range(num): - description = f'{sim_name}_Iter' + str(curr_iter) + '-Sample' + str(j).zfill(mag) + description = f'{sim_name}_Iter' + str(curr_iter) + '_Sample' + str(j).zfill(mag) f_out.write(' '.join( [f'{threads:2d}'] + [description] + [f'{j:9d}'] + [f'{table[j][i]:20.10e}' for i in range(dim)] + ['\n'])) diff --git a/tests/data/linear_sim_data/iter0/smcTable0.txt b/tests/data/linear_sim_data/iter0/smcTable0.txt index 735b39b..51bbd41 100644 --- a/tests/data/linear_sim_data/iter0/smcTable0.txt +++ b/tests/data/linear_sim_data/iter0/smcTable0.txt @@ -1,21 +1,21 @@ -!OMP_NUM_THREADS description key a b - 1 Iter0-Sample00 0 5.0000000000e-01 3.3333333333e+00 - 1 Iter0-Sample01 1 2.5000000000e-01 6.6666666667e+00 - 1 Iter0-Sample02 2 7.5000000000e-01 1.1111111111e+00 - 1 Iter0-Sample03 3 1.2500000000e-01 4.4444444444e+00 - 1 Iter0-Sample04 4 6.2500000000e-01 7.7777777778e+00 - 1 Iter0-Sample05 5 3.7500000000e-01 2.2222222222e+00 - 1 Iter0-Sample06 6 8.7500000000e-01 5.5555555556e+00 - 1 Iter0-Sample07 7 6.2500000000e-02 8.8888888889e+00 - 1 Iter0-Sample08 8 5.6250000000e-01 3.7037037037e-01 - 1 Iter0-Sample09 9 3.1250000000e-01 3.7037037037e+00 - 1 Iter0-Sample10 10 8.1250000000e-01 7.0370370370e+00 - 1 Iter0-Sample11 11 1.8750000000e-01 1.4814814815e+00 - 1 Iter0-Sample12 12 6.8750000000e-01 4.8148148148e+00 - 1 Iter0-Sample13 13 4.3750000000e-01 8.1481481481e+00 - 1 Iter0-Sample14 14 9.3750000000e-01 2.5925925926e+00 - 1 Iter0-Sample15 15 3.1250000000e-02 5.9259259259e+00 - 1 Iter0-Sample16 16 5.3125000000e-01 9.2592592593e+00 - 1 Iter0-Sample17 17 2.8125000000e-01 7.4074074074e-01 - 1 Iter0-Sample18 18 7.8125000000e-01 4.0740740741e+00 - 1 Iter0-Sample19 19 1.5625000000e-01 7.4074074074e+00 +!OMP_NUM_THREADS description key a b + 1 Iter0_Sample00 0 5.0000000000e-01 3.3333333333e+00 + 1 Iter0_Sample01 1 2.5000000000e-01 6.6666666667e+00 + 1 Iter0_Sample02 2 7.5000000000e-01 1.1111111111e+00 + 1 Iter0_Sample03 3 1.2500000000e-01 4.4444444444e+00 + 1 Iter0_Sample04 4 6.2500000000e-01 7.7777777778e+00 + 1 Iter0_Sample05 5 3.7500000000e-01 2.2222222222e+00 + 1 Iter0_Sample06 6 8.7500000000e-01 5.5555555556e+00 + 1 Iter0_Sample07 7 6.2500000000e-02 8.8888888889e+00 + 1 Iter0_Sample08 8 5.6250000000e-01 3.7037037037e-01 + 1 Iter0_Sample09 9 3.1250000000e-01 3.7037037037e+00 + 1 Iter0_Sample10 10 8.1250000000e-01 7.0370370370e+00 + 1 Iter0_Sample11 11 1.8750000000e-01 1.4814814815e+00 + 1 Iter0_Sample12 12 6.8750000000e-01 4.8148148148e+00 + 1 Iter0_Sample13 13 4.3750000000e-01 8.1481481481e+00 + 1 Iter0_Sample14 14 9.3750000000e-01 2.5925925926e+00 + 1 Iter0_Sample15 15 3.1250000000e-02 5.9259259259e+00 + 1 Iter0_Sample16 16 5.3125000000e-01 9.2592592593e+00 + 1 Iter0_Sample17 17 2.8125000000e-01 7.4074074074e-01 + 1 Iter0_Sample18 18 7.8125000000e-01 4.0740740741e+00 + 1 Iter0_Sample19 19 1.5625000000e-01 7.4074074074e+00 diff --git a/tests/data/linear_sim_data/iter1/smcTable1.txt b/tests/data/linear_sim_data/iter1/smcTable1.txt index 60e361b..4ff64ce 100644 --- a/tests/data/linear_sim_data/iter1/smcTable1.txt +++ b/tests/data/linear_sim_data/iter1/smcTable1.txt @@ -1,21 +1,21 @@ -!OMP_NUM_THREADS description key a b - 1 Iter1-Sample00 0 1.1185038467e-01 9.9904614923e+00 - 1 Iter1-Sample01 1 2.4766863021e-01 8.7300885794e+00 - 1 Iter1-Sample02 2 3.9710915381e-02 9.5205107505e+00 - 1 Iter1-Sample03 3 1.3507731531e-01 7.3056093809e+00 - 1 Iter1-Sample04 4 2.2610279230e-01 4.5462839890e+00 - 1 Iter1-Sample05 5 2.6092169224e-01 5.8529533225e+00 - 1 Iter1-Sample06 6 1.5964366743e-01 6.9068594522e+00 - 1 Iter1-Sample07 7 1.8909822388e-01 6.0999438206e+00 - 1 Iter1-Sample08 8 9.9366235498e-02 8.8632067538e+00 - 1 Iter1-Sample09 9 1.4029724542e-01 5.0524425291e+00 - 1 Iter1-Sample10 10 3.8695684796e-01 6.9068594522e+00 - 1 Iter1-Sample11 11 1.1205779332e-01 6.7244665735e+00 - 1 Iter1-Sample12 12 1.1205779332e-01 5.0524425291e+00 - 1 Iter1-Sample13 13 1.8845638993e-01 4.6460485148e+00 - 1 Iter1-Sample14 14 1.7704149923e-01 9.9147302556e+00 - 1 Iter1-Sample15 15 2.0882514748e-01 5.2816170089e+00 - 1 Iter1-Sample16 16 1.5960252612e-01 9.1597806617e-01 - 1 Iter1-Sample17 17 2.2885765140e-01 3.6895871526e+00 - 1 Iter1-Sample18 18 1.8270882369e-01 8.8822108389e+00 - 1 Iter1-Sample19 19 2.0933770405e-01 3.3174721670e+00 +!OMP_NUM_THREADS description key a b + 1 Iter1_Sample00 0 1.1185038467e-01 9.9904614923e+00 + 1 Iter1_Sample01 1 2.4766863021e-01 8.7300885794e+00 + 1 Iter1_Sample02 2 3.9710915381e-02 9.5205107505e+00 + 1 Iter1_Sample03 3 1.3507731531e-01 7.3056093809e+00 + 1 Iter1_Sample04 4 2.2610279230e-01 4.5462839890e+00 + 1 Iter1_Sample05 5 2.6092169224e-01 5.8529533225e+00 + 1 Iter1_Sample06 6 1.5964366743e-01 6.9068594522e+00 + 1 Iter1_Sample07 7 1.8909822388e-01 6.0999438206e+00 + 1 Iter1_Sample08 8 9.9366235498e-02 8.8632067538e+00 + 1 Iter1_Sample09 9 1.4029724542e-01 5.0524425291e+00 + 1 Iter1_Sample10 10 3.8695684796e-01 6.9068594522e+00 + 1 Iter1_Sample11 11 1.1205779332e-01 6.7244665735e+00 + 1 Iter1_Sample12 12 1.1205779332e-01 5.0524425291e+00 + 1 Iter1_Sample13 13 1.8845638993e-01 4.6460485148e+00 + 1 Iter1_Sample14 14 1.7704149923e-01 9.9147302556e+00 + 1 Iter1_Sample15 15 2.0882514748e-01 5.2816170089e+00 + 1 Iter1_Sample16 16 1.5960252612e-01 9.1597806617e-01 + 1 Iter1_Sample17 17 2.2885765140e-01 3.6895871526e+00 + 1 Iter1_Sample18 18 1.8270882369e-01 8.8822108389e+00 + 1 Iter1_Sample19 19 2.0933770405e-01 3.3174721670e+00 diff --git a/tests/data/linear_sim_data/iter2/smcTable2.txt b/tests/data/linear_sim_data/iter2/smcTable2.txt index 25af725..595fa33 100644 --- a/tests/data/linear_sim_data/iter2/smcTable2.txt +++ b/tests/data/linear_sim_data/iter2/smcTable2.txt @@ -1,21 +1,21 @@ -!OMP_NUM_THREADS description key a b - 1 Iter2-Sample00 0 1.7471572588e-01 6.9887049250e+00 - 1 Iter2-Sample01 1 2.0661399897e-01 6.4335031121e+00 - 1 Iter2-Sample02 2 1.5943933424e-01 6.8925088090e+00 - 1 Iter2-Sample03 3 1.8378199507e-01 6.0461820218e+00 - 1 Iter2-Sample04 4 2.0796023992e-01 5.0169031035e+00 - 1 Iter2-Sample05 5 2.1375436267e-01 5.4339824180e+00 - 1 Iter2-Sample06 6 1.8980139918e-01 5.8871405249e+00 - 1 Iter2-Sample07 7 1.9749942223e-01 5.5835867028e+00 - 1 Iter2-Sample08 8 1.7360165363e-01 6.6130496823e+00 - 1 Iter2-Sample09 9 1.8823220604e-01 5.2680851315e+00 - 1 Iter2-Sample10 10 2.5381288677e-01 2.4642192265e+00 - 1 Iter2-Sample11 11 1.7953791166e-01 5.8674853024e+00 - 1 Iter2-Sample12 12 1.4764583945e-01 7.2463508010e+00 - 1 Iter2-Sample13 13 1.9948361146e-01 5.0851254975e+00 - 1 Iter2-Sample14 14 1.8925254558e-01 6.9038705367e+00 - 1 Iter2-Sample15 15 2.0306151644e-01 5.2848960186e+00 - 1 Iter2-Sample16 16 1.9855353902e-01 3.8308449250e+00 - 1 Iter2-Sample17 17 2.0982271863e-01 4.7203607715e+00 - 1 Iter2-Sample18 18 1.9201664865e-01 6.5443494695e+00 - 1 Iter2-Sample19 19 2.0604736361e-01 4.6102529088e+00 +!OMP_NUM_THREADS description key a b + 1 Iter2_Sample00 0 1.7471572588e-01 6.9887049250e+00 + 1 Iter2_Sample01 1 2.0661399897e-01 6.4335031121e+00 + 1 Iter2_Sample02 2 1.5943933424e-01 6.8925088090e+00 + 1 Iter2_Sample03 3 1.8378199507e-01 6.0461820218e+00 + 1 Iter2_Sample04 4 2.0796023992e-01 5.0169031035e+00 + 1 Iter2_Sample05 5 2.1375436267e-01 5.4339824180e+00 + 1 Iter2_Sample06 6 1.8980139918e-01 5.8871405249e+00 + 1 Iter2_Sample07 7 1.9749942223e-01 5.5835867028e+00 + 1 Iter2_Sample08 8 1.7360165363e-01 6.6130496823e+00 + 1 Iter2_Sample09 9 1.8823220604e-01 5.2680851315e+00 + 1 Iter2_Sample10 10 2.5381288677e-01 2.4642192265e+00 + 1 Iter2_Sample11 11 1.7953791166e-01 5.8674853024e+00 + 1 Iter2_Sample12 12 1.4764583945e-01 7.2463508010e+00 + 1 Iter2_Sample13 13 1.9948361146e-01 5.0851254975e+00 + 1 Iter2_Sample14 14 1.8925254558e-01 6.9038705367e+00 + 1 Iter2_Sample15 15 2.0306151644e-01 5.2848960186e+00 + 1 Iter2_Sample16 16 1.9855353902e-01 3.8308449250e+00 + 1 Iter2_Sample17 17 2.0982271863e-01 4.7203607715e+00 + 1 Iter2_Sample18 18 1.9201664865e-01 6.5443494695e+00 + 1 Iter2_Sample19 19 2.0604736361e-01 4.6102529088e+00 diff --git a/tests/data/linear_sim_data/iter3/smcTable3.txt b/tests/data/linear_sim_data/iter3/smcTable3.txt index 27ad35e..d5825ed 100644 --- a/tests/data/linear_sim_data/iter3/smcTable3.txt +++ b/tests/data/linear_sim_data/iter3/smcTable3.txt @@ -1,21 +1,21 @@ -!OMP_NUM_THREADS description key a b - 1 Iter3-Sample00 0 1.9201900403e-01 5.7001606007e+00 - 1 Iter3-Sample01 1 2.0212241969e-01 5.4786028237e+00 - 1 Iter3-Sample02 2 1.8734659776e-01 5.6850716664e+00 - 1 Iter3-Sample03 3 1.9525086996e-01 5.3745328923e+00 - 1 Iter3-Sample04 4 2.0318836358e-01 5.0029419746e+00 - 1 Iter3-Sample05 5 2.0478582987e-01 5.1360542194e+00 - 1 Iter3-Sample06 6 1.9718236127e-01 5.3145582474e+00 - 1 Iter3-Sample07 7 1.9969846267e-01 5.2043335859e+00 - 1 Iter3-Sample08 8 1.9184748122e-01 5.5756719867e+00 - 1 Iter3-Sample09 9 1.9698205394e-01 5.1091103890e+00 - 1 Iter3-Sample10 10 2.1851712253e-01 4.0971744189e+00 - 1 Iter3-Sample11 11 1.9402254610e-01 5.3194741821e+00 - 1 Iter3-Sample12 12 1.8354294006e-01 5.8167151809e+00 - 1 Iter3-Sample13 13 2.0053989830e-01 5.0352703826e+00 - 1 Iter3-Sample14 14 1.9654617098e-01 5.6554847393e+00 - 1 Iter3-Sample15 15 2.0155286648e-01 5.0981288466e+00 - 1 Iter3-Sample16 16 2.0082852035e-01 4.6164892033e+00 - 1 Iter3-Sample17 17 2.0389952988e-01 4.9015997646e+00 - 1 Iter3-Sample18 18 1.9756462314e-01 5.5320529972e+00 - 1 Iter3-Sample19 19 2.0278443940e-01 4.8689736111e+00 +!OMP_NUM_THREADS description key a b + 1 Iter3_Sample00 0 1.9201900403e-01 5.7001606007e+00 + 1 Iter3_Sample01 1 2.0212241969e-01 5.4786028237e+00 + 1 Iter3_Sample02 2 1.8734659776e-01 5.6850716664e+00 + 1 Iter3_Sample03 3 1.9525086996e-01 5.3745328923e+00 + 1 Iter3_Sample04 4 2.0318836358e-01 5.0029419746e+00 + 1 Iter3_Sample05 5 2.0478582987e-01 5.1360542194e+00 + 1 Iter3_Sample06 6 1.9718236127e-01 5.3145582474e+00 + 1 Iter3_Sample07 7 1.9969846267e-01 5.2043335859e+00 + 1 Iter3_Sample08 8 1.9184748122e-01 5.5756719867e+00 + 1 Iter3_Sample09 9 1.9698205394e-01 5.1091103890e+00 + 1 Iter3_Sample10 10 2.1851712253e-01 4.0971744189e+00 + 1 Iter3_Sample11 11 1.9402254610e-01 5.3194741821e+00 + 1 Iter3_Sample12 12 1.8354294006e-01 5.8167151809e+00 + 1 Iter3_Sample13 13 2.0053989830e-01 5.0352703826e+00 + 1 Iter3_Sample14 14 1.9654617098e-01 5.6554847393e+00 + 1 Iter3_Sample15 15 2.0155286648e-01 5.0981288466e+00 + 1 Iter3_Sample16 16 2.0082852035e-01 4.6164892033e+00 + 1 Iter3_Sample17 17 2.0389952988e-01 4.9015997646e+00 + 1 Iter3_Sample18 18 1.9756462314e-01 5.5320529972e+00 + 1 Iter3_Sample19 19 2.0278443940e-01 4.8689736111e+00 diff --git a/tests/data/oedo_sim_data/iter0/smcTable0.txt b/tests/data/oedo_sim_data/iter0/smcTable0.txt index 16d3a7a..cb8b97e 100644 --- a/tests/data/oedo_sim_data/iter0/smcTable0.txt +++ b/tests/data/oedo_sim_data/iter0/smcTable0.txt @@ -1,101 +1,101 @@ -!OMP_NUM_THREADS description key E mu k_r mu_r - 8 Iter0-Sample000 0 1.5000000000e+11 4.3333000000e-01 8.0000000000e+03 4.4286000000e-01 - 8 Iter0-Sample001 1 1.2500000000e+11 3.6667000000e-01 6.0000000000e+03 3.8571000000e-01 - 8 Iter0-Sample002 2 1.7500000000e+11 4.7778000000e-01 4.0000000000e+03 3.2857000000e-01 - 8 Iter0-Sample003 3 1.1250000000e+11 4.1111000000e-01 2.0000000000e+03 2.7143000000e-01 - 8 Iter0-Sample004 4 1.6250000000e+11 3.4444000000e-01 9.6000000000e+03 2.1429000000e-01 - 8 Iter0-Sample005 5 1.3750000000e+11 4.5556000000e-01 7.6000000000e+03 1.5714000000e-01 - 8 Iter0-Sample006 6 1.8750000000e+11 3.8889000000e-01 5.6000000000e+03 4.9184000000e-01 - 8 Iter0-Sample007 7 1.0625000000e+11 3.2222000000e-01 3.6000000000e+03 4.3469000000e-01 - 8 Iter0-Sample008 8 1.5625000000e+11 4.9259000000e-01 1.6000000000e+03 3.7755000000e-01 - 8 Iter0-Sample009 9 1.3125000000e+11 4.2593000000e-01 9.2000000000e+03 3.2041000000e-01 - 8 Iter0-Sample010 10 1.8125000000e+11 3.5926000000e-01 7.2000000000e+03 2.6327000000e-01 - 8 Iter0-Sample011 11 1.1875000000e+11 4.7037000000e-01 5.2000000000e+03 2.0612000000e-01 - 8 Iter0-Sample012 12 1.6875000000e+11 4.0370000000e-01 3.2000000000e+03 1.4898000000e-01 - 8 Iter0-Sample013 13 1.4375000000e+11 3.3704000000e-01 1.2000000000e+03 4.8367000000e-01 - 8 Iter0-Sample014 14 1.9375000000e+11 4.4815000000e-01 8.8000000000e+03 4.2653000000e-01 - 8 Iter0-Sample015 15 1.0312500000e+11 3.8148000000e-01 6.8000000000e+03 3.6939000000e-01 - 8 Iter0-Sample016 16 1.5312500000e+11 3.1482000000e-01 4.8000000000e+03 3.1224000000e-01 - 8 Iter0-Sample017 17 1.2812500000e+11 4.8518000000e-01 2.8000000000e+03 2.5510000000e-01 - 8 Iter0-Sample018 18 1.7812500000e+11 4.1852000000e-01 8.0000000000e+02 1.9796000000e-01 - 8 Iter0-Sample019 19 1.1562500000e+11 3.5185000000e-01 8.4000000000e+03 1.4082000000e-01 - 8 Iter0-Sample020 20 1.6562500000e+11 4.6296000000e-01 6.4000000000e+03 4.7551000000e-01 - 8 Iter0-Sample021 21 1.4062500000e+11 3.9630000000e-01 4.4000000000e+03 4.1837000000e-01 - 8 Iter0-Sample022 22 1.9062500000e+11 3.2963000000e-01 2.4000000000e+03 3.6122000000e-01 - 8 Iter0-Sample023 23 1.0937500000e+11 4.4074000000e-01 4.0000000000e+02 3.0408000000e-01 - 8 Iter0-Sample024 24 1.5937500000e+11 3.7407000000e-01 9.9200000000e+03 2.4694000000e-01 - 8 Iter0-Sample025 25 1.3437500000e+11 3.0741000000e-01 7.9200000000e+03 1.8980000000e-01 - 8 Iter0-Sample026 26 1.8437500000e+11 4.9753000000e-01 5.9200000000e+03 1.3265000000e-01 - 8 Iter0-Sample027 27 1.2187500000e+11 4.3086000000e-01 3.9200000000e+03 4.6735000000e-01 - 8 Iter0-Sample028 28 1.7187500000e+11 3.6420000000e-01 1.9200000000e+03 4.1020000000e-01 - 8 Iter0-Sample029 29 1.4687500000e+11 4.7531000000e-01 9.5200000000e+03 3.5306000000e-01 - 8 Iter0-Sample030 30 1.9687500000e+11 4.0864000000e-01 7.5200000000e+03 2.9592000000e-01 - 8 Iter0-Sample031 31 1.0156200000e+11 3.4197000000e-01 5.5200000000e+03 2.3878000000e-01 - 8 Iter0-Sample032 32 1.5156200000e+11 4.5309000000e-01 3.5200000000e+03 1.8163000000e-01 - 8 Iter0-Sample033 33 1.2656200000e+11 3.8642000000e-01 1.5200000000e+03 1.2449000000e-01 - 8 Iter0-Sample034 34 1.7656200000e+11 3.1975000000e-01 9.1200000000e+03 4.5918000000e-01 - 8 Iter0-Sample035 35 1.1406200000e+11 4.9012000000e-01 7.1200000000e+03 4.0204000000e-01 - 8 Iter0-Sample036 36 1.6406200000e+11 4.2346000000e-01 5.1200000000e+03 3.4490000000e-01 - 8 Iter0-Sample037 37 1.3906200000e+11 3.5679000000e-01 3.1200000000e+03 2.8775000000e-01 - 8 Iter0-Sample038 38 1.8906200000e+11 4.6790000000e-01 1.1200000000e+03 2.3061000000e-01 - 8 Iter0-Sample039 39 1.0781200000e+11 4.0124000000e-01 8.7200000000e+03 1.7347000000e-01 - 8 Iter0-Sample040 40 1.5781200000e+11 3.3457000000e-01 6.7200000000e+03 1.1633000000e-01 - 8 Iter0-Sample041 41 1.3281200000e+11 4.4568000000e-01 4.7200000000e+03 4.5102000000e-01 - 8 Iter0-Sample042 42 1.8281200000e+11 3.7901000000e-01 2.7200000000e+03 3.9388000000e-01 - 8 Iter0-Sample043 43 1.2031200000e+11 3.1235000000e-01 7.2000000000e+02 3.3674000000e-01 - 8 Iter0-Sample044 44 1.7031200000e+11 4.8272000000e-01 8.3200000000e+03 2.7959000000e-01 - 8 Iter0-Sample045 45 1.4531200000e+11 4.1605000000e-01 6.3200000000e+03 2.2245000000e-01 - 8 Iter0-Sample046 46 1.9531200000e+11 3.4938000000e-01 4.3200000000e+03 1.6531000000e-01 - 8 Iter0-Sample047 47 1.0468800000e+11 4.6049000000e-01 2.3200000000e+03 1.0816000000e-01 - 8 Iter0-Sample048 48 1.5468800000e+11 3.9383000000e-01 3.2000000000e+02 4.9883000000e-01 - 8 Iter0-Sample049 49 1.2968800000e+11 3.2716000000e-01 9.8400000000e+03 4.4169000000e-01 - 8 Iter0-Sample050 50 1.7968800000e+11 4.3827000000e-01 7.8400000000e+03 3.8455000000e-01 - 8 Iter0-Sample051 51 1.1718800000e+11 3.7161000000e-01 5.8400000000e+03 3.2741000000e-01 - 8 Iter0-Sample052 52 1.6718800000e+11 3.0494000000e-01 3.8400000000e+03 2.7026000000e-01 - 8 Iter0-Sample053 53 1.4218800000e+11 4.9506000000e-01 1.8400000000e+03 2.1312000000e-01 - 8 Iter0-Sample054 54 1.9218800000e+11 4.2840000000e-01 9.4400000000e+03 1.5598000000e-01 - 8 Iter0-Sample055 55 1.1093800000e+11 3.6173000000e-01 7.4400000000e+03 4.9067000000e-01 - 8 Iter0-Sample056 56 1.6093800000e+11 4.7284000000e-01 5.4400000000e+03 4.3353000000e-01 - 8 Iter0-Sample057 57 1.3593800000e+11 4.0617000000e-01 3.4400000000e+03 3.7639000000e-01 - 8 Iter0-Sample058 58 1.8593800000e+11 3.3951000000e-01 1.4400000000e+03 3.1924000000e-01 - 8 Iter0-Sample059 59 1.2343800000e+11 4.5062000000e-01 9.0400000000e+03 2.6210000000e-01 - 8 Iter0-Sample060 60 1.7343800000e+11 3.8395000000e-01 7.0400000000e+03 2.0496000000e-01 - 8 Iter0-Sample061 61 1.4843800000e+11 3.1728000000e-01 5.0400000000e+03 1.4781000000e-01 - 8 Iter0-Sample062 62 1.9843800000e+11 4.8765000000e-01 3.0400000000e+03 4.8251000000e-01 - 8 Iter0-Sample063 63 1.0078100000e+11 4.2099000000e-01 1.0400000000e+03 4.2536000000e-01 - 8 Iter0-Sample064 64 1.5078100000e+11 3.5432000000e-01 8.6400000000e+03 3.6822000000e-01 - 8 Iter0-Sample065 65 1.2578100000e+11 4.6543000000e-01 6.6400000000e+03 3.1108000000e-01 - 8 Iter0-Sample066 66 1.7578100000e+11 3.9876000000e-01 4.6400000000e+03 2.5394000000e-01 - 8 Iter0-Sample067 67 1.1328100000e+11 3.3210000000e-01 2.6400000000e+03 1.9679000000e-01 - 8 Iter0-Sample068 68 1.6328100000e+11 4.4321000000e-01 6.4000000000e+02 1.3965000000e-01 - 8 Iter0-Sample069 69 1.3828100000e+11 3.7654000000e-01 8.2400000000e+03 4.7434000000e-01 - 8 Iter0-Sample070 70 1.8828100000e+11 3.0988000000e-01 6.2400000000e+03 4.1720000000e-01 - 8 Iter0-Sample071 71 1.0703100000e+11 4.8025000000e-01 4.2400000000e+03 3.6006000000e-01 - 8 Iter0-Sample072 72 1.5703100000e+11 4.1358000000e-01 2.2400000000e+03 3.0291000000e-01 - 8 Iter0-Sample073 73 1.3203100000e+11 3.4691000000e-01 2.4000000000e+02 2.4577000000e-01 - 8 Iter0-Sample074 74 1.8203100000e+11 4.5803000000e-01 9.7600000000e+03 1.8863000000e-01 - 8 Iter0-Sample075 75 1.1953100000e+11 3.9136000000e-01 7.7600000000e+03 1.3149000000e-01 - 8 Iter0-Sample076 76 1.6953100000e+11 3.2469000000e-01 5.7600000000e+03 4.6618000000e-01 - 8 Iter0-Sample077 77 1.4453100000e+11 4.3580000000e-01 3.7600000000e+03 4.0904000000e-01 - 8 Iter0-Sample078 78 1.9453100000e+11 3.6914000000e-01 1.7600000000e+03 3.5190000000e-01 - 8 Iter0-Sample079 79 1.0390600000e+11 3.0247000000e-01 9.3600000000e+03 2.9475000000e-01 - 8 Iter0-Sample080 80 1.5390600000e+11 4.9918000000e-01 7.3600000000e+03 2.3761000000e-01 - 8 Iter0-Sample081 81 1.2890600000e+11 4.3251000000e-01 5.3600000000e+03 1.8047000000e-01 - 8 Iter0-Sample082 82 1.7890600000e+11 3.6584000000e-01 3.3600000000e+03 1.2332000000e-01 - 8 Iter0-Sample083 83 1.1640600000e+11 4.7696000000e-01 1.3600000000e+03 4.5802000000e-01 - 8 Iter0-Sample084 84 1.6640600000e+11 4.1029000000e-01 8.9600000000e+03 4.0087000000e-01 - 8 Iter0-Sample085 85 1.4140600000e+11 3.4362000000e-01 6.9600000000e+03 3.4373000000e-01 - 8 Iter0-Sample086 86 1.9140600000e+11 4.5473000000e-01 4.9600000000e+03 2.8659000000e-01 - 8 Iter0-Sample087 87 1.1015600000e+11 3.8807000000e-01 2.9600000000e+03 2.2945000000e-01 - 8 Iter0-Sample088 88 1.6015600000e+11 3.2140000000e-01 9.6000000000e+02 1.7230000000e-01 - 8 Iter0-Sample089 89 1.3515600000e+11 4.9177000000e-01 8.5600000000e+03 1.1516000000e-01 - 8 Iter0-Sample090 90 1.8515600000e+11 4.2510000000e-01 6.5600000000e+03 4.4985000000e-01 - 8 Iter0-Sample091 91 1.2265600000e+11 3.5844000000e-01 4.5600000000e+03 3.9271000000e-01 - 8 Iter0-Sample092 92 1.7265600000e+11 4.6955000000e-01 2.5600000000e+03 3.3557000000e-01 - 8 Iter0-Sample093 93 1.4765600000e+11 4.0288000000e-01 5.6000000000e+02 2.7843000000e-01 - 8 Iter0-Sample094 94 1.9765600000e+11 3.3621000000e-01 8.1600000000e+03 2.2128000000e-01 - 8 Iter0-Sample095 95 1.0234400000e+11 4.4732000000e-01 6.1600000000e+03 1.6414000000e-01 - 8 Iter0-Sample096 96 1.5234400000e+11 3.8066000000e-01 4.1600000000e+03 1.0700000000e-01 - 8 Iter0-Sample097 97 1.2734400000e+11 3.1399000000e-01 2.1600000000e+03 4.9767000000e-01 - 8 Iter0-Sample098 98 1.7734400000e+11 4.8436000000e-01 1.6000000000e+02 4.4052000000e-01 - 8 Iter0-Sample099 99 1.1484400000e+11 4.1769000000e-01 9.6800000000e+03 3.8338000000e-01 +!OMP_NUM_THREADS description key E mu k_r mu_r + 8 Iter0_Sample000 0 1.5000000000e+11 4.3333000000e-01 8.0000000000e+03 4.4286000000e-01 + 8 Iter0_Sample001 1 1.2500000000e+11 3.6667000000e-01 6.0000000000e+03 3.8571000000e-01 + 8 Iter0_Sample002 2 1.7500000000e+11 4.7778000000e-01 4.0000000000e+03 3.2857000000e-01 + 8 Iter0_Sample003 3 1.1250000000e+11 4.1111000000e-01 2.0000000000e+03 2.7143000000e-01 + 8 Iter0_Sample004 4 1.6250000000e+11 3.4444000000e-01 9.6000000000e+03 2.1429000000e-01 + 8 Iter0_Sample005 5 1.3750000000e+11 4.5556000000e-01 7.6000000000e+03 1.5714000000e-01 + 8 Iter0_Sample006 6 1.8750000000e+11 3.8889000000e-01 5.6000000000e+03 4.9184000000e-01 + 8 Iter0_Sample007 7 1.0625000000e+11 3.2222000000e-01 3.6000000000e+03 4.3469000000e-01 + 8 Iter0_Sample008 8 1.5625000000e+11 4.9259000000e-01 1.6000000000e+03 3.7755000000e-01 + 8 Iter0_Sample009 9 1.3125000000e+11 4.2593000000e-01 9.2000000000e+03 3.2041000000e-01 + 8 Iter0_Sample010 10 1.8125000000e+11 3.5926000000e-01 7.2000000000e+03 2.6327000000e-01 + 8 Iter0_Sample011 11 1.1875000000e+11 4.7037000000e-01 5.2000000000e+03 2.0612000000e-01 + 8 Iter0_Sample012 12 1.6875000000e+11 4.0370000000e-01 3.2000000000e+03 1.4898000000e-01 + 8 Iter0_Sample013 13 1.4375000000e+11 3.3704000000e-01 1.2000000000e+03 4.8367000000e-01 + 8 Iter0_Sample014 14 1.9375000000e+11 4.4815000000e-01 8.8000000000e+03 4.2653000000e-01 + 8 Iter0_Sample015 15 1.0312500000e+11 3.8148000000e-01 6.8000000000e+03 3.6939000000e-01 + 8 Iter0_Sample016 16 1.5312500000e+11 3.1482000000e-01 4.8000000000e+03 3.1224000000e-01 + 8 Iter0_Sample017 17 1.2812500000e+11 4.8518000000e-01 2.8000000000e+03 2.5510000000e-01 + 8 Iter0_Sample018 18 1.7812500000e+11 4.1852000000e-01 8.0000000000e+02 1.9796000000e-01 + 8 Iter0_Sample019 19 1.1562500000e+11 3.5185000000e-01 8.4000000000e+03 1.4082000000e-01 + 8 Iter0_Sample020 20 1.6562500000e+11 4.6296000000e-01 6.4000000000e+03 4.7551000000e-01 + 8 Iter0_Sample021 21 1.4062500000e+11 3.9630000000e-01 4.4000000000e+03 4.1837000000e-01 + 8 Iter0_Sample022 22 1.9062500000e+11 3.2963000000e-01 2.4000000000e+03 3.6122000000e-01 + 8 Iter0_Sample023 23 1.0937500000e+11 4.4074000000e-01 4.0000000000e+02 3.0408000000e-01 + 8 Iter0_Sample024 24 1.5937500000e+11 3.7407000000e-01 9.9200000000e+03 2.4694000000e-01 + 8 Iter0_Sample025 25 1.3437500000e+11 3.0741000000e-01 7.9200000000e+03 1.8980000000e-01 + 8 Iter0_Sample026 26 1.8437500000e+11 4.9753000000e-01 5.9200000000e+03 1.3265000000e-01 + 8 Iter0_Sample027 27 1.2187500000e+11 4.3086000000e-01 3.9200000000e+03 4.6735000000e-01 + 8 Iter0_Sample028 28 1.7187500000e+11 3.6420000000e-01 1.9200000000e+03 4.1020000000e-01 + 8 Iter0_Sample029 29 1.4687500000e+11 4.7531000000e-01 9.5200000000e+03 3.5306000000e-01 + 8 Iter0_Sample030 30 1.9687500000e+11 4.0864000000e-01 7.5200000000e+03 2.9592000000e-01 + 8 Iter0_Sample031 31 1.0156200000e+11 3.4197000000e-01 5.5200000000e+03 2.3878000000e-01 + 8 Iter0_Sample032 32 1.5156200000e+11 4.5309000000e-01 3.5200000000e+03 1.8163000000e-01 + 8 Iter0_Sample033 33 1.2656200000e+11 3.8642000000e-01 1.5200000000e+03 1.2449000000e-01 + 8 Iter0_Sample034 34 1.7656200000e+11 3.1975000000e-01 9.1200000000e+03 4.5918000000e-01 + 8 Iter0_Sample035 35 1.1406200000e+11 4.9012000000e-01 7.1200000000e+03 4.0204000000e-01 + 8 Iter0_Sample036 36 1.6406200000e+11 4.2346000000e-01 5.1200000000e+03 3.4490000000e-01 + 8 Iter0_Sample037 37 1.3906200000e+11 3.5679000000e-01 3.1200000000e+03 2.8775000000e-01 + 8 Iter0_Sample038 38 1.8906200000e+11 4.6790000000e-01 1.1200000000e+03 2.3061000000e-01 + 8 Iter0_Sample039 39 1.0781200000e+11 4.0124000000e-01 8.7200000000e+03 1.7347000000e-01 + 8 Iter0_Sample040 40 1.5781200000e+11 3.3457000000e-01 6.7200000000e+03 1.1633000000e-01 + 8 Iter0_Sample041 41 1.3281200000e+11 4.4568000000e-01 4.7200000000e+03 4.5102000000e-01 + 8 Iter0_Sample042 42 1.8281200000e+11 3.7901000000e-01 2.7200000000e+03 3.9388000000e-01 + 8 Iter0_Sample043 43 1.2031200000e+11 3.1235000000e-01 7.2000000000e+02 3.3674000000e-01 + 8 Iter0_Sample044 44 1.7031200000e+11 4.8272000000e-01 8.3200000000e+03 2.7959000000e-01 + 8 Iter0_Sample045 45 1.4531200000e+11 4.1605000000e-01 6.3200000000e+03 2.2245000000e-01 + 8 Iter0_Sample046 46 1.9531200000e+11 3.4938000000e-01 4.3200000000e+03 1.6531000000e-01 + 8 Iter0_Sample047 47 1.0468800000e+11 4.6049000000e-01 2.3200000000e+03 1.0816000000e-01 + 8 Iter0_Sample048 48 1.5468800000e+11 3.9383000000e-01 3.2000000000e+02 4.9883000000e-01 + 8 Iter0_Sample049 49 1.2968800000e+11 3.2716000000e-01 9.8400000000e+03 4.4169000000e-01 + 8 Iter0_Sample050 50 1.7968800000e+11 4.3827000000e-01 7.8400000000e+03 3.8455000000e-01 + 8 Iter0_Sample051 51 1.1718800000e+11 3.7161000000e-01 5.8400000000e+03 3.2741000000e-01 + 8 Iter0_Sample052 52 1.6718800000e+11 3.0494000000e-01 3.8400000000e+03 2.7026000000e-01 + 8 Iter0_Sample053 53 1.4218800000e+11 4.9506000000e-01 1.8400000000e+03 2.1312000000e-01 + 8 Iter0_Sample054 54 1.9218800000e+11 4.2840000000e-01 9.4400000000e+03 1.5598000000e-01 + 8 Iter0_Sample055 55 1.1093800000e+11 3.6173000000e-01 7.4400000000e+03 4.9067000000e-01 + 8 Iter0_Sample056 56 1.6093800000e+11 4.7284000000e-01 5.4400000000e+03 4.3353000000e-01 + 8 Iter0_Sample057 57 1.3593800000e+11 4.0617000000e-01 3.4400000000e+03 3.7639000000e-01 + 8 Iter0_Sample058 58 1.8593800000e+11 3.3951000000e-01 1.4400000000e+03 3.1924000000e-01 + 8 Iter0_Sample059 59 1.2343800000e+11 4.5062000000e-01 9.0400000000e+03 2.6210000000e-01 + 8 Iter0_Sample060 60 1.7343800000e+11 3.8395000000e-01 7.0400000000e+03 2.0496000000e-01 + 8 Iter0_Sample061 61 1.4843800000e+11 3.1728000000e-01 5.0400000000e+03 1.4781000000e-01 + 8 Iter0_Sample062 62 1.9843800000e+11 4.8765000000e-01 3.0400000000e+03 4.8251000000e-01 + 8 Iter0_Sample063 63 1.0078100000e+11 4.2099000000e-01 1.0400000000e+03 4.2536000000e-01 + 8 Iter0_Sample064 64 1.5078100000e+11 3.5432000000e-01 8.6400000000e+03 3.6822000000e-01 + 8 Iter0_Sample065 65 1.2578100000e+11 4.6543000000e-01 6.6400000000e+03 3.1108000000e-01 + 8 Iter0_Sample066 66 1.7578100000e+11 3.9876000000e-01 4.6400000000e+03 2.5394000000e-01 + 8 Iter0_Sample067 67 1.1328100000e+11 3.3210000000e-01 2.6400000000e+03 1.9679000000e-01 + 8 Iter0_Sample068 68 1.6328100000e+11 4.4321000000e-01 6.4000000000e+02 1.3965000000e-01 + 8 Iter0_Sample069 69 1.3828100000e+11 3.7654000000e-01 8.2400000000e+03 4.7434000000e-01 + 8 Iter0_Sample070 70 1.8828100000e+11 3.0988000000e-01 6.2400000000e+03 4.1720000000e-01 + 8 Iter0_Sample071 71 1.0703100000e+11 4.8025000000e-01 4.2400000000e+03 3.6006000000e-01 + 8 Iter0_Sample072 72 1.5703100000e+11 4.1358000000e-01 2.2400000000e+03 3.0291000000e-01 + 8 Iter0_Sample073 73 1.3203100000e+11 3.4691000000e-01 2.4000000000e+02 2.4577000000e-01 + 8 Iter0_Sample074 74 1.8203100000e+11 4.5803000000e-01 9.7600000000e+03 1.8863000000e-01 + 8 Iter0_Sample075 75 1.1953100000e+11 3.9136000000e-01 7.7600000000e+03 1.3149000000e-01 + 8 Iter0_Sample076 76 1.6953100000e+11 3.2469000000e-01 5.7600000000e+03 4.6618000000e-01 + 8 Iter0_Sample077 77 1.4453100000e+11 4.3580000000e-01 3.7600000000e+03 4.0904000000e-01 + 8 Iter0_Sample078 78 1.9453100000e+11 3.6914000000e-01 1.7600000000e+03 3.5190000000e-01 + 8 Iter0_Sample079 79 1.0390600000e+11 3.0247000000e-01 9.3600000000e+03 2.9475000000e-01 + 8 Iter0_Sample080 80 1.5390600000e+11 4.9918000000e-01 7.3600000000e+03 2.3761000000e-01 + 8 Iter0_Sample081 81 1.2890600000e+11 4.3251000000e-01 5.3600000000e+03 1.8047000000e-01 + 8 Iter0_Sample082 82 1.7890600000e+11 3.6584000000e-01 3.3600000000e+03 1.2332000000e-01 + 8 Iter0_Sample083 83 1.1640600000e+11 4.7696000000e-01 1.3600000000e+03 4.5802000000e-01 + 8 Iter0_Sample084 84 1.6640600000e+11 4.1029000000e-01 8.9600000000e+03 4.0087000000e-01 + 8 Iter0_Sample085 85 1.4140600000e+11 3.4362000000e-01 6.9600000000e+03 3.4373000000e-01 + 8 Iter0_Sample086 86 1.9140600000e+11 4.5473000000e-01 4.9600000000e+03 2.8659000000e-01 + 8 Iter0_Sample087 87 1.1015600000e+11 3.8807000000e-01 2.9600000000e+03 2.2945000000e-01 + 8 Iter0_Sample088 88 1.6015600000e+11 3.2140000000e-01 9.6000000000e+02 1.7230000000e-01 + 8 Iter0_Sample089 89 1.3515600000e+11 4.9177000000e-01 8.5600000000e+03 1.1516000000e-01 + 8 Iter0_Sample090 90 1.8515600000e+11 4.2510000000e-01 6.5600000000e+03 4.4985000000e-01 + 8 Iter0_Sample091 91 1.2265600000e+11 3.5844000000e-01 4.5600000000e+03 3.9271000000e-01 + 8 Iter0_Sample092 92 1.7265600000e+11 4.6955000000e-01 2.5600000000e+03 3.3557000000e-01 + 8 Iter0_Sample093 93 1.4765600000e+11 4.0288000000e-01 5.6000000000e+02 2.7843000000e-01 + 8 Iter0_Sample094 94 1.9765600000e+11 3.3621000000e-01 8.1600000000e+03 2.2128000000e-01 + 8 Iter0_Sample095 95 1.0234400000e+11 4.4732000000e-01 6.1600000000e+03 1.6414000000e-01 + 8 Iter0_Sample096 96 1.5234400000e+11 3.8066000000e-01 4.1600000000e+03 1.0700000000e-01 + 8 Iter0_Sample097 97 1.2734400000e+11 3.1399000000e-01 2.1600000000e+03 4.9767000000e-01 + 8 Iter0_Sample098 98 1.7734400000e+11 4.8436000000e-01 1.6000000000e+02 4.4052000000e-01 + 8 Iter0_Sample099 99 1.1484400000e+11 4.1769000000e-01 9.6800000000e+03 3.8338000000e-01 diff --git a/tests/data/oedo_sim_data/iter1/smcTable1.txt b/tests/data/oedo_sim_data/iter1/smcTable1.txt index 79ad9b9..deae485 100644 --- a/tests/data/oedo_sim_data/iter1/smcTable1.txt +++ b/tests/data/oedo_sim_data/iter1/smcTable1.txt @@ -1,101 +1,101 @@ -!OMP_NUM_THREADS description key E mu k_r mu_r - 8 Iter0-Sample000 0 1.2928500000e+11 3.3384000000e-01 8.7870900000e+03 3.5155000000e-01 - 8 Iter0-Sample001 1 1.3288800000e+11 3.3567000000e-01 7.6095100000e+03 4.0102000000e-01 - 8 Iter0-Sample002 2 1.3301600000e+11 3.2378000000e-01 9.7038600000e+03 4.4130000000e-01 - 8 Iter0-Sample003 3 1.3051500000e+11 3.4693000000e-01 7.3016700000e+03 3.8012000000e-01 - 8 Iter0-Sample004 4 1.3070800000e+11 3.5119000000e-01 7.1650300000e+03 3.6390000000e-01 - 8 Iter0-Sample005 5 1.2386900000e+11 3.8291000000e-01 4.2697100000e+03 3.3203000000e-01 - 8 Iter0-Sample006 6 1.2895100000e+11 3.4493000000e-01 7.6375800000e+03 4.0442000000e-01 - 8 Iter0-Sample007 7 1.2992800000e+11 3.4857000000e-01 6.6893900000e+03 3.6231000000e-01 - 8 Iter0-Sample008 8 1.2854800000e+11 3.6033000000e-01 6.5416700000e+03 3.9115000000e-01 - 8 Iter0-Sample009 9 1.2880900000e+11 3.4724000000e-01 7.9273100000e+03 3.8753000000e-01 - 8 Iter0-Sample010 10 1.2963200000e+11 3.4454000000e-01 7.8085200000e+03 4.2111000000e-01 - 8 Iter0-Sample011 11 1.3453100000e+11 3.3072000000e-01 8.1758300000e+03 4.4942000000e-01 - 8 Iter0-Sample012 12 1.3214200000e+11 3.3752000000e-01 6.2841200000e+03 3.6795000000e-01 - 8 Iter0-Sample013 13 1.2545800000e+11 3.2859000000e-01 1.0244900000e+04 4.7697000000e-01 - 8 Iter0-Sample014 14 1.2611000000e+11 3.4595000000e-01 7.6091600000e+03 4.2873000000e-01 - 8 Iter0-Sample015 15 1.4715500000e+11 2.9855000000e-01 6.3678800000e+03 2.3304000000e-01 - 8 Iter0-Sample016 16 1.3769800000e+11 3.4280000000e-01 4.9062000000e+03 1.4926000000e-01 - 8 Iter0-Sample017 17 1.4767200000e+11 3.1185000000e-01 5.1770900000e+03 1.2620000000e-01 - 8 Iter0-Sample018 18 1.4508800000e+11 3.0733000000e-01 6.5055700000e+03 1.5710000000e-01 - 8 Iter0-Sample019 19 1.5151800000e+11 3.1948000000e-01 4.6254600000e+03 1.9675000000e-01 - 8 Iter0-Sample020 20 1.4580100000e+11 3.4329000000e-01 4.3968900000e+03 1.7825000000e-01 - 8 Iter0-Sample021 21 1.4460400000e+11 3.4242000000e-01 3.7836000000e+03 1.8605000000e-01 - 8 Iter0-Sample022 22 1.4856600000e+11 3.0046000000e-01 5.7765900000e+03 2.0548000000e-01 - 8 Iter0-Sample023 23 1.3408300000e+11 3.6347000000e-01 4.9663900000e+03 2.4735000000e-01 - 8 Iter0-Sample024 24 1.5549800000e+11 3.1465000000e-01 4.5481000000e+03 1.8520000000e-01 - 8 Iter0-Sample025 25 1.4254700000e+11 3.4311000000e-01 4.4245600000e+03 1.5819000000e-01 - 8 Iter0-Sample026 26 1.2118200000e+11 4.3183000000e-01 3.2762200000e+03 3.3714000000e-01 - 8 Iter0-Sample027 27 1.2169800000e+11 4.7698000000e-01 7.9952900000e+02 4.7495000000e-01 - 8 Iter0-Sample028 28 1.1850500000e+11 4.7883000000e-01 1.2277000000e+03 4.7998000000e-01 - 8 Iter0-Sample029 29 1.1863900000e+11 3.9242000000e-01 5.9855500000e+03 2.6196000000e-01 - 8 Iter0-Sample030 30 1.1922100000e+11 4.9259000000e-01 4.6982200000e+02 4.3998000000e-01 - 8 Iter0-Sample031 31 1.1029200000e+11 4.7506000000e-01 3.1555100000e+03 4.7779000000e-01 - 8 Iter0-Sample032 32 1.2193200000e+11 3.4383000000e-01 8.3491200000e+03 1.7058000000e-01 - 8 Iter0-Sample033 33 1.1974600000e+11 4.2495000000e-01 3.5753200000e+03 3.0090000000e-01 - 8 Iter0-Sample034 34 1.1848800000e+11 3.9963000000e-01 6.1777700000e+03 2.6447000000e-01 - 8 Iter0-Sample035 35 1.2446500000e+11 4.1391000000e-01 3.5269100000e+03 2.8588000000e-01 - 8 Iter0-Sample036 36 1.1832800000e+11 3.7179000000e-01 6.5757500000e+03 1.3921000000e-01 - 8 Iter0-Sample037 37 1.1862000000e+11 4.4033000000e-01 2.8326100000e+03 3.4016000000e-01 - 8 Iter0-Sample038 38 1.2229900000e+11 4.2298000000e-01 2.7831600000e+03 3.1447000000e-01 - 8 Iter0-Sample039 39 1.1705300000e+11 4.3499000000e-01 3.9545600000e+03 3.9941000000e-01 - 8 Iter0-Sample040 40 1.2442200000e+11 4.2335000000e-01 3.2982700000e+03 3.8199000000e-01 - 8 Iter0-Sample041 41 1.1738500000e+11 5.2494000000e-01 -1.4141700000e+03 5.7661000000e-01 - 8 Iter0-Sample042 42 1.0948300000e+11 3.7227000000e-01 8.6375700000e+03 2.0400000000e-01 - 8 Iter0-Sample043 43 1.1458700000e+11 4.2541000000e-01 4.3519200000e+03 3.8832000000e-01 - 8 Iter0-Sample044 44 1.3514800000e+11 3.3203000000e-01 3.9490500000e+03 1.2451000000e-01 - 8 Iter0-Sample045 45 1.3190700000e+11 3.8173000000e-01 1.6049500000e+02 7.9900000000e-02 - 8 Iter0-Sample046 46 1.3029500000e+11 4.0291000000e-01 -9.1104800000e+01 1.0919000000e-01 - 8 Iter0-Sample047 47 1.2772300000e+11 3.9123000000e-01 2.7578700000e+03 2.7637000000e-01 - 8 Iter0-Sample048 48 1.3030200000e+11 3.7900000000e-01 2.3198900000e+03 1.2716000000e-01 - 8 Iter0-Sample049 49 1.3592600000e+11 3.2425000000e-01 5.5894200000e+03 2.1319000000e-01 - 8 Iter0-Sample050 50 1.1989700000e+11 3.9290000000e-01 3.1149400000e+03 1.2968000000e-01 - 8 Iter0-Sample051 51 1.2728600000e+11 3.7983000000e-01 1.8618500000e+03 1.2444000000e-01 - 8 Iter0-Sample052 52 1.1697000000e+11 3.6658000000e-01 5.5339700000e+03 3.5025000000e-01 - 8 Iter0-Sample053 53 1.0755900000e+11 3.7535000000e-01 4.7035700000e+03 3.3838000000e-01 - 8 Iter0-Sample054 54 1.1227900000e+11 3.8536000000e-01 4.3776700000e+03 3.1583000000e-01 - 8 Iter0-Sample055 55 1.2679300000e+11 3.7008000000e-01 4.7851200000e+03 3.3810000000e-01 - 8 Iter0-Sample056 56 1.1489100000e+11 3.7217000000e-01 4.8017600000e+03 3.8251000000e-01 - 8 Iter0-Sample057 57 1.3658300000e+11 3.6614000000e-01 3.1531900000e+03 3.4253000000e-01 - 8 Iter0-Sample058 58 1.4588800000e+11 3.2024000000e-01 4.7232500000e+03 2.9623000000e-01 - 8 Iter0-Sample059 59 1.5114200000e+11 3.2274000000e-01 5.0445000000e+03 2.8653000000e-01 - 8 Iter0-Sample060 60 1.5616200000e+11 2.9518000000e-01 4.9900400000e+03 2.6729000000e-01 - 8 Iter0-Sample061 61 1.4411400000e+11 3.3178000000e-01 4.8142300000e+03 3.6516000000e-01 - 8 Iter0-Sample062 62 1.4660600000e+11 3.1910000000e-01 5.6251100000e+03 3.4725000000e-01 - 8 Iter0-Sample063 63 1.4730400000e+11 3.1395000000e-01 6.3943600000e+03 2.6028000000e-01 - 8 Iter0-Sample064 64 1.6704400000e+11 2.7401000000e-01 5.9691100000e+03 2.9689000000e-01 - 8 Iter0-Sample065 65 1.4893100000e+11 3.2882000000e-01 4.9241000000e+03 3.6493000000e-01 - 8 Iter0-Sample066 66 1.5723700000e+11 3.0064000000e-01 5.2079500000e+03 3.4208000000e-01 - 8 Iter0-Sample067 67 1.3055500000e+11 3.1865000000e-01 8.4268700000e+03 9.4060000000e-02 - 8 Iter0-Sample068 68 1.1818100000e+11 3.8059000000e-01 5.8460400000e+03 2.9111000000e-01 - 8 Iter0-Sample069 69 1.1580900000e+11 3.8263000000e-01 4.3256200000e+03 3.7504000000e-01 - 8 Iter0-Sample070 70 1.1758900000e+11 3.8346000000e-01 5.1224400000e+03 3.3931000000e-01 - 8 Iter0-Sample071 71 1.2626200000e+11 3.4806000000e-01 5.3252800000e+03 2.9012000000e-01 - 8 Iter0-Sample072 72 1.2360800000e+11 3.6577000000e-01 4.2972000000e+03 3.6390000000e-01 - 8 Iter0-Sample073 73 1.2324400000e+11 3.6240000000e-01 4.0306900000e+03 3.8912000000e-01 - 8 Iter0-Sample074 74 1.2412700000e+11 3.6629000000e-01 5.2418600000e+03 3.5374000000e-01 - 8 Iter0-Sample075 75 1.2741700000e+11 3.6704000000e-01 2.8596600000e+03 4.2277000000e-01 - 8 Iter0-Sample076 76 1.1746500000e+11 3.6338000000e-01 5.5866500000e+03 3.9039000000e-01 - 8 Iter0-Sample077 77 1.2746000000e+11 3.6745000000e-01 3.8076800000e+03 3.6711000000e-01 - 8 Iter0-Sample078 78 1.2975800000e+11 3.7013000000e-01 3.9793300000e+03 3.8163000000e-01 - 8 Iter0-Sample079 79 1.1261000000e+11 3.6937000000e-01 5.2188700000e+03 3.7177000000e-01 - 8 Iter0-Sample080 80 1.2002300000e+11 3.7051000000e-01 6.2452400000e+03 3.8377000000e-01 - 8 Iter0-Sample081 81 1.0298600000e+11 4.2768000000e-01 5.3054000000e+03 1.1654000000e-01 - 8 Iter0-Sample082 82 1.1873100000e+11 4.0919000000e-01 2.5606100000e+03 1.3273000000e-01 - 8 Iter0-Sample083 83 1.3371000000e+11 3.3686000000e-01 5.8486900000e+03 3.6575000000e-01 - 8 Iter0-Sample084 84 1.1875100000e+11 3.9844000000e-01 6.9035700000e+03 2.2862000000e-01 - 8 Iter0-Sample085 85 1.2569800000e+11 3.9730000000e-01 4.8081100000e+03 3.1635000000e-01 - 8 Iter0-Sample086 86 1.0347100000e+11 4.1365000000e-01 9.3982500000e+03 2.2396000000e-01 - 8 Iter0-Sample087 87 1.2359900000e+11 3.9342000000e-01 7.2477200000e+03 1.1676000000e-01 - 8 Iter0-Sample088 88 1.2449700000e+11 3.9110000000e-01 6.4042400000e+03 2.7586000000e-01 - 8 Iter0-Sample089 89 1.1324900000e+11 3.8959000000e-01 8.1287500000e+03 1.5878000000e-01 - 8 Iter0-Sample090 90 1.2246200000e+11 3.7618000000e-01 7.8201100000e+03 2.1727000000e-01 - 8 Iter0-Sample091 91 1.1334500000e+11 3.8846000000e-01 8.4392600000e+03 1.1385000000e-01 - 8 Iter0-Sample092 92 1.3605300000e+11 3.6683000000e-01 3.0266800000e+03 3.5336000000e-01 - 8 Iter0-Sample093 93 1.3731000000e+11 3.6018000000e-01 2.4675500000e+03 3.8306000000e-01 - 8 Iter0-Sample094 94 1.3351700000e+11 3.3349000000e-01 6.4364500000e+03 3.4931000000e-01 - 8 Iter0-Sample095 95 1.3547100000e+11 3.5207000000e-01 4.1732800000e+03 2.1557000000e-01 - 8 Iter0-Sample096 96 1.4837700000e+11 3.8173000000e-01 1.5496100000e+03 2.4523000000e-01 - 8 Iter0-Sample097 97 1.3780900000e+11 4.2949000000e-01 -4.7077900000e+02 2.8044000000e-01 - 8 Iter0-Sample098 98 1.3288200000e+11 3.7690000000e-01 3.6739200000e+03 2.9670000000e-01 - 8 Iter0-Sample099 99 1.4526000000e+11 3.7741000000e-01 2.3567300000e+03 2.9744000000e-01 +!OMP_NUM_THREADS description key E mu k_r mu_r + 8 Iter0_Sample000 0 1.2928500000e+11 3.3384000000e-01 8.7870900000e+03 3.5155000000e-01 + 8 Iter0_Sample001 1 1.3288800000e+11 3.3567000000e-01 7.6095100000e+03 4.0102000000e-01 + 8 Iter0_Sample002 2 1.3301600000e+11 3.2378000000e-01 9.7038600000e+03 4.4130000000e-01 + 8 Iter0_Sample003 3 1.3051500000e+11 3.4693000000e-01 7.3016700000e+03 3.8012000000e-01 + 8 Iter0_Sample004 4 1.3070800000e+11 3.5119000000e-01 7.1650300000e+03 3.6390000000e-01 + 8 Iter0_Sample005 5 1.2386900000e+11 3.8291000000e-01 4.2697100000e+03 3.3203000000e-01 + 8 Iter0_Sample006 6 1.2895100000e+11 3.4493000000e-01 7.6375800000e+03 4.0442000000e-01 + 8 Iter0_Sample007 7 1.2992800000e+11 3.4857000000e-01 6.6893900000e+03 3.6231000000e-01 + 8 Iter0_Sample008 8 1.2854800000e+11 3.6033000000e-01 6.5416700000e+03 3.9115000000e-01 + 8 Iter0_Sample009 9 1.2880900000e+11 3.4724000000e-01 7.9273100000e+03 3.8753000000e-01 + 8 Iter0_Sample010 10 1.2963200000e+11 3.4454000000e-01 7.8085200000e+03 4.2111000000e-01 + 8 Iter0_Sample011 11 1.3453100000e+11 3.3072000000e-01 8.1758300000e+03 4.4942000000e-01 + 8 Iter0_Sample012 12 1.3214200000e+11 3.3752000000e-01 6.2841200000e+03 3.6795000000e-01 + 8 Iter0_Sample013 13 1.2545800000e+11 3.2859000000e-01 1.0244900000e+04 4.7697000000e-01 + 8 Iter0_Sample014 14 1.2611000000e+11 3.4595000000e-01 7.6091600000e+03 4.2873000000e-01 + 8 Iter0_Sample015 15 1.4715500000e+11 2.9855000000e-01 6.3678800000e+03 2.3304000000e-01 + 8 Iter0_Sample016 16 1.3769800000e+11 3.4280000000e-01 4.9062000000e+03 1.4926000000e-01 + 8 Iter0_Sample017 17 1.4767200000e+11 3.1185000000e-01 5.1770900000e+03 1.2620000000e-01 + 8 Iter0_Sample018 18 1.4508800000e+11 3.0733000000e-01 6.5055700000e+03 1.5710000000e-01 + 8 Iter0_Sample019 19 1.5151800000e+11 3.1948000000e-01 4.6254600000e+03 1.9675000000e-01 + 8 Iter0_Sample020 20 1.4580100000e+11 3.4329000000e-01 4.3968900000e+03 1.7825000000e-01 + 8 Iter0_Sample021 21 1.4460400000e+11 3.4242000000e-01 3.7836000000e+03 1.8605000000e-01 + 8 Iter0_Sample022 22 1.4856600000e+11 3.0046000000e-01 5.7765900000e+03 2.0548000000e-01 + 8 Iter0_Sample023 23 1.3408300000e+11 3.6347000000e-01 4.9663900000e+03 2.4735000000e-01 + 8 Iter0_Sample024 24 1.5549800000e+11 3.1465000000e-01 4.5481000000e+03 1.8520000000e-01 + 8 Iter0_Sample025 25 1.4254700000e+11 3.4311000000e-01 4.4245600000e+03 1.5819000000e-01 + 8 Iter0_Sample026 26 1.2118200000e+11 4.3183000000e-01 3.2762200000e+03 3.3714000000e-01 + 8 Iter0_Sample027 27 1.2169800000e+11 4.7698000000e-01 7.9952900000e+02 4.7495000000e-01 + 8 Iter0_Sample028 28 1.1850500000e+11 4.7883000000e-01 1.2277000000e+03 4.7998000000e-01 + 8 Iter0_Sample029 29 1.1863900000e+11 3.9242000000e-01 5.9855500000e+03 2.6196000000e-01 + 8 Iter0_Sample030 30 1.1922100000e+11 4.9259000000e-01 4.6982200000e+02 4.3998000000e-01 + 8 Iter0_Sample031 31 1.1029200000e+11 4.7506000000e-01 3.1555100000e+03 4.7779000000e-01 + 8 Iter0_Sample032 32 1.2193200000e+11 3.4383000000e-01 8.3491200000e+03 1.7058000000e-01 + 8 Iter0_Sample033 33 1.1974600000e+11 4.2495000000e-01 3.5753200000e+03 3.0090000000e-01 + 8 Iter0_Sample034 34 1.1848800000e+11 3.9963000000e-01 6.1777700000e+03 2.6447000000e-01 + 8 Iter0_Sample035 35 1.2446500000e+11 4.1391000000e-01 3.5269100000e+03 2.8588000000e-01 + 8 Iter0_Sample036 36 1.1832800000e+11 3.7179000000e-01 6.5757500000e+03 1.3921000000e-01 + 8 Iter0_Sample037 37 1.1862000000e+11 4.4033000000e-01 2.8326100000e+03 3.4016000000e-01 + 8 Iter0_Sample038 38 1.2229900000e+11 4.2298000000e-01 2.7831600000e+03 3.1447000000e-01 + 8 Iter0_Sample039 39 1.1705300000e+11 4.3499000000e-01 3.9545600000e+03 3.9941000000e-01 + 8 Iter0_Sample040 40 1.2442200000e+11 4.2335000000e-01 3.2982700000e+03 3.8199000000e-01 + 8 Iter0_Sample041 41 1.1738500000e+11 5.2494000000e-01 -1.4141700000e+03 5.7661000000e-01 + 8 Iter0_Sample042 42 1.0948300000e+11 3.7227000000e-01 8.6375700000e+03 2.0400000000e-01 + 8 Iter0_Sample043 43 1.1458700000e+11 4.2541000000e-01 4.3519200000e+03 3.8832000000e-01 + 8 Iter0_Sample044 44 1.3514800000e+11 3.3203000000e-01 3.9490500000e+03 1.2451000000e-01 + 8 Iter0_Sample045 45 1.3190700000e+11 3.8173000000e-01 1.6049500000e+02 7.9900000000e-02 + 8 Iter0_Sample046 46 1.3029500000e+11 4.0291000000e-01 -9.1104800000e+01 1.0919000000e-01 + 8 Iter0_Sample047 47 1.2772300000e+11 3.9123000000e-01 2.7578700000e+03 2.7637000000e-01 + 8 Iter0_Sample048 48 1.3030200000e+11 3.7900000000e-01 2.3198900000e+03 1.2716000000e-01 + 8 Iter0_Sample049 49 1.3592600000e+11 3.2425000000e-01 5.5894200000e+03 2.1319000000e-01 + 8 Iter0_Sample050 50 1.1989700000e+11 3.9290000000e-01 3.1149400000e+03 1.2968000000e-01 + 8 Iter0_Sample051 51 1.2728600000e+11 3.7983000000e-01 1.8618500000e+03 1.2444000000e-01 + 8 Iter0_Sample052 52 1.1697000000e+11 3.6658000000e-01 5.5339700000e+03 3.5025000000e-01 + 8 Iter0_Sample053 53 1.0755900000e+11 3.7535000000e-01 4.7035700000e+03 3.3838000000e-01 + 8 Iter0_Sample054 54 1.1227900000e+11 3.8536000000e-01 4.3776700000e+03 3.1583000000e-01 + 8 Iter0_Sample055 55 1.2679300000e+11 3.7008000000e-01 4.7851200000e+03 3.3810000000e-01 + 8 Iter0_Sample056 56 1.1489100000e+11 3.7217000000e-01 4.8017600000e+03 3.8251000000e-01 + 8 Iter0_Sample057 57 1.3658300000e+11 3.6614000000e-01 3.1531900000e+03 3.4253000000e-01 + 8 Iter0_Sample058 58 1.4588800000e+11 3.2024000000e-01 4.7232500000e+03 2.9623000000e-01 + 8 Iter0_Sample059 59 1.5114200000e+11 3.2274000000e-01 5.0445000000e+03 2.8653000000e-01 + 8 Iter0_Sample060 60 1.5616200000e+11 2.9518000000e-01 4.9900400000e+03 2.6729000000e-01 + 8 Iter0_Sample061 61 1.4411400000e+11 3.3178000000e-01 4.8142300000e+03 3.6516000000e-01 + 8 Iter0_Sample062 62 1.4660600000e+11 3.1910000000e-01 5.6251100000e+03 3.4725000000e-01 + 8 Iter0_Sample063 63 1.4730400000e+11 3.1395000000e-01 6.3943600000e+03 2.6028000000e-01 + 8 Iter0_Sample064 64 1.6704400000e+11 2.7401000000e-01 5.9691100000e+03 2.9689000000e-01 + 8 Iter0_Sample065 65 1.4893100000e+11 3.2882000000e-01 4.9241000000e+03 3.6493000000e-01 + 8 Iter0_Sample066 66 1.5723700000e+11 3.0064000000e-01 5.2079500000e+03 3.4208000000e-01 + 8 Iter0_Sample067 67 1.3055500000e+11 3.1865000000e-01 8.4268700000e+03 9.4060000000e-02 + 8 Iter0_Sample068 68 1.1818100000e+11 3.8059000000e-01 5.8460400000e+03 2.9111000000e-01 + 8 Iter0_Sample069 69 1.1580900000e+11 3.8263000000e-01 4.3256200000e+03 3.7504000000e-01 + 8 Iter0_Sample070 70 1.1758900000e+11 3.8346000000e-01 5.1224400000e+03 3.3931000000e-01 + 8 Iter0_Sample071 71 1.2626200000e+11 3.4806000000e-01 5.3252800000e+03 2.9012000000e-01 + 8 Iter0_Sample072 72 1.2360800000e+11 3.6577000000e-01 4.2972000000e+03 3.6390000000e-01 + 8 Iter0_Sample073 73 1.2324400000e+11 3.6240000000e-01 4.0306900000e+03 3.8912000000e-01 + 8 Iter0_Sample074 74 1.2412700000e+11 3.6629000000e-01 5.2418600000e+03 3.5374000000e-01 + 8 Iter0_Sample075 75 1.2741700000e+11 3.6704000000e-01 2.8596600000e+03 4.2277000000e-01 + 8 Iter0_Sample076 76 1.1746500000e+11 3.6338000000e-01 5.5866500000e+03 3.9039000000e-01 + 8 Iter0_Sample077 77 1.2746000000e+11 3.6745000000e-01 3.8076800000e+03 3.6711000000e-01 + 8 Iter0_Sample078 78 1.2975800000e+11 3.7013000000e-01 3.9793300000e+03 3.8163000000e-01 + 8 Iter0_Sample079 79 1.1261000000e+11 3.6937000000e-01 5.2188700000e+03 3.7177000000e-01 + 8 Iter0_Sample080 80 1.2002300000e+11 3.7051000000e-01 6.2452400000e+03 3.8377000000e-01 + 8 Iter0_Sample081 81 1.0298600000e+11 4.2768000000e-01 5.3054000000e+03 1.1654000000e-01 + 8 Iter0_Sample082 82 1.1873100000e+11 4.0919000000e-01 2.5606100000e+03 1.3273000000e-01 + 8 Iter0_Sample083 83 1.3371000000e+11 3.3686000000e-01 5.8486900000e+03 3.6575000000e-01 + 8 Iter0_Sample084 84 1.1875100000e+11 3.9844000000e-01 6.9035700000e+03 2.2862000000e-01 + 8 Iter0_Sample085 85 1.2569800000e+11 3.9730000000e-01 4.8081100000e+03 3.1635000000e-01 + 8 Iter0_Sample086 86 1.0347100000e+11 4.1365000000e-01 9.3982500000e+03 2.2396000000e-01 + 8 Iter0_Sample087 87 1.2359900000e+11 3.9342000000e-01 7.2477200000e+03 1.1676000000e-01 + 8 Iter0_Sample088 88 1.2449700000e+11 3.9110000000e-01 6.4042400000e+03 2.7586000000e-01 + 8 Iter0_Sample089 89 1.1324900000e+11 3.8959000000e-01 8.1287500000e+03 1.5878000000e-01 + 8 Iter0_Sample090 90 1.2246200000e+11 3.7618000000e-01 7.8201100000e+03 2.1727000000e-01 + 8 Iter0_Sample091 91 1.1334500000e+11 3.8846000000e-01 8.4392600000e+03 1.1385000000e-01 + 8 Iter0_Sample092 92 1.3605300000e+11 3.6683000000e-01 3.0266800000e+03 3.5336000000e-01 + 8 Iter0_Sample093 93 1.3731000000e+11 3.6018000000e-01 2.4675500000e+03 3.8306000000e-01 + 8 Iter0_Sample094 94 1.3351700000e+11 3.3349000000e-01 6.4364500000e+03 3.4931000000e-01 + 8 Iter0_Sample095 95 1.3547100000e+11 3.5207000000e-01 4.1732800000e+03 2.1557000000e-01 + 8 Iter0_Sample096 96 1.4837700000e+11 3.8173000000e-01 1.5496100000e+03 2.4523000000e-01 + 8 Iter0_Sample097 97 1.3780900000e+11 4.2949000000e-01 -4.7077900000e+02 2.8044000000e-01 + 8 Iter0_Sample098 98 1.3288200000e+11 3.7690000000e-01 3.6739200000e+03 2.9670000000e-01 + 8 Iter0_Sample099 99 1.4526000000e+11 3.7741000000e-01 2.3567300000e+03 2.9744000000e-01 diff --git a/tests/data/oedo_sim_data/iter2/smcTable2.txt b/tests/data/oedo_sim_data/iter2/smcTable2.txt index f0bc99a..a1c0112 100644 --- a/tests/data/oedo_sim_data/iter2/smcTable2.txt +++ b/tests/data/oedo_sim_data/iter2/smcTable2.txt @@ -1,101 +1,101 @@ -!OMP_NUM_THREADS description key E mu k_r mu_r - 8 Iter0-Sample000 0 1.3663100000e+11 3.6195000000e-01 2.4713900000e+03 3.8153000000e-01 - 8 Iter0-Sample001 1 1.3751500000e+11 3.6304000000e-01 2.5488600000e+03 3.7756000000e-01 - 8 Iter0-Sample002 2 1.3708400000e+11 3.5379000000e-01 2.3982400000e+03 3.8803000000e-01 - 8 Iter0-Sample003 3 1.3679400000e+11 3.6025000000e-01 2.6018000000e+03 3.8199000000e-01 - 8 Iter0-Sample004 4 1.3776100000e+11 3.6037000000e-01 2.5060600000e+03 3.8891000000e-01 - 8 Iter0-Sample005 5 1.3795900000e+11 3.6127000000e-01 2.5049600000e+03 3.7676000000e-01 - 8 Iter0-Sample006 6 1.3717900000e+11 3.6070000000e-01 2.2977800000e+03 3.9529000000e-01 - 8 Iter0-Sample007 7 1.3694000000e+11 3.5851000000e-01 2.2762400000e+03 3.8454000000e-01 - 8 Iter0-Sample008 8 1.3809700000e+11 3.6166000000e-01 2.3436400000e+03 3.8068000000e-01 - 8 Iter0-Sample009 9 1.3702000000e+11 3.5901000000e-01 2.3086600000e+03 3.8902000000e-01 - 8 Iter0-Sample010 10 1.3714600000e+11 3.5562000000e-01 2.5860000000e+03 3.9154000000e-01 - 8 Iter0-Sample011 11 1.3735400000e+11 3.6158000000e-01 2.6199700000e+03 3.8375000000e-01 - 8 Iter0-Sample012 12 1.3679200000e+11 3.6037000000e-01 2.3695700000e+03 3.6961000000e-01 - 8 Iter0-Sample013 13 1.3702200000e+11 3.6055000000e-01 2.3549900000e+03 3.8728000000e-01 - 8 Iter0-Sample014 14 1.3648000000e+11 3.6095000000e-01 2.5366500000e+03 3.7742000000e-01 - 8 Iter0-Sample015 15 1.3715800000e+11 3.6046000000e-01 2.4703500000e+03 3.6632000000e-01 - 8 Iter0-Sample016 16 1.3820300000e+11 3.5634000000e-01 2.4819200000e+03 3.9801000000e-01 - 8 Iter0-Sample017 17 1.3699300000e+11 3.5988000000e-01 2.5139600000e+03 3.8485000000e-01 - 8 Iter0-Sample018 18 1.3771400000e+11 3.6098000000e-01 2.5544500000e+03 3.7251000000e-01 - 8 Iter0-Sample019 19 1.3759000000e+11 3.5742000000e-01 2.4347500000e+03 3.7579000000e-01 - 8 Iter0-Sample020 20 1.3721900000e+11 3.5843000000e-01 2.5082100000e+03 3.8772000000e-01 - 8 Iter0-Sample021 21 1.3711100000e+11 3.5914000000e-01 2.3025700000e+03 3.9783000000e-01 - 8 Iter0-Sample022 22 1.3775700000e+11 3.5542000000e-01 2.3513200000e+03 3.9329000000e-01 - 8 Iter0-Sample023 23 1.3746000000e+11 3.5738000000e-01 2.4114600000e+03 3.6450000000e-01 - 8 Iter0-Sample024 24 1.3743500000e+11 3.6472000000e-01 2.6545500000e+03 3.7597000000e-01 - 8 Iter0-Sample025 25 1.3767500000e+11 3.5783000000e-01 2.3558700000e+03 3.8282000000e-01 - 8 Iter0-Sample026 26 1.3720300000e+11 3.6118000000e-01 2.5420700000e+03 3.8742000000e-01 - 8 Iter0-Sample027 27 1.3797600000e+11 3.6090000000e-01 2.4844900000e+03 3.8387000000e-01 - 8 Iter0-Sample028 28 1.3750500000e+11 3.6292000000e-01 2.7351000000e+03 3.7731000000e-01 - 8 Iter0-Sample029 29 1.3729500000e+11 3.6485000000e-01 2.6142700000e+03 3.9236000000e-01 - 8 Iter0-Sample030 30 1.2368600000e+11 4.8979000000e-01 1.1407900000e+03 5.1599000000e-01 - 8 Iter0-Sample031 31 1.1904000000e+11 4.7484000000e-01 4.2838200000e+02 4.4457000000e-01 - 8 Iter0-Sample032 32 1.2381000000e+11 5.0157000000e-01 9.1987400000e+02 4.5753000000e-01 - 8 Iter0-Sample033 33 1.2222100000e+11 4.8396000000e-01 7.8394700000e+02 4.9585000000e-01 - 8 Iter0-Sample034 34 1.1751900000e+11 4.6828000000e-01 1.0953100000e+03 4.9402000000e-01 - 8 Iter0-Sample035 35 1.1914200000e+11 4.9755000000e-01 8.9425200000e+02 4.7292000000e-01 - 8 Iter0-Sample036 36 1.2224700000e+11 4.7117000000e-01 1.9736700000e+02 4.5082000000e-01 - 8 Iter0-Sample037 37 1.2077900000e+11 4.6968000000e-01 8.2621100000e+02 4.8596000000e-01 - 8 Iter0-Sample038 38 1.4889000000e+11 3.8236000000e-01 1.5942100000e+03 2.4673000000e-01 - 8 Iter0-Sample039 39 1.4990800000e+11 3.8312000000e-01 1.5011000000e+03 2.5320000000e-01 - 8 Iter0-Sample040 40 1.4932300000e+11 3.8680000000e-01 1.3995100000e+03 2.2056000000e-01 - 8 Iter0-Sample041 41 1.4894000000e+11 3.8065000000e-01 1.5910100000e+03 2.4389000000e-01 - 8 Iter0-Sample042 42 1.5007100000e+11 3.8005000000e-01 1.9980500000e+03 2.4236000000e-01 - 8 Iter0-Sample043 43 1.4911200000e+11 3.8867000000e-01 1.4850900000e+03 2.4811000000e-01 - 8 Iter0-Sample044 44 1.4773700000e+11 3.8129000000e-01 1.5507600000e+03 2.3445000000e-01 - 8 Iter0-Sample045 45 1.4839100000e+11 3.7846000000e-01 1.7448600000e+03 2.3800000000e-01 - 8 Iter0-Sample046 46 1.4848000000e+11 3.7478000000e-01 1.3016200000e+03 2.5451000000e-01 - 8 Iter0-Sample047 47 1.5109500000e+11 3.8153000000e-01 1.3318400000e+03 2.4036000000e-01 - 8 Iter0-Sample048 48 1.4980400000e+11 3.8534000000e-01 1.5993600000e+03 2.4414000000e-01 - 8 Iter0-Sample049 49 1.4834800000e+11 3.7796000000e-01 1.3689600000e+03 2.4391000000e-01 - 8 Iter0-Sample050 50 1.4880900000e+11 3.7842000000e-01 1.6918800000e+03 2.5123000000e-01 - 8 Iter0-Sample051 51 1.5024500000e+11 3.8055000000e-01 1.5915900000e+03 2.4166000000e-01 - 8 Iter0-Sample052 52 1.4840800000e+11 3.7875000000e-01 1.8337100000e+03 2.5303000000e-01 - 8 Iter0-Sample053 53 1.4852400000e+11 3.8004000000e-01 1.6497100000e+03 2.3691000000e-01 - 8 Iter0-Sample054 54 1.4936300000e+11 3.8219000000e-01 1.6718200000e+03 2.4667000000e-01 - 8 Iter0-Sample055 55 1.2999900000e+11 3.7966000000e-01 2.0726600000e+03 1.5221000000e-01 - 8 Iter0-Sample056 56 1.3039600000e+11 3.6772000000e-01 1.9718200000e+03 1.0318000000e-01 - 8 Iter0-Sample057 57 1.3070800000e+11 3.9204000000e-01 2.4246600000e+03 1.2519000000e-01 - 8 Iter0-Sample058 58 1.3202400000e+11 3.7489000000e-01 2.4033200000e+03 1.1640000000e-01 - 8 Iter0-Sample059 59 1.2957200000e+11 3.7549000000e-01 2.1462500000e+03 1.1257000000e-01 - 8 Iter0-Sample060 60 1.2835200000e+11 3.8000000000e-01 2.1579600000e+03 2.0189000000e-01 - 8 Iter0-Sample061 61 1.2876300000e+11 3.8273000000e-01 2.3770800000e+03 1.2951000000e-01 - 8 Iter0-Sample062 62 1.4128800000e+11 3.6728000000e-01 2.5407900000e+03 2.6195000000e-01 - 8 Iter0-Sample063 63 1.2408300000e+11 3.9998000000e-01 3.3054100000e+03 1.8260000000e-01 - 8 Iter0-Sample064 64 1.2014400000e+11 3.9967000000e-01 2.8600200000e+03 1.4969000000e-01 - 8 Iter0-Sample065 65 1.1780200000e+11 4.0011000000e-01 3.1261000000e+03 1.2866000000e-01 - 8 Iter0-Sample066 66 1.1877200000e+11 3.8704000000e-01 3.0919400000e+03 1.0913000000e-01 - 8 Iter0-Sample067 67 1.1978900000e+11 4.1792000000e-01 2.6025900000e+03 1.5932000000e-01 - 8 Iter0-Sample068 68 1.2629700000e+11 3.7017000000e-01 3.4877800000e+03 3.8726000000e-01 - 8 Iter0-Sample069 69 1.2835000000e+11 3.7412000000e-01 3.5351500000e+03 4.7086000000e-01 - 8 Iter0-Sample070 70 1.3775800000e+11 3.5333000000e-01 4.1984300000e+03 2.1957000000e-01 - 8 Iter0-Sample071 71 1.3500100000e+11 3.5581000000e-01 4.4740900000e+03 2.7618000000e-01 - 8 Iter0-Sample072 72 1.3686200000e+11 3.5157000000e-01 4.6365900000e+03 2.2418000000e-01 - 8 Iter0-Sample073 73 1.3440100000e+11 3.6467000000e-01 4.2343000000e+03 2.2536000000e-01 - 8 Iter0-Sample074 74 1.3759700000e+11 3.6760000000e-01 4.3301900000e+03 1.8687000000e-01 - 8 Iter0-Sample075 75 1.3716200000e+11 3.6947000000e-01 2.9764100000e+03 3.3940000000e-01 - 8 Iter0-Sample076 76 1.3588800000e+11 3.6268000000e-01 3.2038700000e+03 3.0735000000e-01 - 8 Iter0-Sample077 77 1.3586600000e+11 3.6302000000e-01 3.2802900000e+03 3.1328000000e-01 - 8 Iter0-Sample078 78 1.3663600000e+11 3.7237000000e-01 2.9772500000e+03 3.5555000000e-01 - 8 Iter0-Sample079 79 1.3647900000e+11 3.6812000000e-01 2.4388400000e+03 3.3241000000e-01 - 8 Iter0-Sample080 80 1.3733400000e+11 3.6714000000e-01 3.2390500000e+03 3.6887000000e-01 - 8 Iter0-Sample081 81 1.3640200000e+11 3.6112000000e-01 3.1456100000e+03 3.3177000000e-01 - 8 Iter0-Sample082 82 1.3726500000e+11 3.7113000000e-01 3.3884000000e+03 3.0687000000e-01 - 8 Iter0-Sample083 83 1.3764000000e+11 4.2598000000e-01 7.3458700000e+02 2.8411000000e-01 - 8 Iter0-Sample084 84 1.3935000000e+11 4.3454000000e-01 1.0194900000e+02 2.9757000000e-01 - 8 Iter0-Sample085 85 1.3926000000e+11 4.4127000000e-01 1.1742400000e+03 2.8118000000e-01 - 8 Iter0-Sample086 86 1.3770400000e+11 4.1569000000e-01 9.2177900000e+02 3.0581000000e-01 - 8 Iter0-Sample087 87 1.3946600000e+11 4.2380000000e-01 -5.0557900000e+01 2.7215000000e-01 - 8 Iter0-Sample088 88 1.3246800000e+11 3.1140000000e-01 7.6240300000e+03 9.1310000000e-02 - 8 Iter0-Sample089 89 1.3092500000e+11 3.2012000000e-01 7.5701000000e+03 1.1550000000e-01 - 8 Iter0-Sample090 90 1.2851300000e+11 3.2373000000e-01 8.8880500000e+03 9.3370000000e-02 - 8 Iter0-Sample091 91 1.3073300000e+11 3.1226000000e-01 8.4208100000e+03 1.0184000000e-01 - 8 Iter0-Sample092 92 1.2557700000e+11 3.8239000000e-01 3.2579100000e+03 3.0887000000e-01 - 8 Iter0-Sample093 93 1.3588100000e+11 3.9315000000e-01 2.2339100000e+03 2.8966000000e-01 - 8 Iter0-Sample094 94 1.3778800000e+11 3.8254000000e-01 3.4727700000e+03 2.4251000000e-01 - 8 Iter0-Sample095 95 1.3755500000e+11 3.2590000000e-01 3.3265400000e+03 1.6215000000e-01 - 8 Iter0-Sample096 96 1.3619800000e+11 3.3650000000e-01 4.7055500000e+03 1.4950000000e-01 - 8 Iter0-Sample097 97 1.3523700000e+11 3.4823000000e-01 4.2223300000e+03 1.6422000000e-01 - 8 Iter0-Sample098 98 1.4409400000e+11 3.3812000000e-01 4.2253700000e+03 1.0952000000e-01 - 8 Iter0-Sample099 99 1.3706200000e+11 3.5095000000e-01 4.2838200000e+03 1.9530000000e-01 +!OMP_NUM_THREADS description key E mu k_r mu_r + 8 Iter0_Sample000 0 1.3663100000e+11 3.6195000000e-01 2.4713900000e+03 3.8153000000e-01 + 8 Iter0_Sample001 1 1.3751500000e+11 3.6304000000e-01 2.5488600000e+03 3.7756000000e-01 + 8 Iter0_Sample002 2 1.3708400000e+11 3.5379000000e-01 2.3982400000e+03 3.8803000000e-01 + 8 Iter0_Sample003 3 1.3679400000e+11 3.6025000000e-01 2.6018000000e+03 3.8199000000e-01 + 8 Iter0_Sample004 4 1.3776100000e+11 3.6037000000e-01 2.5060600000e+03 3.8891000000e-01 + 8 Iter0_Sample005 5 1.3795900000e+11 3.6127000000e-01 2.5049600000e+03 3.7676000000e-01 + 8 Iter0_Sample006 6 1.3717900000e+11 3.6070000000e-01 2.2977800000e+03 3.9529000000e-01 + 8 Iter0_Sample007 7 1.3694000000e+11 3.5851000000e-01 2.2762400000e+03 3.8454000000e-01 + 8 Iter0_Sample008 8 1.3809700000e+11 3.6166000000e-01 2.3436400000e+03 3.8068000000e-01 + 8 Iter0_Sample009 9 1.3702000000e+11 3.5901000000e-01 2.3086600000e+03 3.8902000000e-01 + 8 Iter0_Sample010 10 1.3714600000e+11 3.5562000000e-01 2.5860000000e+03 3.9154000000e-01 + 8 Iter0_Sample011 11 1.3735400000e+11 3.6158000000e-01 2.6199700000e+03 3.8375000000e-01 + 8 Iter0_Sample012 12 1.3679200000e+11 3.6037000000e-01 2.3695700000e+03 3.6961000000e-01 + 8 Iter0_Sample013 13 1.3702200000e+11 3.6055000000e-01 2.3549900000e+03 3.8728000000e-01 + 8 Iter0_Sample014 14 1.3648000000e+11 3.6095000000e-01 2.5366500000e+03 3.7742000000e-01 + 8 Iter0_Sample015 15 1.3715800000e+11 3.6046000000e-01 2.4703500000e+03 3.6632000000e-01 + 8 Iter0_Sample016 16 1.3820300000e+11 3.5634000000e-01 2.4819200000e+03 3.9801000000e-01 + 8 Iter0_Sample017 17 1.3699300000e+11 3.5988000000e-01 2.5139600000e+03 3.8485000000e-01 + 8 Iter0_Sample018 18 1.3771400000e+11 3.6098000000e-01 2.5544500000e+03 3.7251000000e-01 + 8 Iter0_Sample019 19 1.3759000000e+11 3.5742000000e-01 2.4347500000e+03 3.7579000000e-01 + 8 Iter0_Sample020 20 1.3721900000e+11 3.5843000000e-01 2.5082100000e+03 3.8772000000e-01 + 8 Iter0_Sample021 21 1.3711100000e+11 3.5914000000e-01 2.3025700000e+03 3.9783000000e-01 + 8 Iter0_Sample022 22 1.3775700000e+11 3.5542000000e-01 2.3513200000e+03 3.9329000000e-01 + 8 Iter0_Sample023 23 1.3746000000e+11 3.5738000000e-01 2.4114600000e+03 3.6450000000e-01 + 8 Iter0_Sample024 24 1.3743500000e+11 3.6472000000e-01 2.6545500000e+03 3.7597000000e-01 + 8 Iter0_Sample025 25 1.3767500000e+11 3.5783000000e-01 2.3558700000e+03 3.8282000000e-01 + 8 Iter0_Sample026 26 1.3720300000e+11 3.6118000000e-01 2.5420700000e+03 3.8742000000e-01 + 8 Iter0_Sample027 27 1.3797600000e+11 3.6090000000e-01 2.4844900000e+03 3.8387000000e-01 + 8 Iter0_Sample028 28 1.3750500000e+11 3.6292000000e-01 2.7351000000e+03 3.7731000000e-01 + 8 Iter0_Sample029 29 1.3729500000e+11 3.6485000000e-01 2.6142700000e+03 3.9236000000e-01 + 8 Iter0_Sample030 30 1.2368600000e+11 4.8979000000e-01 1.1407900000e+03 5.1599000000e-01 + 8 Iter0_Sample031 31 1.1904000000e+11 4.7484000000e-01 4.2838200000e+02 4.4457000000e-01 + 8 Iter0_Sample032 32 1.2381000000e+11 5.0157000000e-01 9.1987400000e+02 4.5753000000e-01 + 8 Iter0_Sample033 33 1.2222100000e+11 4.8396000000e-01 7.8394700000e+02 4.9585000000e-01 + 8 Iter0_Sample034 34 1.1751900000e+11 4.6828000000e-01 1.0953100000e+03 4.9402000000e-01 + 8 Iter0_Sample035 35 1.1914200000e+11 4.9755000000e-01 8.9425200000e+02 4.7292000000e-01 + 8 Iter0_Sample036 36 1.2224700000e+11 4.7117000000e-01 1.9736700000e+02 4.5082000000e-01 + 8 Iter0_Sample037 37 1.2077900000e+11 4.6968000000e-01 8.2621100000e+02 4.8596000000e-01 + 8 Iter0_Sample038 38 1.4889000000e+11 3.8236000000e-01 1.5942100000e+03 2.4673000000e-01 + 8 Iter0_Sample039 39 1.4990800000e+11 3.8312000000e-01 1.5011000000e+03 2.5320000000e-01 + 8 Iter0_Sample040 40 1.4932300000e+11 3.8680000000e-01 1.3995100000e+03 2.2056000000e-01 + 8 Iter0_Sample041 41 1.4894000000e+11 3.8065000000e-01 1.5910100000e+03 2.4389000000e-01 + 8 Iter0_Sample042 42 1.5007100000e+11 3.8005000000e-01 1.9980500000e+03 2.4236000000e-01 + 8 Iter0_Sample043 43 1.4911200000e+11 3.8867000000e-01 1.4850900000e+03 2.4811000000e-01 + 8 Iter0_Sample044 44 1.4773700000e+11 3.8129000000e-01 1.5507600000e+03 2.3445000000e-01 + 8 Iter0_Sample045 45 1.4839100000e+11 3.7846000000e-01 1.7448600000e+03 2.3800000000e-01 + 8 Iter0_Sample046 46 1.4848000000e+11 3.7478000000e-01 1.3016200000e+03 2.5451000000e-01 + 8 Iter0_Sample047 47 1.5109500000e+11 3.8153000000e-01 1.3318400000e+03 2.4036000000e-01 + 8 Iter0_Sample048 48 1.4980400000e+11 3.8534000000e-01 1.5993600000e+03 2.4414000000e-01 + 8 Iter0_Sample049 49 1.4834800000e+11 3.7796000000e-01 1.3689600000e+03 2.4391000000e-01 + 8 Iter0_Sample050 50 1.4880900000e+11 3.7842000000e-01 1.6918800000e+03 2.5123000000e-01 + 8 Iter0_Sample051 51 1.5024500000e+11 3.8055000000e-01 1.5915900000e+03 2.4166000000e-01 + 8 Iter0_Sample052 52 1.4840800000e+11 3.7875000000e-01 1.8337100000e+03 2.5303000000e-01 + 8 Iter0_Sample053 53 1.4852400000e+11 3.8004000000e-01 1.6497100000e+03 2.3691000000e-01 + 8 Iter0_Sample054 54 1.4936300000e+11 3.8219000000e-01 1.6718200000e+03 2.4667000000e-01 + 8 Iter0_Sample055 55 1.2999900000e+11 3.7966000000e-01 2.0726600000e+03 1.5221000000e-01 + 8 Iter0_Sample056 56 1.3039600000e+11 3.6772000000e-01 1.9718200000e+03 1.0318000000e-01 + 8 Iter0_Sample057 57 1.3070800000e+11 3.9204000000e-01 2.4246600000e+03 1.2519000000e-01 + 8 Iter0_Sample058 58 1.3202400000e+11 3.7489000000e-01 2.4033200000e+03 1.1640000000e-01 + 8 Iter0_Sample059 59 1.2957200000e+11 3.7549000000e-01 2.1462500000e+03 1.1257000000e-01 + 8 Iter0_Sample060 60 1.2835200000e+11 3.8000000000e-01 2.1579600000e+03 2.0189000000e-01 + 8 Iter0_Sample061 61 1.2876300000e+11 3.8273000000e-01 2.3770800000e+03 1.2951000000e-01 + 8 Iter0_Sample062 62 1.4128800000e+11 3.6728000000e-01 2.5407900000e+03 2.6195000000e-01 + 8 Iter0_Sample063 63 1.2408300000e+11 3.9998000000e-01 3.3054100000e+03 1.8260000000e-01 + 8 Iter0_Sample064 64 1.2014400000e+11 3.9967000000e-01 2.8600200000e+03 1.4969000000e-01 + 8 Iter0_Sample065 65 1.1780200000e+11 4.0011000000e-01 3.1261000000e+03 1.2866000000e-01 + 8 Iter0_Sample066 66 1.1877200000e+11 3.8704000000e-01 3.0919400000e+03 1.0913000000e-01 + 8 Iter0_Sample067 67 1.1978900000e+11 4.1792000000e-01 2.6025900000e+03 1.5932000000e-01 + 8 Iter0_Sample068 68 1.2629700000e+11 3.7017000000e-01 3.4877800000e+03 3.8726000000e-01 + 8 Iter0_Sample069 69 1.2835000000e+11 3.7412000000e-01 3.5351500000e+03 4.7086000000e-01 + 8 Iter0_Sample070 70 1.3775800000e+11 3.5333000000e-01 4.1984300000e+03 2.1957000000e-01 + 8 Iter0_Sample071 71 1.3500100000e+11 3.5581000000e-01 4.4740900000e+03 2.7618000000e-01 + 8 Iter0_Sample072 72 1.3686200000e+11 3.5157000000e-01 4.6365900000e+03 2.2418000000e-01 + 8 Iter0_Sample073 73 1.3440100000e+11 3.6467000000e-01 4.2343000000e+03 2.2536000000e-01 + 8 Iter0_Sample074 74 1.3759700000e+11 3.6760000000e-01 4.3301900000e+03 1.8687000000e-01 + 8 Iter0_Sample075 75 1.3716200000e+11 3.6947000000e-01 2.9764100000e+03 3.3940000000e-01 + 8 Iter0_Sample076 76 1.3588800000e+11 3.6268000000e-01 3.2038700000e+03 3.0735000000e-01 + 8 Iter0_Sample077 77 1.3586600000e+11 3.6302000000e-01 3.2802900000e+03 3.1328000000e-01 + 8 Iter0_Sample078 78 1.3663600000e+11 3.7237000000e-01 2.9772500000e+03 3.5555000000e-01 + 8 Iter0_Sample079 79 1.3647900000e+11 3.6812000000e-01 2.4388400000e+03 3.3241000000e-01 + 8 Iter0_Sample080 80 1.3733400000e+11 3.6714000000e-01 3.2390500000e+03 3.6887000000e-01 + 8 Iter0_Sample081 81 1.3640200000e+11 3.6112000000e-01 3.1456100000e+03 3.3177000000e-01 + 8 Iter0_Sample082 82 1.3726500000e+11 3.7113000000e-01 3.3884000000e+03 3.0687000000e-01 + 8 Iter0_Sample083 83 1.3764000000e+11 4.2598000000e-01 7.3458700000e+02 2.8411000000e-01 + 8 Iter0_Sample084 84 1.3935000000e+11 4.3454000000e-01 1.0194900000e+02 2.9757000000e-01 + 8 Iter0_Sample085 85 1.3926000000e+11 4.4127000000e-01 1.1742400000e+03 2.8118000000e-01 + 8 Iter0_Sample086 86 1.3770400000e+11 4.1569000000e-01 9.2177900000e+02 3.0581000000e-01 + 8 Iter0_Sample087 87 1.3946600000e+11 4.2380000000e-01 -5.0557900000e+01 2.7215000000e-01 + 8 Iter0_Sample088 88 1.3246800000e+11 3.1140000000e-01 7.6240300000e+03 9.1310000000e-02 + 8 Iter0_Sample089 89 1.3092500000e+11 3.2012000000e-01 7.5701000000e+03 1.1550000000e-01 + 8 Iter0_Sample090 90 1.2851300000e+11 3.2373000000e-01 8.8880500000e+03 9.3370000000e-02 + 8 Iter0_Sample091 91 1.3073300000e+11 3.1226000000e-01 8.4208100000e+03 1.0184000000e-01 + 8 Iter0_Sample092 92 1.2557700000e+11 3.8239000000e-01 3.2579100000e+03 3.0887000000e-01 + 8 Iter0_Sample093 93 1.3588100000e+11 3.9315000000e-01 2.2339100000e+03 2.8966000000e-01 + 8 Iter0_Sample094 94 1.3778800000e+11 3.8254000000e-01 3.4727700000e+03 2.4251000000e-01 + 8 Iter0_Sample095 95 1.3755500000e+11 3.2590000000e-01 3.3265400000e+03 1.6215000000e-01 + 8 Iter0_Sample096 96 1.3619800000e+11 3.3650000000e-01 4.7055500000e+03 1.4950000000e-01 + 8 Iter0_Sample097 97 1.3523700000e+11 3.4823000000e-01 4.2223300000e+03 1.6422000000e-01 + 8 Iter0_Sample098 98 1.4409400000e+11 3.3812000000e-01 4.2253700000e+03 1.0952000000e-01 + 8 Iter0_Sample099 99 1.3706200000e+11 3.5095000000e-01 4.2838200000e+03 1.9530000000e-01 diff --git a/tests/data/oedo_sim_data/iter3/smcTable3.txt b/tests/data/oedo_sim_data/iter3/smcTable3.txt index 8439bcf..7853c65 100644 --- a/tests/data/oedo_sim_data/iter3/smcTable3.txt +++ b/tests/data/oedo_sim_data/iter3/smcTable3.txt @@ -1,101 +1,101 @@ -!OMP_NUM_THREADS description key E mu k_r mu_r - 8 Iter0-Sample000 0 1.3760800000e+11 3.4953000000e-01 4.7527700000e+03 2.3180000000e-01 - 8 Iter0-Sample001 1 1.1984100000e+11 4.0053000000e-01 2.6437800000e+03 1.0170000000e-01 - 8 Iter0-Sample002 2 1.1681300000e+11 4.0402000000e-01 2.9927600000e+03 1.3181000000e-01 - 8 Iter0-Sample003 3 1.1770900000e+11 4.0526000000e-01 3.0725800000e+03 1.2576000000e-01 - 8 Iter0-Sample004 4 1.1545300000e+11 3.9996000000e-01 3.3748000000e+03 1.2888000000e-01 - 8 Iter0-Sample005 5 1.1806600000e+11 3.9290000000e-01 2.9623900000e+03 1.3524000000e-01 - 8 Iter0-Sample006 6 1.1730900000e+11 3.9392000000e-01 3.1189400000e+03 1.2663000000e-01 - 8 Iter0-Sample007 7 1.1578400000e+11 4.0092000000e-01 2.9645500000e+03 1.3450000000e-01 - 8 Iter0-Sample008 8 1.1690800000e+11 4.0722000000e-01 3.2763900000e+03 1.3936000000e-01 - 8 Iter0-Sample009 9 1.1790800000e+11 4.0541000000e-01 3.0225700000e+03 1.1707000000e-01 - 8 Iter0-Sample010 10 1.1871100000e+11 3.9532000000e-01 2.8793200000e+03 1.3086000000e-01 - 8 Iter0-Sample011 11 1.1513300000e+11 3.9724000000e-01 3.2400400000e+03 1.3030000000e-01 - 8 Iter0-Sample012 12 1.1697700000e+11 4.0530000000e-01 3.1984900000e+03 1.2741000000e-01 - 8 Iter0-Sample013 13 1.1763200000e+11 4.0105000000e-01 3.1270400000e+03 1.3488000000e-01 - 8 Iter0-Sample014 14 1.2160300000e+11 3.9654000000e-01 2.8563200000e+03 1.7184000000e-01 - 8 Iter0-Sample015 15 1.1645700000e+11 4.0077000000e-01 3.0418800000e+03 1.4006000000e-01 - 8 Iter0-Sample016 16 1.1826100000e+11 3.9859000000e-01 3.2315500000e+03 1.9624000000e-01 - 8 Iter0-Sample017 17 1.2044400000e+11 3.9838000000e-01 3.0504900000e+03 1.7946000000e-01 - 8 Iter0-Sample018 18 1.1855400000e+11 3.9766000000e-01 3.1875700000e+03 1.5369000000e-01 - 8 Iter0-Sample019 19 1.2993500000e+11 3.2075000000e-01 7.3449800000e+03 9.4290000000e-02 - 8 Iter0-Sample020 20 1.3140000000e+11 3.2599000000e-01 6.8463100000e+03 1.4746000000e-01 - 8 Iter0-Sample021 21 1.3154700000e+11 3.3064000000e-01 8.7804500000e+03 8.6790000000e-02 - 8 Iter0-Sample022 22 1.2715700000e+11 3.2492000000e-01 7.8636700000e+03 8.0910000000e-02 - 8 Iter0-Sample023 23 1.3019900000e+11 3.1586000000e-01 8.7588000000e+03 7.5210000000e-02 - 8 Iter0-Sample024 24 1.2768900000e+11 3.2760000000e-01 9.2129100000e+03 8.6660000000e-02 - 8 Iter0-Sample025 25 1.2820300000e+11 3.1805000000e-01 9.9591700000e+03 1.0407000000e-01 - 8 Iter0-Sample026 26 1.3000800000e+11 3.1686000000e-01 8.9728600000e+03 1.0504000000e-01 - 8 Iter0-Sample027 27 1.2856000000e+11 3.2192000000e-01 8.0073800000e+03 5.9490000000e-02 - 8 Iter0-Sample028 28 1.3688100000e+11 3.5996000000e-01 2.6027600000e+03 3.9639000000e-01 - 8 Iter0-Sample029 29 1.3727300000e+11 3.6644000000e-01 2.4992800000e+03 3.7693000000e-01 - 8 Iter0-Sample030 30 1.3663400000e+11 3.5622000000e-01 2.3642500000e+03 3.8998000000e-01 - 8 Iter0-Sample031 31 1.3718200000e+11 3.6025000000e-01 2.4710400000e+03 3.8098000000e-01 - 8 Iter0-Sample032 32 1.3705300000e+11 3.5859000000e-01 2.6318800000e+03 3.8127000000e-01 - 8 Iter0-Sample033 33 1.3688900000e+11 3.6193000000e-01 2.5094200000e+03 3.8733000000e-01 - 8 Iter0-Sample034 34 1.3655900000e+11 3.6085000000e-01 2.7596500000e+03 3.7338000000e-01 - 8 Iter0-Sample035 35 1.3767300000e+11 3.6497000000e-01 2.7894400000e+03 3.8499000000e-01 - 8 Iter0-Sample036 36 1.3714500000e+11 3.6126000000e-01 2.4113200000e+03 3.8134000000e-01 - 8 Iter0-Sample037 37 1.3753500000e+11 3.6090000000e-01 2.6249800000e+03 3.9230000000e-01 - 8 Iter0-Sample038 38 1.3700200000e+11 3.6019000000e-01 2.5984300000e+03 3.6891000000e-01 - 8 Iter0-Sample039 39 1.3701800000e+11 3.5814000000e-01 2.4149600000e+03 3.8255000000e-01 - 8 Iter0-Sample040 40 1.3614800000e+11 3.6026000000e-01 2.5733100000e+03 3.8948000000e-01 - 8 Iter0-Sample041 41 1.3677600000e+11 3.5952000000e-01 2.4451400000e+03 4.0030000000e-01 - 8 Iter0-Sample042 42 1.3718300000e+11 3.6450000000e-01 2.4587200000e+03 3.7572000000e-01 - 8 Iter0-Sample043 43 1.3727100000e+11 3.5557000000e-01 2.5099400000e+03 3.8633000000e-01 - 8 Iter0-Sample044 44 1.3685400000e+11 3.6230000000e-01 2.4838100000e+03 3.9058000000e-01 - 8 Iter0-Sample045 45 1.3713100000e+11 3.6117000000e-01 2.6467200000e+03 3.8572000000e-01 - 8 Iter0-Sample046 46 1.3749800000e+11 3.6316000000e-01 2.3770600000e+03 3.7721000000e-01 - 8 Iter0-Sample047 47 1.3788500000e+11 3.6205000000e-01 2.4768300000e+03 3.7289000000e-01 - 8 Iter0-Sample048 48 1.3715000000e+11 3.6036000000e-01 2.5846400000e+03 3.8848000000e-01 - 8 Iter0-Sample049 49 1.3735200000e+11 3.5893000000e-01 2.5635300000e+03 3.8043000000e-01 - 8 Iter0-Sample050 50 1.3715300000e+11 3.6022000000e-01 2.7335700000e+03 3.8077000000e-01 - 8 Iter0-Sample051 51 1.3730200000e+11 3.5813000000e-01 2.5615400000e+03 3.7971000000e-01 - 8 Iter0-Sample052 52 1.3677600000e+11 3.6163000000e-01 2.5875900000e+03 3.8696000000e-01 - 8 Iter0-Sample053 53 1.3706000000e+11 3.6288000000e-01 2.5152100000e+03 3.7851000000e-01 - 8 Iter0-Sample054 54 1.3694800000e+11 3.5879000000e-01 2.4625600000e+03 3.7721000000e-01 - 8 Iter0-Sample055 55 1.3726900000e+11 3.5885000000e-01 2.5439300000e+03 3.8580000000e-01 - 8 Iter0-Sample056 56 1.3667600000e+11 3.6127000000e-01 2.6612900000e+03 3.7015000000e-01 - 8 Iter0-Sample057 57 1.3723800000e+11 3.6144000000e-01 2.5713100000e+03 3.8487000000e-01 - 8 Iter0-Sample058 58 1.3683400000e+11 3.6480000000e-01 2.5110000000e+03 3.8746000000e-01 - 8 Iter0-Sample059 59 1.3631400000e+11 3.6015000000e-01 2.6512900000e+03 3.9803000000e-01 - 8 Iter0-Sample060 60 1.3725600000e+11 3.6439000000e-01 2.4724000000e+03 3.7769000000e-01 - 8 Iter0-Sample061 61 1.3709100000e+11 3.5837000000e-01 2.5619700000e+03 3.8409000000e-01 - 8 Iter0-Sample062 62 1.3768100000e+11 3.6189000000e-01 2.4462100000e+03 3.7921000000e-01 - 8 Iter0-Sample063 63 1.3755400000e+11 3.6209000000e-01 2.5595000000e+03 3.7612000000e-01 - 8 Iter0-Sample064 64 1.3710700000e+11 3.5517000000e-01 2.5663200000e+03 3.7473000000e-01 - 8 Iter0-Sample065 65 1.3751800000e+11 3.5981000000e-01 2.5858900000e+03 3.8714000000e-01 - 8 Iter0-Sample066 66 1.3711600000e+11 3.6125000000e-01 2.4178300000e+03 3.7757000000e-01 - 8 Iter0-Sample067 67 1.3717500000e+11 3.5936000000e-01 2.6630500000e+03 3.7315000000e-01 - 8 Iter0-Sample068 68 1.3688900000e+11 3.6344000000e-01 2.5792500000e+03 3.9534000000e-01 - 8 Iter0-Sample069 69 1.3648500000e+11 3.6150000000e-01 2.5274100000e+03 3.8222000000e-01 - 8 Iter0-Sample070 70 1.3731000000e+11 3.6370000000e-01 2.7203200000e+03 3.8148000000e-01 - 8 Iter0-Sample071 71 1.3679500000e+11 3.5899000000e-01 2.5669300000e+03 3.8012000000e-01 - 8 Iter0-Sample072 72 1.3715500000e+11 3.6007000000e-01 2.4984400000e+03 3.7048000000e-01 - 8 Iter0-Sample073 73 1.3742200000e+11 3.5669000000e-01 2.5622500000e+03 3.8780000000e-01 - 8 Iter0-Sample074 74 1.3776800000e+11 3.5918000000e-01 2.6275400000e+03 3.7810000000e-01 - 8 Iter0-Sample075 75 1.3745500000e+11 3.6147000000e-01 2.6628500000e+03 3.7604000000e-01 - 8 Iter0-Sample076 76 1.3775300000e+11 3.5831000000e-01 2.6026800000e+03 3.7795000000e-01 - 8 Iter0-Sample077 77 1.3697800000e+11 3.6131000000e-01 2.5390100000e+03 3.9560000000e-01 - 8 Iter0-Sample078 78 1.3799100000e+11 3.6193000000e-01 2.5426900000e+03 3.7600000000e-01 - 8 Iter0-Sample079 79 1.3764600000e+11 3.5813000000e-01 2.6053400000e+03 3.8257000000e-01 - 8 Iter0-Sample080 80 1.3711600000e+11 3.6372000000e-01 2.5464100000e+03 3.7035000000e-01 - 8 Iter0-Sample081 81 1.3724500000e+11 3.5926000000e-01 2.4665900000e+03 3.9282000000e-01 - 8 Iter0-Sample082 82 1.3716700000e+11 3.5984000000e-01 2.5488500000e+03 3.9183000000e-01 - 8 Iter0-Sample083 83 1.3754200000e+11 3.5992000000e-01 2.4711300000e+03 3.9131000000e-01 - 8 Iter0-Sample084 84 1.3671400000e+11 3.6005000000e-01 2.5732500000e+03 3.8998000000e-01 - 8 Iter0-Sample085 85 1.3692300000e+11 3.5955000000e-01 2.4905100000e+03 3.8252000000e-01 - 8 Iter0-Sample086 86 1.3710700000e+11 3.6296000000e-01 2.5214100000e+03 3.8188000000e-01 - 8 Iter0-Sample087 87 1.3726700000e+11 3.6071000000e-01 2.5746400000e+03 3.8191000000e-01 - 8 Iter0-Sample088 88 1.3776300000e+11 3.6182000000e-01 2.6014600000e+03 3.7644000000e-01 - 8 Iter0-Sample089 89 1.3652800000e+11 3.6311000000e-01 2.4356900000e+03 3.8379000000e-01 - 8 Iter0-Sample090 90 1.3690500000e+11 3.6133000000e-01 2.4406100000e+03 3.6837000000e-01 - 8 Iter0-Sample091 91 1.3730900000e+11 3.5770000000e-01 2.6222800000e+03 3.7997000000e-01 - 8 Iter0-Sample092 92 1.3792700000e+11 3.6459000000e-01 2.4379300000e+03 3.9419000000e-01 - 8 Iter0-Sample093 93 1.3709700000e+11 3.6372000000e-01 2.5478600000e+03 3.9236000000e-01 - 8 Iter0-Sample094 94 1.3741100000e+11 3.6183000000e-01 2.3154000000e+03 3.7990000000e-01 - 8 Iter0-Sample095 95 1.3768000000e+11 3.6135000000e-01 2.5651700000e+03 3.8847000000e-01 - 8 Iter0-Sample096 96 1.3719700000e+11 3.6319000000e-01 2.6221700000e+03 3.9202000000e-01 - 8 Iter0-Sample097 97 1.3745300000e+11 3.5874000000e-01 2.4801600000e+03 3.7414000000e-01 - 8 Iter0-Sample098 98 1.3777000000e+11 3.5941000000e-01 2.4514900000e+03 3.7357000000e-01 - 8 Iter0-Sample099 99 1.3659700000e+11 3.6514000000e-01 2.6390900000e+03 3.8576000000e-01 +!OMP_NUM_THREADS description key E mu k_r mu_r + 8 Iter0_Sample000 0 1.3760800000e+11 3.4953000000e-01 4.7527700000e+03 2.3180000000e-01 + 8 Iter0_Sample001 1 1.1984100000e+11 4.0053000000e-01 2.6437800000e+03 1.0170000000e-01 + 8 Iter0_Sample002 2 1.1681300000e+11 4.0402000000e-01 2.9927600000e+03 1.3181000000e-01 + 8 Iter0_Sample003 3 1.1770900000e+11 4.0526000000e-01 3.0725800000e+03 1.2576000000e-01 + 8 Iter0_Sample004 4 1.1545300000e+11 3.9996000000e-01 3.3748000000e+03 1.2888000000e-01 + 8 Iter0_Sample005 5 1.1806600000e+11 3.9290000000e-01 2.9623900000e+03 1.3524000000e-01 + 8 Iter0_Sample006 6 1.1730900000e+11 3.9392000000e-01 3.1189400000e+03 1.2663000000e-01 + 8 Iter0_Sample007 7 1.1578400000e+11 4.0092000000e-01 2.9645500000e+03 1.3450000000e-01 + 8 Iter0_Sample008 8 1.1690800000e+11 4.0722000000e-01 3.2763900000e+03 1.3936000000e-01 + 8 Iter0_Sample009 9 1.1790800000e+11 4.0541000000e-01 3.0225700000e+03 1.1707000000e-01 + 8 Iter0_Sample010 10 1.1871100000e+11 3.9532000000e-01 2.8793200000e+03 1.3086000000e-01 + 8 Iter0_Sample011 11 1.1513300000e+11 3.9724000000e-01 3.2400400000e+03 1.3030000000e-01 + 8 Iter0_Sample012 12 1.1697700000e+11 4.0530000000e-01 3.1984900000e+03 1.2741000000e-01 + 8 Iter0_Sample013 13 1.1763200000e+11 4.0105000000e-01 3.1270400000e+03 1.3488000000e-01 + 8 Iter0_Sample014 14 1.2160300000e+11 3.9654000000e-01 2.8563200000e+03 1.7184000000e-01 + 8 Iter0_Sample015 15 1.1645700000e+11 4.0077000000e-01 3.0418800000e+03 1.4006000000e-01 + 8 Iter0_Sample016 16 1.1826100000e+11 3.9859000000e-01 3.2315500000e+03 1.9624000000e-01 + 8 Iter0_Sample017 17 1.2044400000e+11 3.9838000000e-01 3.0504900000e+03 1.7946000000e-01 + 8 Iter0_Sample018 18 1.1855400000e+11 3.9766000000e-01 3.1875700000e+03 1.5369000000e-01 + 8 Iter0_Sample019 19 1.2993500000e+11 3.2075000000e-01 7.3449800000e+03 9.4290000000e-02 + 8 Iter0_Sample020 20 1.3140000000e+11 3.2599000000e-01 6.8463100000e+03 1.4746000000e-01 + 8 Iter0_Sample021 21 1.3154700000e+11 3.3064000000e-01 8.7804500000e+03 8.6790000000e-02 + 8 Iter0_Sample022 22 1.2715700000e+11 3.2492000000e-01 7.8636700000e+03 8.0910000000e-02 + 8 Iter0_Sample023 23 1.3019900000e+11 3.1586000000e-01 8.7588000000e+03 7.5210000000e-02 + 8 Iter0_Sample024 24 1.2768900000e+11 3.2760000000e-01 9.2129100000e+03 8.6660000000e-02 + 8 Iter0_Sample025 25 1.2820300000e+11 3.1805000000e-01 9.9591700000e+03 1.0407000000e-01 + 8 Iter0_Sample026 26 1.3000800000e+11 3.1686000000e-01 8.9728600000e+03 1.0504000000e-01 + 8 Iter0_Sample027 27 1.2856000000e+11 3.2192000000e-01 8.0073800000e+03 5.9490000000e-02 + 8 Iter0_Sample028 28 1.3688100000e+11 3.5996000000e-01 2.6027600000e+03 3.9639000000e-01 + 8 Iter0_Sample029 29 1.3727300000e+11 3.6644000000e-01 2.4992800000e+03 3.7693000000e-01 + 8 Iter0_Sample030 30 1.3663400000e+11 3.5622000000e-01 2.3642500000e+03 3.8998000000e-01 + 8 Iter0_Sample031 31 1.3718200000e+11 3.6025000000e-01 2.4710400000e+03 3.8098000000e-01 + 8 Iter0_Sample032 32 1.3705300000e+11 3.5859000000e-01 2.6318800000e+03 3.8127000000e-01 + 8 Iter0_Sample033 33 1.3688900000e+11 3.6193000000e-01 2.5094200000e+03 3.8733000000e-01 + 8 Iter0_Sample034 34 1.3655900000e+11 3.6085000000e-01 2.7596500000e+03 3.7338000000e-01 + 8 Iter0_Sample035 35 1.3767300000e+11 3.6497000000e-01 2.7894400000e+03 3.8499000000e-01 + 8 Iter0_Sample036 36 1.3714500000e+11 3.6126000000e-01 2.4113200000e+03 3.8134000000e-01 + 8 Iter0_Sample037 37 1.3753500000e+11 3.6090000000e-01 2.6249800000e+03 3.9230000000e-01 + 8 Iter0_Sample038 38 1.3700200000e+11 3.6019000000e-01 2.5984300000e+03 3.6891000000e-01 + 8 Iter0_Sample039 39 1.3701800000e+11 3.5814000000e-01 2.4149600000e+03 3.8255000000e-01 + 8 Iter0_Sample040 40 1.3614800000e+11 3.6026000000e-01 2.5733100000e+03 3.8948000000e-01 + 8 Iter0_Sample041 41 1.3677600000e+11 3.5952000000e-01 2.4451400000e+03 4.0030000000e-01 + 8 Iter0_Sample042 42 1.3718300000e+11 3.6450000000e-01 2.4587200000e+03 3.7572000000e-01 + 8 Iter0_Sample043 43 1.3727100000e+11 3.5557000000e-01 2.5099400000e+03 3.8633000000e-01 + 8 Iter0_Sample044 44 1.3685400000e+11 3.6230000000e-01 2.4838100000e+03 3.9058000000e-01 + 8 Iter0_Sample045 45 1.3713100000e+11 3.6117000000e-01 2.6467200000e+03 3.8572000000e-01 + 8 Iter0_Sample046 46 1.3749800000e+11 3.6316000000e-01 2.3770600000e+03 3.7721000000e-01 + 8 Iter0_Sample047 47 1.3788500000e+11 3.6205000000e-01 2.4768300000e+03 3.7289000000e-01 + 8 Iter0_Sample048 48 1.3715000000e+11 3.6036000000e-01 2.5846400000e+03 3.8848000000e-01 + 8 Iter0_Sample049 49 1.3735200000e+11 3.5893000000e-01 2.5635300000e+03 3.8043000000e-01 + 8 Iter0_Sample050 50 1.3715300000e+11 3.6022000000e-01 2.7335700000e+03 3.8077000000e-01 + 8 Iter0_Sample051 51 1.3730200000e+11 3.5813000000e-01 2.5615400000e+03 3.7971000000e-01 + 8 Iter0_Sample052 52 1.3677600000e+11 3.6163000000e-01 2.5875900000e+03 3.8696000000e-01 + 8 Iter0_Sample053 53 1.3706000000e+11 3.6288000000e-01 2.5152100000e+03 3.7851000000e-01 + 8 Iter0_Sample054 54 1.3694800000e+11 3.5879000000e-01 2.4625600000e+03 3.7721000000e-01 + 8 Iter0_Sample055 55 1.3726900000e+11 3.5885000000e-01 2.5439300000e+03 3.8580000000e-01 + 8 Iter0_Sample056 56 1.3667600000e+11 3.6127000000e-01 2.6612900000e+03 3.7015000000e-01 + 8 Iter0_Sample057 57 1.3723800000e+11 3.6144000000e-01 2.5713100000e+03 3.8487000000e-01 + 8 Iter0_Sample058 58 1.3683400000e+11 3.6480000000e-01 2.5110000000e+03 3.8746000000e-01 + 8 Iter0_Sample059 59 1.3631400000e+11 3.6015000000e-01 2.6512900000e+03 3.9803000000e-01 + 8 Iter0_Sample060 60 1.3725600000e+11 3.6439000000e-01 2.4724000000e+03 3.7769000000e-01 + 8 Iter0_Sample061 61 1.3709100000e+11 3.5837000000e-01 2.5619700000e+03 3.8409000000e-01 + 8 Iter0_Sample062 62 1.3768100000e+11 3.6189000000e-01 2.4462100000e+03 3.7921000000e-01 + 8 Iter0_Sample063 63 1.3755400000e+11 3.6209000000e-01 2.5595000000e+03 3.7612000000e-01 + 8 Iter0_Sample064 64 1.3710700000e+11 3.5517000000e-01 2.5663200000e+03 3.7473000000e-01 + 8 Iter0_Sample065 65 1.3751800000e+11 3.5981000000e-01 2.5858900000e+03 3.8714000000e-01 + 8 Iter0_Sample066 66 1.3711600000e+11 3.6125000000e-01 2.4178300000e+03 3.7757000000e-01 + 8 Iter0_Sample067 67 1.3717500000e+11 3.5936000000e-01 2.6630500000e+03 3.7315000000e-01 + 8 Iter0_Sample068 68 1.3688900000e+11 3.6344000000e-01 2.5792500000e+03 3.9534000000e-01 + 8 Iter0_Sample069 69 1.3648500000e+11 3.6150000000e-01 2.5274100000e+03 3.8222000000e-01 + 8 Iter0_Sample070 70 1.3731000000e+11 3.6370000000e-01 2.7203200000e+03 3.8148000000e-01 + 8 Iter0_Sample071 71 1.3679500000e+11 3.5899000000e-01 2.5669300000e+03 3.8012000000e-01 + 8 Iter0_Sample072 72 1.3715500000e+11 3.6007000000e-01 2.4984400000e+03 3.7048000000e-01 + 8 Iter0_Sample073 73 1.3742200000e+11 3.5669000000e-01 2.5622500000e+03 3.8780000000e-01 + 8 Iter0_Sample074 74 1.3776800000e+11 3.5918000000e-01 2.6275400000e+03 3.7810000000e-01 + 8 Iter0_Sample075 75 1.3745500000e+11 3.6147000000e-01 2.6628500000e+03 3.7604000000e-01 + 8 Iter0_Sample076 76 1.3775300000e+11 3.5831000000e-01 2.6026800000e+03 3.7795000000e-01 + 8 Iter0_Sample077 77 1.3697800000e+11 3.6131000000e-01 2.5390100000e+03 3.9560000000e-01 + 8 Iter0_Sample078 78 1.3799100000e+11 3.6193000000e-01 2.5426900000e+03 3.7600000000e-01 + 8 Iter0_Sample079 79 1.3764600000e+11 3.5813000000e-01 2.6053400000e+03 3.8257000000e-01 + 8 Iter0_Sample080 80 1.3711600000e+11 3.6372000000e-01 2.5464100000e+03 3.7035000000e-01 + 8 Iter0_Sample081 81 1.3724500000e+11 3.5926000000e-01 2.4665900000e+03 3.9282000000e-01 + 8 Iter0_Sample082 82 1.3716700000e+11 3.5984000000e-01 2.5488500000e+03 3.9183000000e-01 + 8 Iter0_Sample083 83 1.3754200000e+11 3.5992000000e-01 2.4711300000e+03 3.9131000000e-01 + 8 Iter0_Sample084 84 1.3671400000e+11 3.6005000000e-01 2.5732500000e+03 3.8998000000e-01 + 8 Iter0_Sample085 85 1.3692300000e+11 3.5955000000e-01 2.4905100000e+03 3.8252000000e-01 + 8 Iter0_Sample086 86 1.3710700000e+11 3.6296000000e-01 2.5214100000e+03 3.8188000000e-01 + 8 Iter0_Sample087 87 1.3726700000e+11 3.6071000000e-01 2.5746400000e+03 3.8191000000e-01 + 8 Iter0_Sample088 88 1.3776300000e+11 3.6182000000e-01 2.6014600000e+03 3.7644000000e-01 + 8 Iter0_Sample089 89 1.3652800000e+11 3.6311000000e-01 2.4356900000e+03 3.8379000000e-01 + 8 Iter0_Sample090 90 1.3690500000e+11 3.6133000000e-01 2.4406100000e+03 3.6837000000e-01 + 8 Iter0_Sample091 91 1.3730900000e+11 3.5770000000e-01 2.6222800000e+03 3.7997000000e-01 + 8 Iter0_Sample092 92 1.3792700000e+11 3.6459000000e-01 2.4379300000e+03 3.9419000000e-01 + 8 Iter0_Sample093 93 1.3709700000e+11 3.6372000000e-01 2.5478600000e+03 3.9236000000e-01 + 8 Iter0_Sample094 94 1.3741100000e+11 3.6183000000e-01 2.3154000000e+03 3.7990000000e-01 + 8 Iter0_Sample095 95 1.3768000000e+11 3.6135000000e-01 2.5651700000e+03 3.8847000000e-01 + 8 Iter0_Sample096 96 1.3719700000e+11 3.6319000000e-01 2.6221700000e+03 3.9202000000e-01 + 8 Iter0_Sample097 97 1.3745300000e+11 3.5874000000e-01 2.4801600000e+03 3.7414000000e-01 + 8 Iter0_Sample098 98 1.3777000000e+11 3.5941000000e-01 2.4514900000e+03 3.7357000000e-01 + 8 Iter0_Sample099 99 1.3659700000e+11 3.6514000000e-01 2.6390900000e+03 3.8576000000e-01 diff --git a/tests/integration/test_gmm.py b/tests/integration/test_gmm.py index b3b6c75..a4b3be2 100644 --- a/tests/integration/test_gmm.py +++ b/tests/integration/test_gmm.py @@ -57,7 +57,7 @@ def test_gmm(): # %% # write new parameter table to the simulation directory - calibration.system.write_params_to_table(calibration.curr_iter + 1) + calibration.system.write_params_to_table() # %% check_list = np.isclose(resampled_param_data_ref, resampled_param_data) diff --git a/tests/integration/test_lenreg_IO.py b/tests/integration/test_lenreg_IO.py index 6cbb436..542460f 100644 --- a/tests/integration/test_lenreg_IO.py +++ b/tests/integration/test_lenreg_IO.py @@ -12,18 +12,17 @@ executable = f'python {PATH}/linear_model.py' -def run_sim(model, **kwargs): +def run_sim(model): """ Run the external executable and passes the parameter sample to generate the output file. """ # keep the naming convention consistent between iterations mag = floor(log(model.num_samples, 10)) + 1 - curr_iter = kwargs['curr_iter'] # check the software name and version print("*** Running external software... ***\n") # loop over and pass parameter samples to the executable for i, params in enumerate(model.param_data): - description = 'Iter' + str(curr_iter) + '_Sample' + str(i).zfill(mag) + description = 'Iter' + str(model.curr_iter) + '_Sample' + str(i).zfill(mag) print(" ".join([executable, "%.8e %.8e" % tuple(params), description])) os.system(' '.join([executable, "%.8e %.8e" % tuple(params), description])) diff --git a/tests/unit/test_dynamic_systems.py b/tests/unit/test_dynamic_systems.py index 50863f3..15b8ba0 100644 --- a/tests/unit/test_dynamic_systems.py +++ b/tests/unit/test_dynamic_systems.py @@ -220,7 +220,7 @@ def test_init(self): def test_run(self): """Test if the callback function works as expected""" - def run_sim(system, **kwargs): + def run_sim(system): """Run the simulation""" # Initialize the data list data = [] @@ -232,8 +232,7 @@ def run_sim(system, **kwargs): for i, param in enumerate(system.param_data): # Get the description of the current sample mag = floor(log(system.num_samples, 10)) + 1 - curr_iter = kwargs['curr_iter'] - description = 'Iter' + str(curr_iter) + '_Sample' + str(i).zfill(mag) + description = 'Iter' + str(system.curr_iter) + '_Sample' + str(i).zfill(mag) # Run the model y = param[0] + param[1] * x + param[2] * x ** 2 + param[3] * x ** 3 # Append the data to the list @@ -258,14 +257,14 @@ def run_sim(system, **kwargs): system_cls.param_data = np.arange(1, system_cls.num_samples * 4 + 1, dtype=float).reshape( system_cls.num_samples, 4) - system_cls.run(curr_iter=0) + system_cls.run() # check if the file that contains the parameter data has the right name assert path.normpath(system_cls.param_data_file) == path.normpath( path.join(GL_PATH, 'tests', 'unit', 'sim_data', 'iter0', 'test_Iter0_Samples.txt')) # check if the simulations data are stored with the right name - system_cls.get_sim_data_files(curr_iter=0) + system_cls.get_sim_data_files() mag = floor(log(system_cls.num_samples, 10)) + 1 for i, f in enumerate(system_cls.sim_data_files): description = 'Iter' + str(0) + '_Sample' + str(i).zfill(mag) @@ -274,7 +273,7 @@ def run_sim(system, **kwargs): # check if the parameter data are correctly stored param_data_backup = np.copy(system_cls.param_data) - system_cls.load_param_data(curr_iter=0) + system_cls.load_param_data() np.testing.assert_array_equal(param_data_backup, system_cls.param_data) # check if the simulation data are correctly stored diff --git a/tests/unit/test_iterative_bayesian_filter.py b/tests/unit/test_iterative_bayesian_filter.py index dc8dbad..de6fa82 100644 --- a/tests/unit/test_iterative_bayesian_filter.py +++ b/tests/unit/test_iterative_bayesian_filter.py @@ -199,10 +199,10 @@ def test_save_and_load_proposal(): sim_data_sub_dir = f'{system_cls.sim_data_dir}/iter{-1}' if not os.path.exists(sim_data_sub_dir): os.makedirs(sim_data_sub_dir) - ibf_cls.save_proposal_to_file(system_cls, curr_iter=0) + ibf_cls.save_proposal_to_file(system_cls) #: Load the Gaussian Mixture Model from a file - ibf_cls.load_proposal_from_file(system_cls, curr_iter=0) + ibf_cls.load_proposal_from_file(system_cls) #: Check if the loaded proposal density is the same as the original one np.testing.assert_allclose(ibf_cls.proposal, dummy_proposal, 0.18) diff --git a/tutorials/physics_based/oedometric_compression/oedo_load_and_resample.py b/tutorials/physics_based/oedometric_compression/oedo_load_and_resample.py index 901c4a6..4078bc8 100644 --- a/tutorials/physics_based/oedometric_compression/oedo_load_and_resample.py +++ b/tutorials/physics_based/oedometric_compression/oedo_load_and_resample.py @@ -6,7 +6,7 @@ from grainlearning import BayesianCalibration from grainlearning.dynamic_systems import IODynamicSystem -sim_data_dir = os.path.abspath(os.path.join(__file__, "../../../tests/data/oedo_sim_data")) +sim_data_dir = os.path.abspath(os.path.join(__file__, "../../../../tests/data/oedo_sim_data")) curr_iter = 1 calibration = BayesianCalibration.from_dict( diff --git a/tutorials/physics_based/two_particle_collision/Collision.py b/tutorials/physics_based/two_particle_collision/Collision.py index afe779d..97ba667 100644 --- a/tutorials/physics_based/two_particle_collision/Collision.py +++ b/tutorials/physics_based/two_particle_collision/Collision.py @@ -98,5 +98,5 @@ def add_sim_data(): O.bodies[1].state.vel = Vector3(0, 0, -0.01) # run DEM simulation -O.run(int(1e10)) +O.run() waitIfBatch() diff --git a/tutorials/simple_regression/linear_regression/linear_reg_one_iteration.py b/tutorials/simple_regression/linear_regression/linear_reg_one_iteration.py index 99ddc6a..5982bdd 100644 --- a/tutorials/simple_regression/linear_regression/linear_reg_one_iteration.py +++ b/tutorials/simple_regression/linear_regression/linear_reg_one_iteration.py @@ -3,7 +3,7 @@ """ import os from grainlearning import BayesianCalibration -from grainlearning.dynamic_systems import IODynamicSystem +from grainlearning.dynamic_systems import IODynamicSystem, DynamicSystem PATH = os.path.abspath(os.path.dirname(__file__)) sim_data_dir = os.path.abspath(os.path.join(__file__, "../../../../tests/data/linear_sim_data")) @@ -23,6 +23,7 @@ "sim_name": 'linear', "param_data_file": f'{sim_data_dir}/iter{curr_iter}/smcTable0.txt', "sim_data_dir": sim_data_dir, + "sim_data_file_ext": ".npy", "param_names": ['a', 'b'], }, "calibration": { @@ -36,11 +37,42 @@ } ) -# %% -# reproduce the result with a given sigma value +# run GrainLearning for one iteration and generate the resampled parameter values calibration.load_and_run_one_iteration() -resampled_param_data = calibration.resample() -# %% -# write new parameter table to the simulation directory -calibration.system.write_params_to_table(calibration.curr_iter + 1) +# store the original parameter values and simulation data +param_data = calibration.system.param_data +sim_data = calibration.system.sim_data +ctrl_data = calibration.system.ctrl_data +obs_data = calibration.system.obs_data + +# recreate a calibration tool +calibration = BayesianCalibration.from_dict( + { + "num_iter": 0, + "system": { + "system_type": DynamicSystem, + "param_min": [0.1, 0.1], + "param_max": [1, 10], + "param_names": ['a', 'b'], + "param_data": param_data, + "num_samples": param_data.shape[0], + "ctrl_data": ctrl_data, + "obs_data": obs_data, + "obs_names": ['f'], + "sim_name": 'linear', + "sim_data": sim_data, + "callback": None, + }, + "calibration": { + "inference": {"ess_target": 0.3}, + "sampling": { + "max_num_components": 1, + }, + }, + "save_fig": 1, + } +) + +# run GrainLearning for one iteration and generate the resampled parameter values +calibration.load_and_run_one_iteration() diff --git a/tutorials/simple_regression/linear_regression/linear_regression_solve.py b/tutorials/simple_regression/linear_regression/linear_regression_solve.py index d057f01..ffd7157 100644 --- a/tutorials/simple_regression/linear_regression/linear_regression_solve.py +++ b/tutorials/simple_regression/linear_regression/linear_regression_solve.py @@ -11,18 +11,17 @@ executable = f'python {PATH}/linear_model.py' -def run_sim(system, **kwargs): +def run_sim(system): """ Run the external executable and passes the parameter sample to generate the output file. """ # keep the naming convention consistent between iterations mag = floor(log(system.num_samples, 10)) + 1 - curr_iter = kwargs['curr_iter'] # check the software name and version print("*** Running external software... ***\n") # loop over and pass parameter samples to the executable for i, params in enumerate(system.param_data): - description = 'Iter' + str(curr_iter) + '_Sample' + str(i).zfill(mag) + description = 'Iter' + str(system.curr_iter) + '_Sample' + str(i).zfill(mag) print(" ".join([executable, "%.8e %.8e" % tuple(params), system.sim_name, description])) os.system(' '.join([executable, "%.8e %.8e" % tuple(params), system.sim_name, description])) diff --git a/tutorials/simple_regression/linear_regression/python_linear_regression_solve.py b/tutorials/simple_regression/linear_regression/python_linear_regression_solve.py index ccdbab1..cafeaf0 100644 --- a/tutorials/simple_regression/linear_regression/python_linear_regression_solve.py +++ b/tutorials/simple_regression/linear_regression/python_linear_regression_solve.py @@ -47,7 +47,7 @@ def run_sim(system, **kwargs): }, "initial_sampling": "halton", }, - "save_fig": 0, + "save_fig": -1, } )