diff --git a/docs/source/tutorials.rst b/docs/source/tutorials.rst index fdad6d6..3cf0620 100644 --- a/docs/source/tutorials.rst +++ b/docs/source/tutorials.rst @@ -152,7 +152,7 @@ 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": 'linearObs.dat', + "obs_data_file": 'linear_obs.dat', "obs_names": ['f'], "ctrl_name": 'u', "sim_name": 'linear', diff --git a/grainlearning/dynamic_systems.py b/grainlearning/dynamic_systems.py index 9946c1f..ea46316 100644 --- a/grainlearning/dynamic_systems.py +++ b/grainlearning/dynamic_systems.py @@ -463,7 +463,7 @@ def __init__( inv_obs_weight: List[float] = None, sim_data: np.ndarray = None, callback: Callable = None, - param_data_file: str = None, + param_data_file: str = '', param_data: np.ndarray = None, param_names: List[str] = None, ): @@ -539,7 +539,7 @@ def from_dict(cls: Type["IODynamicSystem"], obj: dict): obs_data_file=obj["obs_data_file"], obs_names=obj["obs_names"], ctrl_name=obj["ctrl_name"], - param_data_file=obj.get("param_data_file", None), + param_data_file=obj.get("param_data_file", ''), obs_data=obj.get("obs_data", None), num_samples=obj.get("num_samples", None), param_min=obj.get("param_min", None), @@ -566,9 +566,7 @@ def get_obs_data(self): self.num_steps = len(self.ctrl_data) # remove the data not used by Bayesian filtering self.num_obs = len(self.obs_names) - for key in keys_and_data: - if key not in self.obs_names: - keys_and_data.pop(key) + keys_and_data = {key: keys_and_data[key] for key in self.obs_names} # assign the obs_data array self.obs_data = np.zeros([self.num_obs, self.num_steps]) for i, key in enumerate(self.obs_names): @@ -613,9 +611,9 @@ def load_sim_data(self): for i, sim_data_file in enumerate(self.sim_data_files): if self.sim_data_file_ext != '.npy': data = get_keys_and_data(sim_data_file) - param_data = np.genfromtxt(sim_data_file.split('_sim')[0] + f'_param{self.sim_data_file_ext}') - for j, key in enumerate(self.param_names): - data[key] = param_data[j] + param_data = get_keys_and_data(sim_data_file.split('_sim')[0] + f'_param{self.sim_data_file_ext}') + for key in self.param_names: + data[key] = param_data[key][0] else: data = np.load(sim_data_file, allow_pickle=True).item() @@ -623,14 +621,7 @@ def load_sim_data(self): self.sim_data[i, j, :] = data[key] params = np.array([data[key] for key in self.param_names]) - if not (np.abs((params - self.param_data[i, :]) - / self.param_data[i, :] < 1e-5).all()): - raise RuntimeError( - "Parameters [" + ", ".join( - [f"{v}" for v in self.param_data[i, :]]) - + '] vs [' + - ", ".join(f"{v}" for v in params) + - f"] from the simulation data file {sim_data_file} and the parameter table do not match") + np.testing.assert_allclose(params, self.param_data[i, :], rtol=1e-5) def load_param_data(self, curr_iter: int = 0): """ @@ -643,15 +634,17 @@ def load_param_data(self, curr_iter: int = 0): self.param_data = np.genfromtxt(self.param_data_file, comments='!')[:, -self.num_params:] self.num_samples = self.param_data.shape[0] else: - # if param_data_file does not exit, get parameter daa from simulation data files - files = glob(self.sim_data_dir + f'/iter{curr_iter}/{self.sim_name}*{self.sim_data_file_ext}') + # 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}') self.num_samples = len(files) self.sim_data_files = sorted(files) self.param_data = np.zeros([self.num_samples, self.num_params]) for i, sim_data_file in enumerate(self.sim_data_files): - # TODO: this is still for npy, support text file formats - data = np.load(sim_data_file, allow_pickle=True).item() - params = [data[key] for key in self.param_names] + if self.sim_data_file_ext == '.npy': + data = np.load(sim_data_file, allow_pickle=True).item() + else: + data = get_keys_and_data(sim_data_file) + params = [data[key][0] for key in self.param_names] self.param_data[i, :] = params def run(self, **kwargs): @@ -692,7 +685,7 @@ def write_params_to_table(self, curr_iter: int): :return param_data_file: The name of the parameter data file """ self.param_data_file = write_to_table( - f'{os.getcwd()}/{self.sim_name}', + self.sim_name, self.param_data, self.param_names, curr_iter) diff --git a/grainlearning/tools.py b/grainlearning/tools.py index 94b3eb4..7d0ddc9 100644 --- a/grainlearning/tools.py +++ b/grainlearning/tools.py @@ -7,7 +7,6 @@ import subprocess from typing import List, Callable import numpy as np -import matplotlib.pylab as plt from sklearn.mixture import BayesianGaussianMixture from scipy.spatial import Voronoi, ConvexHull @@ -60,14 +59,14 @@ def write_to_table(sim_name, table, names, curr_iter=0, threads=8): """ # Computation of decimal number for unique key - table_file_name = f'{sim_name}_Iter{curr_iter}_Samples.txt' + table_file_name = f'{os.getcwd()}/{sim_name}_Iter{curr_iter}_Samples.txt' with open(table_file_name, 'w') as f_out: num, dim = table.shape 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 = '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'])) @@ -84,14 +83,7 @@ def get_keys_and_data(file_name: str, delimiters=None): """ if delimiters is None: delimiters = ['\t', ' ', ','] - data = np.genfromtxt(file_name) - - try: - nc_ols = data.shape[1] - except IndexError: - n_rows = data.shape[0] - nc_ols = 1 - data = data.reshape([n_rows, 1]) + data = np.genfromtxt(file_name, ndmin=2) with open(file_name, 'r') as f_open: first_line = f_open.read().splitlines()[0] @@ -102,7 +94,7 @@ def get_keys_and_data(file_name: str, delimiters=None): keys.remove('#') # remove empty strings from the list keys = list(filter(None, keys)) - if len(keys) == nc_ols: + if len(keys) == data.shape[1]: break # store data in a dictionary @@ -409,6 +401,7 @@ def plot_param_stats(fig_name, param_names, means, covs, save_fig=0): :param covs: ndarray :param save_fig: bool defaults to False """ + import matplotlib.pylab as plt num = len(param_names) n_cols = int(np.ceil(num / 2)) plt.figure('Posterior means of the parameters') @@ -449,6 +442,10 @@ def plot_posterior(fig_name, param_names, param_data, posterior, save_fig=0): :param posterior: ndarray :param save_fig: bool defaults to False """ + try: + import matplotlib.pylab as plt + except ImportError: + print('matplotlib is not installed, cannot plot posterior distribution. Please install with grainlearning[plot]') num_steps = posterior.shape[0] for i, name in enumerate(param_names): plt.figure(f'Posterior distribution of {name}') @@ -468,6 +465,7 @@ def plot_posterior(fig_name, param_names, param_data, posterior, save_fig=0): def plot_param_data(fig_name, param_names, param_data_list, save_fig=0): + import matplotlib.pylab as plt num = len(param_names) n_cols = int(np.ceil(num / 2)) num = num - 1 @@ -501,6 +499,7 @@ def plot_obs_and_sim(fig_name, ctrl_name, obs_names, ctrl_data, obs_data, sim_da :param posterior: ndarray :param save_fig: bool defaults to False """ + import matplotlib.pylab as plt ensemble_mean = np.einsum('ijk, ki->jk', sim_data, posteriors) ensemble_std = np.einsum('ijk, ki->jk', (sim_data - ensemble_mean) ** 2, posteriors) ensemble_std = np.sqrt(ensemble_std) @@ -549,6 +548,10 @@ def write_dict_to_file(data, file_name): 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') + # check if data[list(keys)[0]] is a list + if isinstance(data[list(keys)[0]], list): + num = len(data[list(keys)[0]]) + for i in range(num): + f.write(' '.join([str(data[key][i]) for key in keys]) + '\n') + else: + f.write(' '.join([str(data[key]) for key in keys]) + '\n') diff --git a/pyproject.toml b/pyproject.toml index 7c8ec90..1c15c7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,10 +28,16 @@ pytest = {version = "^6.2.4", optional = true} pytest-cov = {version = "^2.12.1", optional = true} prospector = {version = "^1.7.6", optional = true, extras = ["with_pyroma"]} pyroma = {version = "^4.0", optional = true} +h5py = {version ="^3.7.0", optional = true} +wandb = {version ="^0.13.4", optional = true} +tensorflow = {version ="2.10.0", optional = true} +ipykernel = {version = "*", optional = true} [tool.poetry.extras] docs = ["Sphinx", "sphinx-autodoc-typehints", "sphinx-mdinclude", "sphinx-rtd-theme"] -dev = ["pytest", "pytest-cov", "prospector", "pyroma"] +dev = ["pytest", "pytest-cov", "prospector", "pyroma", "h5py"] +rnn = ["wandb", "tensorflow"] +tutorials = ["ipykernel"] [build-system] requires = ["poetry-core>=1.0.0"] diff --git a/tests/data/linear_sim_data/linearObs.dat b/tests/data/linear_sim_data/linear_obs.dat similarity index 100% rename from tests/data/linear_sim_data/linearObs.dat rename to tests/data/linear_sim_data/linear_obs.dat diff --git a/tests/integration/test_gmm.py b/tests/integration/test_gmm.py index 221f511..b3b6c75 100644 --- a/tests/integration/test_gmm.py +++ b/tests/integration/test_gmm.py @@ -18,7 +18,7 @@ def test_gmm(): "num_iter": 0, "system": { "system_type": IODynamicSystem, - "obs_data_file": f'{sim_data_dir}/linearObs.dat', + "obs_data_file": f'{sim_data_dir}/linear_obs.dat', "obs_names": ['f'], "ctrl_name": 'u', "sim_name": 'linear', diff --git a/tests/integration/test_lenreg_IO.py b/tests/integration/test_lenreg_IO.py index 2bb7559..6cbb436 100644 --- a/tests/integration/test_lenreg_IO.py +++ b/tests/integration/test_lenreg_IO.py @@ -14,7 +14,7 @@ def run_sim(model, **kwargs): """ - Runs the external executable and passes the parameter sample to generate the output file. + 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 @@ -40,7 +40,7 @@ def test_lenreg_IO(): "param_names": ['a', 'b'], "num_samples": 20, "obs_data_file": os.path.abspath( - os.path.join(__file__, "../..")) + '/data/linear_sim_data/linearObs.dat', + os.path.join(__file__, "../..")) + '/data/linear_sim_data/linear_obs.dat', "obs_names": ['f'], "ctrl_name": 'u', "sim_name": 'linear', diff --git a/tests/integration/test_smc.py b/tests/integration/test_smc.py index 6b94277..bb4e0ba 100644 --- a/tests/integration/test_smc.py +++ b/tests/integration/test_smc.py @@ -15,7 +15,7 @@ def test_smc(): "num_iter": 0, "system": { "system_type": IODynamicSystem, - "obs_data_file": f'{sim_data_dir}/linearObs.dat', + "obs_data_file": f'{sim_data_dir}/linear_obs.dat', "obs_names": ['f'], "ctrl_name": 'u', "sim_name": 'linear', diff --git a/tests/unit/test_dynamic_systems.py b/tests/unit/test_dynamic_systems.py index f6dd5d6..50863f3 100644 --- a/tests/unit/test_dynamic_systems.py +++ b/tests/unit/test_dynamic_systems.py @@ -193,18 +193,12 @@ class TestIODynamicSystem: def test_init(self): """Test if the class is initialized correctly""" - system_cls = IODynamicSystem( - param_min=[0.001, 0.001], - param_max=[1, 10], - param_names=['a', 'b'], - num_samples=20, - obs_data_file=path.abspath(path.join(__file__, "../..")) + '/data/linear_sim_data/linearObs.dat', - obs_names=['f'], - ctrl_name='u', - sim_name='linear', - sim_data_dir=path.abspath(path.join(__file__, "../..")) + '/data/linear_sim_data/', - sim_data_file_ext='.txt', - ) + system_cls = IODynamicSystem(sim_name='linear', + sim_data_dir=path.abspath(path.join(__file__, "../..")) + '/data/linear_sim_data/', + sim_data_file_ext='.txt', obs_data_file=path.abspath( + path.join(__file__, "../..")) + '/data/linear_sim_data/linear_obs.dat', obs_names=['f'], ctrl_name='u', + num_samples=20, param_min=[0.001, 0.001], param_max=[1, 10], + param_names=['a', 'b']) config = { "system_type": IODynamicSystem, @@ -212,7 +206,7 @@ def test_init(self): "param_max": [1, 10], "param_names": ['a', 'b'], "num_samples": 20, - "obs_data_file": path.abspath(path.join(__file__, "../..")) + '/data/linear_sim_data/linearObs.dat', + "obs_data_file": path.abspath(path.join(__file__, "../..")) + '/data/linear_sim_data/linear_obs.dat', "obs_names": ['f'], "ctrl_name": 'u', "sim_name": 'linear', @@ -246,27 +240,20 @@ def run_sim(system, **kwargs): data.append(np.array(y, ndmin=2)) # Write the data to a file data_file_name = f'{sim_name}_' + description + '_sim.txt' - write_dict_to_file({'f': y}, data_file_name) + write_dict_to_file({'f': list(y)}, data_file_name) # Write the parameters to a file data_param_name = f'{sim_name}_' + description + '_param.txt' - param_data = {'param0': [param[0]], 'param1': [param[1]], 'param2': [param[2]], 'param3': [param[3]]} + param_data = {'a': [param[0]], 'b': [param[1]], 'c': [param[2]], 'd': [param[3]]} write_dict_to_file(param_data, data_param_name) # Set the simulation data system.set_sim_data(data) - system_cls = IODynamicSystem( - param_min=[None, None, None, None], - param_max=[None, None, None, None], - param_names=['a', 'b', 'c', 'd'], - num_samples=10, - obs_data_file=path.abspath(path.join(__file__, "../..")) + '/data/linear_sim_data/linearObs.dat', - obs_names=['f'], - ctrl_name='u', - sim_name='test', - sim_data_dir=PATH + '/sim_data/', - sim_data_file_ext='.txt', - callback=run_sim, - ) + system_cls = IODynamicSystem(sim_name='test', sim_data_dir=PATH + '/sim_data/', sim_data_file_ext='.txt', + obs_data_file=path.abspath( + path.join(__file__, "../..")) + '/data/linear_sim_data/linear_obs.dat', + obs_names=['f'], ctrl_name='u', num_samples=10, param_min=[None, None, None, None], + param_max=[None, None, None, None], callback=run_sim, + param_names=['a', 'b', 'c', 'd']) system_cls.param_data = np.arange(1, system_cls.num_samples * 4 + 1, dtype=float).reshape( system_cls.num_samples, 4) @@ -301,7 +288,7 @@ def test_get_obs_data(self): "system_type": IODynamicSystem, "param_min": [0.001, 0.001], "param_max": [1, 10], - "obs_data_file": path.abspath(path.join(__file__, "../../data/linear_sim_data/linearObs.dat")), + "obs_data_file": path.abspath(path.join(__file__, "../../data/linear_sim_data/linear_obs.dat")), "obs_names": ['f'], "ctrl_name": 'u', "sim_name": 'linear', diff --git a/tests/unit/test_iterative_bayesian_filter.py b/tests/unit/test_iterative_bayesian_filter.py index 4a08047..dc8dbad 100644 --- a/tests/unit/test_iterative_bayesian_filter.py +++ b/tests/unit/test_iterative_bayesian_filter.py @@ -171,20 +171,12 @@ def test_run_inference(): def test_save_and_load_proposal(): """Test if the proposal density can be loaded from a file""" #: Initialize a system object (note the observed data is not used in this test) - system_cls = IODynamicSystem( - sim_name='test_ibf', - sim_data_dir=PATH + '/sim_data/', - sim_data_file_ext='.txt', - obs_names=['f'], - ctrl_name='u', - num_samples=10, - param_min=[1e6, 0.2], - param_max=[1e7, 0.5], - obs_data=[[12, 3, 4, 4], [12, 4, 5, 4]], - ctrl_data=[1, 2, 3, 4], - param_names=['a', 'b'], - obs_data_file=os.path.abspath(os.path.join(__file__, "../..")) + '/data/linear_sim_data/linearObs.dat', - ) + system_cls = IODynamicSystem(sim_name='test_ibf', sim_data_dir=PATH + '/sim_data/', sim_data_file_ext='.txt', + obs_data_file=os.path.abspath( + os.path.join(__file__, "../..")) + '/data/linear_sim_data/linear_obs.dat', + obs_names=['f'], ctrl_name='u', num_samples=10, param_min=[1e6, 0.2], + param_max=[1e7, 0.5], obs_data=[[12, 3, 4, 4], [12, 4, 5, 4]], ctrl_data=[1, 2, 3, 4], + param_names=['a', 'b']) #: Assert that the inference runs correctly if a proposal density is provided ibf_cls = IterativeBayesianFilter.from_dict( diff --git a/tutorials/rnn/experimental_test_drained_s3=0.2.dat b/tutorials/data_driven/LSTM/experimental_test_drained_s3=0.2.dat similarity index 100% rename from tutorials/rnn/experimental_test_drained_s3=0.2.dat rename to tutorials/data_driven/LSTM/experimental_test_drained_s3=0.2.dat diff --git a/tutorials/rnn/predict.ipynb b/tutorials/data_driven/LSTM/predict.ipynb similarity index 100% rename from tutorials/rnn/predict.ipynb rename to tutorials/data_driven/LSTM/predict.ipynb diff --git a/tutorials/rnn/rnn_calibration_GL.ipynb b/tutorials/data_driven/LSTM/rnn_calibration_GL.ipynb similarity index 100% rename from tutorials/rnn/rnn_calibration_GL.ipynb rename to tutorials/data_driven/LSTM/rnn_calibration_GL.ipynb diff --git a/tutorials/rnn/train_rnn.ipynb b/tutorials/data_driven/LSTM/train_rnn.ipynb similarity index 100% rename from tutorials/rnn/train_rnn.ipynb rename to tutorials/data_driven/LSTM/train_rnn.ipynb diff --git a/tutorials/oedo_compression/oedo_load_and_resample.py b/tutorials/physics_based/oedometric_compression/oedo_load_and_resample.py similarity index 100% rename from tutorials/oedo_compression/oedo_load_and_resample.py rename to tutorials/physics_based/oedometric_compression/oedo_load_and_resample.py diff --git a/tutorials/physics_based/triaxial_compression/PeriSp_1000_0.68.txt b/tutorials/physics_based/triaxial_compression/PeriSp_1000_0.68.txt new file mode 100644 index 0000000..b7a3e06 --- /dev/null +++ b/tutorials/physics_based/triaxial_compression/PeriSp_1000_0.68.txt @@ -0,0 +1,1001 @@ +##PERIODIC:: 0.0462201 0.0461205 0.0921203 +0.000415226 0.0042207 0.0554055 0.00477857 -1 +0.0429143 0.0427957 0.0167394 0.00474171 -1 +0.0228902 0.0175817 0.0228873 0.00470177 -1 +0.0355313 0.00288812 0.0519793 0.00466491 -1 +0.0279807 0.0384271 0.0531328 0.00462805 -1 +0.024123 0.0397878 0.0914837 0.00459119 -1 +0.0322303 0.0477125 0.0261988 0.0045574 -1 +0.0188308 0.042797 0.0611867 0.00452054 -1 +0.0391674 0.0412477 0.0275094 0.00448675 -1 +0.0437353 0.0187028 0.0274107 0.00445604 -1 +0.0235655 0.0201598 0.0732673 0.00442225 -1 +0.033764 0.0246144 0.053722 0.00439153 -1 +0.00439372 0.0290608 0.040203 0.00436081 -1 +0.0299212 0.0380202 0.044396 0.0043301 -1 +0.0337476 0.00400018 0.0178118 0.00429938 -1 +0.00978664 0.0352582 0.00664443 0.00427174 -1 +0.00657163 0.0273938 0.0550021 0.0042441 -1 +0.0323499 0.0145788 0.041651 0.00421645 -1 +0.0268391 0.00626844 0.0657503 0.0041888 -1 +0.0173838 0.0196958 0.00748508 0.00416116 -1 +0.00524662 0.00548797 0.0416989 0.00413659 -1 +0.00263673 0.0214956 0.0435818 0.00410894 -1 +0.0244545 0.0302965 0.00971234 0.00408437 -1 +0.00253762 0.0378256 0.0370214 0.0040598 -1 +0.00880841 0.00757561 0.0875394 0.0040383 -1 +0.0462631 0.00614735 0.0793279 0.00402601 -1 +0.0299715 0.0311796 0.0573977 0.00401372 -1 +0.0265672 0.00713086 0.022365 0.00399837 -1 +0.0357734 0.0263465 0.0835063 0.00398609 -1 +0.0138678 0.00812618 0.0248685 0.0039738 -1 +0.0216588 0.00453305 0.0596957 0.00396152 -1 +0.0270879 0.00539734 0.0130976 0.00394924 -1 +0.00270536 0.0442636 0.0485727 0.00393696 -1 +0.00232631 0.0264373 0.0685581 0.00392467 -1 +0.0221432 0.0216069 0.00124597 0.00391546 -1 +0.0121223 0.00852165 0.050962 0.00390318 -1 +0.00601625 0.0271254 0.0167545 0.00389089 -1 +0.0306133 0.0127895 0.0628669 0.00387861 -1 +0.00213504 0.00710455 0.0344078 0.00386632 -1 +0.0350951 0.0155718 0.0750593 0.00385711 -1 +0.0271747 0.0358048 0.0631022 0.00384483 -1 +0.013638 0.0388536 0.0492799 0.00383254 -1 +0.0360952 0.0448144 0.083437 0.00382333 -1 +0.0369541 0.0357792 0.0533229 0.00381105 -1 +-0.000394594 0.00653962 0.0471842 0.00380184 -1 +0.0349915 0.0130104 0.0565755 0.00378955 -1 +0.0423134 0.013363 0.0738194 0.00378034 -1 +0.0482413 0.00413206 0.0892755 0.00376806 -1 +0.011449 0.0210469 0.0551554 0.00375884 -1 +0.0133017 0.0424493 0.00612098 0.00374963 -1 +0.0106998 0.0397649 0.039475 0.00373734 -1 +0.0443454 0.0276133 0.00423441 0.00372813 -1 +0.0390772 0.00988879 0.0490375 0.00371585 -1 +0.0074966 0.0236453 0.0761713 0.00370664 -1 +0.014464 0.0232548 0.033355 0.00369742 -1 +0.0305084 0.0428195 0.0178613 0.00368821 -1 +0.0335516 0.0168689 0.0898059 0.003679 -1 +0.0255494 0.0438389 0.00985621 0.00366671 -1 +0.00271075 0.0359542 0.0101544 0.0036575 -1 +0.0446768 0.0154302 0.0200475 0.00364829 -1 +0.0274954 0.0451839 0.0687457 0.00363907 -1 +0.00825156 0.0415979 0.0610123 0.00362986 -1 +0.000220383 0.0244979 0.0760357 0.00362065 -1 +0.0371728 0.0444288 0.0685441 0.00361143 -1 +0.00957469 0.0155668 0.0505065 0.00360222 -1 +0.00875162 0.0156551 0.0593676 0.003593 -1 +0.0174814 0.0120165 0.0421245 0.00358379 -1 +0.0189631 0.00653822 0.0486849 0.00357458 -1 +0.0114921 0.0333142 0.0536889 0.00356536 -1 +0.0357301 0.00719271 0.0400525 0.00355615 -1 +0.0414024 0.0336474 0.0261751 0.00354694 -1 +0.0458458 0.0127839 0.0641452 0.00353773 -1 +0.0423206 0.03936 0.0434567 0.00352852 -1 +0.00172163 0.00434348 0.0201255 0.00352238 -1 +0.0206498 0.0212679 0.036907 0.00351316 -1 +0.00125121 0.00506707 0.0273801 0.00350395 -1 +0.0126426 0.0301071 0.0412051 0.00349474 -1 +0.0405134 0.0313205 0.0867244 0.0034886 -1 +0.00886931 0.00844722 0.0169001 0.00347938 -1 +0.0440287 0.0188271 0.0674935 0.00347017 -1 +0.00738864 0.0384331 0.0673022 0.00346403 -1 +0.0112916 0.0210102 0.0871891 0.00345482 -1 +0.015624 0.0253755 0.00145837 0.0034456 -1 +0.0477304 0.045036 0.0615854 0.00343946 -1 +0.0347956 0.0442991 0.0369305 0.00343025 -1 +0.0266809 0.0407549 0.0839526 0.00342104 -1 +0.00516991 0.0133409 0.0321911 0.0034149 -1 +0.0139916 0.0216697 0.0618246 0.00340569 -1 +0.0073414 0.0221481 0.0493971 0.00339955 -1 +0.017605 0.0180728 0.0572751 0.00339423 -1 +0.00827572 0.0340751 -0.000970479 0.00339321 -1 +0.00149199 0.0189959 0.0617059 0.00339219 -1 +0.0462824 0.00128508 0.0382167 0.00339117 -1 +0.0246956 0.0127269 0.0852773 0.00339014 -1 +0.0288992 0.0167826 0.056142 0.00338912 -1 +0.0235594 0.0145284 0.0630494 0.00338789 -1 +0.00654826 0.0380413 0.0481901 0.00338636 -1 +0.043351 0.042298 0.066046 0.00338503 -1 +0.00599245 0.0333542 0.020513 0.003384 -1 +0.00375307 0.00831462 0.0674448 0.00338298 -1 +0.00812501 0.0334924 0.0139368 0.00338196 -1 +0.0372379 0.0206963 0.0150767 0.00338094 -1 +0.00819334 0.0149308 0.0867956 0.00337991 -1 +0.016651 0.0284682 0.0290995 0.00337869 -1 +0.0366895 0.022751 0.0677109 0.00337715 -1 +0.0432681 0.0256104 0.0354275 0.00337582 -1 +0.0347647 0.0327736 0.0627897 0.0033748 -1 +0.0176193 0.0181151 0.0686586 0.00337377 -1 +-0.00202573 4.99292e-05 0.0240069 0.00337275 -1 +0.0299729 0.0445136 0.08857 0.00337173 -1 +0.00854905 0.0286344 0.00303874 0.0033707 -1 +0.00322688 0.00859967 0.0130211 0.00336949 -1 +0.00792377 0.0186771 0.0811897 0.00336795 -1 +0.043794 0.00477596 0.0632984 0.00336661 -1 +0.0203302 0.0190747 0.0303906 0.00336559 -1 +0.0055785 0.0196322 0.00663911 0.00336457 -1 +0.0465444 0.040131 0.089416 0.00336354 -1 +0.0189443 0.00176631 0.032016 0.00336252 -1 +0.01758 0.0459743 0.0383165 0.0033615 -1 +0.0176179 0.00883937 0.00475673 0.00336048 -1 +0.0157796 0.0372063 0.066249 0.00335945 -1 +0.0121323 0.0300079 0.0753224 0.00335843 -1 +0.0385081 0.0142426 0.0165391 0.00335722 -1 +0.028346 0.0232337 0.0439891 0.00335568 -1 +0.0319593 0.0199997 0.0109517 0.00335434 -1 +0.0357987 0.0122733 0.0059057 0.00335331 -1 +0.0321591 0.00361319 0.0338455 0.00335229 -1 +0.0457219 0.0387651 0.0237468 0.00335127 -1 +0.0133645 0.00482242 0.0578382 0.00335024 -1 +0.00750993 0.000962989 0.0179247 0.00334922 -1 +0.00790428 0.0133646 0.012263 0.0033482 -1 +0.00558453 0.0449689 0.0679505 0.00334718 -1 +0.043255 0.0086138 0.0868959 0.00334615 -1 +0.022272 0.00390645 0.076421 0.00334494 -1 +0.0320484 0.0277801 0.0663711 0.00334341 -1 +0.0357519 0.0255257 0.0195115 0.00334206 -1 +0.0315956 0.0106206 0.0696826 0.00334104 -1 +0.0142976 0.0412843 0.0849021 0.00334001 -1 +0.0400967 0.00238311 0.0735363 0.00333899 -1 +0.0186925 0.0437345 0.0445347 0.00333797 -1 +0.0431475 0.0355196 0.0789203 0.00333695 -1 +0.00850396 0.0404342 0.00121844 0.00333592 -1 +0.0154588 0.0408712 0.0718419 0.0033349 -1 +0.0290446 0.00714108 0.0417179 0.00333388 -1 +0.0123373 0.0130697 0.092402 0.00333267 -1 +0.0322049 0.0458977 0.0447514 0.00333114 -1 +0.038574 0.0272539 0.076466 0.00332978 -1 +0.0303344 0.0151524 0.0211067 0.00332876 -1 +0.0340519 0.0165947 0.0680246 0.00332774 -1 +0.0174343 0.0413713 0.0334391 0.00332672 -1 +0.0345597 0.018729 0.0616482 0.00332569 -1 +0.0210277 0.0448937 0.0220894 0.00332467 -1 +0.0139364 0.0272504 0.087297 0.00332365 -1 +0.0358253 0.0063143 0.00289619 0.00332262 -1 +0.0442362 0.0189884 0.0351686 0.0033216 -1 +0.0270879 0.00719976 0.0731976 0.00332058 -1 +0.00929712 0.0335761 0.0363876 0.00331956 -1 +0.0160726 0.0079267 0.0904437 0.00331853 -1 +0.0344103 0.0383232 0.0776948 0.00331751 -1 +0.0136032 0.00349247 0.0169734 0.00331649 -1 +0.0174176 0.0243518 0.0532847 0.00331546 -1 +0.0395207 0.0128688 0.0310664 0.00331427 -1 +0.00411444 0.0315599 0.0327617 0.00331274 -1 +0.0212479 0.0136567 0.0361019 0.00331137 -1 +0.0408978 0.0357268 0.0328456 0.00331035 -1 +0.00271491 0.0255684 0.061235 0.00330933 -1 +0.0441678 0.00915542 0.017073 0.0033083 -1 +0.024671 0.0304979 0.0828732 0.00330728 -1 +0.0232353 0.0321205 0.0732024 0.00330626 -1 +0.0164818 0.0366848 0.00309718 0.00330524 -1 +0.0130038 0.0175465 0.0131355 0.00330421 -1 +0.0285225 0.0182168 0.0851538 0.00330319 -1 +0.0224589 0.0267493 0.0497309 0.00330217 -1 +0.0215115 0.00784393 0.0329608 0.00330114 -1 +0.0340488 0.0152846 0.0830266 0.00330012 -1 +0.0174281 0.015501 0.0776716 0.0032991 -1 +0.00331206 0.0264081 0.0233767 0.00329807 -1 +0.0437814 0.0384562 0.0605958 0.00329705 -1 +0.0384843 0.0472622 0.0417113 0.00329603 -1 +0.0200346 0.0406338 0.0816331 0.003295 -1 +0.021324 0.0284734 0.00328455 0.00329398 -1 +0.0114774 0.00239006 0.0390953 0.00329296 -1 +0.00272329 0.0351895 0.0636475 0.00329194 -1 +0.00214395 0.0144616 0.0703286 0.00329091 -1 +0.00542737 0.0442582 0.0406547 0.00328973 -1 +0.045248 0.0133318 0.0802498 0.0032882 -1 +0.0293813 0.0322362 0.0148405 0.00328682 -1 +0.0375855 0.0250682 0.00416526 0.0032858 -1 +0.0232936 0.0420216 0.0161754 0.00328477 -1 +0.0268013 0.0192108 0.0389381 0.00328375 -1 +0.0112588 0.00964996 0.040443 0.00328273 -1 +0.00087467 0.00345743 0.0095193 0.00328171 -1 +0.00980939 0.0159979 0.0396176 0.00328068 -1 +0.0114223 0.0112012 0.0638931 0.00327966 -1 +0.0421491 0.0278405 0.0589093 0.00327864 -1 +0.00314168 0.0224599 0.0121331 0.00327762 -1 +0.0356511 0.0234906 0.0901828 0.00327659 -1 +0.00544187 0.0371723 0.0798777 0.00327557 -1 +0.0434547 0.00845616 0.0688314 0.00327455 -1 +0.022612 0.00781905 0.0403694 0.00327353 -1 +-0.000989655 0.0213239 0.00717879 0.0032725 -1 +0.0231267 0.0271027 0.077454 0.00327148 -1 +0.0123023 0.0281213 0.0615182 0.00327046 -1 +0.0103923 0.035785 0.0248719 0.00326943 -1 +0.0321663 0.0229644 0.0330543 0.00326841 -1 +0.0151969 0.00647611 0.0698725 0.00326739 -1 +0.0230101 0.0242382 0.0178177 0.00326637 -1 +0.0268506 0.0155953 0.0911147 0.00326534 -1 +0.0134463 0.0379952 0.058262 0.00326432 -1 +0.0178143 0.0430238 0.0532193 0.0032633 -1 +0.0410938 0.0197186 0.0615004 0.00326228 -1 +0.0328107 0.00052179 0.094176 0.00326125 -1 +0.0304022 0.0192454 0.07895 0.00326023 -1 +0.0216069 0.0384888 0.0733773 0.00325921 -1 +0.0374248 0.047275 0.00665456 0.00325818 -1 +0.0352772 0.00515277 0.0699851 0.00325716 -1 +0.0023397 0.0397825 0.0715268 0.00325614 -1 +-0.000823567 0.038168 0.053561 0.00325511 -1 +0.0232583 0.0290445 0.0291669 0.00325409 -1 +0.0414651 0.00449031 0.0917276 0.00325307 -1 +-0.00168855 0.033022 0.0424986 0.00325205 -1 +0.0195831 0.0343068 0.0302241 0.00325102 -1 +0.00285299 0.0089867 0.00590208 0.00325 -1 +0.0372683 0.0383486 0.0653442 0.00324898 -1 +0.0110677 0.0232563 0.00596088 0.00324795 -1 +0.00435943 0.00916374 0.0608975 0.00324693 -1 +0.0037229 0.044953 0.00142304 0.00324591 -1 +0.00808675 0.0118773 0.0711813 0.00324489 -1 +0.0219581 0.0349892 0.0789507 0.00324386 -1 +0.0430446 0.0355922 0.0664304 0.00324284 -1 +0.0314057 0.022412 0.0266123 0.00324182 -1 +0.0125798 0.0283406 0.0142438 0.00324079 -1 +0.0282602 0.0205247 0.0500019 0.00323977 -1 +0.0254326 0.0303656 0.0672923 0.00323875 -1 +0.0140991 0.0315176 0.0476675 0.00323773 -1 +0.00313861 0.0367762 0.00223418 0.0032367 -1 +0.0339314 0.0203574 0.0461635 0.00323568 -1 +0.0449935 0.040754 0.00487989 0.00323466 -1 +0.0235306 0.0451296 0.0554773 0.00323364 -1 +0.0225143 0.00518599 0.00723603 0.00323261 -1 +0.0308133 0.0337598 0.00866654 0.00323159 -1 +0.0366017 0.0262455 0.0261676 0.00323057 -1 +0.0351192 0.0339616 0.000664702 0.00322954 -1 +0.0030939 0.0159597 0.0483843 0.00322852 -1 +0.00242943 0.0120868 0.0883275 0.0032275 -1 +0.0294984 0.0253093 0.00794197 0.00322648 -1 +0.00854021 0.0324149 0.064618 0.00322551 -1 +0.0365057 0.00775003 0.0613842 0.00322475 -1 +0.00473524 0.0344628 0.053444 0.00322398 -1 +0.0113512 0.0391572 0.0128512 0.00322321 -1 +0.021051 0.00802156 0.0159438 0.00322239 -1 +0.0107098 0.00332749 0.0462827 0.00322136 -1 +0.00312333 0.0379415 0.0167259 0.00322034 -1 +0.0316279 0.0325749 0.039418 0.00321932 -1 +0.0391058 0.00243332 0.012777 0.00321829 -1 +0.045122 0.0116583 0.0519351 0.00321727 -1 +0.00439617 0.0360905 0.0861928 0.00321625 -1 +0.0445831 0.0077043 0.040375 0.00321522 -1 +0.0203173 0.00569831 0.0269259 0.0032142 -1 +0.0119357 0.0328712 0.0304532 0.00321318 -1 +0.0408775 0.044513 0.0342686 0.00321215 -1 +0.0286829 0.000217301 0.0809846 0.00321113 -1 +0.0187468 0.0260595 0.0727914 0.00321011 -1 +0.00104955 0.024544 0.0882595 0.00320909 -1 +0.0168528 0.0270398 0.00778226 0.00320806 -1 +0.00440005 0.0165358 0.0168105 0.00320704 -1 +0.0390208 0.0354731 0.0172885 0.00320602 -1 +0.0312672 0.0114339 0.0012396 0.00320499 -1 +0.0154602 0.0353958 0.0351844 0.00320397 -1 +0.0341935 0.0334419 0.0693084 0.00320295 -1 +0.0456943 0.0413487 0.0774063 0.00320193 -1 +0.0421013 0.0191113 0.045035 0.00320096 -1 +0.0445006 0.00100348 0.00410977 0.00320019 -1 +-0.00064972 0.0171614 0.0122912 0.00319942 -1 +0.00418606 0.0141767 0.0545618 0.00319866 -1 +0.023649 0.0230663 0.00938255 0.00319784 -1 +0.00959232 0.0230058 0.0122295 0.00319681 -1 +0.0329379 0.0384208 0.00478403 0.00319579 -1 +0.0213961 0.0072224 0.0867575 0.00319477 -1 +0.011632 0.00500484 0.0807351 0.00319374 -1 +0.0204554 0.0373021 0.0513249 0.00319272 -1 +0.0299711 0.0242168 0.0871748 0.0031917 -1 +0.0273051 0.0372865 0.0762058 0.00319067 -1 +0.0125642 -0.00155688 0.0566407 0.00318965 -1 +-0.000223962 0.0315822 0.0217029 0.00318863 -1 +0.0393787 0.0440427 0.0472676 0.0031876 -1 +0.0217236 0.0369727 0.0356788 0.00318658 -1 +0.0351434 0.00716036 0.0828889 0.00318556 -1 +0.0251602 0.04631 0.033335 0.00318454 -1 +0.0261218 0.0247191 0.0237764 0.00318351 -1 +0.0352433 0.0378754 0.0218462 0.00318254 -1 +0.0154646 0.0223426 0.0459208 0.00318177 -1 +0.00485985 0.0110926 0.0824818 0.00318101 -1 +-0.000979194 0.0263023 0.0173765 0.00318024 -1 +0.00785474 0.0282862 0.0285583 0.00317942 -1 +0.0310793 0.0205957 0.0722077 0.0031784 -1 +0.0458923 0.0336444 0.0899481 0.00317738 -1 +0.0421394 0.0250779 0.0649123 0.00317636 -1 +0.011925 -0.000203906 0.0756986 0.00317533 -1 +0.00107322 0.0320122 0.0154885 0.00317431 -1 +0.0112657 0.0115848 0.0820717 0.00317329 -1 +0.0450198 0.0271695 0.0110874 0.00317226 -1 +0.00897413 0.0286498 0.069771 0.00317124 -1 +0.00959126 0.0431912 0.0454871 0.00317026 -1 +0.015729 0.01836 0.0406092 0.0031695 -1 +0.0281672 0.0311113 0.0774568 0.00316873 -1 +0.0407215 0.00434434 0.0365614 0.00316796 -1 +0.0186638 0.00469001 0.0208456 0.00316715 -1 +0.00947347 0.00509559 0.0732249 0.00316613 -1 +0.0332727 0.0272486 0.0425302 0.0031651 -1 +0.0395817 0.0488593 0.0587424 0.00316408 -1 +0.00463042 0.0203316 0.056108 0.00316306 -1 +0.00791378 0.0108979 0.0458084 0.00316204 -1 +0.038052 0.024701 0.0392609 0.00316101 -1 +0.0229889 0.0153993 0.00941446 0.00315999 -1 +0.0421977 0.00697295 0.030999 0.00315897 -1 +0.0166893 0.0342808 0.0724629 0.00315799 -1 +0.0311188 0.0215513 0.0172334 0.00315722 -1 +0.034603 0.0419024 0.0556732 0.00315645 -1 +0.0100814 0.041625 0.0799724 0.00315568 -1 +0.00171291 0.0335361 0.0479036 0.00315488 -1 +0.0441868 0.0131592 0.0458144 0.00315385 -1 +0.00724073 0.017972 0.00037788 0.00315283 -1 +0.0116762 0.0392153 0.0309909 0.00315181 -1 +0.0223661 0.0201897 0.0533143 0.00315079 -1 +0.0159409 0.0354561 0.081061 0.00314976 -1 +0.0358937 0.0028265 0.0890492 0.00314878 -1 +0.00737112 0.044253 0.0287705 0.00314801 -1 +0.00763217 0.00277386 0.0339424 0.00314724 -1 +0.00914822 0.0311501 0.0853662 0.00314648 -1 +0.027579 0.0165804 0.0679426 0.00314567 -1 +0.0161908 0.0183919 0.0508981 0.00314465 -1 +0.00749007 0.0214404 0.0625803 0.00314363 -1 +0.0226069 0.00123776 0.0910351 0.0031426 -1 +0.0175744 0.0396119 0.0396619 0.00314158 -1 +0.0207069 0.0341892 0.0214385 0.00314056 -1 +0.0276208 0.0356675 0.0700823 0.00313957 -1 +0.00827092 0.040275 0.0196407 0.0031388 -1 +0.0276378 0.0126611 0.0267511 0.00313804 -1 +0.0349015 0.0196294 0.0220594 0.00313727 -1 +0.0358939 0.0425332 0.0131742 0.00313647 -1 +0.0320419 0.0219922 0.00314604 0.00313544 -1 +0.0241945 0.0356688 0.0164362 0.00313442 -1 +0.0440633 0.0344374 0.00489245 0.0031334 -1 +0.0403587 0.036756 0.0905018 0.00313237 -1 +0.0180476 0.0326711 0.0548957 0.00313135 -1 +0.00872344 0.0393908 0.054183 0.00313036 -1 +0.0287243 0.0422994 0.038404 0.0031296 -1 +0.0174731 0.0222149 0.0852703 0.00312883 -1 +0.011844 0.00625444 0.0114228 0.00312806 -1 +0.0209279 0.0480729 0.0124777 0.00312726 -1 +0.0400354 0.0426351 0.00136706 0.00312624 -1 +0.0294237 0.00732402 0.050054 0.00312522 -1 +0.0287368 0.0156574 0.0339693 0.00312423 -1 +0.0259824 0.00293689 0.0860369 0.00312346 -1 +0.00484938 0.00902126 0.0509645 0.00312269 -1 +0.0196431 0.0441965 0.0754646 0.00312192 -1 +0.0201649 0.0265992 0.0888191 0.00312113 -1 +0.0338972 0.0417994 0.0494373 0.0031201 -1 +0.0459195 0.0116358 0.0290446 0.00311908 -1 +0.00689113 0.00184774 0.059251 0.00311806 -1 +0.00851803 0.00550354 0.0640326 0.00311703 -1 +0.0268393 0.0381541 0.00638859 0.00311601 -1 +0.0416915 0.0279166 0.0295686 0.00311502 -1 +0.0315854 0.0399034 0.0677478 0.00311425 -1 +-0.00134484 0.0318478 0.0362164 0.00311348 -1 +0.00240996 0.0253202 0.0296297 0.00311271 -1 +0.0395652 0.00368263 0.0800583 0.00311192 -1 +0.0160424 0.038176 0.0266232 0.0031109 -1 +0.0145789 0.04677 0.0112933 0.00310987 -1 +0.0340824 0.0363439 0.0134504 0.00310888 -1 +0.0232169 0.0267476 0.0560962 0.00310811 -1 +0.0357949 0.0385433 0.0863726 0.00310734 -1 +0.0366547 0.0202686 0.0799583 0.00310658 -1 +0.00351835 0.0196427 0.0319117 0.00310578 -1 +0.00983967 0.0211612 0.0433743 0.00310476 -1 +0.0430809 0.00687408 0.00591528 0.00310374 -1 +0.0364252 0.0439878 0.0209827 0.00310274 -1 +0.0345402 0.0174896 0.0352842 0.00310197 -1 +0.0398365 0.00819516 0.0556689 0.00310121 -1 +0.0281148 0.0040832 0.0917707 0.00310044 -1 +0.0169403 0.00631761 0.0378176 0.00309965 -1 +0.0398882 0.0181259 0.00975196 0.00309862 -1 +0.0220851 0.0388396 0.0253619 0.0030976 -1 +0.00983339 0.0147417 0.0232664 0.0030966 -1 +0.0332662 0.0343616 0.0335867 0.00309583 -1 +9.87286e-05 0.0301347 0.0528922 0.00309507 -1 +0.0145407 0.0195324 0.0275608 0.0030943 -1 +0.0131228 0.00424071 0.0307247 0.00309351 -1 +-0.000142299 0.0329049 0.0584197 0.00309249 -1 +0.00314473 0.0435819 0.0211132 0.00309146 -1 +0.0452554 0.0205576 0.0813374 0.00309046 -1 +0.0334722 0.046026 0.0769022 0.00308969 -1 +0.00479706 0.0442903 0.0873355 0.00308893 -1 +0.0337559 0.046735 0.0595408 0.00308816 -1 +0.0278683 0.0266307 0.0385352 0.00308737 -1 +0.0438343 0.0305696 0.0748842 0.00308635 -1 +0.0141425 0.0127307 0.069459 0.00308533 -1 +0.0160672 0.0454817 0.0803715 0.00308432 -1 +0.023045 0.00991015 0.0531815 0.00308356 -1 +0.0208438 0.0217813 0.0800708 0.00308279 -1 +0.0273274 0.0418681 0.0266047 0.00308202 -1 +0.0132274 0.0193047 0.00149444 0.00308124 -1 +0.0149963 0.0473197 0.0255958 0.00308021 -1 +0.000784853 0.0178222 0.0760913 0.00307919 -1 +0.0275137 0.0307386 0.0247944 0.00307819 -1 +0.0247493 0.0162264 0.0796054 0.00307742 -1 +0.0339372 0.0101212 0.0124919 0.00307665 -1 +0.0059887 0.014201 0.0652605 0.00307588 -1 +0.0208116 0.00975102 0.0810498 0.0030751 -1 +0.0301341 0.00587423 0.0786615 0.00307408 -1 +0.0326803 0.0215505 0.0395481 0.00307305 -1 +0.0217833 0.0246231 0.0674333 0.00307205 -1 +0.0208072 0.0280551 0.0414219 0.00307128 -1 +0.0258764 0.0235283 0.0336029 0.00307051 -1 +0.0185618 0.0352232 0.0607655 0.00306974 -1 +0.00421118 0.0434729 0.0553693 0.00306896 -1 +0.0431234 0.0367469 0.0726342 0.00306794 -1 +0.0290342 0.0145481 0.0481358 0.00306692 -1 +0.031597 0.0329199 0.0207549 0.00306591 -1 +0.0100833 0.0257375 0.0222242 0.00306514 -1 +0.0180543 0.0318518 0.0856607 0.00306437 -1 +0.0287599 0.0103745 0.0553978 0.00306361 -1 +0.0264154 0.0268391 -0.00050768 0.00306284 -1 +0.0190067 0.0373062 0.0452402 0.00306207 -1 +0.0415679 0.0269864 0.0223762 0.00306131 -1 +0.02787 0.00234105 0.0055548 0.00306054 -1 +0.0265991 0.0361875 0.022121 0.00305976 -1 +0.0399475 0.0176433 0.0556409 0.00305874 -1 +0.0389515 0.00941498 0.0207401 0.00305771 -1 +0.0429973 0.0140854 0.0902113 0.0030567 -1 +0.0159498 0.0245609 0.0401036 0.00305593 -1 +0.0185034 0.012754 0.0870656 0.00305517 -1 +0.0204863 0.02408 0.0263732 0.0030544 -1 +0.0236638 0.0407428 0.0472158 0.00305363 -1 +0.0162424 0.00362977 0.0433347 0.00305287 -1 +0.0200248 0.0331406 0.0913058 0.0030521 -1 +0.0473682 0.0428354 0.0103447 0.00305133 -1 +0.0420578 0.0239514 0.0710359 0.00305056 -1 +0.0159132 0.00454768 0.0762139 0.00304953 -1 +0.0383367 0.021086 0.0320468 0.00304851 -1 +0.00223441 0.046572 0.0319318 0.0030475 -1 +0.0454993 0.0412254 0.0316153 0.00304673 -1 +0.00759786 0.0317081 0.0485934 0.00304596 -1 +0.0112137 0.00186598 0.0682128 0.00304519 -1 +0.0283924 0.038646 0.0130169 0.00304443 -1 +0.0430325 0.0273186 0.0810199 0.00304366 -1 +0.00358389 0.0271772 0.047935 0.00304289 -1 +0.0368589 0.0385675 0.0716874 0.00304212 -1 +0.032422 0.031311 0.0507832 0.00304135 -1 +0.0381025 0.0307584 0.0103661 0.00304033 -1 +0.0118545 0.0171719 0.0659161 0.0030393 -1 +0.0316156 0.0384224 0.0292957 0.00303829 -1 +0.0331415 0.00962887 0.0225704 0.00303752 -1 +0.0358007 0.00809733 0.0278125 0.00303675 -1 +0.0111454 0.0151076 0.07696 0.00303599 -1 +0.0260929 0.0184922 0.0149263 0.00303522 -1 +0.00383962 0.0230624 0.00152469 0.00303445 -1 +-0.000753626 0.00919995 0.000760962 0.00303368 -1 +0.0162385 0.0372903 0.00940161 0.00303292 -1 +0.0140668 0.0480322 0.0855585 0.00303215 -1 +0.0158828 0.0143526 0.0223706 0.00303112 -1 +0.00415906 0.0161283 0.0251144 0.0030301 -1 +0.0103384 0.00970956 0.0307061 0.00302908 -1 +0.0290984 0.0262284 0.0813541 0.00302831 -1 +0.00676852 0.0194008 0.0683598 0.00302754 -1 +0.0361696 0.041439 0.0425541 0.00302678 -1 +0.0416302 0.0230863 0.0855651 0.00302601 -1 +0.0306599 0.0417779 0.0735204 0.00302524 -1 +0.0293211 0.0274672 0.0296772 0.00302448 -1 +0.0149491 0.0277691 0.068153 0.00302371 -1 +0.0325328 0.00185629 0.0653981 0.00302294 -1 +0.0218771 0.0460739 0.0495183 0.00302217 -1 +0.0238477 0.0174442 0.0468016 0.00302141 -1 +0.00132448 0.022846 0.0515268 0.00302064 -1 +0.0232866 0.0408012 0.0310507 0.00301987 -1 +0.0238618 0.031986 0.0529846 0.00301885 -1 +0.0238984 0.0338104 0.0443375 0.00301783 -1 +0.0267507 0.0192532 0.0293586 0.0030168 -1 +0.0188719 0.0424001 0.0113242 0.00301604 -1 +0.00766613 0.00701205 0.0560343 0.00301527 -1 +0.0185971 0.027174 0.0818167 0.0030145 -1 +0.0222102 0.00289544 0.0442586 0.00301374 -1 +0.0338771 0.0261168 0.0723579 0.00301297 -1 +0.00787006 0.0345372 0.0739425 0.0030122 -1 +0.0222794 0.00709354 0.0928991 0.00301143 -1 +0.0209475 0.0398572 0.00626981 0.00301067 -1 +0.0164018 0.0148447 0.0626737 0.0030099 -1 +0.0415273 0.0129377 0.0591309 0.00300913 -1 +0.00524112 0.0435307 0.0766655 0.00300836 -1 +0.0414637 0.0058742 0.0249757 0.0030076 -1 +0.00467164 0.029454 0.0743412 0.00300683 -1 +0.00706459 0.0434661 0.0114853 0.00300606 -1 +0.0334399 0.0174725 0.0516916 0.00300529 -1 +0.0225175 0.0359971 0.0851003 0.00300453 -1 +0.0371689 0.0268323 0.0335444 0.00300351 -1 +0.00764861 2.11675e-05 0.00613664 0.00300249 -1 +0.020343 0.0103093 0.0227579 0.00300146 -1 +0.00861885 0.0286425 0.00942972 0.00300069 -1 +0.00896041 0.0172213 0.028767 0.00299992 -1 +0.0373828 0.0312959 0.0215747 0.00299916 -1 +0.0219387 0.0361817 0.0675217 0.00299839 -1 +0.0300222 0.0102379 0.017135 0.00299762 -1 +0.0101251 0.0247838 0.0384728 0.00299685 -1 +0.0391472 0.0228789 0.0489696 0.00299609 -1 +0.0121181 0.026315 0.0504764 0.00299532 -1 +0.0265312 0.00558626 0.036017 0.00299455 -1 +0.0170023 0.0382943 0.0152947 0.00299379 -1 +0.0324864 0.00789741 0.088418 0.00299302 -1 +0.00200805 0.0347563 0.075224 0.00299225 -1 +0.000389418 0.0356171 0.0296484 0.00299148 -1 +0.0151737 0.0191636 0.018819 0.00299072 -1 +0.00922259 0.0411591 0.0728572 0.00298995 -1 +0.0393152 0.0162103 0.0023898 0.00298918 -1 +0.0173575 0.0292354 0.0227824 0.00298841 -1 +0.0287734 0.0253307 0.0754144 0.00298765 -1 +0.0382716 0.0141371 0.0640211 0.00298688 -1 +0.00401176 0.0257812 0.0068941 0.00298611 -1 +0.0342228 0.0326687 0.0860015 0.00298535 -1 +0.015823 0.0080004 0.084146 0.00298458 -1 +0.0105644 0.0158202 0.00568442 0.00298381 -1 +0.0457285 0.00966276 0.0231466 0.00298304 -1 +0.0168917 0.032389 0.0166144 0.00298203 -1 +0.00793883 0.00898482 0.00224026 0.00298101 -1 +0.0282005 0.000631805 0.0496411 0.00297999 -1 +0.00687996 0.0428639 0.0347179 0.00297921 -1 +0.0324554 0.004559 0.00879876 0.00297844 -1 +0.0408202 0.0420371 0.0874637 0.00297767 -1 +0.0169999 0.0292531 0.0361145 0.00297691 -1 +0.0243775 0.0471355 0.0271493 0.00297614 -1 +0.0176526 0.0123613 0.0544558 0.00297537 -1 +0.00656446 0.00327259 0.0121142 0.0029746 -1 +0.029995 0.0105222 0.0825286 0.00297384 -1 +0.00334507 0.0381995 0.0581883 0.00297307 -1 +0.0271629 0.000609769 0.0613211 0.0029723 -1 +0.043448 0.0214115 0.00113181 0.00297154 -1 +0.0415452 0.0214706 0.0197825 0.00297077 -1 +0.00645019 0.0174154 0.0740102 0.00297 -1 +0.0221365 0.0224104 0.0431123 0.00296923 -1 +0.00145554 0.0406387 0.0832066 0.00296847 -1 +0.0119075 0.0444138 0.0898296 0.0029677 -1 +0.0378229 0.0071119 0.00894004 0.00296693 -1 +0.0306588 0.0215535 0.0661509 0.00296617 -1 +0.00436834 0.0309859 0.0804913 0.0029654 -1 +0.00269729 0.0166106 0.0841077 0.00296463 -1 +0.019173 0.0137338 0.0173975 0.00296386 -1 +0.0228389 0.0284433 0.0353408 0.0029631 -1 +0.0324338 0.0153213 0.0151693 0.00296233 -1 +0.0305364 0.0435464 0.0322244 0.00296156 -1 +0.00902046 0.0268145 0.0454138 0.0029608 -1 +0.0156589 0.0235348 0.0228275 0.00296003 -1 +0.0177261 0.00189 0.0664352 0.00295926 -1 +0.000794552 0.018487 0.0893937 0.0029585 -1 +0.0122385 0.0448962 0.0331678 0.00295773 -1 +0.0391256 0.039661 0.0376623 0.00295696 -1 +0.00326287 0.0300324 0.0865304 0.00295619 -1 +0.0253818 0.0125054 0.0438049 0.00295543 -1 +0.0353282 0.0307195 0.0159766 0.00295466 -1 +0.0166574 0.00909938 0.0610949 0.00295389 -1 +0.00558663 0.0397323 0.0250823 0.00295312 -1 +0.00928077 0.0481867 0.0521919 0.00295236 -1 +0.0169273 0.012796 0.0485895 0.00295159 -1 +0.00713016 0.0258133 0.087992 0.00295082 -1 +0.0296587 0.0273544 0.0189433 0.00295006 -1 +0.0344271 0.0412106 0.0916354 0.00294929 -1 +0.0334648 0.0326219 0.0801165 0.00294852 -1 +0.041216 0.0262445 0.0906188 0.00294775 -1 +0.0365708 0.0168497 0.0272079 0.00294699 -1 +0.0203745 0.0128325 0.0283901 0.00294622 -1 +0.0178916 0.0395692 0.0210269 0.00294545 -1 +0.0120072 0.000694206 0.0623925 0.00294469 -1 +0.00800299 0.0466211 0.0827875 0.00294392 -1 +0.0286593 0.0270014 0.0490271 0.00294315 -1 +0.0320807 0.0246041 0.0608969 0.00294239 -1 +0.0270238 0.00813436 0.00422069 0.00294162 -1 +0.0162898 0.0206256 0.0742981 0.00294085 -1 +0.038614 0.0295526 0.0513046 0.00294008 -1 +0.0303536 0.0147828 0.00781658 0.00293932 -1 +0.00773286 0.00416146 0.0280177 0.00293855 -1 +0.0291617 0.0343251 0.00221766 0.00293778 -1 +0.0109977 0.0234241 0.0671339 0.00293702 -1 +0.0272678 0.0321705 0.0342026 0.00293625 -1 +0.00861016 0.0201253 0.0351269 0.00293548 -1 +0.00564255 0.0381905 0.0307644 0.00293471 -1 +0.0179869 0.0336065 0.0404842 0.00293395 -1 +0.0266909 0.0253276 0.0639563 0.00293332 -1 +0.00385405 0.033373 0.0696647 0.0029327 -1 +0.00343068 0.0314745 0.0053757 0.00293209 -1 +0.0296836 0.0454686 0.0552925 0.00293147 -1 +0.042465 0.0255078 0.0531181 0.00293086 -1 +0.0460066 0.00426983 0.0726341 0.00293011 -1 +0.0131969 0.0378915 0.0900578 0.00292934 -1 +0.0229536 0.0147388 0.0567641 0.00292858 -1 +0.0444519 0.0177676 0.0516995 0.00292781 -1 +0.0427201 0.0429508 0.0722924 0.00292704 -1 +0.0195811 0.010475 0.0105008 0.00292628 -1 +0.0248106 0.0425298 0.0781274 0.00292551 -1 +0.028535 0.0143189 0.0738522 0.00292474 -1 +0.0291018 0.0349103 0.0834173 0.00292397 -1 +0.0388344 0.0436877 0.0618664 0.00292321 -1 +0.0454031 0.0300824 0.0636883 0.00292244 -1 +0.0441364 -8.6157e-05 0.0439933 0.00292167 -1 +0.0211218 0.00744671 0.0713807 0.0029209 -1 +0.0367223 0.00792989 0.0336952 0.00292014 -1 +0.0198701 0.0196437 0.062984 0.00291937 -1 +0.040067 0.0417362 0.0529612 0.0029186 -1 +0.0233502 0.039018 0.0415023 0.00291784 -1 +0.0252127 0.000973559 0.0395188 0.00291707 -1 +0.0130567 0.0365772 0.0193459 0.0029163 -1 +0.0272975 0.0184695 0.00444804 0.00291554 -1 +0.0332472 0.0313887 0.0264127 0.00291477 -1 +0.0111465 0.0147841 0.033692 0.002914 -1 +0.0262732 0.0358404 0.0297575 0.00291323 -1 +0.0147094 0.0249278 0.0779445 0.00291247 -1 +0.0320875 0.028685 0.0919556 0.00291183 -1 +0.0272657 0.0100696 0.0322261 0.00291122 -1 +0.0400359 0.032093 0.0705008 0.0029106 -1 +0.00766678 0.0342559 0.0588297 0.00290999 -1 +0.0238 0.0119237 0.0687777 0.00290938 -1 +0.0198205 0.00732179 0.0656997 0.00290863 -1 +0.00797032 0.00886307 0.0777459 0.00290786 -1 +0.0219348 0.0457414 0.00470555 0.0029071 -1 +0.0390086 0.0168709 0.049801 0.00290633 -1 +0.0225086 0.0344521 0.00443947 0.00290556 -1 +0.0446999 0.0127885 0.034832 0.00290479 -1 +0.0268039 0.0117859 0.0381664 0.00290403 -1 +0.0156939 0.0100118 0.0332451 0.00290326 -1 +0.0137543 0.0170729 0.0828478 0.00290249 -1 +0.0401036 0.0116881 0.0415915 0.00290173 -1 +0.00503794 0.0333663 0.0267571 0.00290096 -1 +0.0232684 0.0320745 0.0588747 0.00290019 -1 +0.00512504 0.0119215 0.0208034 0.00289955 -1 +0.0181736 0.0292581 0.0598656 0.00289894 -1 +0.00518811 0.0407897 0.00648573 0.00289832 -1 +0.0429223 0.0438401 0.0576199 0.00289771 -1 +0.0100403 0.0448537 0.0232983 0.0028971 -1 +0.0145067 0.0115309 0.0131669 0.00289636 -1 +0.037336 0.0343694 0.0406788 0.00289559 -1 +0.0371574 0.0374614 0.0468333 0.00289482 -1 +0.0333908 0.00890867 0.0458134 0.00289405 -1 +0.0189081 0.0433362 0.0277236 0.00289329 -1 +0.0344629 0.0324835 0.0453361 0.00289252 -1 +0.00648589 0.0259525 0.0339933 0.00289175 -1 +0.0405449 0.00947662 0.081345 0.00289099 -1 +0.00106577 0.017295 0.00299291 0.00289022 -1 +0.029033 0.0302245 0.0872684 0.00288945 -1 +0.0323822 0.0374077 0.059142 0.00288868 -1 +0.0397654 0.0150326 0.0368778 0.00288792 -1 +0.00242381 0.0460503 0.0811902 0.00288728 -1 +0.0391033 0.0365979 0.0101836 0.00288666 -1 +0.0385908 0.0128227 0.0864292 0.00288605 -1 +0.0272878 0.00462445 0.0557987 0.00288543 -1 +0.0275753 0.0132113 0.0126881 0.00288482 -1 +0.0117245 0.0309444 0.0197212 0.00288408 -1 +0.0128152 0.00995462 0.0745733 0.00288331 -1 +0.0180958 0.0306251 0.0770613 0.00288255 -1 +0.0334809 0.0382428 0.0381278 0.00288178 -1 +0.0194959 0.00396543 0.0819934 0.00288101 -1 +0.0423977 0.0357789 0.048771 0.00288025 -1 +0.00658012 0.0215169 0.0252719 0.00287948 -1 +0.0355011 0.00570079 0.0760923 0.00287871 -1 +0.00388987 0.0127497 0.0764343 0.00287807 -1 +0.00582352 0.0115288 0.0381814 0.00287745 -1 +0.012699 0.010986 0.0572519 0.00287684 -1 +0.0397438 0.0189719 0.0893533 0.00287623 -1 +0.017947 0.0450345 0.0167105 0.00287561 -1 +0.0381253 0.0337925 0.0756905 0.00287488 -1 +0.0228866 0.0130154 0.0745937 0.00287411 -1 +0.0274102 0.000682417 0.075053 0.00287334 -1 +0.0378083 0.0107279 0.0696937 0.00287257 -1 +0.0389194 0.0374505 0.00416905 0.00287181 -1 +0.0118314 0.0178717 0.0717848 0.00287104 -1 +0.00787621 0.0261753 0.0822303 0.00287027 -1 +0.0275093 0.0251475 0.0696983 0.00286951 -1 +0.0367921 0.0302832 0.0571308 0.00286886 -1 +0.0409717 0.00293455 0.0858225 0.00286825 -1 +0.0296681 0.0301683 0.0716865 0.00286763 -1 +0.0311807 1.35464e-05 0.0122459 0.00286702 -1 +0.0155862 0.0092354 0.0183413 0.00286641 -1 +0.0191656 0.0451584 0.0862854 0.00286567 -1 +0.0104959 0.0366411 0.0833244 0.0028649 -1 +-0.000869459 0.0453552 0.0858538 0.00286414 -1 +0.0171274 0.00247044 0.00619812 0.00286337 -1 +0.0442117 0.0253619 0.0473827 0.0028626 -1 +0.0224852 0.0127808 0.0943662 0.00286184 -1 +0.0163237 0.0171194 0.0347376 0.00286107 -1 +0.00819519 0.00527019 0.0223447 0.0028603 -1 +0.021684 0.0168393 0.0413687 0.00285775 -1 +0.039123 0.0266042 0.0144239 0.00285468 -1 +0.00306379 0.0290501 0.000130787 0.00285161 -1 +0.0134767 0.0299967 0.081382 0.00284854 -1 +0.0024914 0.022916 0.0367753 0.00284547 -1 +0.00837558 0.0342725 0.0433502 0.0028424 -1 +-0.00132567 0.0225713 0.0574505 0.00283933 -1 +0.0121412 0.0137577 0.0178901 0.00283625 -1 +0.0387704 0.0310598 0.00453831 0.00283318 -1 +0.0243323 0.021792 0.0600617 0.00283011 -1 +0.0124508 0.0435246 0.0168912 0.00282704 -1 +0.043184 0.0369747 0.0852615 0.00282397 -1 +0.0396059 0.0123027 0.0107772 0.00282089 -1 +0.0334102 0.0293843 0.00539239 0.00281782 -1 +0.0308852 0.0365199 0.0891015 0.00281475 -1 +0.00785368 0.00575927 0.00705106 0.00281168 -1 +0.0136507 0.0429941 0.0663677 0.00280861 -1 +0.00417704 0.00783176 0.0735998 0.00280553 -1 +0.0394035 0.0150398 0.0801096 0.00280246 -1 +0.0197224 0.0266059 0.0130847 0.00279939 -1 +0.0131632 0.0155584 0.045209 0.00279632 -1 +0.0318443 0.02877 0.0347675 0.00279325 -1 +0.016887 0.0262046 0.017885 0.00279018 -1 +0.00200422 0.0206085 0.0220554 0.00278711 -1 +0.0403214 0.0334691 0.0602264 0.00278403 -1 +0.0194264 0.017033 0.0832057 0.00278096 -1 +0.0218763 0.0173799 0.0881835 0.00277789 -1 +0.0416056 0.00373818 0.019044 0.00277482 -1 +0.018345 0.00981618 0.0757489 0.00277176 -1 +0.00837906 0.0207936 0.0181905 0.00276869 -1 +0.00310715 0.0143551 0.00860442 0.00276562 -1 +0.019174 0.0237377 0.0591061 0.00276255 -1 +0.0449613 0.0111498 0.00971363 0.00275948 -1 +0.0126892 0.0246368 0.0724532 0.00275642 -1 +0.0232887 0.00255244 0.0178301 0.00275335 -1 +0.0372251 0.0217472 0.0740645 0.00275029 -1 +0.0225786 0.0426401 0.0372148 0.00274722 -1 +0.037865 0.0386801 0.0593889 0.00274531 -1 +0.0154496 0.0230772 0.0132182 0.00274378 -1 +0.0414945 0.019576 0.0767502 0.00274109 -1 +0.0412878 0.0407119 0.0815611 0.00273801 -1 +0.0247196 0.0121877 0.0181058 0.00273494 -1 +0.0313516 0.00923476 0.0360278 0.00273187 -1 +0.026954 0.0360775 0.0382927 0.0027288 -1 +0.000351152 0.0303321 0.0274549 0.00272574 -1 +0.0267995 0.000472188 0.0214816 0.00272267 -1 +0.0400368 0.040002 0.076291 0.0027196 -1 +0.0177107 0.0156479 0.00191084 0.00271654 -1 +0.0372393 0.0315921 0.0303764 0.00271461 -1 +0.0397865 0.0106148 0.0935183 0.00271307 -1 +0.0389828 0.0315217 0.0807207 0.0027104 -1 +0.0137218 0.0357592 0.0435191 0.00270733 -1 +0.0435469 0.0361019 0.0135401 0.00270426 -1 +0.0153915 0.0403176 0.0778521 0.00270119 -1 +0.00881841 0.0401287 0.0873206 0.00269812 -1 +0.016148 0.000905746 0.0717748 0.00269505 -1 +0.0123036 0.0301484 0.0252097 0.00269199 -1 +0.00895861 0.0227387 0.0301575 0.00269005 -1 +0.0106053 0.0104891 0.00762224 0.00268851 -1 +0.035306 0.0182839 0.00622523 0.00268585 -1 +0.0196005 0.0310491 0.0685647 0.00268278 -1 +0.0162799 0.0177949 0.08896 0.00267971 -1 +0.044978 0.0165089 0.0405834 0.00267665 -1 +0.0327951 0.0288622 0.0113064 0.00267358 -1 +0.0229815 -0.000344415 0.0823207 0.00267163 -1 +0.0272309 0.0225665 0.0554515 0.00267009 -1 +0.0247461 0.00749036 0.046503 0.00266744 -1 +0.0145376 0.0309349 0.00401845 0.00266437 -1 +0.0388878 0.00804496 0.0145183 0.0026613 -1 +0.0375912 0.0414599 0.0077387 0.00265824 -1 +0.00394934 0.0225222 0.0835788 0.00265517 -1 +0.0378325 0.0275817 0.0461288 0.00265321 -1 +0.0262789 -0.00103186 0.0446033 0.00265167 -1 +0.0400146 0.030757 0.0649514 0.00264904 -1 +0.000198779 0.0206139 0.0169311 0.00264597 -1 +0.0431913 0.00137198 0.0297908 0.0026429 -1 +0.0101012 0.00363317 0.00256248 0.00263983 -1 +0.0159902 0.0318516 0.010988 0.00263786 -1 +0.0140179 0.031977 0.0909466 0.00263632 -1 +0.0306844 0.00189777 0.0393876 0.0026337 -1 +0.0316615 0.00307112 0.085121 0.00263063 -1 +0.0243852 0.00475801 0.0511136 0.00262756 -1 +0.0427773 0.022218 0.0132907 0.00262558 -1 +0.0093662 0.0233435 0.0924618 0.00262404 -1 +0.0151016 0.0133176 0.00782209 0.00262143 -1 +0.0455214 0.0323917 0.0833977 0.00261836 -1 +0.0396487 0.0301568 0.0379526 0.00261529 -1 +0.0273518 0.0325334 0.0485981 0.0026133 -1 +0.018332 0.017315 0.0456644 0.00261176 -1 +0.0201771 0.0346507 0.0124597 0.00260915 -1 +0.00211122 0.00126376 0.0148414 0.00260608 -1 +0.0331989 0.011597 0.0506044 0.00260302 -1 +0.0213445 0.0149494 0.0511745 0.00260102 -1 +0.0256063 0.00976083 0.0600613 0.00259948 -1 +0.038871 0.0155014 0.0223473 0.00259688 -1 +0.0454938 0.0162046 0.0568943 0.00259381 -1 +0.0151737 0.0143571 0.0298718 0.00259075 -1 +0.00556721 0.0137475 0.00388766 0.00258874 -1 +0.0405935 0.00768612 0.0761347 0.0025872 -1 +0.0253121 0.0283384 0.0448331 0.00258461 -1 +0.0112194 0.0202208 0.0226931 0.00258155 -1 +0.00215511 0.0205558 0.0713299 0.00257953 -1 +0.0203814 0.0248078 0.0319574 0.002578 -1 +0.0414391 0.0122949 0.0255205 0.00257541 -1 +0.0431542 0.0219745 0.0401336 0.00257234 -1 +0.0336526 0.0422642 0.0630078 0.00257032 -1 +0.00129128 0.00289647 0.0675265 0.00256878 -1 +0.0254224 0.0409017 0.0594034 0.0025662 -1 +0.0196728 0.00294762 0.0536862 0.00256313 -1 +0.0432591 0.0455247 0.0805437 0.00256111 -1 +0.0283511 0.0187523 0.0619805 0.00255957 -1 +0.0195161 0.0195514 0.01537 0.00255699 -1 +0.016035 0.0316354 0.0642824 0.00255393 -1 +0.037757 0.00277466 0.0319037 0.0025519 -1 +0.0429832 0.016116 0.0849169 0.00255036 -1 +0.0376809 0.0189647 0.0401271 0.00254779 -1 +0.00534551 0.00405698 0.0482739 0.00254472 -1 +0.00743528 0.0267536 0.0646053 0.00254268 -1 +0.0124705 0.0361473 0.076604 0.00254115 -1 +0.0297862 0.00941918 0.00877608 0.00253858 -1 +0.0400024 0.00414131 0.0464762 0.00253551 -1 +0.0182418 0.0425964 0.00224151 0.00253347 -1 +0.0112537 0.0285327 0.0341571 0.00253194 -1 +0.0231325 0.0325344 0.0389937 0.00252938 -1 +0.0246065 0.0219121 0.0874152 0.00252631 -1 +0.0416656 0.0126226 0.00585523 0.00252426 -1 +0.0113149 0.00684506 0.0353605 0.00252273 -1 +0.00620815 0.00382446 0.078816 0.00252018 -1 +0.00348907 0.036476 0.0433886 0.00251813 -1 +0.0179162 0.0274807 0.0461691 0.00251659 -1 +0.0077037 0.00174599 0.0905236 0.00251404 -1 +0.0433706 0.00125094 0.0496038 0.00251097 -1 +0.0229215 0.0470004 0.065061 0.00250892 -1 +0.0417427 0.0312818 0.0145197 0.00250738 -1 +0.0379079 0.00827834 0.0892476 0.00250484 -1 +0.0427505 -0.000358877 0.00936381 0.00250278 -1 +0.00318743 0.0144905 0.0428172 0.00250124 -1 +0.0218049 0.0434585 0.070271 0.00249871 -1 +0.0395942 0.0230165 0.0570237 0.00249664 -1 +0.00460393 0.00427051 0.00304043 0.0024951 -1 +0.0149668 0.0465341 0.0938246 0.00249257 -1 +0.0464861 0.0112474 0.0574612 0.0024895 -1 +0.0295124 0.038434 0.0344055 0.00248743 -1 +0.0195621 0.0318413 0.0495505 0.0024859 -1 +0.0336559 0.0244137 0.0777062 0.00248337 -1 +0.0392732 0.0180465 0.0709857 0.00248129 -1 +0.0330321 0.012883 0.0283172 0.00247976 -1 +0.0320219 0.0178395 0.0299916 0.00247724 -1 +0.0381639 0.0365415 0.081731 0.00247515 -1 +0.00197301 0.0432791 0.0271668 0.00247362 -1 +0.0270819 0.00863826 0.0887332 0.0024711 -1 +0.0125509 0.0248143 0.027091 0.00246901 -1 +0.0328119 0.00702383 0.0571146 0.00246748 -1 +0.0439518 0.0420348 0.0383473 0.00246497 -1 +0.0149082 0.00230632 0.0521046 0.00246287 -1 +0.0118306 0.0364946 0.0707111 0.00246134 -1 +0.0182263 0.0373288 0.0882084 0.00245883 -1 +0.0140942 0.00534429 0.0643618 0.00245673 -1 +0.0239336 0.0292264 0.0206944 0.0024552 -1 +0.0248481 0.0101456 0.00874624 0.00245269 -1 +0.022579 0.0372108 0.0575429 0.00245059 -1 +0.0355079 0.0396247 0.0332461 0.00244906 -1 +0.0387972 0.0447913 0.0777793 0.00244656 -1 +0.0246887 0.0204895 0.0651831 0.00244445 -1 +0.0432476 0.0304987 0.0482983 0.00244292 -1 +0.0205391 0.0215554 0.0482096 0.00244042 -1 +0.0422666 0.0408687 0.00985319 0.00243831 -1 +0.0227093 0.0299823 0.015992 0.00243678 -1 +0.0317741 0.042024 0.0089506 0.00243429 -1 +0.0256523 0.0415435 0.0213611 0.00243218 -1 +0.0259328 0.010419 0.0785361 0.00243064 -1 +0.00745489 0.0163782 0.0448059 0.00242816 -1 +0.0182217 0.0153164 0.0123338 0.00242604 -1 +0.0372004 0.0261748 0.0622342 0.00242451 -1 +0.0211645 0.0313907 0.0637164 0.00242297 -1 +-0.0018026 0.0360897 0.0187595 0.00242144 -1 +0.036198 0.0103993 0.0784383 0.00241896 -1 +0.043368 0.0323986 0.0100076 0.00241683 -1 +0.0172702 0.00234171 0.0899435 0.0024153 -1 +0.0379335 0.0237139 0.00987616 0.00241283 -1 +0.0254256 0.00642976 0.0814263 0.00241069 -1 +0.047457 0.0453365 0.0717052 0.00240916 -1 +0.0397511 0.0322045 0.0454081 0.00240362 -1 +0.0281382 0.0211032 -0.000677192 0.00240055 -1 +0.0376847 0.0029184 0.0640648 0.00239441 -1 +0.0189135 0.0124245 0.0667936 0.00238827 -1 +0.0302005 0.0421991 0.059453 0.0023852 -1 +0.0239266 0.0305999 0.0885097 0.00237906 -1 +0.027557 0.00433728 0.0305177 0.00237292 -1 +0.0380582 0.0152829 0.0448601 0.00236986 -1 +0.021588 0.00362684 0.0367424 0.00236372 -1 +0.0436158 0.0409025 0.0489907 0.00236065 -1 +0.0275887 0.0419621 0.0636925 0.00235451 -1 +0.0300021 0.0125442 0.0875057 0.00235143 -1 +0.0130848 0.019943 0.0784465 0.00234529 -1 +0.00549615 0.00891426 0.0285295 0.00233915 -1 +0.0302016 0.00797555 0.0283199 0.00233609 -1 +0.040273 0.00360572 0.0679922 0.00232995 -1 +0.0297975 0.0412339 0.0791467 0.00232688 -1 +0.0353967 0.012244 0.0363594 0.00232074 -1 +0.0171709 0.00709244 0.0543051 0.00231767 -1 +0.017259 0.0417582 0.0896922 0.00231153 -1 +0.0283052 0.0293195 0.00395645 0.00230846 -1 +0.0169913 0.00564872 0.0130437 0.00230232 -1 +0.0126536 0.00346918 0.0904576 0.00229926 -1 +0.0455816 0.000618556 0.0763448 0.00229312 -1 +0.0303067 0.00476822 0.0604855 0.00229005 -1 +0.0136789 0.0443224 0.042053 0.00228698 -1 +0.0125529 0.0236032 0.0172902 0.00228084 -1 +0.0409725 0.00961371 0.0640016 0.00227776 -1 +0.0260199 0.0226211 0.0789879 0.00227162 -1 +0.00790174 0.00995835 0.0247404 0.00226856 -1 +0.0415015 0.0315533 0.000264806 0.00226242 -1 +0.0373 0.0283288 0.0682461 0.00225935 -1 +0.0232648 0.0336631 0.0261614 0.00225628 -1 +0.0121035 0.00297678 0.00710296 0.00225014 -1 +0.0313797 0.0037031 0.0737907 0.00224707 -1 +0.0016428 0.0408225 0.042775 0.002244 -1 +0.0144072 0.0129584 0.0372703 0.00223786 -1 +0.0277344 0.0433315 0.00399981 0.00223479 -1 +0.0119982 0.0230704 0.0819337 0.00223172 -1 +0.0354482 0.00427613 0.0450944 0.00222557 -1 +0.0406229 0.0242187 0.0439662 0.00222251 -1 +0.0316216 0.0415193 0.0235156 0.00221943 -1 +0.04061 0.0383697 0.0215843 0.00221329 -1 +0.031983 0.0367405 0.0729875 0.00221022 -1 +0.0371895 0.0289523 0.000239586 0.00220715 -1 +0.0132512 0.012578 0.0869661 0.00220101 -1 +0.000936773 0.0123453 0.0392873 0.00219794 -1 +0.00419598 0.0431709 0.0158162 0.00219487 -1 +0.0358931 0.0344401 0.00689285 0.0021918 -1 +0.00368011 0.00215897 0.0752 0.00218566 -1 +0.0325194 0.0462049 0.0715042 0.00218259 -1 +0.0431246 0.0456187 0.090372 0.00217952 -1 +0.0133179 0.015419 0.0549065 0.00217645 -1 +0.0435986 0.0469759 0.0692765 0.0021703 -1 +0.0251686 0.00753664 0.0283561 0.00216724 -1 +0.044641 0.0251441 0.0261798 0.00216417 -1 +0.033095 0.00733498 0.0655317 0.0021611 -1 +0.0251651 0.0264825 0.086545 0.00215495 -1 +0.0183936 0.038483 0.0561123 0.00215189 -1 +0.0388929 0.00142988 0.0254525 0.00214882 -1 +0.0148746 0.00898864 0.0791432 0.00214575 -1 +0.0403128 0.0204647 0.00508066 0.00214268 -1 +0.0417679 0.0353932 0.0385266 0.00213654 -1 +0.0250521 0.0316438 0.000937655 0.00213347 -1 +0.00556298 0.000940852 0.0242024 0.00213041 -1 +0.0139614 0.0082212 0.0451811 0.00212734 -1 +0.027477 0.0258 0.0589827 0.00212427 -1 +0.0268798 0.0309616 0.0412546 0.00212119 -1 +0.0213128 0.0112665 0.0465649 0.00211506 -1 +0.0268123 0.0338577 0.0898919 0.00211199 -1 +0.013457 0.0341502 0.0865471 0.00210893 -1 +0.0150367 0.0442231 0.0211349 0.00210586 -1 +0.0353397 0.0359351 0.0267703 0.00210279 -1 +0.0310847 0.0362511 0.0246694 0.00209972 -1 +0.0297645 0.030712 0.0448487 0.00209665 -1 +0.0192261 0.0317391 0.0449845 0.00209358 -1 +0.00488701 0.00386033 0.0707876 0.0020905 -1 +0.0367996 0.0123028 0.0250662 0.00208436 -1 +0.0331681 0.0288405 0.0766215 0.0020813 -1 +0.0260376 0.0134653 0.0056184 0.00207823 -1 +0.00423239 0.00791914 0.0236245 0.00207517 -1 +0.0268771 0.0189002 0.00939932 0.0020721 -1 +0.00694591 0.0465872 0.0729725 0.00206903 -1 +-0.00161615 0.0440979 0.0528171 0.00206596 -1 +0.0182798 0.0269354 0.0643569 0.00206289 -1 +0.0164013 0.0125987 0.082126 0.00205982 -1 +0.0153947 0.0340047 0.023598 0.00205675 -1 +0.0346211 0.0151396 0.0105035 0.00205368 -1 +0.0350242 0.0188437 0.0562932 0.00205061 -1 +0.00652525 0.0129089 0.0915496 0.00204753 -1 +0.0390376 0.0219936 0.0241855 0.00204446 -1 +0.0243649 0.0184084 0.0339279 0.00204138 -1 +0.0328033 0.0331343 0.0751322 0.00203831 -1 +0.0126685 0.0284048 0.0561138 0.00203524 -1 +0.0420036 0.032899 0.0527312 0.00203216 -1 +0.0145654 0.025192 0.0577258 0.00202909 -1 +0.0271313 0.0269307 0.0143085 0.00202601 -1 +0.0452336 0.0313819 0.0694402 0.00201987 -1 +0.0433737 0.00550863 0.0129998 0.00200759 -1 +0.0126086 0.00745024 0.0034405 0.00199531 -1 +0.0449468 0.0283269 0.0855605 0.0019861 -1 +0.0419987 0.0350951 0.0560816 0.00197381 -1 +-0.000134923 0.0132247 0.00535084 0.0019646 -1 +0.0187429 0.0414994 0.0675298 0.00195231 -1 +0.0236207 0.0195542 0.0836779 0.00194309 -1 +0.00737614 0.0238534 0.0704853 0.00193081 -1 +0.00340897 0.0112634 0.0256522 0.0019216 -1 +0.0365948 0.0430928 0.0739299 0.00191238 -1 +0.0330403 0.012296 0.0327006 0.0019001 -1 +0.00186943 0.00766568 0.0847928 0.00189089 -1 +0.0409991 0.010327 0.0366707 0.00188168 -1 +0.0102409 0.00804087 0.0683153 0.00187246 -1 +0.0349636 0.0395929 0.0171097 0.00186325 -1 +0.0241165 0.0368305 0.0107235 0.00185403 -1 +0.0221444 0.0168272 0.00464876 0.00184482 -1 +0.0334375 0.00293041 0.0807891 0.00183561 -1 +0.0429303 0.0131788 0.0139134 0.0018264 -1 +0.00840905 0.0383188 0.0346258 0.00181719 -1 +0.0290878 0.006689 0.0852449 0.00181104 -1 +0.00526287 0.00463607 0.0831416 0.00180183 -1 +0.0046663 0.0309525 0.0608934 0.00179261 -1 +0.0102592 0.0192547 0.00899159 0.0017834 -1 +0.00644387 0.000889606 0.0452262 0.00177726 -1 +0.0409669 -0.00235774 0.00603769 0.00176805 -1 +0.0150926 0.00915715 0.00920198 0.00176191 -1 +0.0120822 0.0346188 0.0617681 0.00175269 -1 +0.0169408 0.0061108 0.00902045 0.00174655 -1 +0.0236723 0.0107356 0.0127246 0.00173733 -1 +0.0359604 0.0121071 0.0910809 0.00173119 -1 +0.0126715 0.0433124 0.0280368 0.00172197 -1 +0.0452221 0.0435564 0.0929257 0.00171583 -1 diff --git a/tutorials/physics_based/triaxial_compression/triax_YADE_DEM_model.py b/tutorials/physics_based/triaxial_compression/triax_YADE_DEM_model.py new file mode 100755 index 0000000..36d6582 --- /dev/null +++ b/tutorials/physics_based/triaxial_compression/triax_YADE_DEM_model.py @@ -0,0 +1,193 @@ +# encoding: utf-8 + +# default material parameters +readParamsFromTable( + # no. of your simulation + key=0, + # Young's modulus + E_m=8.8328129646e+00, + # Poisson's ratio + v=1.1768868293e-01, + # rolling/bending stiffness + kr=1.0968388788e-01, + # rolling/bending plastic limit + eta=7.3928627878e-01, + # final friction coefficient + mu=2.9648597170e+01, + # number of particles + num=1000, + # initial confining pressure + conf=0.5e6, + unknownOk=True +) + +import numpy as np +from yade.params import table +from yade import pack +from grainlearning.tools import get_keys_and_data, write_dict_to_file + +# check if run in batch mode +isBatch = runningInBatch() +if isBatch: + description = O.tags['description'] +else: + description = 'triax_DEM_test_run' + +#: Simulation control parameters +num = table.num # number of soil particles +dScaling = 1e3 # density scaling +e = 0.68 # initial void ratio +conf = table.conf # confining pressure +rate = 0.1 # strain rate (decrease this for serious calculations) +damp = 0.2 # damping coefficient +stabilityRatio = 1.e-3 # threshold for quasi-static condition (decrease this for serious calculations) +stressTolRatio = 1.e-3 # tolerance for stress goal +initStabilityRatio = 1.e-3 # initial stability threshold +obsCtrl = 'e_z' # key for simulation control +lowDamp = 0.2 # damping coefficient +highDamp = 0.9 +debug = False + +#: load strain/stress data for quasi-static loading +obs_file_name = "triax_data_DEM.dat" +obs_data = get_keys_and_data(obs_file_name) +obs_ctrl_data = list(0.01 * obs_data[obsCtrl]) +obs_ctrl_data.reverse() + +#: Soil sphere parameters +E = pow(10, table.E_m) # micro Young's modulus +v = table.v # micro Poisson's ratio +kr = table.kr # rolling/bending stiffness +eta = table.eta # rolling/bending plastic limit +mu = table.mu # contact friction during shear +ctrMu = table.mu # use small mu to prepare dense packing? +rho = 2650 * dScaling # soil density + +#: create materials +spMat = O.materials.append( + CohFrictMat(young=E, poisson=v, frictionAngle=radians(ctrMu), density=rho, isCohesive=False, + alphaKr=kr, alphaKtw=kr, momentRotationLaw=True, etaRoll=eta, etaTwist=eta)) + +# create dictionary to store simulation data +sim_data = {} +sim_data['e_z'] = [] +sim_data['e_v'] = [] +sim_data['s33_over_s11'] = [] + +#: define the periodic box where a certain configuration of particles is loaded +O.periodic = True +sp = pack.SpherePack() +cfg_file = 'PeriSp_' + str(num) + f'_{e}.txt' +with open(cfg_file, 'r') as f: + first_line = f.readline() + sizes = first_line.split()[1:] + sizes = [float(s) for s in sizes] +O.cell.hSize = Matrix3(sizes[0], 0, 0, 0, sizes[1], 0, 0, 0, sizes[1]) +sp.load(cfg_file) + +# load spheres to simulation +spIds = sp.toSimulation(material=spMat) + +# define engines +O.engines = [ + ForceResetter(), + InsertionSortCollider([Bo1_Sphere_Aabb()]), + InteractionLoop( + [Ig2_Sphere_Sphere_ScGeom6D()], + [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys()], + [Law2_ScGeom6D_CohFrictPhys_CohesionMoment( + always_use_moment_law=True, + useIncrementalForm=True + )], + ), + GlobalStiffnessTimeStepper(timestepSafetyCoefficient=0.8), + PeriTriaxController(label='triax', + # whether they are strains or stresses + stressMask=7, + # confining stress + goal=(-conf, -conf, -conf), + # strain rate + maxStrainRate=(10. * rate, 10. * rate, 10. * rate), + # type of servo-control + dynCell=True, + # wait until the unbalanced force goes below this value + maxUnbalanced=stabilityRatio, + # turn on checkVoidRatio after finishing initial compression + relStressTol=stressTolRatio, + # function to call after the goal is reached + doneHook='compactionFinished()', + ), + NewtonIntegrator(damping=damp, label='newton'), +] + + +def compactionFinished(): + if unbalancedForce() < stabilityRatio: + if debug: print('compaction finished') + # set the current cell configuration to be the reference one + O.cell.trsf = Matrix3.Identity + O.cell.velGrad = Matrix3.Zero + setRefSe3() + # set loading type: constant pressure in x,y, 8.5% compression in z + triax.stressMask = 3; + triax.globUpdate = 1; + # allow faster deformation along x,y to better maintain stresses + triax.maxStrainRate = (10 * rate, 10 * rate, rate) + # set damping to a normal value + newton.damping = lowDamp + print('start trixial shearing.') + startLoading() + + +# start to load the packing +def startLoading(): + global obs_ctrl_data + if debug: print('startLoading') + strain = obs_ctrl_data.pop() + triax.goal = Vector3(-conf, -conf, -strain) + triax.maxUnbalanced = initStabilityRatio + triax.relStressTol = stressTolRatio + triax.doneHook = 'calmSystem()' + newton.damping = lowDamp + + +# switch on high background damping to stablize the packing +def calmSystem(): + if debug: print('calmSystem') + newton.damping = highDamp + triax.maxUnbalanced = stabilityRatio + triax.doneHook = 'addPlotData()' + + +def addPlotData(): + global obs_ctrl_data + if debug: print('addPlotData') + s = triax.stress + s33_over_s11 = 2. * s[2] / (s[0] + s[1]) + e_x, e_y, e_z = -triax.strain + e_v = e_x + e_y + e_z + n = porosity() + print("Triax goal is: ", triax.goal, "dt=", O.dt, "numIter=", O.iter, "real time=", O.realtime) # e = n/(1.-n) + sim_data['e_z'].append(100 * e_z) + sim_data['e_v'].append(100 * e_v) + sim_data['s33_over_s11'].append(s33_over_s11) + if len(obs_ctrl_data) != 0: + startLoading() + else: + # write simulation data into a text file + data_file_name = f'{description}_sim.txt' + data_param_name = f'{description}_param.txt' + # initialize data dictionary + param_data = {} + for name in table.__all__: + param_data[name] = eval('table.' + name) + # write simulation data into a text file + write_dict_to_file(sim_data, data_file_name) + write_dict_to_file(param_data, data_param_name) + O.pause() + + +# run in batch mode +t0 = O.realtime +O.run() +waitIfBatch() diff --git a/tutorials/physics_based/triaxial_compression/triax_calibration.py b/tutorials/physics_based/triaxial_compression/triax_calibration.py new file mode 100644 index 0000000..06940c7 --- /dev/null +++ b/tutorials/physics_based/triaxial_compression/triax_calibration.py @@ -0,0 +1,61 @@ +""" + This tutorial shows how to perform iterative Bayesian calibration for a DEM simulation of two particle colliding + using GrainLearning. The simulation is performed using Yade on a desktop computer. +""" +import os +from math import floor, log +from grainlearning import BayesianCalibration +from grainlearning.dynamic_systems import IODynamicSystem + +PATH = os.path.abspath(os.path.dirname(__file__)) +executable = 'yade-batch' +yade_script = f'{PATH}/triax_YADE_DEM_model.py' + + +def run_sim(system, **kwargs): + """ + Run the external executable and passes the parameter sample to generate the output file. + """ + print("*** Running external software YADE ... ***\n") + os.system(' '.join([executable, system.param_data_file, yade_script])) + + +calibration = BayesianCalibration.from_dict( + { + "curr_iter": 0, + "num_iter": 4, + "system": { + "system_type": IODynamicSystem, + "param_min": [7, 0.0, 0.0, 0.0, 10.0], + "param_max": [11, 0.5, 1.0, 1.0, 50.0], + "param_names": ['E_m', 'v', 'kr', 'eta', 'mu'], + "num_samples": 15, + "obs_data_file": PATH + '/triax_data_DEM.dat', + "obs_names": ['e_v', 's33_over_s11'], + "ctrl_name": 'e_z', + "sim_name": 'triax', + "sim_data_dir": PATH + '/sim_data/', + "sim_data_file_ext": '.txt', + "sigma_tol": 0.01, + "callback": run_sim, + }, + "calibration": { + "inference": {"ess_target": 0.3}, + "sampling": { + "max_num_components": 2, + "n_init": 1, + "random_state": 0, + "covariance_type": "full", + } + }, + "save_fig": 0, + } +) + +calibration.run() + +most_prob_params = calibration.get_most_prob_params() +print(f'Most probable parameter values: {most_prob_params}') + +# calibration.load_and_run_one_iteration() +# resampled_param_data = calibration.resample() diff --git a/tutorials/physics_based/triaxial_compression/triax_data_DEM.dat b/tutorials/physics_based/triaxial_compression/triax_data_DEM.dat new file mode 100755 index 0000000..20baf63 --- /dev/null +++ b/tutorials/physics_based/triaxial_compression/triax_data_DEM.dat @@ -0,0 +1,52 @@ +# dt e_v e_x e_y e_z numIter realTime s33_over_s11 +0.000129182013495409 -6.387602852817072e-06 -3.1592026477987963e-06 -3.2284002050182757e-06 -0.0 717 2.588 0.9999979940877495 +0.00012910045422267902 0.18940273348010736 -0.10814845542188825 -0.10244881109800316 0.3999999999999988 1134 3.224 1.7851818339269934 +0.00013420856274592327 0.3355159096100714 -0.23533883755236604 -0.22914525283755974 0.7999999999999973 1593 3.911 2.3806411977264528 +0.00013603320437014183 0.4175918136208415 -0.3903900145390303 -0.39201817184013044 1.2000000000000022 2022 4.544 2.813239805004959 +0.00013616559298666264 0.4379117195425287 -0.5796831710113425 -0.5824051094461263 1.5999999999999976 2451 5.167 3.1286112938248047 +0.0001361431183969907 0.410675827491535 -0.7934728512166317 -0.7958513212918383 2.000000000000005 2937 5.901 3.3352829991290847 +0.00014290330819647715 0.35047124733047114 -1.031587443414819 -1.017941309254712 2.400000000000002 3420 6.693 3.5288441083004174 +0.00014326770686897634 0.256444850706768 -1.28147063891255 -1.2620845103806864 2.8000000000000043 3899 7.403 3.6945518646823396 +0.00014332898440164602 0.1296515374226162 -1.5367589067429122 -1.5335895558344814 3.20000000000001 4396 8.132 3.8176877609822446 +0.0001434215245106087 -0.008502456482671616 -1.7928058593391472 -1.815696597143531 3.6000000000000068 4843 8.773 3.9273128561414787 +0.0001427189470342277 -0.16162352891235104 -2.0590034305995055 -2.1026200983128494 4.0000000000000036 5349 9.547 3.9921651004140646 +0.00014268785375339826 -0.32277449089492816 -2.3342961771016246 -2.388478313793303 4.3999999999999995 5910 10.404 4.008829835017557 +0.00014346490892632667 -0.4842098329394362 -2.6185713784727094 -2.6656384544667273 4.800000000000001 6366 11.089 4.097305579611853 +0.000143545310876368 -0.662783589705853 -2.9150629777044186 -2.9477206120014396 5.2000000000000055 6881 11.862 4.124220741674652 +0.00014220602915253862 -0.8565923650338619 -3.2254138144177458 -3.2311785506161144 5.599999999999998 7400 12.637 4.151389276349139 +0.00014227882907913043 -1.054256803543529 -3.544322744863809 -3.5099340586797187 5.999999999999999 7867 13.35 4.188086781659981 +0.00014237046785017934 -1.2387338597339341 -3.854628960647868 -3.7841048990860693 6.400000000000003 8389 14.062 4.164213304903922 +0.00014355968830597688 -1.4129697516603577 -4.153423716861567 -4.0595460347987915 6.800000000000001 8915 14.767 4.18126827946713 +0.00014357591179002495 -1.5662653997298617 -4.423368064767593 -4.342897334962268 7.199999999999999 9506 15.547 4.096521495295745 +0.00014361493891330444 -1.7154873427701431 -4.70847120787031 -4.607016134899832 7.6 10040 16.248 4.1566570069055535 +0.0001437647446400358 -1.884719400681957 -5.023990331056986 -4.860729069624973 8.000000000000004 10505 16.896 4.170422099089756 +0.00014393763342827946 -2.039693274108935 -5.345552851915408 -5.0941404221935285 8.400000000000002 11035 17.589 4.1065531034236455 +0.0001441399882990865 -2.215621429110558 -5.646353065946831 -5.3692683631637275 8.8 11507 18.201 4.149856723134699 +0.00014426663807985067 -2.385474646430362 -5.965925106252374 -5.619549540177992 9.200000000000005 12165 19.057 4.103144891585518 +0.00014430953021986017 -2.5653656129215525 -6.27733023168979 -5.8880353812317585 9.599999999999996 12638 19.668 4.190869091737304 +0.00014025978602943268 -2.74033501785349 -6.556854122836474 -6.183480895017022 10.000000000000005 13254 20.51 4.149465747604719 +0.00014070577676921636 -2.9315389645997474 -6.847679136294089 -6.483859828305663 10.400000000000006 13813 21.223 4.184628420190132 +0.00014073799619288016 -3.1283594734236684 -7.138890191590182 -6.789469281833485 10.8 14367 21.924 4.176379671712513 +0.00014083282108348736 -3.312465544076419 -7.440853125984671 -7.071612418091755 11.200000000000006 14936 22.69 4.101366474692158 +0.0001373292786984716 -3.487322431129278 -7.723172212508936 -7.36415021862035 11.600000000000007 15559 23.554 4.000942110769998 +0.0001370244353375904 -3.6808596942593903 -8.015321798209737 -7.665537896049656 12.000000000000004 16059 24.245 4.112552086681962 +0.0001367968693863711 -3.8579320486695003 -8.292896894252824 -7.965035154416677 12.399999999999999 16700 25.14 4.057816192464647 +0.0001365164531320075 -3.970532756090231 -8.546501892555817 -8.224030863534418 12.800000000000002 17500 26.252 3.917982513771601 +0.0001362374529093665 -4.125326972930016 -8.815964196832663 -8.509362776097356 13.200000000000006 18136 27.142 3.998587861184115 +0.000136193601334641 -4.308207110802201 -9.09914653101934 -8.809060579782862 13.600000000000003 18711 27.935 4.06377645752193 +0.0001358554552872213 -4.5105058648887 -9.379169041450762 -9.13133682343795 14.000000000000009 19298 28.743 4.100597402888529 +0.00013558857617170203 -4.700422352419895 -9.622286457636022 -9.478135894783875 14.400000000000004 19957 29.664 4.028084551564864 +0.00013501368954863937 -4.901029662913686 -9.87407067766404 -9.82695898524964 14.799999999999994 20547 30.47 4.064540146690221 +0.00013464887315244557 -5.069981035120566 -10.112813132414795 -10.157167902705778 15.200000000000005 21280 31.461 3.974014214685953 +0.0001342758988880933 -5.254828519579865 -10.363331983642109 -10.491496535937758 15.6 22121 32.576 3.979476227013233 +0.00013326724912657084 -5.4113543189795745 -10.588783995920746 -10.822570323058839 16.00000000000001 22887 33.595 3.9450664361464636 +0.00014437260826720454 -5.572120997882932 -10.867197749373297 -11.104923248509634 16.4 23606 34.544 3.8760570734144313 +0.00014428161668741696 -5.739231536000511 -11.17879688104352 -11.360434654956988 16.799999999999997 24230 35.373 3.826430333374614 +0.00014441803345278159 -5.842495108347245 -11.406119708062585 -11.636375400284656 17.2 24783 36.109 3.761327706624893 +0.00014456213745330437 -5.935715611093747 -11.658940572592588 -11.876775038501169 17.60000000000001 25500 37.076 3.664445971434841 +0.0001445530189052671 -6.073494395408447 -11.939874428097625 -12.133619967310825 18.000000000000004 26057 37.825 3.732247085422734 +0.00014459757374104252 -6.184605621045333 -12.171692938018335 -12.412912683026994 18.4 26684 38.674 3.686075314383034 +0.00014455345461805984 -6.327255538328128 -12.465539495481702 -12.66171604284643 18.800000000000004 27319 39.529 3.7022009280855315 +0.00014437114506670224 -6.44702862172446 -12.770431035462051 -12.876597586262415 19.200000000000006 27935 40.355 3.7004479044178247 +0.00014475879718316625 -6.583094875406576 -13.084994704960431 -13.09810017044615 19.600000000000005 28498 41.107 3.7323541150541075 +0.00014491391534048956 -6.677627236498515 -13.43322542889101 -13.24440180760751 20.000000000000004 29198 42.062 3.6067803185672727 diff --git a/tutorials/physics_based/two_particle_collision/Collision.py b/tutorials/physics_based/two_particle_collision/Collision.py new file mode 100644 index 0000000..afe779d --- /dev/null +++ b/tutorials/physics_based/two_particle_collision/Collision.py @@ -0,0 +1,102 @@ +# encoding: utf-8 + +# default material parameters +readParamsFromTable( + # no. of your simulation + key=0, + # Density + rho=2450, + # Young's modulus + E_m=8, + # Poisson's ratio + nu=0.2, + # final friction coefficient + mu=0.4, + # timestepSafetyCoefficient + safe=0.1, +) + +# import modules +import numpy as np +from yade.params import table +from grainlearning.tools import write_dict_to_file + +# check if run in batch mode +isBatch = runningInBatch() +if isBatch: + description = O.tags['description'] +else: + description = 'collision_test_run' + +# glass bead parameters (units: ug->1e-9kg; mm->1e-3m; ms->1e-3s) +lenScale = 1e3 # length in mm <- 1e-3 m +sigScale = 1 # Stress in ug/(mm*ms^2) <- Pa +rhoScale = 1 # Density in ug/mm^3 <- kg/m^3 + + +# function to save simulation data and stop simulation +def add_sim_data(): + # get interaction force between particle 1 and particle 2 + inter = O.interactions[0, 1] + # get penetration depth + u = inter.geom.penetrationDepth + # check current penetration depth against the target value + if u > obs_ctrl_data[-1]: + sim_data['u'].append(u) + sim_data['f'].append(inter.phys.normalForce.norm()) + obs_ctrl_data.pop() + if not obs_ctrl_data: + data_file_name = f'{description}_sim.txt' + data_param_name = f'{description}_param.txt' + # initialize data dictionary + param_data = {} + for name in table.__all__: + param_data[name] = eval('table.' + name) + # write simulation data into a text file + write_dict_to_file(sim_data, data_file_name) + write_dict_to_file(param_data, data_param_name) + O.pause() + + +obs_file = "collision_obs.dat" +# get data for simulation control +obs_ctrl_data = np.loadtxt(obs_file)[:, 0].tolist() + +# reverse the ctrl data to pop the last element +obs_ctrl_data.reverse() + +# create dictionary to store simulation data +sim_data = {} +sim_data['u'] = [] +sim_data['f'] = [] + +# create materials +O.materials.append( + FrictMat(young=pow(10, table.E_m), poisson=table.nu, frictionAngle=atan(table.mu), density=table.rho)) + +# create two particles +O.bodies.append(sphere(Vector3(0, 0, 0), 1, material=0, fixed=True)) +O.bodies.append(sphere(Vector3(0, 0, 2), 1, material=0, fixed=True)) + +# define engines +O.engines = [ + ForceResetter(), + InsertionSortCollider([Bo1_Sphere_Aabb()]), + InteractionLoop( + [Ig2_Sphere_Sphere_ScGeom()], + [Ip2_FrictMat_FrictMat_MindlinPhys()], + [Law2_ScGeom_MindlinPhys_Mindlin()] + ), + NewtonIntegrator(damping=0.0, label='newton'), + # needs to add module collision before function name + PyRunner(command='add_sim_data()', iterPeriod=1) +] + +# set initial timestep +O.dt = table.safe * PWaveTimeStep() +# move particle 1 +O.bodies[1].state.vel = Vector3(0, 0, -0.01) + +# run DEM simulation +O.run(int(1e10)) +waitIfBatch() diff --git a/tutorials/physics_based/two_particle_collision/collision_calibration.py b/tutorials/physics_based/two_particle_collision/collision_calibration.py new file mode 100644 index 0000000..a72159b --- /dev/null +++ b/tutorials/physics_based/two_particle_collision/collision_calibration.py @@ -0,0 +1,57 @@ +""" + This tutorial shows how to perform iterative Bayesian calibration for a DEM simulation of two particle colliding + using GrainLearning. The simulation is performed using Yade on a desktop computer. +""" +import os +from math import floor, log +from grainlearning import BayesianCalibration +from grainlearning.dynamic_systems import IODynamicSystem + +PATH = os.path.abspath(os.path.dirname(__file__)) +executable = 'yade-batch' +yade_script = f'{PATH}/Collision.py' + + +def run_sim(system, **kwargs): + """ + Run the external executable and passes the parameter sample to generate the output file. + """ + print("*** Running external software YADE ... ***\n") + os.system(' '.join([executable, system.param_data_file, yade_script])) + + +calibration = BayesianCalibration.from_dict( + { + "num_iter": 4, + "system": { + "system_type": IODynamicSystem, + "param_min": [7, 0.0], + "param_max": [11, 0.5], + "param_names": ['E_m', 'nu'], + "num_samples": 10, + "obs_data_file": PATH + '/collision_obs.dat', + "obs_names": ['f'], + "ctrl_name": 'u', + "sim_name": 'collision', + "sim_data_dir": PATH + '/sim_data/', + "sim_data_file_ext": '.txt', + "sigma_tol": 0.01, + "callback": run_sim, + }, + "calibration": { + "inference": {"ess_target": 0.3}, + "sampling": { + "max_num_components": 2, + "n_init": 1, + "random_state": 0, + "covariance_type": "full", + } + }, + "save_fig": 0, + } +) + +calibration.run() + +most_prob_params = calibration.get_most_prob_params() +print(f'Most probable parameter values: {most_prob_params}') diff --git a/tutorials/physics_based/two_particle_collision/collision_obs.dat b/tutorials/physics_based/two_particle_collision/collision_obs.dat new file mode 100644 index 0000000..748b689 --- /dev/null +++ b/tutorials/physics_based/two_particle_collision/collision_obs.dat @@ -0,0 +1,488 @@ +# u f +0.00019456912103699153 93289.21219164728 +0.00038913824207398306 263861.7382090582 +0.0005837073631109746 484744.965942021 +0.0007782764841479661 746313.6975331781 +0.0009728456051849577 1043005.1001396272 +0.0011674147262219492 1371065.8102545803 +0.0013619838472589407 1727740.3882496348 +0.0015565529682959323 2110893.9056724655 +0.0017511220893329238 2518808.7291744757 +0.0019456912103699153 2950063.9164835378 +0.002140260331406907 3403458.4521029685 +0.0023348294524438984 3877959.7275361684 +0.00252939857348089 4372667.494060119 +0.0027239676945178815 4886787.778644781 +0.002918536815554873 5419613.477985898 +0.0031131059365918645 5970509.580265426 +0.003307675057628856 6538901.685145949 +0.0035022441786658476 7124266.93164457 +0.003696813299702839 7726126.720852348 +0.0038913824207398306 8344040.801117018 +0.004085951541776822 8977602.404211437 +0.004280520662813814 9626434.203874718 +0.004475089783850805 10290184.92611536 +0.004669658904887797 10968526.482036643 +0.004864228025924788 11661151.52395591 +0.00505879714696178 12367771.347695593 +0.005253366267998771 13088114.080434566 +0.005447935389035763 13821923.105997078 +0.0056425045100727544 14568955.6890131 +0.005837073631109746 15328981.766775351 +0.0060316427521467375 16101782.883391391 +0.006226211873183729 16887151.245379724 +0.006420780994220721 17684888.881476197 +0.006615350115257712 18494806.892315373 +0.006809919236294704 19316724.77799031 +0.007004488357331695 20150469.83339581 +0.007199057478368687 20995876.6028145 +0.007393626599405678 21852786.386485115 +0.00758819572044267 22721046.792951025 +0.007782764841479661 23600511.331868302 +0.007977333962516653 24491039.04268946 +0.008171903083553644 25392494.155258242 +0.008366472204590636 26304745.778873544 +0.008561041325627627 27227667.616823744 +0.008755610446664619 28161137.703769933 +0.00895017956770161 29105038.163679056 +0.009144748688738602 30059254.98628442 +0.009339317809775594 31023677.820289347 +0.009533886930812585 31998199.781735018 +0.009728456051849577 32982717.276132267 +0.009923025172886568 33977129.8331116 +0.01011759429392356 34981339.95248096 +0.010312163414960551 35995252.960698806 +0.010506732535997543 37018776.87687368 +0.010701301657034534 38051822.28749224 +0.010895870778071526 39094302.22915825 +0.011090439899108517 40146132.07869537 +0.011285009020145509 41207229.45002997 +0.0114795781411825 42277514.097325146 +0.011674147262219492 43356907.82388718 +0.011868716383256483 44445334.396409415 +0.012063285504293475 45542719.46415814 +0.012257854625330467 46648990.48274014 +0.012452423746367458 47764076.6421234 +0.01264699286740445 48887908.79861043 +0.012841561988441441 50020419.41048959 +0.013036131109478433 51161542.47711271 +0.013230700230515424 52311213.48116759 +0.013425269351552416 53469369.33393359 +0.013619838472589407 54635948.32332463 +0.013814407593626399 55810890.06453994 +0.01400897671466339 56994135.45315656 +0.014203545835700382 58185626.6205104 +0.014398114956737373 59385306.89122443 +0.014592684077774365 60593120.742752634 +0.014787253198811356 61809013.76681878 +0.014981822319848348 63032932.63263703 +0.01517639144088534 64264825.05181011 +0.015370960561922331 65504639.74480792 +0.015565529682959323 66752326.40893614 +0.015760098803996314 68007835.68771085 +0.015954667925033306 69271119.14156084 +0.016149237046070297 70542129.21978417 +0.01634380616710729 71820819.2336915 +0.01653837528814428 73107143.33087136 +0.016732944409181272 74401056.47051877 +0.016927513530218263 75702514.39977098 +0.017122082651255255 77011473.63099775 +0.017316651772292246 78327891.41999786 +0.017511220893329238 79651725.74505551 +0.01770579001436623 80982935.28681356 +0.01790035913540322 82321479.40892288 +0.018094928256440213 83667318.13943034 +0.018289497377477204 85020412.15286903 +0.018484066498514196 86380722.75301695 +0.018678635619551187 87748211.85629314 +0.01887320474058818 89122841.97576042 +0.01906777386162517 90504576.20570694 +0.01926234298266216 91893378.20678014 +0.019456912103699153 93289212.19164728 +0.019651481224736145 94692042.91115938 +0.019846050345773136 96101835.64099583 +0.020040619466810128 97518556.16876847 +0.02023518858784712 98942170.78156473 +0.02042975770888411 100372646.25391158 +0.020624326829921102 101809949.83614108 +0.020818895950958094 103254049.24314141 +0.021013465071995086 104704912.64347655 +0.021208034193032077 106162508.64885959 +0.02140260331406907 107626806.30396466 +0.02159717243510606 109097775.07656406 +0.02179174155614305 110575384.84797664 +0.021986310677180043 112059605.90381594 +0.022180879798217035 113550408.92502514 +0.022375448919254026 115047764.97918797 +0.022570018040291018 116551645.5121048 +0.02276458716132801 118062022.33962321 +0.022959156282365 119578867.63971387 +0.023153725403401992 121102153.94478148 +0.023348294524438984 122631854.13420281 +0.023542863645475975 124167941.42708254 +0.023737432766512967 125710389.37521923 +0.02393200188754996 127259171.85627355 +0.02412657100858695 128814263.06713113 +0.02432114012962394 130375637.5174534 +0.024515709250660933 131943270.0234091 +0.024710278371697925 133517135.70158048 +0.024904847492734916 135097209.9630378 +0.025099416613771908 136683468.50757578 +0.0252939857348089 138275887.31810766 +0.02548855485584589 139874442.65520912 +0.025683123976882882 141479111.0518096 +0.025877693097919874 143089869.30802387 +0.026072262218956865 144706694.48612 +0.026266831339993857 146329563.90561923 +0.02646140046103085 147958455.138523 +0.02665596958206784 149593346.00466287 +0.02685053870310483 151234214.56716987 +0.027045107824141823 152881039.12805852 +0.027239676945178815 154533798.22392252 +0.027434246066215806 156192470.62173823 +0.027628815187252798 157857035.31477243 +0.02782338430828979 159527471.51859117 +0.02801795342932678 161203758.66716647 +0.028212522550363772 162885876.40907788 +0.028407091671400764 164573804.6038056 +0.028601660792437755 166267523.31811324 +0.028796229913474747 167967012.82251596 +0.02899079903451174 169672253.58783343 +0.02918536815554873 171383226.28182256 +0.02937993727658572 173099911.7658901 +0.029574506397622713 174822291.0918809 +0.029769075518659704 176550345.49894065 +0.029963644639696696 178284056.41044986 +0.030158213760733688 180023405.4310286 +0.03035278288177068 181768374.3436082 +0.03054735200280767 183518945.10656896 +0.030741921123844662 185275099.85094208 +0.030936490244881654 187036820.87767315 +0.031131059365918645 188804090.65494642 +0.03132562848695564 190576891.8155676 +0.03152019760799263 192355207.1544034 +0.03171476672902962 194139019.6258767 +0.03190933585006661 195928312.34151566 +0.0321039049711036 197723068.56755504 +0.032298474092140594 199523271.7225884 +0.032493043213177586 201328905.37527022 +0.03268761233421458 203139953.24206594 +0.03288218145525157 204956399.1850491 +0.03307675057628856 206778227.20974407 +0.03327131969732555 208605421.4630134 +0.033465888818362544 210437966.23098835 +0.033660457939399535 212275845.93704167 +0.03385502706043653 214119045.1398013 +0.03404959618147352 215967548.53120437 +0.03424416530251051 217821340.93458998 +0.0344387344235475 219680407.30282983 +0.03463330354458449 221544732.71649632 +0.034827872665621484 223414302.38206613 +0.035022441786658476 225289101.63015944 +0.03521701090769547 227169115.9138135 +0.03541158002873246 229054330.80678883 +0.03560614914976945 230944732.0019092 +0.03580071827080644 232840305.30943245 +0.035995287391843434 234741036.6554529 +0.036189856512880425 236646912.08033377 +0.03638442563391742 238557917.7371693 +0.03657899475495441 240474039.8902754 +0.0367735638759914 242395264.9137088 +0.03696813299702839 244321579.28981355 +0.03716270211806538 246252969.60779408 +0.037357271239102374 248189422.56231478 +0.037551840360139366 250130924.952125 +0.03774640948117636 252077463.67870906 +0.03794097860221335 254029025.74496043 +0.03813554772325034 255985598.25388014 +0.03833011684428733 257947168.4072981 +0.03852468596532432 259913723.50461736 +0.038719255086361315 261885250.9415806 +0.038913824207398306 263861738.20905814 +0.0391083933284353 265843172.89185748 +0.03930296244947229 267829542.6675534 +0.03949753157050928 269820835.3053383 +0.03969210069154627 271817038.6648928 +0.039886669812583264 273818140.695275 +0.040081238933620256 275824129.4338296 +0.04027580805465725 277834993.0051147 +0.04047037717569424 279850719.61984766 +0.04066494629673123 281871297.5738679 +0.04085951541776822 283896715.2471176 +0.04105408453880521 285926961.1026394 +0.041248653659842205 287962023.68559045 +0.041443222780879196 290001891.62227273 +0.04163779190191619 292046553.61917996 +0.04183236102295318 294095998.4620595 +0.04202693014399017 296150215.0149894 +0.04222149926502716 298209192.21947116 +0.042416068386064154 300272919.09353644 +0.042610637507101146 302341384.73086864 +0.04280520662813814 304414578.29993796 +0.04299977574917513 306492489.0431508 +0.04319434487021212 308575106.2760126 +0.04338891399124911 310662419.3863031 +0.0435834831122861 312754417.833266 +0.043778052233323095 314851091.1468095 +0.043972621354360086 316952428.9267212 +0.04416719047539708 319058420.8418938 +0.04436175959643407 321169056.629563 +0.04455632871747106 323284326.09455734 +0.04475089783850805 325404219.10856 +0.044945466959545044 327528725.60938084 +0.045140036080582036 329657835.60023975 +0.04533460520161903 331791539.1490616 +0.04552917432265602 333929826.38778096 +0.04572374344369301 336072687.5116574 +0.04591831256473 338220112.7786011 +0.04611288168576699 340372092.50850886 +0.046307450806803985 342528617.08260876 +0.046502019927840976 344689676.94281614 +0.04669658904887797 346855262.5910974 +0.04689115816991496 349025364.5888443 +0.04708572729095195 351199973.55625635 +0.04728029641198894 353379080.17173326 +0.047474865533025934 355562675.1712753 +0.047669434654062925 357750749.3478921 +0.04786400377509992 359943293.5510211 +0.04805857289613691 362140298.6859527 +0.0482531420171739 364341755.7132651 +0.04844771113821089 366547655.6482659 +0.04864228025924788 368757989.56044227 +0.048836849380284875 370972748.5729184 +0.049031418501321866 373191923.86192113 +0.04922598762235886 375415506.6562521 +0.04942055674339585 377643488.2367682 +0.04961512586443284 379875859.93586814 +0.04980969498546983 382112613.13698727 +0.050004264106506824 384353739.27409816 +0.050198833227543815 386599229.8312191 +0.05039340234858081 388849076.34192777 +0.0505879714696178 391103270.3888834 +0.05078254059065479 393361803.6033536 +0.05097710971169178 395624667.6647489 +0.05117167883272877 397891854.30016255 +0.051366247953765765 400163355.2839168 +0.051560817074802756 402439162.4371155 +0.05175538619583975 404719267.62720203 +0.05194995531687674 407003662.7675238 +0.05214452443791373 409292339.8169017 +0.05233909355895072 411585290.7792053 +0.052533662679987714 413882507.70293444 +0.052728231801024705 416183982.68080497 +0.0529228009220617 418489707.84934074 +0.05311737004309869 420799675.3884706 +0.05331193916413568 423113877.5211306 +0.05350650828517267 425432306.512871 +0.05370107740620966 427754954.67146873 +0.053895646527246655 430081814.3465444 +0.054090215648283646 432412877.9291844 +0.05428478476932064 434748137.85156757 +0.05447935389035763 437087586.58659697 +0.05467392301139462 439431216.64753556 +0.05486849213243161 441779020.5876468 +0.055063061253468604 444130990.99983996 +0.055257630374505595 446487120.5163195 +0.05545219949554259 448847401.8082389 +0.05564676861657958 451211827.58535856 +0.05584133773761657 453580390.5957079 +0.05603590685865356 455953083.6252524 +0.05623047597969055 458329899.49756306 +0.056425045100727544 460710831.07349133 +0.056619614221764536 463095871.2508477 +0.05681418334280153 465485012.9640832 +0.05700875246383852 467878249.18397605 +0.05720332158487551 470275572.91732115 +0.0573978907059125 472676977.20662344 +0.057592459826949494 475082455.1297954 +0.057787028947986485 477491999.7998574 +0.05798159806902348 479905604.36464214 +0.05817616719006047 482323262.00650215 +0.05837073631109746 484744965.9420211 +0.05856530543213445 487170709.421728 +0.05875987455317144 489600485.7298158 +0.058954443674208434 492034288.18386114 +0.059149012795245426 494472110.1345503 +0.05934358191628242 496913944.9654051 +0.05953815103731941 499359786.0925151 +0.0597327201583564 501809626.9642697 +0.05992728927939339 504263461.0610962 +0.060121858400430384 506721281.895199 +0.060316427521467375 509183083.01030195 +0.06051099664250437 511648857.9813948 +0.06070556576354136 514118600.41448087 +0.06090013488457835 516592303.946329 +0.06109470400561534 519069962.2442268 +0.06128927312665233 521551569.00573844 +0.061483842247689324 524037117.95846343 +0.061678411368726316 526526602.859799 +0.06187298048976331 529020017.49670523 +0.0620675496108003 531517355.68547195 +0.06226211873183729 534018611.27148914 +0.06245668785287428 536523778.129019 +0.06265125697391127 539032850.1609714 +0.06284582609494826 541545821.2986811 +0.06304039521598526 544062685.5016868 +0.06323496433702225 546583436.757515 +0.06342953345805924 549108069.0814626 +0.06362410257909623 551636576.5163854 +0.06381867170013322 554168953.1324867 +0.06401324082117021 556705193.0271078 +0.0642078099422072 559245290.3245234 +0.0644023790632442 561789239.1757358 +0.06459694818428119 564337033.7582735 +0.06479151730531818 566888668.2759916 +0.06498608642635517 569444136.9588733 +0.06518065554739216 572003434.062835 +0.06537522466842915 574566553.869532 +0.06556979378946615 577133490.6861669 +0.06576436291050314 579704238.8453007 +0.06595893203154013 582278792.7046636 +0.06615350115257712 584857146.6469709 +0.06634807027361411 587439295.0797375 +0.0665426393946511 590025232.4350982 +0.0667372085156881 592614953.1696248 +0.06693177763672509 595208451.7641503 +0.06712634675776208 597805722.7235907 +0.06732091587879907 600406760.5767719 +0.06751548499983606 603011559.8762553 +0.06771005412087305 605620115.1981677 +0.06790462324191004 608232421.1420319 +0.06809919236294704 610848472.3305976 +0.06829376148398403 613468263.4096776 +0.06848833060502102 616091789.047982 +0.06868289972605801 618719043.9369547 +0.068877468847095 621350022.790615 +0.069072037968132 623984720.3453945 +0.06926660708916899 626623131.3599828 +0.06946117621020598 629265250.6151679 +0.06965574533124297 631911072.9136829 +0.06985031445227996 634560593.0800537 +0.07004488357331695 637213805.9604441 +0.07023945269435394 639870706.4225087 +0.07043402181539093 642531289.3552415 +0.07062859093642793 645195549.66883 +0.07082316005746492 647863482.2945085 +0.07101772917850191 650535082.1844132 +0.0712122982995389 653210344.3114394 +0.07140686742057589 655889263.6690998 +0.07160143654161288 658571835.271383 +0.07179600566264988 661258054.1526154 +0.07199057478368687 663947915.3673226 +0.07218514390472386 666641413.9900931 +0.07237971302576085 669338545.1154429 +0.07257428214679784 672039303.8576815 +0.07276885126783483 674743685.3507799 +0.07296342038887182 677451684.7482373 +0.07315798950990882 680163297.2229521 +0.07335255863094581 682878517.9670937 +0.0735471277519828 685597342.1919725 +0.07374169687301979 688319765.1279145 +0.07393626599405678 691045782.0241356 +0.07413083511509377 693775388.1486176 +0.07432540423613077 696508578.7879839 +0.07451997335716776 699245349.2473788 +0.07471454247820475 701985694.850345 +0.07490911159924174 704729610.9387059 +0.07510368072027873 707477092.8724439 +0.07529824984131572 710228136.0295856 +0.07549281896235271 712982735.8060833 +0.0756873880833897 715740887.6156996 +0.0758819572044267 718502586.8898944 +0.07607652632546369 721267829.077709 +0.07627109544650068 724036609.6456555 +0.07646566456753767 726808924.0776048 +0.07666023368857466 729584767.8746753 +0.07685480280961166 732364136.555125 +0.07704937193064865 735147025.6542411 +0.07724394105168564 737933430.7242337 +0.07743851017272263 740723347.3341293 +0.07763307929375962 743516771.0696634 +0.07782764841479661 746313697.5331781 +0.0780222175358336 749114122.3435167 +0.0782167866568706 751918041.1359208 +0.07841135577790759 754725449.5619289 +0.07860592489894458 757536343.2892749 +0.07880049401998157 760350718.0017883 +0.07899506314101856 763168569.3992932 +0.07918963226205555 765989893.1975124 +0.07938420138309255 768814685.1279668 +0.07957877050412954 771642940.9378806 +0.07977333962516653 774474656.3900845 +0.07996790874620352 777309827.2629205 +0.08016247786724051 780148449.3501477 +0.0803570469882775 782990518.4608479 +0.0805516161093145 785836030.4193344 +0.08074618523035149 788684981.0650582 +0.08094075435138848 791537366.2525179 +0.08113532347242547 794393181.8511686 +0.08132989259346246 797252423.7453328 +0.08152446171449945 800115087.8341109 +0.08171903083553644 802981170.0312928 +0.08191359995657344 805850666.2652712 +0.08210816907761043 808723572.4789542 +0.08230273819864742 811599884.6296796 +0.08249730731968441 814479598.6891288 +0.0826918764407214 817362710.6432436 +0.08288644556175839 820249216.492141 +0.08308101468279538 823139112.2500305 +0.08327558380383238 826032393.9451313 +0.08347015292486937 828929057.6195906 +0.08366472204590636 831829099.3294028 +0.08385929116694335 834732515.1443279 +0.08405386028798034 837639301.1478124 +0.08424842940901733 840549453.4369098 +0.08444299853005433 843462968.1222025 +0.08463756765109132 846379841.327723 +0.08483213677212831 849300069.1908767 +0.0850267058931653 852223647.8623656 +0.08522127501420229 855150573.5061125 +0.08541584413523928 858080842.2991841 +0.08561041325627627 861014450.4317174 +0.08580498237731327 863951394.1068454 +0.08599955149835026 866891669.5406224 +0.08619412061938725 869835272.9619515 +0.08638868974042424 872782200.6125125 +0.08658325886146123 875732448.7466886 +0.08677782798249822 878686013.6314964 +0.08697239710353522 881642891.5465147 +0.0871669662245722 884603078.7838131 +0.0873615353456092 887566571.6478838 +0.08755610446664619 890533366.455571 +0.08775067358768318 893503459.5360042 +0.08794524270872017 896476847.2305276 +0.08813981182975716 899453525.892634 +0.08833438095079416 902433491.8878977 +0.08852895007183115 905416741.5939077 +0.08872351919286814 908403271.4002012 +0.08891808831390513 911393077.7081984 +0.08911265743494212 914386156.9311386 +0.08930722655597911 917382505.4940132 +0.0895017956770161 920382119.8335038 +0.0896963647980531 923384996.3979176 +0.08989093391909009 926391131.6471249 +0.09008550304012708 929400522.0524956 +0.09028007216116407 932413164.0968384 +0.09047464128220106 935429054.2743376 +0.09066921040323805 938448189.0904933 +0.09086377952427505 941470565.06206 +0.09105834864531204 944496178.7169858 +0.09125291776634903 947525026.5943539 +0.09144748688738602 950557105.244322 +0.09164205600842301 953592411.2280638 +0.09183662512946 956630941.117711 +0.092031194250497 959672691.4962941 +0.09222576337153399 962717658.957686 +0.09242033249257098 965765840.1065434 +0.09261490161360797 968817231.5582519 +0.09280947073464496 971871829.9388676 +0.09300403985568195 974929631.8850626 +0.09319860897671894 977990634.0440687 +0.09339317809775594 981054833.0736225 +0.09358774721879293 984122225.6419107 +0.09378231633982992 987192808.4275154 +0.09397688546086691 990266578.1193613 +0.0941714545819039 993343531.4166602 +0.0943660237029409 996423665.0288597 +0.09456059282397788 999506975.6755892 +0.09475516194501488 1002593460.086608 diff --git a/tutorials/linear_regression/linear_model.py b/tutorials/simple_regression/linear_regression/linear_model.py similarity index 85% rename from tutorials/linear_regression/linear_model.py rename to tutorials/simple_regression/linear_regression/linear_model.py index 33e3a6b..8af06cb 100755 --- a/tutorials/linear_regression/linear_model.py +++ b/tutorials/simple_regression/linear_regression/linear_model.py @@ -20,7 +20,8 @@ def write_dict_to_file(data, file_name): a = float(sys.argv[1]) b = float(sys.argv[2]) -description = sys.argv[3] +sim_name = sys.argv[3] +description = sys.argv[4] x_obs = np.arange(100) y_sim = a * x_obs + b @@ -34,10 +35,10 @@ def write_dict_to_file(data, file_name): # np.save(data_file_name,data) # write sim data and parameter in text files -data_file_name = 'linear_' + description + '_sim.txt' +data_file_name = f'{sim_name}_{description}_sim.txt' sim_data = {'f': y_sim} write_dict_to_file(sim_data, data_file_name) -data_param_name = 'linear_' + description + '_param.txt' +data_param_name = f'{sim_name}_{description}_param.txt' param_data = {'a': [a], 'b': [b]} write_dict_to_file(param_data, data_param_name) diff --git a/tutorials/linear_regression/linearObs.dat b/tutorials/simple_regression/linear_regression/linear_obs.dat similarity index 100% rename from tutorials/linear_regression/linearObs.dat rename to tutorials/simple_regression/linear_regression/linear_obs.dat diff --git a/tutorials/linear_regression/linear_reg_one_iteration.py b/tutorials/simple_regression/linear_regression/linear_reg_one_iteration.py similarity index 93% rename from tutorials/linear_regression/linear_reg_one_iteration.py rename to tutorials/simple_regression/linear_regression/linear_reg_one_iteration.py index f416744..99ddc6a 100644 --- a/tutorials/linear_regression/linear_reg_one_iteration.py +++ b/tutorials/simple_regression/linear_regression/linear_reg_one_iteration.py @@ -6,7 +6,7 @@ from grainlearning.dynamic_systems import IODynamicSystem PATH = os.path.abspath(os.path.dirname(__file__)) -sim_data_dir = os.path.abspath(os.path.join(__file__, "../../../tests/data/linear_sim_data")) +sim_data_dir = os.path.abspath(os.path.join(__file__, "../../../../tests/data/linear_sim_data")) curr_iter = 0 calibration = BayesianCalibration.from_dict( @@ -17,7 +17,7 @@ "system_type": IODynamicSystem, "param_min": [0.001, 0.001], "param_max": [1, 10], - "obs_data_file": PATH + '/linearObs.dat', + "obs_data_file": PATH + '/linear_obs.dat', "obs_names": ['f'], "ctrl_name": 'u', "sim_name": 'linear', diff --git a/tutorials/linear_regression/linear_regression_solve.py b/tutorials/simple_regression/linear_regression/linear_regression_solve.py similarity index 86% rename from tutorials/linear_regression/linear_regression_solve.py rename to tutorials/simple_regression/linear_regression/linear_regression_solve.py index e14f0ea..d057f01 100644 --- a/tutorials/linear_regression/linear_regression_solve.py +++ b/tutorials/simple_regression/linear_regression/linear_regression_solve.py @@ -11,20 +11,20 @@ executable = f'python {PATH}/linear_model.py' -def run_sim(model, **kwargs): +def run_sim(system, **kwargs): """ - Runs the external executable and passes the parameter sample to generate the output file. + 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 + 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(model.param_data): + 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])) + print(" ".join([executable, "%.8e %.8e" % tuple(params), system.sim_name, description])) + os.system(' '.join([executable, "%.8e %.8e" % tuple(params), system.sim_name, description])) calibration = BayesianCalibration.from_dict( @@ -36,7 +36,7 @@ def run_sim(model, **kwargs): "param_max": [1, 10], "param_names": ['a', 'b'], "num_samples": 20, - "obs_data_file": PATH + '/linearObs.dat', + "obs_data_file": PATH + '/linear_obs.dat', "obs_names": ['f'], "ctrl_name": 'u', "sim_name": 'linear', diff --git a/tutorials/linear_regression/python_linear_regression_solve.py b/tutorials/simple_regression/linear_regression/python_linear_regression_solve.py similarity index 100% rename from tutorials/linear_regression/python_linear_regression_solve.py rename to tutorials/simple_regression/linear_regression/python_linear_regression_solve.py