Skip to content

Commit a801cbc

Browse files
committed
Update cpp and remove notify display option
1 parent 2e059b9 commit a801cbc

7 files changed

Lines changed: 10 additions & 12 deletions

File tree

cpp/includes/defines.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ resampleMinAngle : float
595595
resampleNPoints : int
596596
The number of initial points to use for resampling.
597597
display : str
598-
How much RAT should print to the terminal. Can be 'off', 'iter', 'notify', or 'final'.
598+
How much RAT should print to the terminal. Can be 'off', 'iter', or 'final'.
599599
IPCFilePath : str
600600
The path of the inter process communication file.
601601
updateFreq : int

ratapi/controls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class Controls(BaseModel, validate_assignment=True, extra="forbid", use_attribut
6666
"""The number of initial points to use for resampling."""
6767

6868
display: Display = Display.Iter
69-
"""How much RAT should print to the terminal. Can be 'off', 'iter', 'notify', or 'final'."""
69+
"""How much RAT should print to the terminal. Can be 'off', 'iter', or 'final'."""
7070

7171
# Simplex
7272
xTolerance: float = Field(1.0e-6, gt=0.0)

ratapi/examples/domains/domains_XY_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def domains_XY_model(params, bulk_in, bulk_out, contrast, domain):
3636
vfWater = 1 - totalVF
3737

3838
# Now convert the Volume Fractions to SLDs
39-
siSLD = vfSilicon * bulk_in
39+
siSLD = vfSilicon * bulk_in[contrast - 1]
4040
oxSLD = vfOxide * 3.41e-6
4141

4242
# Layer SLD depends on whether we are calculating the domain or not

ratapi/utils/enums.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ class Display(RATEnum):
6060

6161
Off = "off"
6262
Iter = "iter"
63-
Notify = "notify"
6463
Final = "final"
6564

6665

tests/test_controls.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def test_calculate_property_values(self, control_property: str, value: Any) -> N
116116
("numSimulationPoints", 10),
117117
("resampleMinAngle", 0.2),
118118
("resampleNPoints", 1),
119-
("display", Display.Notify),
119+
("display", Display.Final),
120120
],
121121
)
122122
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:
211211
@pytest.mark.parametrize("value", ["test", "iterate", True, 1, 3.0])
212212
def test_calculate_display_validation(self, value: Any) -> None:
213213
"""Tests the display setter validation in Calculate class."""
214-
with pytest.raises(pydantic.ValidationError, match="Input should be 'off', 'iter', 'notify' or 'final'"):
214+
with pytest.raises(pydantic.ValidationError, match="Input should be 'off', 'iter' or 'final'"):
215215
self.calculate.display = value
216216

217217
def test_str(self, table_str) -> None:
@@ -277,7 +277,7 @@ def test_simplex_property_values(self, control_property: str, value: Any) -> Non
277277
("numSimulationPoints", 10),
278278
("resampleMinAngle", 0.2),
279279
("resampleNPoints", 1),
280-
("display", Display.Notify),
280+
("display", Display.Final),
281281
("xTolerance", 4e-6),
282282
("funcTolerance", 3e-4),
283283
("maxFuncEvals", 100),
@@ -436,7 +436,7 @@ def test_de_property_values(self, control_property: str, value: Any) -> None:
436436
("numSimulationPoints", 10),
437437
("resampleMinAngle", 0.2),
438438
("resampleNPoints", 1),
439-
("display", Display.Notify),
439+
("display", Display.Final),
440440
("populationSize", 20),
441441
("fWeight", 0.3),
442442
("crossoverProbability", 0.4),
@@ -603,7 +603,7 @@ def test_ns_property_values(self, control_property: str, value: Any) -> None:
603603
("numSimulationPoints", 10),
604604
("resampleMinAngle", 0.2),
605605
("resampleNPoints", 1),
606-
("display", Display.Notify),
606+
("display", Display.Final),
607607
("nLive", 1500),
608608
("nMCMC", 1),
609609
("propScale", 0.5),
@@ -773,7 +773,7 @@ def test_dream_property_values(self, control_property: str, value: Any) -> None:
773773
("numSimulationPoints", 10),
774774
("resampleMinAngle", 0.2),
775775
("resampleNPoints", 1),
776-
("display", Display.Notify),
776+
("display", Display.Final),
777777
("nSamples", 500),
778778
("nChains", 1000),
779779
("jumpProbability", 0.7),

tests/test_enums.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
(Parallel, "contrasts", Parallel.Contrasts),
3636
(Display, "off", Display.Off),
3737
(Display, "iter", Display.Iter),
38-
(Display, "notify", Display.Notify),
3938
(Display, "final", Display.Final),
4039
(BoundHandling, "off", BoundHandling.Off),
4140
(BoundHandling, "reflect", BoundHandling.Reflect),

0 commit comments

Comments
 (0)