diff --git a/cpp/RAT b/cpp/RAT index dfb38e9d..7b7c3fff 160000 --- a/cpp/RAT +++ b/cpp/RAT @@ -1 +1 @@ -Subproject commit dfb38e9d1805aef7e84fc04fa54c93d0e020eeb2 +Subproject commit 7b7c3fff87926585e7e432ddac1983b4ca1c80a9 diff --git a/cpp/includes/defines.h b/cpp/includes/defines.h index 097ad0eb..2f7ddad2 100644 --- a/cpp/includes/defines.h +++ b/cpp/includes/defines.h @@ -595,7 +595,7 @@ resampleMinAngle : float resampleNPoints : int The number of initial points to use for resampling. display : str - How much RAT should print to the terminal. Can be 'off', 'iter', 'notify', or 'final'. + How much RAT should print to the terminal. Can be 'off', 'iter', or 'final'. IPCFilePath : str The path of the inter process communication file. updateFreq : int diff --git a/pyproject.toml b/pyproject.toml index 746fc035..94d7f768 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ build-backend = 'setuptools.build_meta' [project] name = "ratapi" -version = "0.0.0.dev15" +version = "0.0.0.dev16" description = "Python extension for the Reflectivity Analysis Toolbox (RAT)" readme = "README.md" requires-python = ">=3.10" diff --git a/ratapi/controls.py b/ratapi/controls.py index 9dd815b5..ea6d96be 100644 --- a/ratapi/controls.py +++ b/ratapi/controls.py @@ -66,7 +66,7 @@ class Controls(BaseModel, validate_assignment=True, extra="forbid", use_attribut """The number of initial points to use for resampling.""" display: Display = Display.Iter - """How much RAT should print to the terminal. Can be 'off', 'iter', 'notify', or 'final'.""" + """How much RAT should print to the terminal. Can be 'off', 'iter', or 'final'.""" # Simplex xTolerance: float = Field(1.0e-6, gt=0.0) diff --git a/ratapi/examples/domains/domains_XY_model.py b/ratapi/examples/domains/domains_XY_model.py index 6a288ba2..2548e5fe 100644 --- a/ratapi/examples/domains/domains_XY_model.py +++ b/ratapi/examples/domains/domains_XY_model.py @@ -36,7 +36,7 @@ def domains_XY_model(params, bulk_in, bulk_out, contrast, domain): vfWater = 1 - totalVF # Now convert the Volume Fractions to SLDs - siSLD = vfSilicon * bulk_in + siSLD = vfSilicon * bulk_in[contrast - 1] oxSLD = vfOxide * 3.41e-6 # Layer SLD depends on whether we are calculating the domain or not diff --git a/ratapi/utils/enums.py b/ratapi/utils/enums.py index 313f04c7..d403e860 100644 --- a/ratapi/utils/enums.py +++ b/ratapi/utils/enums.py @@ -60,7 +60,6 @@ class Display(RATEnum): Off = "off" Iter = "iter" - Notify = "notify" Final = "final" diff --git a/tests/test_controls.py b/tests/test_controls.py index 5a83bccc..2c6fdcaa 100644 --- a/tests/test_controls.py +++ b/tests/test_controls.py @@ -116,7 +116,7 @@ def test_calculate_property_values(self, control_property: str, value: Any) -> N ("numSimulationPoints", 10), ("resampleMinAngle", 0.2), ("resampleNPoints", 1), - ("display", Display.Notify), + ("display", Display.Final), ], ) def test_calculate_property_setters(self, control_property: str, value: Any) -> None: @@ -211,7 +211,7 @@ def test_calculate_parallel_validation(self, value: Any) -> None: @pytest.mark.parametrize("value", ["test", "iterate", True, 1, 3.0]) def test_calculate_display_validation(self, value: Any) -> None: """Tests the display setter validation in Calculate class.""" - with pytest.raises(pydantic.ValidationError, match="Input should be 'off', 'iter', 'notify' or 'final'"): + with pytest.raises(pydantic.ValidationError, match="Input should be 'off', 'iter' or 'final'"): self.calculate.display = value def test_str(self, table_str) -> None: @@ -277,7 +277,7 @@ def test_simplex_property_values(self, control_property: str, value: Any) -> Non ("numSimulationPoints", 10), ("resampleMinAngle", 0.2), ("resampleNPoints", 1), - ("display", Display.Notify), + ("display", Display.Final), ("xTolerance", 4e-6), ("funcTolerance", 3e-4), ("maxFuncEvals", 100), @@ -436,7 +436,7 @@ def test_de_property_values(self, control_property: str, value: Any) -> None: ("numSimulationPoints", 10), ("resampleMinAngle", 0.2), ("resampleNPoints", 1), - ("display", Display.Notify), + ("display", Display.Final), ("populationSize", 20), ("fWeight", 0.3), ("crossoverProbability", 0.4), @@ -603,7 +603,7 @@ def test_ns_property_values(self, control_property: str, value: Any) -> None: ("numSimulationPoints", 10), ("resampleMinAngle", 0.2), ("resampleNPoints", 1), - ("display", Display.Notify), + ("display", Display.Final), ("nLive", 1500), ("nMCMC", 1), ("propScale", 0.5), @@ -773,7 +773,7 @@ def test_dream_property_values(self, control_property: str, value: Any) -> None: ("numSimulationPoints", 10), ("resampleMinAngle", 0.2), ("resampleNPoints", 1), - ("display", Display.Notify), + ("display", Display.Final), ("nSamples", 500), ("nChains", 1000), ("jumpProbability", 0.7), diff --git a/tests/test_enums.py b/tests/test_enums.py index 3d07c308..f4bfcd71 100644 --- a/tests/test_enums.py +++ b/tests/test_enums.py @@ -35,7 +35,6 @@ (Parallel, "contrasts", Parallel.Contrasts), (Display, "off", Display.Off), (Display, "iter", Display.Iter), - (Display, "notify", Display.Notify), (Display, "final", Display.Final), (BoundHandling, "off", BoundHandling.Off), (BoundHandling, "reflect", BoundHandling.Reflect),