From 38d6817f1667501bfa320d6423d2c5698208391d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Eide?= Date: Tue, 3 Sep 2024 15:24:01 +0200 Subject: [PATCH] Convert ErtConfig to dataclass --- src/ert/config/ensemble_config.py | 15 +++-- src/ert/config/ert_config.py | 55 ++++++++++++++----- src/ert/config/field.py | 2 +- src/ert/config/forward_model_step.py | 9 +++ src/ert/config/gen_kw_config.py | 4 +- src/ert/config/general_observation.py | 10 ++-- src/ert/config/observations.py | 10 ++-- src/ert/config/queue_config.py | 16 +++--- src/ert/config/refcase.py | 8 +-- src/ert/config/workflow.py | 11 ++-- src/ert/config/workflow_job.py | 2 +- src/ert/substitution_list.py | 41 +++++++++++++- .../test_export_misfit/0/csv_data.csv | 10 ++-- .../config/observations_generator.py | 9 ++- .../ert/unit_tests/config/test_ert_config.py | 25 ++++++++- .../unit_tests/config/test_observations.py | 13 ++--- .../0/snake_oil_measured_output.csv | 14 ++--- .../unit_tests/data/test_integration_data.py | 4 +- .../0/misfit_collector.csv | 10 ++-- .../test_that_storage_matches/parameters | 2 +- tests/ert/unit_tests/test_libres_facade.py | 2 +- 21 files changed, 187 insertions(+), 85 deletions(-) diff --git a/src/ert/config/ensemble_config.py b/src/ert/config/ensemble_config.py index a12e3024229..8502d91c641 100644 --- a/src/ert/config/ensemble_config.py +++ b/src/ert/config/ensemble_config.py @@ -15,7 +15,8 @@ from ert.field_utils import get_shape -from .field import Field +from . import ExtParamConfig +from .field import Field as FieldConfig from .gen_data_config import GenDataConfig from .gen_kw_config import GenKwConfig from .parameter_config import ParameterConfig @@ -49,8 +50,12 @@ def _get_abs_path(file: Optional[str]) -> Optional[str]: @dataclass class EnsembleConfig: grid_file: Optional[str] = None - response_configs: Dict[str, ResponseConfig] = field(default_factory=dict) - parameter_configs: Dict[str, ParameterConfig] = field(default_factory=dict) + response_configs: Dict[str, Union[SummaryConfig, GenDataConfig]] = field( + default_factory=dict + ) + parameter_configs: Dict[ + str, GenKwConfig | FieldConfig | SurfaceConfig | ExtParamConfig + ] = field(default_factory=dict) refcase: Optional[Refcase] = None eclbase: Optional[str] = None @@ -93,7 +98,7 @@ def from_dict(cls, config_dict: ConfigDict) -> EnsembleConfig: grid_file_path, ) from err - def make_field(field_list: List[str]) -> Field: + def make_field(field_list: List[str]) -> FieldConfig: if grid_file_path is None: raise ConfigValidationError.with_context( "In order to use the FIELD keyword, a GRID must be supplied.", @@ -104,7 +109,7 @@ def make_field(field_list: List[str]) -> Field: f"Grid file {grid_file_path} did not contain dimensions", grid_file_path, ) - return Field.from_config_list(grid_file_path, dims, field_list) + return FieldConfig.from_config_list(grid_file_path, dims, field_list) parameter_configs = ( [GenKwConfig.from_config_list(g) for g in gen_kw_list] diff --git a/src/ert/config/ert_config.py b/src/ert/config/ert_config.py index 503b45383c6..9bb4562dae2 100644 --- a/src/ert/config/ert_config.py +++ b/src/ert/config/ert_config.py @@ -4,13 +4,14 @@ import logging import os from collections import defaultdict -from dataclasses import dataclass, field +from dataclasses import field from datetime import datetime from os import path from pathlib import Path from typing import ( Any, ClassVar, + DefaultDict, Dict, List, Optional, @@ -24,6 +25,8 @@ import xarray as xr from pydantic import ValidationError as PydanticValidationError +from pydantic import field_validator +from pydantic.dataclasses import dataclass from typing_extensions import Self from ert.plugins import ErtPluginManager @@ -49,6 +52,7 @@ ConfigWarning, ErrorInfo, ForwardModelStepKeys, + HistorySource, HookRuntime, init_forward_model_schema, init_site_config_schema, @@ -98,7 +102,9 @@ class ErtConfig: queue_config: QueueConfig = field(default_factory=QueueConfig) workflow_jobs: Dict[str, WorkflowJob] = field(default_factory=dict) workflows: Dict[str, Workflow] = field(default_factory=dict) - hooked_workflows: Dict[HookRuntime, List[Workflow]] = field(default_factory=dict) + hooked_workflows: DefaultDict[HookRuntime, List[Workflow]] = field( + default_factory=lambda: defaultdict(list) + ) runpath_file: Path = Path(DEFAULT_RUNPATH_FILE) ert_templates: List[Tuple[str, str]] = field(default_factory=list) installed_forward_model_steps: Dict[str, ForwardModelStep] = field( @@ -111,6 +117,14 @@ class ErtConfig: observation_config: List[ Tuple[str, Union[HistoryValues, SummaryValues, GenObsValues]] ] = field(default_factory=list) + enkf_obs: EnkfObs = field(default_factory=EnkfObs) + + @field_validator("substitution_list", mode="before") + @classmethod + def convert_to_substitution_list(cls, v: Dict[str, str]) -> SubstitutionList: + if isinstance(v, SubstitutionList): + return v + return SubstitutionList(v) def __post_init__(self) -> None: self.config_path = ( @@ -118,8 +132,6 @@ def __post_init__(self) -> None: if self.user_config_file else os.getcwd() ) - self.enkf_obs: EnkfObs = self._create_observations(self.observation_config) - self.observations: Dict[str, xr.Dataset] = self.enkf_obs.datasets @staticmethod @@ -276,7 +288,7 @@ def from_dict(cls, config_dict) -> Self: errors.append(err) obs_config_file = config_dict.get(ConfigKeys.OBS_CONFIG) - obs_config_content = None + obs_config_content = [] try: if obs_config_file: if path.isfile(obs_config_file) and path.getsize(obs_config_file) == 0: @@ -307,6 +319,19 @@ def from_dict(cls, config_dict) -> Self: [key] for key in summary_obs if key not in summary_keys ] ensemble_config = EnsembleConfig.from_dict(config_dict=config_dict) + if model_config: + observations = cls._create_observations( + obs_config_content, + ensemble_config, + model_config.time_map, + model_config.history_source, + ) + else: + errors.append( + ConfigValidationError( + "Not possible to validate observations without valid model config" + ) + ) except ConfigValidationError as err: errors.append(err) @@ -339,6 +364,7 @@ def from_dict(cls, config_dict) -> Self: model_config=model_config, user_config_file=config_file_path, observation_config=obs_config_content, + enkf_obs=observations, ) @classmethod @@ -947,24 +973,25 @@ def _installed_forward_model_steps_from_dict( def preferred_num_cpu(self) -> int: return int(self.substitution_list.get(f"<{ConfigKeys.NUM_CPU}>", 1)) + @staticmethod def _create_observations( - self, obs_config_content: Optional[ Dict[str, Union[HistoryValues, SummaryValues, GenObsValues]] ], + ensemble_config: EnsembleConfig, + time_map: Optional[List[datetime]], + history: HistorySource, ) -> EnkfObs: if not obs_config_content: return EnkfObs({}, []) obs_vectors: Dict[str, ObsVector] = {} obs_time_list: Sequence[datetime] = [] - if self.ensemble_config.refcase is not None: - obs_time_list = self.ensemble_config.refcase.all_dates - elif self.model_config.time_map is not None: - obs_time_list = self.model_config.time_map + if ensemble_config.refcase is not None: + obs_time_list = ensemble_config.refcase.all_dates + elif time_map is not None: + obs_time_list = time_map - history = self.model_config.history_source time_len = len(obs_time_list) - ensemble_config = self.ensemble_config config_errors: List[ErrorInfo] = [] for obs_name, values in obs_config_content: try: @@ -1036,7 +1063,7 @@ def _get_files_in_directory(job_path, errors): def _substitution_list_from_dict(config_dict) -> SubstitutionList: - subst_list = SubstitutionList() + subst_list = {} for key, val in config_dict.get("DEFINE", []): subst_list[key] = val @@ -1054,7 +1081,7 @@ def _substitution_list_from_dict(config_dict) -> SubstitutionList: for key, val in config_dict.get("DATA_KW", []): subst_list[key] = val - return subst_list + return SubstitutionList(subst_list) @no_type_check diff --git a/src/ert/config/field.py b/src/ert/config/field.py index 520ff9d82d1..79691f83bbc 100644 --- a/src/ert/config/field.py +++ b/src/ert/config/field.py @@ -3,13 +3,13 @@ import logging import os import time -from dataclasses import dataclass from functools import cached_property from pathlib import Path from typing import TYPE_CHECKING, Any, List, Optional, Union, overload import numpy as np import xarray as xr +from pydantic.dataclasses import dataclass from typing_extensions import Self from ert.field_utils import FieldFileFormat, Shape, read_field, read_mask, save_field diff --git a/src/ert/config/forward_model_step.py b/src/ert/config/forward_model_step.py index 08551937e7e..ee264933955 100644 --- a/src/ert/config/forward_model_step.py +++ b/src/ert/config/forward_model_step.py @@ -5,12 +5,14 @@ from dataclasses import dataclass, field from typing import ( ClassVar, + Dict, Literal, Optional, TypedDict, Union, ) +from pydantic import field_validator from typing_extensions import NotRequired, Unpack from ert.config.parsing.config_errors import ConfigWarning @@ -174,6 +176,13 @@ class ForwardModelStep: "_ERT_RUNPATH": "", } + @field_validator("private_args", mode="before") + @classmethod + def convert_to_substitution_list(cls, v: Dict[str, str]) -> SubstitutionList: + if isinstance(v, SubstitutionList): + return v + return SubstitutionList(v) + def validate_pre_experiment(self, fm_step_json: ForwardModelStepJSON) -> None: """ Raise errors pertaining to the environment not being diff --git a/src/ert/config/gen_kw_config.py b/src/ert/config/gen_kw_config.py index a634573c965..e1ac3c04da4 100644 --- a/src/ert/config/gen_kw_config.py +++ b/src/ert/config/gen_kw_config.py @@ -70,9 +70,7 @@ class TransformFunctionDefinition: class GenKwConfig(ParameterConfig): template_file: Optional[str] output_file: Optional[str] - transform_function_definitions: ( - List[TransformFunctionDefinition] | List[Dict[Any, Any]] - ) + transform_function_definitions: List[TransformFunctionDefinition] forward_init_file: Optional[str] = None def __post_init__(self) -> None: diff --git a/src/ert/config/general_observation.py b/src/ert/config/general_observation.py index d2a31ccc07b..40744641f7a 100644 --- a/src/ert/config/general_observation.py +++ b/src/ert/config/general_observation.py @@ -1,17 +1,17 @@ from __future__ import annotations from dataclasses import dataclass +from typing import List import numpy as np -import numpy.typing as npt @dataclass(eq=False) class GenObservation: - values: npt.NDArray[np.double] - stds: npt.NDArray[np.double] - indices: npt.NDArray[np.int32] - std_scaling: npt.NDArray[np.double] + values: List[float] + stds: List[float] + indices: List[int] + std_scaling: List[float] def __post_init__(self) -> None: for val in self.stds: diff --git a/src/ert/config/observations.py b/src/ert/config/observations.py index a490a292140..8414c4b9877 100644 --- a/src/ert/config/observations.py +++ b/src/ert/config/observations.py @@ -1,5 +1,5 @@ import os -from dataclasses import dataclass +from dataclasses import dataclass, field from datetime import datetime, timedelta from typing import TYPE_CHECKING, Dict, Iterator, List, Optional, Tuple, Union @@ -38,8 +38,8 @@ def history_key(key: str) -> str: @dataclass class EnkfObs: - obs_vectors: Dict[str, ObsVector] - obs_time: List[datetime] + obs_vectors: Dict[str, ObsVector] = field(default_factory=dict) + obs_time: List[datetime] = field(default_factory=list) def __post_init__(self) -> None: self.datasets: Dict[str, xr.Dataset] = { @@ -370,7 +370,9 @@ def _create_gen_obs( f"index list ({indices}) must be of equal length", obs_file if obs_file is not None else "", ) - return GenObservation(values, stds, indices, std_scaling) + return GenObservation( + values.tolist(), stds.tolist(), indices.tolist(), std_scaling.tolist() + ) @classmethod def _handle_general_observation( diff --git a/src/ert/config/queue_config.py b/src/ert/config/queue_config.py index b2bd139333b..96cabb6590b 100644 --- a/src/ert/config/queue_config.py +++ b/src/ert/config/queue_config.py @@ -4,11 +4,11 @@ import re import shutil from abc import abstractmethod -from dataclasses import asdict, dataclass, field, fields +from dataclasses import asdict, field, fields from typing import Any, Dict, List, Literal, Mapping, Optional, Union, no_type_check import pydantic -from pydantic import Field +from pydantic.dataclasses import dataclass from typing_extensions import Annotated from .parsing import ( @@ -81,7 +81,7 @@ def driver_options(self) -> Dict[str, Any]: @pydantic.dataclasses.dataclass class LocalQueueOptions(QueueOptions): - name: Literal[QueueSystem.LOCAL.lower()] = QueueSystem.LOCAL.lower() + name: Literal[QueueSystem.LOCAL] = QueueSystem.LOCAL @property def driver_options(self) -> Dict[str, Any]: @@ -90,7 +90,7 @@ def driver_options(self) -> Dict[str, Any]: @pydantic.dataclasses.dataclass class LsfQueueOptions(QueueOptions): - name: Literal[QueueSystem.LSF.lower()] = QueueSystem.LSF.lower() + name: Literal[QueueSystem.LSF] = QueueSystem.LSF bhist_cmd: Optional[NonEmptyString] = None bjobs_cmd: Optional[NonEmptyString] = None bkill_cmd: Optional[NonEmptyString] = None @@ -113,7 +113,7 @@ def driver_options(self) -> Dict[str, Any]: @pydantic.dataclasses.dataclass class TorqueQueueOptions(QueueOptions): - name: Literal[QueueSystem.TORQUE.lower()] = QueueSystem.TORQUE.lower() + name: Literal[QueueSystem.TORQUE] = QueueSystem.TORQUE qsub_cmd: Optional[NonEmptyString] = None qstat_cmd: Optional[NonEmptyString] = None qdel_cmd: Optional[NonEmptyString] = None @@ -149,7 +149,7 @@ def check_memory_per_job(cls, value: Optional[str]) -> Optional[str]: @pydantic.dataclasses.dataclass class SlurmQueueOptions(QueueOptions): - name: Literal[QueueSystem.SLURM.lower()] + name: Literal[QueueSystem.SLURM] = QueueSystem.SLURM sbatch: NonEmptyString = "sbatch" scancel: NonEmptyString = "scancel" scontrol: NonEmptyString = "scontrol" @@ -269,7 +269,7 @@ class QueueConfig: queue_system: QueueSystem = QueueSystem.LOCAL queue_options: Union[ LsfQueueOptions, TorqueQueueOptions, SlurmQueueOptions, LocalQueueOptions - ] = Field(default_factory=LocalQueueOptions, discriminator="name") + ] = pydantic.Field(default_factory=LocalQueueOptions, discriminator="name") queue_options_test_run: LocalQueueOptions = field(default_factory=LocalQueueOptions) stop_long_running: bool = False @@ -363,7 +363,7 @@ def from_dict(cls, config_dict: ConfigDict) -> QueueConfig: selected_queue_system, queue_options, queue_options_test_run, - stop_long_running=stop_long_running, + stop_long_running=bool(stop_long_running), ) def create_local_copy(self) -> QueueConfig: diff --git a/src/ert/config/refcase.py b/src/ert/config/refcase.py index f5c1fbb4964..3c62873f1a3 100644 --- a/src/ert/config/refcase.py +++ b/src/ert/config/refcase.py @@ -1,14 +1,12 @@ from dataclasses import dataclass from datetime import datetime from typing import ( - Any, List, Optional, Sequence, ) import numpy as np -import numpy.typing as npt from ._read_summary import read_summary from .parsing.config_dict import ConfigDict @@ -21,7 +19,7 @@ class Refcase: start_date: datetime keys: List[str] dates: Sequence[datetime] - values: npt.NDArray[Any] + values: List[List[float]] def __eq__(self, other: object) -> bool: if not isinstance(other, Refcase): @@ -50,5 +48,7 @@ def from_config_dict(cls, config_dict: ConfigDict) -> Optional["Refcase"]: raise ConfigValidationError(f"Could not read refcase: {err}") from err return ( - cls(start_date, refcase_keys, time_map, data) if data is not None else None + cls(start_date, refcase_keys, time_map, data.tolist()) + if data is not None + else None ) diff --git a/src/ert/config/workflow.py b/src/ert/config/workflow.py index 7da7d7c5aed..9ac6059a4c4 100644 --- a/src/ert/config/workflow.py +++ b/src/ert/config/workflow.py @@ -1,6 +1,7 @@ from __future__ import annotations import os +from dataclasses import dataclass from typing import TYPE_CHECKING, Any, Dict, Iterator, List, Optional, Tuple from .parsing import ConfigValidationError, ErrorInfo, init_workflow_schema, parse @@ -11,14 +12,10 @@ from .workflow_job import WorkflowJob +@dataclass class Workflow: - def __init__( - self, - src_file: str, - cmd_list: List[Tuple[WorkflowJob, Any]], - ): - self.src_file = src_file - self.cmd_list = cmd_list + src_file: str + cmd_list: List[Tuple[WorkflowJob, Any]] def __len__(self) -> int: return len(self.cmd_list) diff --git a/src/ert/config/workflow_job.py b/src/ert/config/workflow_job.py index af816329ec1..4eea83c515d 100644 --- a/src/ert/config/workflow_job.py +++ b/src/ert/config/workflow_job.py @@ -82,7 +82,7 @@ def from_file(cls, config_file: str, name: Optional[str] = None) -> "WorkflowJob arg_types_list = cls._make_arg_types_list(content_dict) return cls( name=name, - internal=content_dict.get("INTERNAL"), # type: ignore + internal=bool(content_dict.get("INTERNAL", False)), # type: ignore min_args=content_dict.get("MIN_ARG"), # type: ignore max_args=content_dict.get("MAX_ARG"), # type: ignore arg_types=arg_types_list, diff --git a/src/ert/substitution_list.py b/src/ert/substitution_list.py index 47cf7330658..bb735280cd0 100644 --- a/src/ert/substitution_list.py +++ b/src/ert/substitution_list.py @@ -2,7 +2,11 @@ import logging import re -from typing import Optional +from typing import Any, Optional + +from pydantic import GetCoreSchemaHandler, GetJsonSchemaHandler +from pydantic.json_schema import JsonSchemaValue +from pydantic_core import core_schema logger = logging.getLogger(__name__) _PATTERN = re.compile("<[^<>]+>") @@ -67,6 +71,41 @@ def __repr__(self) -> str: def __str__(self) -> str: return f"SubstitutionList({self._concise_representation()})" + @classmethod + def __get_pydantic_core_schema__( + cls, + _source_type: Any, + _handler: GetCoreSchemaHandler, + ) -> core_schema.CoreSchema: + def _serialize(instance: Any, info: Any) -> Any: + return dict(instance) + + from_str_schema = core_schema.chain_schema( + [ + core_schema.str_schema(), + core_schema.no_info_plain_validator_function(cls), + ] + ) + + return core_schema.json_or_python_schema( + json_schema=from_str_schema, + python_schema=core_schema.union_schema( + [ + from_str_schema, + core_schema.is_instance_schema(cls), + ] + ), + serialization=core_schema.plain_serializer_function_ser_schema( + _serialize, info_arg=True + ), + ) + + @classmethod + def __get_pydantic_json_schema__( + cls, _core_schema: core_schema.CoreSchema, handler: GetJsonSchemaHandler + ) -> JsonSchemaValue: + return handler(core_schema.str_schema()) + def _replace_strings(subst_list: SubstitutionList, string: str) -> Optional[str]: start = 0 diff --git a/tests/ert/unit_tests/all/plugins/snapshots/test_export_misfit/test_export_misfit/0/csv_data.csv b/tests/ert/unit_tests/all/plugins/snapshots/test_export_misfit/test_export_misfit/0/csv_data.csv index 5424ec92d24..4d0aac1be0c 100644 --- a/tests/ert/unit_tests/all/plugins/snapshots/test_export_misfit/test_export_misfit/0/csv_data.csv +++ b/tests/ert/unit_tests/all/plugins/snapshots/test_export_misfit/test_export_misfit/0/csv_data.csv @@ -1,6 +1,6 @@ Realization,FOPR,WOPR_OP1_108,WOPR_OP1_144,WOPR_OP1_190,WOPR_OP1_36,WOPR_OP1_72,WOPR_OP1_9,WPR_DIFF_1 -0,1572.455126624968,4.663157777414048,1.2280040962512109,24.150873738474047,0.16579549917171352,16.6031985311065,0.5786173169058768,17.52338148044444 -1,564.7325372587165,4.368782497900839,32.6530612244898,2.25,7.513238617348759,7.502955389862009,4.0,3.917211792502779 -2,760.2134646694443,0.6758601761400266,0.0495481141274234,0.878978328860087,0.53148428819629,10.315068719501141,0.5691876200100965,21.326953031224996 -3,762.2886383355541,0.057372834892021204,2.003570229564708,89.39209245855437,1.0729962591656552,0.23633929814081966,1.963529806065796,4.454344394944445 -4,978.68543806519,0.6099979595035421,11.1651322515757,2.3617365751122437,0.5138762294603726,41.03398708587926,0.04177266072298375,27.46179846677778 +0,1572.4551516177269,4.663157777414048,1.2280040962512109,24.150873738474047,0.16579549917171352,16.6031985311065,0.5786173169058768,17.52338148044444 +1,564.7325457301008,4.368782497900839,32.6530612244898,2.25,7.513238617348759,7.502955389862009,4.0,3.917211792502779 +2,760.2134818146507,0.6758601761400266,0.0495481141274234,0.878978328860087,0.53148428819629,10.315068719501141,0.5691876200100965,21.326953031224996 +3,762.2886413785844,0.057372834892021204,2.003570229564708,89.39209245855437,1.0729962591656552,0.23633929814081966,1.963529806065796,4.454344394944445 +4,978.6854544674984,0.6099979595035421,11.1651322515757,2.3617365751122437,0.5138762294603726,41.03398708587926,0.04177266072298375,27.46179846677778 diff --git a/tests/ert/unit_tests/config/observations_generator.py b/tests/ert/unit_tests/config/observations_generator.py index 4c0b65bc932..ba4c2db1f94 100644 --- a/tests/ert/unit_tests/config/observations_generator.py +++ b/tests/ert/unit_tests/config/observations_generator.py @@ -137,7 +137,7 @@ def general_observations(draw, ensemble_keys, std_cutoff, names): } val_type = draw(st.sampled_from(["value", "obs_file"])) if val_type == "value": - kws["value"] = draw(st.floats(allow_nan=False)) + kws["value"] = draw(st.floats(allow_nan=False, allow_infinity=False)) if val_type == "obs_file": kws["obs_file"] = draw(names) kws["error"] = None @@ -224,7 +224,10 @@ def observations(draw, ensemble_keys, summary_keys, std_cutoff, start_date): st.builds( HistoryObservation, error=st.floats( - min_value=std_cutoff, allow_nan=False, allow_infinity=False + min_value=std_cutoff, + max_value=1e20, + allow_nan=False, + allow_infinity=False, ), segment=st.lists( st.builds( @@ -234,12 +237,14 @@ def observations(draw, ensemble_keys, summary_keys, std_cutoff, start_date): stop=st.integers(min_value=1, max_value=10), error=st.floats( min_value=0.01, + max_value=1e20, allow_nan=False, allow_infinity=False, exclude_min=True, ), error_min=st.floats( min_value=0.0, + max_value=1e20, allow_nan=False, allow_infinity=False, exclude_min=True, diff --git a/tests/ert/unit_tests/config/test_ert_config.py b/tests/ert/unit_tests/config/test_ert_config.py index c711883d38c..e3e1f938bf4 100644 --- a/tests/ert/unit_tests/config/test_ert_config.py +++ b/tests/ert/unit_tests/config/test_ert_config.py @@ -11,6 +11,7 @@ import pytest from hypothesis import assume, given, settings from hypothesis import strategies as st +from pydantic import RootModel, TypeAdapter from ert.config import AnalysisConfig, ConfigValidationError, ErtConfig, HookRuntime from ert.config.ert_config import site_config_location @@ -23,7 +24,6 @@ ContextList, ContextString, ) -from ert.config.parsing.observations_parser import ObservationConfigError from ert.config.parsing.queue_system import QueueSystem from .config_dict_generator import config_generators @@ -537,6 +537,25 @@ def test_that_creating_ert_config_from_dict_is_same_as_from_file( @pytest.mark.integration_test +@pytest.mark.filterwarnings("ignore::ert.config.ConfigWarning") +@pytest.mark.usefixtures("set_site_config") +@settings(max_examples=20) +@given(config_generators()) +def test_that_ert_config_is_serializable(tmp_path_factory, config_generator): + filename = "config.ert" + with config_generator(tmp_path_factory, filename) as config_values: + ert_config = ErtConfig.from_dict( + config_values.to_config_dict("config.ert", os.getcwd()) + ) + config_json = json.loads(RootModel[ErtConfig](ert_config).model_dump_json()) + from_json = ErtConfig(**config_json) + assert from_json == ert_config + + +def test_that_ert_config_has_valid_schema(): + TypeAdapter(ErtConfig).json_schema() + + @pytest.mark.filterwarnings("ignore::ert.config.ConfigWarning") @pytest.mark.usefixtures("set_site_config") @settings(max_examples=10) @@ -1450,7 +1469,7 @@ def test_no_timemap_or_refcase_provides_clear_error(): print(line, end="") with pytest.raises( - ObservationConfigError, + ConfigValidationError, match="Missing REFCASE or TIME_MAP for observations: WPR_DIFF_1", ): ErtConfig.from_file("snake_oil.ert") @@ -1491,7 +1510,7 @@ def test_that_multiple_errors_are_shown_when_generating_observations(): continue print(line, end="") - with pytest.raises(ObservationConfigError) as err: + with pytest.raises(ConfigValidationError) as err: _ = ErtConfig.from_file("snake_oil.ert") expected_errors = [ diff --git a/tests/ert/unit_tests/config/test_observations.py b/tests/ert/unit_tests/config/test_observations.py index 9d3dfb35e66..6132d7a0b1a 100644 --- a/tests/ert/unit_tests/config/test_observations.py +++ b/tests/ert/unit_tests/config/test_observations.py @@ -4,7 +4,6 @@ from pathlib import Path from textwrap import dedent -import numpy as np import pytest from hypothesis import given, settings from hypothesis import strategies as st @@ -181,10 +180,10 @@ def test_summary_obs_invalid_observation_std(std): def test_gen_obs_invalid_observation_std(std): with pytest.raises(ValueError, match="must be strictly > 0"): GenObservation( - np.array(range(len(std))), - np.array(std), - np.array(range(len(std))), - np.array(range(len(std))), + list(range(len(std))), + list(std), + list(range(len(std))), + list(range(len(std))), ) @@ -283,7 +282,7 @@ def test_that_index_list_is_read(tmpdir): ) observations = ErtConfig.from_file("config.ert").enkf_obs - assert observations["OBS"].observations[0].indices.tolist() == [0, 2, 4, 6, 8] + assert observations["OBS"].observations[0].indices == [0, 2, 4, 6, 8] def test_that_index_file_is_read(tmpdir): @@ -317,7 +316,7 @@ def test_that_index_file_is_read(tmpdir): ) observations = ErtConfig.from_file("config.ert").enkf_obs - assert observations["OBS"].observations[0].indices.tolist() == [0, 2, 4, 6, 8] + assert observations["OBS"].observations[0].indices == [0, 2, 4, 6, 8] def test_that_missing_obs_file_raises_exception(tmpdir): diff --git a/tests/ert/unit_tests/data/snapshots/test_integration_data/test_all_measured_snapshot/0/snake_oil_measured_output.csv b/tests/ert/unit_tests/data/snapshots/test_integration_data/test_all_measured_snapshot/0/snake_oil_measured_output.csv index b508a4bf1aa..14ffeafb1c7 100644 --- a/tests/ert/unit_tests/data/snapshots/test_integration_data/test_all_measured_snapshot/0/snake_oil_measured_output.csv +++ b/tests/ert/unit_tests/data/snapshots/test_integration_data/test_all_measured_snapshot/0/snake_oil_measured_output.csv @@ -1,10 +1,10 @@ ,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,FOPR,WOPR_OP1_108,WOPR_OP1_144,WOPR_OP1_190,WOPR_OP1_36,WOPR_OP1_72,WOPR_OP1_9,WPR_DIFF_1,WPR_DIFF_1,WPR_DIFF_1,WPR_DIFF_1 key_index,2010-01-10 00:00:00,2010-01-20 00:00:00,2010-01-30 00:00:00,2010-02-09 00:00:00,2010-02-19 00:00:00,2010-03-01 00:00:00,2010-03-11 00:00:00,2010-03-21 00:00:00,2010-03-31 00:00:00,2010-04-10 00:00:00,2010-04-20 00:00:00,2010-04-30 00:00:00,2010-05-10 00:00:00,2010-05-20 00:00:00,2010-05-30 00:00:00,2010-06-09 00:00:00,2010-06-19 00:00:00,2010-06-29 00:00:00,2010-07-09 00:00:00,2010-07-19 00:00:00,2010-07-29 00:00:00,2010-08-08 00:00:00,2010-08-18 00:00:00,2010-08-28 00:00:00,2010-09-07 00:00:00,2010-09-17 00:00:00,2010-09-27 00:00:00,2010-10-07 00:00:00,2010-10-17 00:00:00,2010-10-27 00:00:00,2010-11-06 00:00:00,2010-11-16 00:00:00,2010-11-26 00:00:00,2010-12-06 00:00:00,2010-12-16 00:00:00,2010-12-26 00:00:00,2011-01-05 00:00:00,2011-01-15 00:00:00,2011-01-25 00:00:00,2011-02-04 00:00:00,2011-02-14 00:00:00,2011-02-24 00:00:00,2011-03-06 00:00:00,2011-03-16 00:00:00,2011-03-26 00:00:00,2011-04-05 00:00:00,2011-04-15 00:00:00,2011-04-25 00:00:00,2011-05-05 00:00:00,2011-05-15 00:00:00,2011-05-25 00:00:00,2011-06-04 00:00:00,2011-06-14 00:00:00,2011-06-24 00:00:00,2011-07-04 00:00:00,2011-07-14 00:00:00,2011-07-24 00:00:00,2011-08-03 00:00:00,2011-08-13 00:00:00,2011-08-23 00:00:00,2011-09-02 00:00:00,2011-09-12 00:00:00,2011-09-22 00:00:00,2011-10-02 00:00:00,2011-10-12 00:00:00,2011-10-22 00:00:00,2011-11-01 00:00:00,2011-11-11 00:00:00,2011-11-21 00:00:00,2011-12-01 00:00:00,2011-12-11 00:00:00,2011-12-21 00:00:00,2011-12-31 00:00:00,2012-01-10 00:00:00,2012-01-20 00:00:00,2012-01-30 00:00:00,2012-02-09 00:00:00,2012-02-19 00:00:00,2012-02-29 00:00:00,2012-03-10 00:00:00,2012-03-20 00:00:00,2012-03-30 00:00:00,2012-04-09 00:00:00,2012-04-19 00:00:00,2012-04-29 00:00:00,2012-05-09 00:00:00,2012-05-19 00:00:00,2012-05-29 00:00:00,2012-06-08 00:00:00,2012-06-18 00:00:00,2012-06-28 00:00:00,2012-07-08 00:00:00,2012-07-18 00:00:00,2012-07-28 00:00:00,2012-08-07 00:00:00,2012-08-17 00:00:00,2012-08-27 00:00:00,2012-09-06 00:00:00,2012-09-16 00:00:00,2012-09-26 00:00:00,2012-10-06 00:00:00,2012-10-16 00:00:00,2012-10-26 00:00:00,2012-11-05 00:00:00,2012-11-15 00:00:00,2012-11-25 00:00:00,2012-12-05 00:00:00,2012-12-15 00:00:00,2012-12-25 00:00:00,2013-01-04 00:00:00,2013-01-14 00:00:00,2013-01-24 00:00:00,2013-02-03 00:00:00,2013-02-13 00:00:00,2013-02-23 00:00:00,2013-03-05 00:00:00,2013-03-15 00:00:00,2013-03-25 00:00:00,2013-04-04 00:00:00,2013-04-14 00:00:00,2013-04-24 00:00:00,2013-05-04 00:00:00,2013-05-14 00:00:00,2013-05-24 00:00:00,2013-06-03 00:00:00,2013-06-13 00:00:00,2013-06-23 00:00:00,2013-07-03 00:00:00,2013-07-13 00:00:00,2013-07-23 00:00:00,2013-08-02 00:00:00,2013-08-12 00:00:00,2013-08-22 00:00:00,2013-09-01 00:00:00,2013-09-11 00:00:00,2013-09-21 00:00:00,2013-10-01 00:00:00,2013-10-11 00:00:00,2013-10-21 00:00:00,2013-10-31 00:00:00,2013-11-10 00:00:00,2013-11-20 00:00:00,2013-11-30 00:00:00,2013-12-10 00:00:00,2013-12-20 00:00:00,2013-12-30 00:00:00,2014-01-09 00:00:00,2014-01-19 00:00:00,2014-01-29 00:00:00,2014-02-08 00:00:00,2014-02-18 00:00:00,2014-02-28 00:00:00,2014-03-10 00:00:00,2014-03-20 00:00:00,2014-03-30 00:00:00,2014-04-09 00:00:00,2014-04-19 00:00:00,2014-04-29 00:00:00,2014-05-09 00:00:00,2014-05-19 00:00:00,2014-05-29 00:00:00,2014-06-08 00:00:00,2014-06-18 00:00:00,2014-06-28 00:00:00,2014-07-08 00:00:00,2014-07-18 00:00:00,2014-07-28 00:00:00,2014-08-07 00:00:00,2014-08-17 00:00:00,2014-08-27 00:00:00,2014-09-06 00:00:00,2014-09-16 00:00:00,2014-09-26 00:00:00,2014-10-06 00:00:00,2014-10-16 00:00:00,2014-10-26 00:00:00,2014-11-05 00:00:00,2014-11-15 00:00:00,2014-11-25 00:00:00,2014-12-05 00:00:00,2014-12-15 00:00:00,2014-12-25 00:00:00,2015-01-04 00:00:00,2015-01-14 00:00:00,2015-01-24 00:00:00,2015-02-03 00:00:00,2015-02-13 00:00:00,2015-02-23 00:00:00,2015-03-05 00:00:00,2015-03-15 00:00:00,2015-03-25 00:00:00,2015-04-04 00:00:00,2015-04-14 00:00:00,2015-04-24 00:00:00,2015-05-04 00:00:00,2015-05-14 00:00:00,2015-05-24 00:00:00,2015-06-03 00:00:00,2015-06-13 00:00:00,2015-06-23 00:00:00,2012-12-15 00:00:00,2013-12-10 00:00:00,2015-03-15 00:00:00,2010-12-26 00:00:00,2011-12-21 00:00:00,2010-03-31 00:00:00,400,800,1200,1800 data_index,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,107,143,189,35,71,8,400,800,1200,1800 -OBS,0.0016968873096629977,0.007549144793301821,0.017537245526909828,0.03158785030245781,0.04960281774401665,0.07146798074245453,0.09703561663627625,0.12614504992961884,0.1586153209209442,0.1942545473575592,0.23281694948673248,0.27404671907424927,0.3176907002925873,0.3634442389011383,0.4109863340854645,0.46002548933029175,0.5102593302726746,0.5614363551139832,0.6133571267127991,0.6655344367027283,0.7178515791893005,0.7704011797904968,0.8226962685585022,0.8746448755264282,0.9261661171913147,0.977008044719696,1.0266836881637573,1.0750459432601929,1.12155020236969,1.1657692193984985,1.207544207572937,1.2470088005065918,1.2835049629211426,1.3167047500610352,1.346083641052246,1.3711466789245605,1.3915883302688599,1.4073505401611328,1.4176363945007324,1.4222338199615479,1.4235652685165405,1.4251763820648193,1.4272525310516357,1.4300298690795898,1.4334416389465332,1.43769371509552,1.4429181814193726,1.4488641023635864,1.4547947645187378,1.4603124856948853,1.465605616569519,1.4704256057739258,1.4741872549057007,1.4752846956253052,1.4738245010375977,1.4694164991378784,1.4611896276474,1.4494869709014893,1.4363856315612793,1.4213961362838745,1.4026654958724976,1.3793243169784546,1.3527154922485352,1.3241467475891113,1.296581506729126,1.270460844039917,1.2434195280075073,1.2160032987594604,1.1891443729400635,1.161468505859375,1.1344152688980103,1.111630916595459,1.0911470651626587,1.071900486946106,1.0527071952819824,1.0326411724090576,1.0128751993179321,0.9945804476737976,0.975469708442688,0.9557305574417114,0.9363316893577576,0.9158328175544739,0.8928252458572388,0.8686985969543457,0.8423308730125427,0.8124594688415527,0.7789327502250671,0.7419267892837524,0.7024903893470764,0.661297619342804,0.6193501949310303,0.5782303810119629,0.5396573543548584,0.5051060914993286,0.47489526867866516,0.4502047300338745,0.43144863843917847,0.4186316132545471,0.410041481256485,0.40574684739112854,0.40424859523773193,0.3991520404815674,0.3887236714363098,0.37419527769088745,0.3551763594150543,0.331745445728302,0.30616295337677,0.28151485323905945,0.26365551352500916,0.24812838435173035,0.23326681554317474,0.21852639317512512,0.20469489693641663,0.19195015728473663,0.17977432906627655,0.16876085102558136,0.15952761471271515,0.15166985988616943,0.14568953216075897,0.14111457765102386,0.13730789721012115,0.13369180262088776,0.1301889419555664,0.12653681635856628,0.12283045053482056,0.11926789581775665,0.11993221193552017,0.12808072566986084,0.1359952986240387,0.1433563381433487,0.14990629255771637,0.1549033373594284,0.15908613801002502,0.16274403035640717,0.16555064916610718,0.1669514924287796,0.16719110310077667,0.1661362498998642,0.16499200463294983,0.16432030498981476,0.165121391415596,0.169014111161232,0.17592155933380127,0.18565155565738678,0.19735679030418396,0.2105773389339447,0.2247595340013504,0.23917199671268463,0.2524295449256897,0.2640857398509979,0.2746853232383728,0.2849123775959015,0.2945040166378021,0.3027935326099396,0.30875587463378906,0.3120051324367523,0.31252342462539673,0.3097202479839325,0.3039141893386841,0.2956465780735016,0.28585320711135864,0.2753968834877014,0.2641619145870209,0.2527305483818054,0.24120257794857025,0.22952820360660553,0.21775572001934052,0.20688839256763458,0.19651590287685394,0.18688032031059265,0.17763660848140717,0.1682787537574768,0.1587630957365036,0.14956273138523102,0.14119677245616913,0.13354657590389252,0.12660714983940125,0.12049901485443115,0.11532926559448242,0.11091870814561844,0.10653064399957657,0.10148541629314423,0.09563612192869186,0.0887933000922203,0.08123061805963516,0.0733993723988533,0.0654938817024231,0.05767139419913292,0.05034296214580536,0.04377567023038864,0.03793442249298096,0.032930485904216766,0.02895224094390869,0.025974156334996223,0.023769771680235863,0.022172002121806145,0.021033743396401405,0.020261472091078758,0.019794177263975143,0.01961757428944111,0.3,0.2,0.015,0.7,0.5,0.1,0.0,0.1,0.2,0.0 -STD,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.10266836732625961,0.10750459879636765,0.112155020236969,0.11657692492008209,0.1207544207572937,0.1247008815407753,0.12835049629211426,0.13167047500610352,0.13460837304592133,0.13711467385292053,0.13915883004665375,0.14073505997657776,0.14176364243030548,0.14222338795661926,0.1423565298318863,0.14251764118671417,0.14272525906562805,0.14300298690795898,0.14334416389465332,0.14376936852931976,0.14429181814193726,0.14488641917705536,0.1454794853925705,0.1460312455892563,0.14656056463718414,0.14704255759716034,0.14741872251033783,0.14752846956253052,0.147382453083992,0.1469416469335556,0.14611896872520447,0.14494870603084564,0.14363856613636017,0.14213961362838745,0.140266552567482,0.1379324346780777,0.13527154922485352,0.13241468369960785,0.12965814769268036,0.12704609334468842,0.12434195727109909,0.12160032987594604,0.11891444027423859,0.11614685505628586,0.11344152688980103,0.11116309463977814,0.10911470651626587,0.10719005018472672,0.10527072101831436,0.10326411575078964,0.10128752142190933,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.075,0.035,0.01,0.07,0.05,0.05,0.1,0.2,0.15,0.05 -0,0.05596115440130234,0.05905991047620773,0.06433762609958649,0.07174286246299744,0.08120841532945633,0.09265599399805069,0.10600091516971588,0.12115591764450073,0.1380334496498108,0.15654607117176056,0.17655602097511292,0.20094838738441467,0.24621784687042236,0.2936668395996094,0.3425387442111969,0.39265134930610657,0.4441823959350586,0.4966517984867096,0.5499683022499084,0.603771448135376,0.6578561067581177,0.7111904621124268,0.7627429366111755,0.8122514486312866,0.8594288229942322,0.9040638208389282,0.9463410973548889,0.9862102270126343,1.0224096775054932,1.0546443462371826,1.0845394134521484,1.1104881763458252,1.131589651107788,1.1479130983352661,1.1595455408096313,1.167633056640625,1.1722285747528076,1.1743475198745728,1.1731048822402954,1.1686681509017944,1.161161184310913,1.1525744199752808,1.1427159309387207,1.1304982900619507,1.1179068088531494,1.1081316471099854,1.0939658880233765,1.0752445459365845,1.0542879104614258,1.033347487449646,1.0119364261627197,0.991693377494812,0.9730311632156372,0.9550253748893738,0.9345653653144836,0.915583610534668,0.8953654766082764,0.8732743263244629,0.8482869863510132,0.8196418881416321,0.7878987193107605,0.7517772316932678,0.7119350433349609,0.6717563271522522,0.6330385804176331,0.5994275212287903,0.5638179183006287,0.5303453207015991,0.4990736246109009,0.47381284832954407,0.4495185911655426,0.4257318377494812,0.4019607603549957,0.3778245449066162,0.35616952180862427,0.33382049202919006,0.3128863275051117,0.2942618131637573,0.2768097221851349,0.25245460867881775,0.23063282668590546,0.2152853012084961,0.20333616435527802,0.19387012720108032,0.18325699865818024,0.1716025322675705,0.15743741393089294,0.14652186632156372,0.13051219284534454,0.12044452875852585,0.11048588901758194,0.10224469006061554,0.09571051597595215,0.09076317399740219,0.08720768988132477,0.08480052649974823,0.0832802802324295,0.0823993906378746,0.08195365220308304,0.08180616050958633,0.08303830027580261,0.0871763601899147,0.0938313826918602,0.1023586317896843,0.1119394525885582,0.12166640162467957,0.1306365430355072,0.1380424052476883,0.14325076341629028,0.1458611786365509,0.1471879780292511,0.14924518764019012,0.1518167108297348,0.15459828078746796,0.15724658966064453,0.15941375494003296,0.16078181564807892,0.16109345853328705,0.16017602384090424,0.15795643627643585,0.15502306818962097,0.15231360495090485,0.15010681748390198,0.14880436658859253,0.1488730013370514,0.15077413618564606,0.15489619970321655,0.1614965796470642,0.1706589013338089,0.1822691708803177,0.19436874985694885,0.2043376863002777,0.2121737152338028,0.2180357575416565,0.22218506038188934,0.22784097492694855,0.23126012086868286,0.23103396594524384,0.2298966646194458,0.22823171317577362,0.2288496047258377,0.2323354035615921,0.2407100647687912,0.24989749491214752,0.259870707988739,0.2709311246871948,0.2825491726398468,0.2953783869743347,0.3056764602661133,0.3122561275959015,0.3177250623703003,0.3260450065135956,0.33306464552879333,0.3378613293170929,0.3401772677898407,0.3393363654613495,0.33513420820236206,0.32767120003700256,0.3184562027454376,0.3070579171180725,0.2937939465045929,0.2805998921394348,0.26584646105766296,0.2500576078891754,0.23389898240566254,0.2171536237001419,0.2064875066280365,0.19675801694393158,0.18681614100933075,0.1767863929271698,0.16696739196777344,0.15770217776298523,0.14908964931964874,0.1412104070186615,0.1341284066438675,0.1278918832540512,0.12253551930189133,0.11808308213949203,0.11455046385526657,0.11194827407598495,0.10930047929286957,0.10525462031364441,0.10003970563411713,0.09402676671743393,0.08766300231218338,0.08140913397073746,0.07567841559648514,0.07078717648983002,0.06692437827587128,0.06414353847503662,0.06218907982110977,0.0607629232108593,0.05987086892127991,0.059472911059856415,0.0594835989177227,0.05978194996714592,0.06022725999355316,0.060678575187921524,0.06101493909955025,0.06115317344665527,0.1380424052476883,0.23878537118434906,0.06414353847503662,0.6714974045753479,0.2962648868560791,0.1380334496498108,0.047452,0.186768,0.183387,0.206747 -1,0.015982799232006073,0.018984779715538025,0.024110613390803337,0.03132806345820427,0.040592338889837265,0.05184478685259819,0.06501130759716034,0.08000797778367996,0.09674280881881714,0.11666669696569443,0.1547873169183731,0.19551505148410797,0.23858241736888885,0.2837105095386505,0.33061379194259644,0.3790050148963928,0.42859306931495667,0.4790826141834259,0.530165433883667,0.5815176963806152,0.6328243017196655,0.683779776096344,0.7340631484985352,0.7833876609802246,0.8314805030822754,0.8780428767204285,0.9227654933929443,0.9654030203819275,1.0057004690170288,1.0433998107910156,1.0782145261764526,1.1098326444625854,1.1379904747009277,1.1624739170074463,1.1830859184265137,1.199626088142395,1.2118992805480957,1.2197221517562866,1.2229278087615967,1.2213786840438843,1.2169352769851685,1.2124816179275513,1.2080864906311035,1.2037124633789062,1.1992862224578857,1.1947860717773438,1.1902142763137817,1.18546462059021,1.1803616285324097,1.1747498512268066,1.168567180633545,1.1618250608444214,1.1543725728988647,1.1459240913391113,1.13620924949646,1.124887466430664,1.1115686893463135,1.0958844423294067,1.0775634050369263,1.0562971830368042,1.0329523086547852,1.0090575218200684,0.9846935868263245,0.9599347710609436,0.9349110126495361,0.9096108078956604,0.8839359879493713,0.8580445647239685,0.8321131467819214,0.8062962293624878,0.7803827524185181,0.7539368867874146,0.7269884943962097,0.6998342871665955,0.6727391481399536,0.6459682583808899,0.6198227405548096,0.5945395827293396,0.5701333284378052,0.546614944934845,0.5241619348526001,0.5030096173286438,0.4830918610095978,0.46424102783203125,0.44636914134025574,0.4295010268688202,0.41373512148857117,0.3993065655231476,0.3863489031791687,0.37498939037323,0.36516276001930237,0.3567117750644684,0.34958377480506897,0.34382718801498413,0.3394446074962616,0.3363114297389984,0.3341835141181946,0.3328339457511902,0.33216604590415955,0.33196502923965454,0.3318219780921936,0.3313627243041992,0.33065733313560486,0.32973673939704895,0.3287767171859741,0.3275703489780426,0.32573410868644714,0.32341766357421875,0.3206343948841095,0.3175012469291687,0.3141641318798065,0.310667484998703,0.3068810999393463,0.30280783772468567,0.2981817126274109,0.2929636240005493,0.2872481048107147,0.2808453440666199,0.273607462644577,0.26548323035240173,0.2569913864135742,0.24875681102275848,0.24054837226867676,0.23218560218811035,0.22346261143684387,0.21454405784606934,0.2057448923587799,0.1969687044620514,0.19148972630500793,0.1869451254606247,0.18230167031288147,0.1777462363243103,0.17350296676158905,0.16964203119277954,0.16624945402145386,0.16334843635559082,0.1608814150094986,0.15887707471847534,0.15757042169570923,0.15705910325050354,0.15676461160182953,0.1558055281639099,0.15419445931911469,0.15193144977092743,0.14906775951385498,0.1457849144935608,0.14229340851306915,0.13865648210048676,0.14243510365486145,0.14706450700759888,0.15147319436073303,0.15541724860668182,0.15862180292606354,0.16089214384555817,0.16202522814273834,0.16175909340381622,0.15994486212730408,0.15665996074676514,0.15195421874523163,0.14596134424209595,0.13947585225105286,0.13341030478477478,0.1276789754629135,0.12229876965284348,0.11719293892383575,0.11222783476114273,0.10731115192174911,0.10240022838115692,0.0974106714129448,0.0923248678445816,0.08721800893545151,0.08217174559831619,0.07716022431850433,0.07480820268392563,0.07278872281312943,0.07074357569217682,0.0686924159526825,0.06665557622909546,0.06462446600198746,0.06258249282836914,0.06048394367098808,0.05825715884566307,0.055906541645526886,0.05344926938414574,0.05093437433242798,0.04839274287223816,0.04584064334630966,0.043324366211891174,0.040897443890571594,0.03858765959739685,0.036393437534570694,0.03432837128639221,0.03244904801249504,0.030789656564593315,0.02938135340809822,0.02822822891175747,0.02732691913843155,0.026679888367652893,0.026284758001565933,0.026137633249163628,0.14323775470256805,0.0,0.0,0.5081279873847961,0.3630423843860626,0.0,-0.018255,-0.045011,0.003181,-0.063963 -2,0.0,0.0,0.0,0.0009306804859079421,0.009585856460034847,0.020108461380004883,0.032440222799777985,0.046518269926309586,0.06227773800492287,0.07963735610246658,0.09848103672266006,0.11865821480751038,0.1488896757364273,0.19660300016403198,0.24429930746555328,0.2945767641067505,0.345316618680954,0.39578354358673096,0.450306236743927,0.5048250555992126,0.5587748885154724,0.614186704158783,0.6681363582611084,0.721177875995636,0.7719404697418213,0.8255054354667664,0.8687918186187744,0.9061083793640137,0.9438246488571167,0.982487678527832,1.0182257890701294,1.0524622201919556,1.0842313766479492,1.1144633293151855,1.1407458782196045,1.1650632619857788,1.1853220462799072,1.1931416988372803,1.1973447799682617,1.1967073678970337,1.1917431354522705,1.1848559379577637,1.1863983869552612,1.180171012878418,1.1808456182479858,1.1644538640975952,1.1476174592971802,1.139690637588501,1.1310341358184814,1.1272388696670532,1.1152210235595703,1.093773603439331,1.0590318441390991,1.0220450162887573,0.9824433922767639,0.9581566452980042,0.9283046126365662,0.8893449902534485,0.8637832999229431,0.8359286785125732,0.803458571434021,0.8110893368721008,0.7883930206298828,0.769569993019104,0.736599326133728,0.6992374658584595,0.6777465343475342,0.6741881966590881,0.671044111251831,0.6680765151977539,0.664774477481842,0.6605854034423828,0.6556973457336426,0.6500316858291626,0.6434630751609802,0.6357719302177429,0.6268970966339111,0.617358922958374,0.6077398061752319,0.5987376570701599,0.5895726084709167,0.578502357006073,0.5655543208122253,0.5514233112335205,0.5361951589584351,0.5202483534812927,0.5043804049491882,0.4890173077583313,0.474770188331604,0.4622876048088074,0.45095524191856384,0.4394868314266205,0.4282333254814148,0.41782838106155396,0.408579021692276,0.4006316661834717,0.4190254509449005,0.43807944655418396,0.4212518632411957,0.4232972264289856,0.4041292369365692,0.3852272927761078,0.3837123215198517,0.38165757060050964,0.3787357211112976,0.374404639005661,0.36859017610549927,0.3616580367088318,0.3533220887184143,0.344603955745697,0.3364063501358032,0.32908573746681213,0.32303041219711304,0.31812265515327454,0.31358474493026733,0.3091912567615509,0.3050493597984314,0.3004007935523987,0.29471608996391296,0.28817132115364075,0.28165388107299805,0.2761516869068146,0.27177420258522034,0.2684633135795593,0.2654974162578583,0.262513667345047,0.2592756748199463,0.25492778420448303,0.24965855479240417,0.24329020082950592,0.2366958111524582,0.2313782125711441,0.22729013860225677,0.22418691217899323,0.2218572497367859,0.22002002596855164,0.21842610836029053,0.21708914637565613,0.21592605113983154,0.21536625921726227,0.2147497832775116,0.21293288469314575,0.21053028106689453,0.2077907919883728,0.2046555131673813,0.20135003328323364,0.19799858331680298,0.19402647018432617,0.18963764607906342,0.18482011556625366,0.1794918328523636,0.17377987504005432,0.16786564886569977,0.16131030023097992,0.15413634479045868,0.14697274565696716,0.14039060473442078,0.1342773735523224,0.12885694205760956,0.12410005927085876,0.11916770786046982,0.11318899691104889,0.10661362111568451,0.09984112530946732,0.09322840720415115,0.08676834404468536,0.08038439601659775,0.07439789175987244,0.06882855296134949,0.06383582949638367,0.059450600296258926,0.05551062524318695,0.051901817321777344,0.048607032746076584,0.04552468657493591,0.042628213763237,0.03994819521903992,0.037432871758937836,0.035108331590890884,0.03296605870127678,0.030791183933615685,0.028320135548710823,0.025629933923482895,0.022796794772148132,0.019936542958021164,0.017027921974658966,0.014029205776751041,0.011087421327829361,0.008258547633886337,0.005624615587294102,0.0033161561004817486,0.0014094742946326733,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.3616580367088318,0.2077907919883728,0.005624615587294102,0.6489679217338562,0.6605854034423828,0.06227773800492287,0.0,0.167201,0.264971,0.229273 -3,0.28399229049682617,0.2900899052619934,0.30051347613334656,0.31520578265190125,0.3340320289134979,0.3568198084831238,0.38345974683761597,0.41381514072418213,0.44766536355018616,0.48479968309402466,0.524895191192627,0.5675287842750549,0.6124934554100037,0.659464418888092,0.7083309292793274,0.7591266632080078,0.8110880851745605,0.8637502193450928,0.9169859886169434,0.9708776473999023,1.0252817869186401,1.0793012380599976,1.1328692436218262,1.1856926679611206,1.2374732494354248,1.2876266241073608,1.3354979753494263,1.3810325860977173,1.4239223003387451,1.4638843536376953,1.501342535018921,1.5354032516479492,1.5647892951965332,1.5895379781723022,1.6103185415267944,1.6276174783706665,1.6417065858840942,1.6522436141967773,1.6595404148101807,1.6629419326782227,1.6622159481048584,1.6604959964752197,1.6582337617874146,1.6521093845367432,1.6410725116729736,1.6280039548873901,1.6145401000976562,1.5991586446762085,1.582806944847107,1.5639278888702393,1.542736291885376,1.5189188718795776,1.493863821029663,1.469462513923645,1.4498372077941895,1.4321577548980713,1.4089341163635254,1.383515477180481,1.3558306694030762,1.32869291305542,1.3047574758529663,1.28446364402771,1.2640172243118286,1.2433749437332153,1.2219152450561523,1.1997239589691162,1.1781433820724487,1.159340500831604,1.1392289400100708,1.1183892488479614,1.0908747911453247,1.056386947631836,1.018433690071106,0.9807536602020264,0.9458610415458679,0.9133395552635193,0.879306435585022,0.8442026972770691,0.8080228567123413,0.778321385383606,0.7529441118240356,0.7308405041694641,0.715999960899353,0.7056357264518738,0.6951778531074524,0.6831094622612,0.6720735430717468,0.6578577160835266,0.6461779475212097,0.6373482346534729,0.6276736855506897,0.6161053776741028,0.6078271865844727,0.6010143160820007,0.5948863625526428,0.5922757387161255,0.5962059497833252,0.6016223430633545,0.6080636978149414,0.6132354736328125,0.6123179793357849,0.6122469305992126,0.6102297902107239,0.6086387634277344,0.6013227105140686,0.5878710150718689,0.5724338889122009,0.5560264587402344,0.5341708660125732,0.5133089423179626,0.49811720848083496,0.4873057007789612,0.4790615141391754,0.4766489863395691,0.4725334048271179,0.4662644565105438,0.4611850678920746,0.45502641797065735,0.4445648193359375,0.43355774879455566,0.42516061663627625,0.41411468386650085,0.4056221842765808,0.3962383568286896,0.388287752866745,0.3828529715538025,0.37402740120887756,0.36259591579437256,0.3537798821926117,0.34560051560401917,0.3363794982433319,0.32862865924835205,0.3196941912174225,0.30884209275245667,0.2979681193828583,0.29072046279907227,0.2843686640262604,0.2812165319919586,0.28171229362487793,0.28330865502357483,0.28534188866615295,0.2869175672531128,0.2849505841732025,0.28144049644470215,0.27814629673957825,0.2747631072998047,0.2722829580307007,0.27271410822868347,0.2723371088504791,0.27203190326690674,0.27342113852500916,0.27600958943367004,0.27884557843208313,0.2836582064628601,0.28787606954574585,0.2923819124698639,0.29844561219215393,0.3024548888206482,0.304222971200943,0.30586937069892883,0.30722901225090027,0.3077033460140228,0.3087846040725708,0.30966421961784363,0.31035280227661133,0.3119439482688904,0.31266963481903076,0.31322699785232544,0.313370019197464,0.31348881125450134,0.31317460536956787,0.31274160742759705,0.3114594519138336,0.30946511030197144,0.3065339922904968,0.3032349646091461,0.3004685938358307,0.2975768744945526,0.29431015253067017,0.29039499163627625,0.28660133481025696,0.28363025188446045,0.2822751998901367,0.281708300113678,0.2817384600639343,0.28266236186027527,0.2846493422985077,0.2868160903453827,0.28935301303863525,0.29160943627357483,0.29359668493270874,0.29520100355148315,0.2964218556880951,0.29742148518562317,0.29827019572257996,0.2988854944705963,0.29930371046066284,0.29959961771965027,0.29972729086875916,0.2997667193412781,0.2820355296134949,0.15045836567878723,0.10954739153385162,0.7725098729133606,0.524307370185852,0.17006300389766693,-0.120237,-0.098908,-0.004551,0.019996 -4,0.02509653940796852,0.02827547676861286,0.03370004892349243,0.041331253945827484,0.051114898175001144,0.06298260390758514,0.07685297727584839,0.0926329717040062,0.11021918058395386,0.12949924170970917,0.15035124123096466,0.17264455556869507,0.21688063442707062,0.2665579319000244,0.31835392117500305,0.3719891309738159,0.42720311880111694,0.48359477519989014,0.540685772895813,0.5980349183082581,0.6550778150558472,0.7111934423446655,0.765991747379303,0.8190850615501404,0.8700788021087646,0.918589174747467,0.9642108082771301,1.0068879127502441,1.0467756986618042,1.0840752124786377,1.118454933166504,1.1493537425994873,1.1766772270202637,1.2003511190414429,1.2203409671783447,1.2367597818374634,1.2497233152389526,1.2590172290802002,1.2645816802978516,1.2663131952285767,1.264798641204834,1.2609126567840576,1.2547250986099243,1.2461302280426025,1.2350307703018188,1.2211872339248657,1.2045375108718872,1.185194969177246,1.1630009412765503,1.137857437133789,1.1104543209075928,1.0815999507904053,1.05112886428833,1.0198420286178589,0.9876242280006409,0.9549700021743774,0.9232159852981567,0.8924859762191772,0.8628618121147156,0.8347347378730774,0.8083072304725647,0.784145712852478,0.7628934383392334,0.7445844411849976,0.7288458943367004,0.7142981886863708,0.6996052861213684,0.6846065521240234,0.6691861152648926,0.6542112231254578,0.6396579742431641,0.6247348189353943,0.6098151803016663,0.5952072739601135,0.5802691578865051,0.5646029114723206,0.5484598875045776,0.5307885408401489,0.5107890367507935,0.48859673738479614,0.4652012586593628,0.44159096479415894,0.41829437017440796,0.3958168029785156,0.37400123476982117,0.3536297082901001,0.336173951625824,0.3211837410926819,0.3096402585506439,0.30152666568756104,0.29626551270484924,0.29285570979118347,0.2909570038318634,0.2892732322216034,0.2875249981880188,0.28604134917259216,0.2852393686771393,0.29412710666656494,0.29974955320358276,0.3018835186958313,0.3028077483177185,0.30590304732322693,0.3110741972923279,0.31811466813087463,0.32674533128738403,0.33662697672843933,0.34737518429756165,0.35857677459716797,0.36980652809143066,0.3806433379650116,0.3907493054866791,0.39983856678009033,0.40756067633628845,0.41360563039779663,0.4177159368991852,0.41969481110572815,0.41941192746162415,0.41680705547332764,0.41188982129096985,0.40473729372024536,0.39652687311172485,0.388846218585968,0.3817134499549866,0.37512412667274475,0.3690653145313263,0.363515168428421,0.3584473729133606,0.35383835434913635,0.34966516494750977,0.34590643644332886,0.3425322473049164,0.33951255679130554,0.33683890104293823,0.3345080614089966,0.3325205445289612,0.33087849617004395,0.32958513498306274,0.328645795583725,0.32806527614593506,0.32784706354141235,0.3272450268268585,0.3251878619194031,0.3217240869998932,0.3169499337673187,0.31099560856819153,0.30402103066444397,0.2962065637111664,0.28774014115333557,0.2788122892379761,0.2696090042591095,0.26029443740844727,0.2510133981704712,0.24190938472747803,0.2331041544675827,0.22469566762447357,0.21675612032413483,0.20933285355567932,0.20245112478733063,0.1961149126291275,0.1903093010187149,0.18420985341072083,0.1767779290676117,0.16823911666870117,0.158842995762825,0.14884279668331146,0.1384870409965515,0.12801021337509155,0.1176237091422081,0.10751236975193024,0.09783150255680084,0.08870455622673035,0.08022389560937881,0.07245419919490814,0.0654345378279686,0.05918315798044205,0.053702980279922485,0.0489872507750988,0.04502492770552635,0.041805557906627655,0.039323147386312485,0.03737601265311241,0.03567379340529442,0.034217219799757004,0.033006906509399414,0.03203965350985527,0.03130673989653587,0.03079403005540371,0.03048313409090042,0.030350450426340103,0.03036794252693653,0.030501989647746086,0.030718181282281876,0.030987171456217766,0.03128131106495857,0.031575482338666916,0.031847789883613586,0.03208010271191597,0.032258305698633194,0.032372280955314636,0.03241586685180664,0.35857677459716797,0.3169499337673187,0.03036794252693653,0.6498203873634338,0.17971111834049225,0.11021918058395386,0.036091,0.194078,-0.082472,0.242714 +OBS,0.0016968873,0.0075491448,0.0175372455,0.0315878503,0.0496028177,0.0714679807,0.0970356166,0.1261450499,0.1586153209,0.1942545474,0.2328169495,0.2740467191,0.3176907003,0.3634442389,0.4109863341,0.4600254893,0.5102593303,0.5614363551,0.6133571267,0.6655344367,0.7178515792,0.7704011798,0.8226962686,0.8746448755,0.9261661172,0.9770080447,1.0266836882,1.0750459433,1.1215502024,1.1657692194,1.2075442076,1.2470088005,1.2835049629,1.3167047501,1.3460836411,1.3711466789,1.3915883303,1.4073505402,1.4176363945,1.42223382,1.4235652685,1.4251763821,1.4272525311,1.4300298691,1.4334416389,1.4376937151,1.4429181814,1.4488641024,1.4547947645,1.4603124857,1.4656056166,1.4704256058,1.4741872549,1.4752846956,1.473824501,1.4694164991,1.4611896276,1.4494869709,1.4363856316,1.4213961363,1.4026654959,1.379324317,1.3527154922,1.3241467476,1.2965815067,1.270460844,1.243419528,1.2160032988,1.1891443729,1.1614685059,1.1344152689,1.1116309166,1.0911470652,1.0719004869,1.0527071953,1.0326411724,1.0128751993,0.9945804477,0.9754697084,0.9557305574,0.9363316894,0.9158328176,0.8928252459,0.868698597,0.842330873,0.8124594688,0.7789327502,0.7419267893,0.7024903893,0.6612976193,0.6193501949,0.578230381,0.5396573544,0.5051060915,0.4748952687,0.45020473,0.4314486384,0.4186316133,0.4100414813,0.4057468474,0.4042485952,0.3991520405,0.3887236714,0.3741952777,0.3551763594,0.3317454457,0.3061629534,0.2815148532,0.2636555135,0.2481283844,0.2332668155,0.2185263932,0.2046948969,0.1919501573,0.1797743291,0.168760851,0.1595276147,0.1516698599,0.1456895322,0.1411145777,0.1373078972,0.1336918026,0.130188942,0.1265368164,0.1228304505,0.1192678958,0.1199322119,0.1280807257,0.1359952986,0.1433563381,0.1499062926,0.1549033374,0.159086138,0.1627440304,0.1655506492,0.1669514924,0.1671911031,0.1661362499,0.1649920046,0.164320305,0.1651213914,0.1690141112,0.1759215593,0.1856515557,0.1973567903,0.2105773389,0.224759534,0.2391719967,0.2524295449,0.2640857399,0.2746853232,0.2849123776,0.2945040166,0.3027935326,0.3087558746,0.3120051324,0.3125234246,0.309720248,0.3039141893,0.2956465781,0.2858532071,0.2753968835,0.2641619146,0.2527305484,0.2412025779,0.2295282036,0.21775572,0.2068883926,0.1965159029,0.1868803203,0.1776366085,0.1682787538,0.1587630957,0.1495627314,0.1411967725,0.1335465759,0.1266071498,0.1204990149,0.1153292656,0.1109187081,0.106530644,0.1014854163,0.0956361219,0.0887933001,0.0812306181,0.0733993724,0.0654938817,0.0576713942,0.0503429621,0.0437756702,0.0379344225,0.0329304859,0.0289522409,0.0259741563,0.0237697717,0.0221720021,0.0210337434,0.0202614721,0.0197941773,0.0196175743,0.3,0.2,0.015,0.7,0.5,0.1,0.0,0.1,0.2,0.0 +STD,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1026683688,0.1075045943,0.1121550202,0.1165769219,0.1207544208,0.1247008801,0.1283504963,0.131670475,0.1346083641,0.1371146679,0.139158833,0.140735054,0.1417636395,0.142223382,0.1423565269,0.1425176382,0.1427252531,0.1430029869,0.1433441639,0.1437693715,0.1442918181,0.1448864102,0.1454794765,0.1460312486,0.1465605617,0.1470425606,0.1474187255,0.1475284696,0.1473824501,0.1469416499,0.1461189628,0.1449486971,0.1436385632,0.1421396136,0.1402665496,0.1379324317,0.1352715492,0.1324146748,0.1296581507,0.1270460844,0.1243419528,0.1216003299,0.1189144373,0.1161468506,0.1134415269,0.1111630917,0.1091147065,0.1071900487,0.1052707195,0.1032641172,0.1012875199,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.075,0.035,0.01,0.07,0.05,0.05,0.1,0.2,0.15,0.05 +0,0.0559611544,0.0590599105,0.0643376261,0.0717428625,0.0812084153,0.092655994,0.1060009152,0.1211559176,0.1380334496,0.1565460712,0.176556021,0.2009483874,0.2462178469,0.2936668396,0.3425387442,0.3926513493,0.4441823959,0.4966517985,0.5499683022,0.6037714481,0.6578561068,0.7111904621,0.7627429366,0.8122514486,0.859428823,0.9040638208,0.9463410974,0.986210227,1.0224096775,1.0546443462,1.0845394135,1.1104881763,1.1315896511,1.1479130983,1.1595455408,1.1676330566,1.1722285748,1.1743475199,1.1731048822,1.1686681509,1.1611611843,1.15257442,1.1427159309,1.1304982901,1.1179068089,1.1081316471,1.093965888,1.0752445459,1.0542879105,1.0333474874,1.0119364262,0.9916933775,0.9730311632,0.9550253749,0.9345653653,0.9155836105,0.8953654766,0.8732743263,0.8482869864,0.8196418881,0.7878987193,0.7517772317,0.7119350433,0.6717563272,0.6330385804,0.5994275212,0.5638179183,0.5303453207,0.4990736246,0.4738128483,0.4495185912,0.4257318377,0.4019607604,0.3778245449,0.3561695218,0.333820492,0.3128863275,0.2942618132,0.2768097222,0.2524546087,0.2306328267,0.2152853012,0.2033361644,0.1938701272,0.1832569987,0.1716025323,0.1574374139,0.1465218663,0.1305121928,0.1204445288,0.110485889,0.1022446901,0.095710516,0.090763174,0.0872076899,0.0848005265,0.0832802802,0.0823993906,0.0819536522,0.0818061605,0.0830383003,0.0871763602,0.0938313827,0.1023586318,0.1119394526,0.1216664016,0.130636543,0.1380424052,0.1432507634,0.1458611786,0.147187978,0.1492451876,0.1518167108,0.1545982808,0.1572465897,0.1594137549,0.1607818156,0.1610934585,0.1601760238,0.1579564363,0.1550230682,0.152313605,0.1501068175,0.1488043666,0.1488730013,0.1507741362,0.1548961997,0.1614965796,0.1706589013,0.1822691709,0.1943687499,0.2043376863,0.2121737152,0.2180357575,0.2221850604,0.2278409749,0.2312601209,0.2310339659,0.2298966646,0.2282317132,0.2288496047,0.2323354036,0.2407100648,0.2498974949,0.259870708,0.2709311247,0.2825491726,0.295378387,0.3056764603,0.3122561276,0.3177250624,0.3260450065,0.3330646455,0.3378613293,0.3401772678,0.3393363655,0.3351342082,0.3276712,0.3184562027,0.3070579171,0.2937939465,0.2805998921,0.2658464611,0.2500576079,0.2338989824,0.2171536237,0.2064875066,0.1967580169,0.186816141,0.1767863929,0.166967392,0.1577021778,0.1490896493,0.141210407,0.1341284066,0.1278918833,0.1225355193,0.1180830821,0.1145504639,0.1119482741,0.1093004793,0.1052546203,0.1000397056,0.0940267667,0.0876630023,0.081409134,0.0756784156,0.0707871765,0.0669243783,0.0641435385,0.0621890798,0.0607629232,0.0598708689,0.0594729111,0.0594835989,0.05978195,0.06022726,0.0606785752,0.0610149391,0.0611531734,0.1380424052,0.2387853712,0.0641435385,0.6714974046,0.2962648869,0.1380334496,0.047452,0.186768,0.183387,0.206747 +1,0.0159827992,0.0189847797,0.0241106134,0.0313280635,0.0405923389,0.0518447869,0.0650113076,0.0800079778,0.0967428088,0.116666697,0.1547873169,0.1955150515,0.2385824174,0.2837105095,0.3306137919,0.3790050149,0.4285930693,0.4790826142,0.5301654339,0.5815176964,0.6328243017,0.6837797761,0.7340631485,0.783387661,0.8314805031,0.8780428767,0.9227654934,0.9654030204,1.005700469,1.0433998108,1.0782145262,1.1098326445,1.1379904747,1.162473917,1.1830859184,1.1996260881,1.2118992805,1.2197221518,1.2229278088,1.221378684,1.216935277,1.2124816179,1.2080864906,1.2037124634,1.1992862225,1.1947860718,1.1902142763,1.1854646206,1.1803616285,1.1747498512,1.1685671806,1.1618250608,1.1543725729,1.1459240913,1.1362092495,1.1248874664,1.1115686893,1.0958844423,1.077563405,1.056297183,1.0329523087,1.0090575218,0.9846935868,0.9599347711,0.9349110126,0.9096108079,0.8839359879,0.8580445647,0.8321131468,0.8062962294,0.7803827524,0.7539368868,0.7269884944,0.6998342872,0.6727391481,0.6459682584,0.6198227406,0.5945395827,0.5701333284,0.5466149449,0.5241619349,0.5030096173,0.483091861,0.4642410278,0.4463691413,0.4295010269,0.4137351215,0.3993065655,0.3863489032,0.3749893904,0.36516276,0.3567117751,0.3495837748,0.343827188,0.3394446075,0.3363114297,0.3341835141,0.3328339458,0.3321660459,0.3319650292,0.3318219781,0.3313627243,0.3306573331,0.3297367394,0.3287767172,0.327570349,0.3257341087,0.3234176636,0.3206343949,0.3175012469,0.3141641319,0.310667485,0.3068810999,0.3028078377,0.2981817126,0.292963624,0.2872481048,0.2808453441,0.2736074626,0.2654832304,0.2569913864,0.248756811,0.2405483723,0.2321856022,0.2234626114,0.2145440578,0.2057448924,0.1969687045,0.1914897263,0.1869451255,0.1823016703,0.1777462363,0.1735029668,0.1696420312,0.166249454,0.1633484364,0.160881415,0.1588770747,0.1575704217,0.1570591033,0.1567646116,0.1558055282,0.1541944593,0.1519314498,0.1490677595,0.1457849145,0.1422934085,0.1386564821,0.1424351037,0.147064507,0.1514731944,0.1554172486,0.1586218029,0.1608921438,0.1620252281,0.1617590934,0.1599448621,0.1566599607,0.1519542187,0.1459613442,0.1394758523,0.1334103048,0.1276789755,0.1222987697,0.1171929389,0.1122278348,0.1073111519,0.1024002284,0.0974106714,0.0923248678,0.0872180089,0.0821717456,0.0771602243,0.0748082027,0.0727887228,0.0707435757,0.068692416,0.0666555762,0.064624466,0.0625824928,0.0604839437,0.0582571588,0.0559065416,0.0534492694,0.0509343743,0.0483927429,0.0458406433,0.0433243662,0.0408974439,0.0385876596,0.0363934375,0.0343283713,0.032449048,0.0307896566,0.0293813534,0.0282282289,0.0273269191,0.0266798884,0.026284758,0.0261376332,0.1432377547,0.0,0.0,0.5081279874,0.3630423844,0.0,-0.018255,-0.045011,0.003181,-0.063963 +2,0.0,0.0,0.0,0.0009306805,0.0095858565,0.0201084614,0.0324402228,0.0465182699,0.062277738,0.0796373561,0.0984810367,0.1186582148,0.1488896757,0.1966030002,0.2442993075,0.2945767641,0.3453166187,0.3957835436,0.4503062367,0.5048250556,0.5587748885,0.6141867042,0.6681363583,0.721177876,0.7719404697,0.8255054355,0.8687918186,0.9061083794,0.9438246489,0.9824876785,1.0182257891,1.0524622202,1.0842313766,1.1144633293,1.1407458782,1.165063262,1.1853220463,1.1931416988,1.19734478,1.1967073679,1.1917431355,1.184855938,1.186398387,1.1801710129,1.1808456182,1.1644538641,1.1476174593,1.1396906376,1.1310341358,1.1272388697,1.1152210236,1.0937736034,1.0590318441,1.0220450163,0.9824433923,0.9581566453,0.9283046126,0.8893449903,0.8637832999,0.8359286785,0.8034585714,0.8110893369,0.7883930206,0.769569993,0.7365993261,0.6992374659,0.6777465343,0.6741881967,0.6710441113,0.6680765152,0.6647744775,0.6605854034,0.6556973457,0.6500316858,0.6434630752,0.6357719302,0.6268970966,0.617358923,0.6077398062,0.5987376571,0.5895726085,0.578502357,0.5655543208,0.5514233112,0.536195159,0.5202483535,0.5043804049,0.4890173078,0.4747701883,0.4622876048,0.4509552419,0.4394868314,0.4282333255,0.4178283811,0.4085790217,0.4006316662,0.4190254509,0.4380794466,0.4212518632,0.4232972264,0.4041292369,0.3852272928,0.3837123215,0.3816575706,0.3787357211,0.374404639,0.3685901761,0.3616580367,0.3533220887,0.3446039557,0.3364063501,0.3290857375,0.3230304122,0.3181226552,0.3135847449,0.3091912568,0.3050493598,0.3004007936,0.29471609,0.2881713212,0.2816538811,0.2761516869,0.2717742026,0.2684633136,0.2654974163,0.2625136673,0.2592756748,0.2549277842,0.2496585548,0.2432902008,0.2366958112,0.2313782126,0.2272901386,0.2241869122,0.2218572497,0.220020026,0.2184261084,0.2170891464,0.2159260511,0.2153662592,0.2147497833,0.2129328847,0.2105302811,0.207790792,0.2046555132,0.2013500333,0.1979985833,0.1940264702,0.1896376461,0.1848201156,0.1794918329,0.173779875,0.1678656489,0.1613103002,0.1541363448,0.1469727457,0.1403906047,0.1342773736,0.1288569421,0.1241000593,0.1191677079,0.1131889969,0.1066136211,0.0998411253,0.0932284072,0.086768344,0.080384396,0.0743978918,0.068828553,0.0638358295,0.0594506003,0.0555106252,0.0519018173,0.0486070327,0.0455246866,0.0426282138,0.0399481952,0.0374328718,0.0351083316,0.0329660587,0.0307911839,0.0283201355,0.0256299339,0.0227967948,0.019936543,0.017027922,0.0140292058,0.0110874213,0.0082585476,0.0056246156,0.0033161561,0.0014094743,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.3616580367,0.207790792,0.0056246156,0.6489679217,0.6605854034,0.062277738,0.0,0.167201,0.264971,0.229273 +3,0.2839922905,0.2900899053,0.3005134761,0.3152057827,0.3340320289,0.3568198085,0.3834597468,0.4138151407,0.4476653636,0.4847996831,0.5248951912,0.5675287843,0.6124934554,0.6594644189,0.7083309293,0.7591266632,0.8110880852,0.8637502193,0.9169859886,0.9708776474,1.0252817869,1.0793012381,1.1328692436,1.185692668,1.2374732494,1.2876266241,1.3354979753,1.3810325861,1.4239223003,1.4638843536,1.501342535,1.5354032516,1.5647892952,1.5895379782,1.6103185415,1.6276174784,1.6417065859,1.6522436142,1.6595404148,1.6629419327,1.6622159481,1.6604959965,1.6582337618,1.6521093845,1.6410725117,1.6280039549,1.6145401001,1.5991586447,1.5828069448,1.5639278889,1.5427362919,1.5189188719,1.493863821,1.4694625139,1.4498372078,1.4321577549,1.4089341164,1.3835154772,1.3558306694,1.3286929131,1.3047574759,1.284463644,1.2640172243,1.2433749437,1.2219152451,1.199723959,1.1781433821,1.1593405008,1.13922894,1.1183892488,1.0908747911,1.0563869476,1.0184336901,0.9807536602,0.9458610415,0.9133395553,0.8793064356,0.8442026973,0.8080228567,0.7783213854,0.7529441118,0.7308405042,0.7159999609,0.7056357265,0.6951778531,0.6831094623,0.6720735431,0.6578577161,0.6461779475,0.6373482347,0.6276736856,0.6161053777,0.6078271866,0.6010143161,0.5948863626,0.5922757387,0.5962059498,0.6016223431,0.6080636978,0.6132354736,0.6123179793,0.6122469306,0.6102297902,0.6086387634,0.6013227105,0.5878710151,0.5724338889,0.5560264587,0.534170866,0.5133089423,0.4981172085,0.4873057008,0.4790615141,0.4766489863,0.4725334048,0.4662644565,0.4611850679,0.455026418,0.4445648193,0.4335577488,0.4251606166,0.4141146839,0.4056221843,0.3962383568,0.3882877529,0.3828529716,0.3740274012,0.3625959158,0.3537798822,0.3456005156,0.3363794982,0.3286286592,0.3196941912,0.3088420928,0.2979681194,0.2907204628,0.284368664,0.281216532,0.2817122936,0.283308655,0.2853418887,0.2869175673,0.2849505842,0.2814404964,0.2781462967,0.2747631073,0.272282958,0.2727141082,0.2723371089,0.2720319033,0.2734211385,0.2760095894,0.2788455784,0.2836582065,0.2878760695,0.2923819125,0.2984456122,0.3024548888,0.3042229712,0.3058693707,0.3072290123,0.307703346,0.3087846041,0.3096642196,0.3103528023,0.3119439483,0.3126696348,0.3132269979,0.3133700192,0.3134888113,0.3131746054,0.3127416074,0.3114594519,0.3094651103,0.3065339923,0.3032349646,0.3004685938,0.2975768745,0.2943101525,0.2903949916,0.2866013348,0.2836302519,0.2822751999,0.2817083001,0.2817384601,0.2826623619,0.2846493423,0.2868160903,0.289353013,0.2916094363,0.2935966849,0.2952010036,0.2964218557,0.2974214852,0.2982701957,0.2988854945,0.2993037105,0.2995996177,0.2997272909,0.2997667193,0.2820355296,0.1504583657,0.1095473915,0.7725098729,0.5243073702,0.1700630039,-0.120237,-0.098908,-0.004551,0.019996 +4,0.0250965394,0.0282754768,0.0337000489,0.0413312539,0.0511148982,0.0629826039,0.0768529773,0.0926329717,0.1102191806,0.1294992417,0.1503512412,0.1726445556,0.2168806344,0.2665579319,0.3183539212,0.371989131,0.4272031188,0.4835947752,0.5406857729,0.5980349183,0.6550778151,0.7111934423,0.7659917474,0.8190850616,0.8700788021,0.9185891747,0.9642108083,1.0068879128,1.0467756987,1.0840752125,1.1184549332,1.1493537426,1.176677227,1.200351119,1.2203409672,1.2367597818,1.2497233152,1.2590172291,1.2645816803,1.2663131952,1.2647986412,1.2609126568,1.2547250986,1.246130228,1.2350307703,1.2211872339,1.2045375109,1.1851949692,1.1630009413,1.1378574371,1.1104543209,1.0815999508,1.0511288643,1.0198420286,0.987624228,0.9549700022,0.9232159853,0.8924859762,0.8628618121,0.8347347379,0.8083072305,0.7841457129,0.7628934383,0.7445844412,0.7288458943,0.7142981887,0.6996052861,0.6846065521,0.6691861153,0.6542112231,0.6396579742,0.6247348189,0.6098151803,0.595207274,0.5802691579,0.5646029115,0.5484598875,0.5307885408,0.5107890368,0.4885967374,0.4652012587,0.4415909648,0.4182943702,0.395816803,0.3740012348,0.3536297083,0.3361739516,0.3211837411,0.3096402586,0.3015266657,0.2962655127,0.2928557098,0.2909570038,0.2892732322,0.2875249982,0.2860413492,0.2852393687,0.2941271067,0.2997495532,0.3018835187,0.3028077483,0.3059030473,0.3110741973,0.3181146681,0.3267453313,0.3366269767,0.3473751843,0.3585767746,0.3698065281,0.380643338,0.3907493055,0.3998385668,0.4075606763,0.4136056304,0.4177159369,0.4196948111,0.4194119275,0.4168070555,0.4118898213,0.4047372937,0.3965268731,0.3888462186,0.38171345,0.3751241267,0.3690653145,0.3635151684,0.3584473729,0.3538383543,0.3496651649,0.3459064364,0.3425322473,0.3395125568,0.336838901,0.3345080614,0.3325205445,0.3308784962,0.329585135,0.3286457956,0.3280652761,0.3278470635,0.3272450268,0.3251878619,0.321724087,0.3169499338,0.3109956086,0.3040210307,0.2962065637,0.2877401412,0.2788122892,0.2696090043,0.2602944374,0.2510133982,0.2419093847,0.2331041545,0.2246956676,0.2167561203,0.2093328536,0.2024511248,0.1961149126,0.190309301,0.1842098534,0.1767779291,0.1682391167,0.1588429958,0.1488427967,0.138487041,0.1280102134,0.1176237091,0.1075123698,0.0978315026,0.0887045562,0.0802238956,0.0724541992,0.0654345378,0.059183158,0.0537029803,0.0489872508,0.0450249277,0.0418055579,0.0393231474,0.0373760127,0.0356737934,0.0342172198,0.0330069065,0.0320396535,0.0313067399,0.0307940301,0.0304831341,0.0303504504,0.0303679425,0.0305019896,0.0307181813,0.0309871715,0.0312813111,0.0315754823,0.0318477899,0.0320801027,0.0322583057,0.032372281,0.0324158669,0.3585767746,0.3169499338,0.0303679425,0.6498203874,0.1797111183,0.1102191806,0.036091,0.194078,-0.082472,0.242714 diff --git a/tests/ert/unit_tests/data/test_integration_data.py b/tests/ert/unit_tests/data/test_integration_data.py index 44f1620a769..3e0f0185904 100644 --- a/tests/ert/unit_tests/data/test_integration_data.py +++ b/tests/ert/unit_tests/data/test_integration_data.py @@ -159,4 +159,6 @@ def test_all_measured_snapshot(snapshot, facade_snake_oil, create_measured_data) """ obs_keys = facade_snake_oil.get_observations().datasets.keys() measured_data = create_measured_data(obs_keys) - snapshot.assert_match(measured_data.data.to_csv(), "snake_oil_measured_output.csv") + snapshot.assert_match( + measured_data.data.round(10).to_csv(), "snake_oil_measured_output.csv" + ) diff --git a/tests/ert/unit_tests/snapshots/test_libres_facade/test_misfit_collector/0/misfit_collector.csv b/tests/ert/unit_tests/snapshots/test_libres_facade/test_misfit_collector/0/misfit_collector.csv index f5bc3163718..b4497edc5a2 100644 --- a/tests/ert/unit_tests/snapshots/test_libres_facade/test_misfit_collector/0/misfit_collector.csv +++ b/tests/ert/unit_tests/snapshots/test_libres_facade/test_misfit_collector/0/misfit_collector.csv @@ -1,6 +1,6 @@ Realization,MISFIT:FOPR,MISFIT:WOPR_OP1_108,MISFIT:WOPR_OP1_144,MISFIT:WOPR_OP1_190,MISFIT:WOPR_OP1_36,MISFIT:WOPR_OP1_72,MISFIT:WOPR_OP1_9,MISFIT:WPR_DIFF_1,MISFIT:TOTAL -0,1572.455126624968,4.663157777414048,1.2280040962512109,24.150873738474047,0.16579549917171352,16.6031985311065,0.5786173169058768,17.52338148044444,1637.3681550647357 -1,564.7325372587165,4.368782497900839,32.6530612244898,2.25,7.513238617348759,7.502955389862009,4.0,3.917211792502779,626.9377867808207 -2,760.2134646694443,0.6758601761400266,0.0495481141274234,0.878978328860087,0.53148428819629,10.315068719501141,0.5691876200100965,21.326953031224996,794.5605449475045 -3,762.2886383355541,0.057372834892021204,2.003570229564708,89.39209245855437,1.0729962591656552,0.23633929814081966,1.963529806065796,4.454344394944445,861.468883616882 -4,978.68543806519,0.6099979595035421,11.1651322515757,2.3617365751122437,0.5138762294603726,41.03398708587926,0.04177266072298375,27.46179846677778,1061.8737392942219 +0,1572.45515162,4.66315778,1.2280041,24.15087374,0.1657955,16.60319853,0.57861732,17.52338148,1637.36818006 +1,564.73254573,4.3687825,32.65306122,2.25,7.51323862,7.50295539,4.0,3.91721179,626.93779525 +2,760.21348181,0.67586018,0.04954811,0.87897833,0.53148429,10.31506872,0.56918762,21.32695303,794.56056209 +3,762.28864138,0.05737283,2.00357023,89.39209246,1.07299626,0.2363393,1.96352981,4.45434439,861.46888666 +4,978.68545447,0.60999796,11.16513225,2.36173658,0.51387623,41.03398709,0.04177266,27.46179847,1061.8737557 diff --git a/tests/ert/unit_tests/storage/snapshots/test_storage_migration/test_that_storage_matches/parameters b/tests/ert/unit_tests/storage/snapshots/test_storage_migration/test_that_storage_matches/parameters index 11c37522e80..74f07f09cf8 100644 --- a/tests/ert/unit_tests/storage/snapshots/test_storage_migration/test_that_storage_matches/parameters +++ b/tests/ert/unit_tests/storage/snapshots/test_storage_migration/test_that_storage_matches/parameters @@ -1 +1 @@ -{'BPR': GenKwConfig(name='BPR', forward_init=False, update=True, template_file='/home/eivind/Projects/ert/test-data/all_data_types/template.txt', output_file='params.txt', transform_function_definitions=[{'name': 'BPR', 'param_name': 'NORMAL', 'values': ['0', '1']}], forward_init_file=None), 'PORO': Field(name='PORO', forward_init=False, update=True, nx=2, ny=3, nz=4, file_format='grdecl', output_transformation=None, input_transformation=None, truncation_min=None, truncation_max=None, forward_init_file='data/poro%d.grdecl', output_file='poro.grdecl', grid_file='/home/eivind/Projects/ert/test-data/all_data_types/refcase/CASE.EGRID', mask_file=''), 'TOP': SurfaceConfig(name='TOP', forward_init=False, update=True, ncol=2, nrow=3, xori=0.0, yori=0.0, xinc=1.0, yinc=1.0, rotation=0.0, yflip=1, forward_init_file='data/surf%d.irap', output_file='surf.irap', base_surface_path='data/basesurf.irap')} +{'BPR': GenKwConfig(name='BPR', forward_init=False, update=True, template_file='/home/eivind/Projects/ert/test-data/all_data_types/template.txt', output_file='params.txt', transform_function_definitions=[{'name': 'BPR', 'param_name': 'NORMAL', 'values': ['0', '1']}], forward_init_file=None), 'PORO': Field(name='PORO', forward_init=False, update=True, nx=2, ny=3, nz=4, file_format=, output_transformation=None, input_transformation=None, truncation_min=None, truncation_max=None, forward_init_file='data/poro%d.grdecl', output_file=PosixPath('poro.grdecl'), grid_file='/home/eivind/Projects/ert/test-data/all_data_types/refcase/CASE.EGRID', mask_file=''), 'TOP': SurfaceConfig(name='TOP', forward_init=False, update=True, ncol=2, nrow=3, xori=0.0, yori=0.0, xinc=1.0, yinc=1.0, rotation=0.0, yflip=1, forward_init_file='data/surf%d.irap', output_file='surf.irap', base_surface_path='data/basesurf.irap')} diff --git a/tests/ert/unit_tests/test_libres_facade.py b/tests/ert/unit_tests/test_libres_facade.py index be24bc0d8ae..c8991d59046 100644 --- a/tests/ert/unit_tests/test_libres_facade.py +++ b/tests/ert/unit_tests/test_libres_facade.py @@ -129,7 +129,7 @@ def test_summary_collector( def test_misfit_collector(snake_oil_case_storage, snake_oil_default_storage, snapshot): facade = LibresFacade(snake_oil_case_storage) data = facade.load_all_misfit_data(snake_oil_default_storage) - snapshot.assert_match(data.to_csv(), "misfit_collector.csv") + snapshot.assert_match(data.round(8).to_csv(), "misfit_collector.csv") with pytest.raises(KeyError): # realization 60: