You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: RATapi/examples/orso_integration/orso_integration.ipynb
+39-25Lines changed: 39 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@
16
16
},
17
17
{
18
18
"cell_type": "code",
19
-
"execution_count": 8,
19
+
"execution_count": null,
20
20
"metadata": {},
21
21
"outputs": [],
22
22
"source": [
@@ -94,53 +94,37 @@
94
94
"cell_type": "markdown",
95
95
"metadata": {},
96
96
"source": [
97
-
"## Reading in data and models from .ort files\n",
98
-
"\n",
99
-
"It is possible to read data from .ort format files at two different levels of depth."
97
+
"## Reading in data and models from .ort files"
100
98
]
101
99
},
102
100
{
103
101
"cell_type": "markdown",
104
102
"metadata": {},
105
103
"source": [
106
-
"### Reading data\n",
104
+
"RAT can also load both data and model information from an .ort file. This is done through the `ORSOProject` object, which takes a file path and can also optionally account for absorption.\n",
107
105
"\n",
108
-
"Firstly, if you just want to read the data from a file, you can do so via the function `RATapi.utils.orso.load_ort_data`.\n",
109
-
"\n",
110
-
"This will read the .ort data in as a RAT `Data` object. If there are multiple datasets in your file, you will get a list of datasets back."
106
+
"The example data file we use here [is example data by Artur Glavic, taken on the Amor reflectometer at PSI.](https://github.com/reflectivity/orsopy/blob/main/examples/prist5_10K_m_025.Rqz.ort)"
"If your .ort file contains model data, you can also use the more elaborate `RATapi.utils.orso.ort_to_project`, which creates an almost-complete RAT `Project` with model and data from the file. If your file contains multiple datasets with models, a contrast will be created in the project for each model.\n",
125
+
"The `ORSOProject` object contains two lists: `ORSOProject.data` and `ORSOProject.samples`. The former is a list of Data objects with each dataset defined in the file, and the latter is a list of `ORSOSample` objects (like above) with model information. Note that if the .ort file does not define a model for a dataset, that index of `ORSOProject.samples` will be None.\n",
132
126
"\n",
133
-
"Note that none of the parameters will have ranges or be fittable (you will have to manually change the minimum and maximum range if you want to fit the parameters!). Furthermore, the background and scalefactor are not part of the format and will just be empty placeholders in this project. "
0 commit comments