Skip to content

Commit fa0f5c5

Browse files
committed
review fixes
1 parent 34c1b1f commit fa0f5c5

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

RATapi/examples/bayes_benchmark/bayes_benchmark.ipynb

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
},
4848
{
4949
"cell_type": "code",
50-
"execution_count": 2,
50+
"execution_count": null,
5151
"metadata": {},
5252
"outputs": [],
5353
"source": [
@@ -65,8 +65,8 @@
6565
" bulk_in=[Parameter(name=\"Air\", min=0.0, value=0.0, max=0.0, fit=False)],\n",
6666
" bulk_out=[Parameter(name=\"D2O\", min=6.3e-06, value=6.35e-06, max=6.4e-06, fit=False)],\n",
6767
" resolution_parameters=[Parameter(name=\"Resolution parameter 1\", min=0.01, value=0.03, max=0.05, fit=False)],\n",
68-
" backgrounds=[Background(name=\"Background 1\", type=\"constant\", value_1=\"Background parameter 1\")],\n",
69-
" resolutions=[Resolution(name=\"Resolution 1\", type=\"constant\", value_1=\"Resolution parameter 1\")],\n",
68+
" backgrounds=[Background(name=\"Background 1\", type=\"constant\", source=\"Background parameter 1\")],\n",
69+
" resolutions=[Resolution(name=\"Resolution 1\", type=\"constant\", source=\"Resolution parameter 1\")],\n",
7070
" data=[\n",
7171
" Data(name=\"Simulation\", data=np.empty([0, 3]), simulation_range=[0.005, 0.7]),\n",
7272
" Data(\n",
@@ -178,7 +178,7 @@
178178
},
179179
{
180180
"cell_type": "code",
181-
"execution_count": 4,
181+
"execution_count": null,
182182
"metadata": {},
183183
"outputs": [],
184184
"source": [
@@ -240,13 +240,11 @@
240240
"\n",
241241
"print(\"Best values according to Nested Sampler:\\n\",\n",
242242
" \"Roughness: \", ns_results.fitParams[0], \"\\n\",\n",
243-
" ## FIXME: once fitParams outputs properly!\n",
244-
")# \"Background: \", ns_results.fitParams[1])\n",
243+
" \"Background: \", ns_results.fitParams[1])\n",
245244
"\n",
246245
"print(\"Best values according to DREAM:\\n\",\n",
247246
" \"Roughness: \", dream_results.fitParams[0], \"\\n\",\n",
248-
" ## FIXME: once fitParams outputs properly!\n",
249-
" )# \"Background: \", dream_results.fitParams[1])"
247+
" \"Background: \", dream_results.fitParams[1])"
250248
]
251249
},
252250
{
@@ -341,6 +339,13 @@
341339
"fig.tight_layout()\n",
342340
"fig.show()"
343341
]
342+
},
343+
{
344+
"cell_type": "code",
345+
"execution_count": null,
346+
"metadata": {},
347+
"outputs": [],
348+
"source": []
344349
}
345350
],
346351
"metadata": {
@@ -359,7 +364,7 @@
359364
"name": "python",
360365
"nbconvert_exporter": "python",
361366
"pygments_lexer": "ipython3",
362-
"version": "3.11.2"
367+
"version": "3.10.12"
363368
}
364369
},
365370
"nbformat": 4,

RATapi/examples/bayes_benchmark/bayes_benchmark.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ def get_project() -> RAT.Project:
4848
bulk_in=[Parameter(name="Air", min=0.0, value=0.0, max=0.0, fit=False)],
4949
bulk_out=[Parameter(name="D2O", min=6.3e-06, value=6.35e-06, max=6.4e-06, fit=False)],
5050
resolution_parameters=[Parameter(name="Resolution parameter 1", min=0.01, value=0.03, max=0.05, fit=False)],
51-
backgrounds=[Background(name="Background 1", type="constant", value_1="Background parameter 1")],
52-
resolutions=[Resolution(name="Resolution 1", type="constant", value_1="Resolution parameter 1")],
51+
backgrounds=[Background(name="Background 1", type="constant", source="Background parameter 1")],
52+
resolutions=[Resolution(name="Resolution 1", type="constant", source="Resolution parameter 1")],
5353
data=[
5454
Data(name="Simulation", data=np.empty([0, 3]), simulation_range=[0.005, 0.7]),
5555
Data(

0 commit comments

Comments
 (0)