From d1fd27a306a161ff9fa3e8fb6769fcef376a9d21 Mon Sep 17 00:00:00 2001 From: alexhroom Date: Fri, 7 Feb 2025 11:28:53 +0000 Subject: [PATCH 01/16] written ort file reader --- RATapi/classlist.py | 9 ++ RATapi/utils/orso.py | 208 +++++++++++++++++++++++++++++++++++++++++++ requirements.txt | 1 + 3 files changed, 218 insertions(+) create mode 100644 RATapi/utils/orso.py diff --git a/RATapi/classlist.py b/RATapi/classlist.py index c3e1d04f..f7adbe11 100644 --- a/RATapi/classlist.py +++ b/RATapi/classlist.py @@ -296,6 +296,15 @@ def extend(self, other: Sequence[T]) -> None: self._check_unique_name_fields(other) self.data.extend(other) + def union(self, other: Sequence[T]) -> None: + """Extend the ClassList by a sequence, ignoring input items with names that already exist.""" + if other and not (isinstance(other, Sequence) and not isinstance(other, str)): + other = [other] + if hasattr(other, self.name_field): + other = (item for item in other if getattr(other, self.name_field) not in self.get_names()) + + self.extend(other) + def set_fields(self, index: Union[int, slice, str, T], **kwargs) -> None: """Assign the values of an existing object's attributes using keyword arguments.""" self._validate_name_field(kwargs) diff --git a/RATapi/utils/orso.py b/RATapi/utils/orso.py new file mode 100644 index 00000000..ad60314c --- /dev/null +++ b/RATapi/utils/orso.py @@ -0,0 +1,208 @@ +"""Readers from file formats.""" + +from dataclasses import dataclass + +import orsopy +from orsopy.fileio import load_orso + +from RATapi import ClassList, Project +from RATapi.models import AbsorptionLayer, Background, Contrast, Data, Layer, Parameter, Resolution + + +def read_ort(filepath: str) -> Project: + """Create a project from an .ort file. + + Parameters + ---------- + filepath : str + The path to the .ort file. + + Returns + ------- + Project + The project data from the .ort file. + """ + project = Project() + + ort_data = load_orso(filepath) + + for dataset in ort_data: + metadata = dataset.info + sample = metadata.data_source.sample + model_info = orso_model_to_rat(sample.model) + + # Add all parameters that aren't already defined + project.parameters.union(model_info.parameters) + project.layers.extend(model_info.layers) + project.bulk_in.append(model_info.bulk_in) + project.bulk_out.append(model_info.bulk_out) + + project.data.append(Data(name=sample.name, data=dataset.data)) + + if dataset.data.shape[1] == 4: + project.resolutions.append( + Resolution( + name=f"{sample.name} Resolution", + type="data", + ) + ) + else: + project.resolution_parameters.append(Parameter(name=f"{sample.name} Resolution Parameter")) + project.resolutions.append( + Resolution( + name=f"{sample.name} Resolution", + type="constant", + source=f"{sample.name} Resolution Parameter", + ) + ) + + project.background_parameters.append(Parameter(name=f"{sample.name} Background Parameter")) + project.backgrounds.append( + Background( + name=f"{sample.name} Background", + type="constant", + source=f"{sample.name} Background Parameter", + ) + ) + + project.scalefactors.append(Parameter(name=f"{sample.name} Scalefactor")) + + project.contrasts.append( + Contrast( + name=metadata.data_source.experiment.title, + data=sample.name, + background=f"{sample.name} Background", + bulk_in=model_info.bulk_in.name, + bulk_out=model_info.bulk_out.name, + scalefactor=f"{sample.name} Scalefactor", + resolution=f"{sample.name} Resolution", + model=[layer.name for layer in model_info.layers], + ) + ) + + return project + + +@dataclass +class ORSOSample: + """The stack data from an ORSO SampleModel, in RAT models.""" + + bulk_in: Parameter + bulk_out: Parameter + parameters: ClassList[Parameter] + layers: ClassList[Layer] + + +def orso_model_to_rat(model: orsopy.fileio.model_language.SampleModel | str) -> ORSOSample: + """Get information from an ORSO SampleModel object. + + Parameters + ---------- + model : orsopy.fileio.model_language.SampleModel or str + The sample model to turn into a RAT data. If given as a string, + the string is interpreted as a layer stack in ORSO model language. + + Returns + ------- + ORSOSample + A dataclass containing the sample data. + + """ + if isinstance(model, str): + model = orsopy.fileio.model_language.SampleModel(stack=model) + stack = model.resolve_to_layers() + # if bulk in or out is air, it has SLD predefined + # else we need to grab it from SLDDB + if bulk_in_sld := stack[0].material.sld is None: + bulk_in_sld = stack[0].material.get_sld() + + # orsopy SLDs are in 10^-6 inverse square Angstroms + # but RAT uses just inverse square Angstroms + bulk_in_sld *= 1e6 + + # resolve_to_layers loses the name of bulk in and out + bulk_in_name = model.stack.split("|")[0].strip() + bulk_in = Parameter( + name=f"{bulk_in_name} SLD", + min=bulk_in_sld.real, + value=bulk_in_sld.real, + max=bulk_in_sld.real, + fit=False, + ) + + if bulk_out_sld := stack[-1].material.sld is None: + bulk_out_sld = stack[-1].material.get_sld() + + bulk_out_sld *= 1e6 + + bulk_out_name = model.stack.split("|")[-1].strip() + bulk_out = Parameter( + name=f"{bulk_out_name} SLD", + min=bulk_out_sld.real, + value=bulk_out_sld.real, + max=bulk_out_sld.real, + fit=False, + ) + + parameters = ClassList() + layers = ClassList() + + for orso_layer in stack[1:-1]: + layer_params, layer = orso_layer_to_rat_layer(orso_layer) + parameters.union(layer_params) + layers.append(layer) + + return ORSOSample(bulk_in=bulk_in, bulk_out=bulk_out, parameters=parameters, layers=layers) + + +def orso_layer_to_rat_layer( + layer: orsopy.fileio.model_language.Layer, absorption: bool = False +) -> tuple[ClassList[Parameter], Layer]: + """Convert an ``orsopy`` layer to a RAT layer. + + Parameters + ---------- + layer : orsopy.fileio.model_language.Layer + An ``orsopy`` Layer. + absorption : bool, default True + Whether absorption should be accounted for in the layer. + + Returns + ------- + ClassList[Parameter], Layer + The parameters required for the RAT layer and the layer itself. + + """ + name = layer.material.formula + thickness = layer.thickness.as_unit("angstrom") + roughness = layer.roughness.as_unit("angstrom") + + # orsopy SLDs are in 10^-6 inverse square Angstroms + # but RAT uses just inverse square Angstroms + sld = layer.material.get_sld() * 1e6 + + params = ClassList( + [ + Parameter(name=f"{name} Thickness", min=thickness, value=thickness, max=thickness, fit=False), + Parameter(name=f"{name} Roughness", min=roughness, value=roughness, max=roughness, fit=False), + Parameter(name=f"{name} SLD", min=sld.real, value=sld.real, max=sld.real, fit=False), + ] + ) + if absorption: + params.append(Parameter(name=f"{name} SLD imaginary", min=sld.imag, value=sld.imag, max=sld.imag, fit=False)) + layer = AbsorptionLayer( + name=f"{name}", + thickness=f"{name} Thickness", + roughness=f"{name} Roughness", + SLD_real=f"{name} SLD", + SLD_imag=f"{name} SLD imaginary", + ) + else: + layer = Layer( + name=f"{name}", + thickness=f"{name} Thickness", + roughness=f"{name} Roughness", + SLD=f"{name} SLD", + ) + + return params, layer diff --git a/requirements.txt b/requirements.txt index 47a268b5..4092f866 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,3 +10,4 @@ StrEnum >= 0.4.15; python_version < '3.11' ruff >= 0.4.10 scipy >= 1.13.1 tqdm >= 4.66.5 +orsopy >= 1.2.1 From 934343967900dffd493936ebe658a0be78c3493b Mon Sep 17 00:00:00 2001 From: alexhroom Date: Mon, 10 Feb 2025 13:02:28 +0000 Subject: [PATCH 02/16] made model parsing only if the model is there --- RATapi/utils/orso.py | 124 +++++++++++++++++++++++++------------------ 1 file changed, 72 insertions(+), 52 deletions(-) diff --git a/RATapi/utils/orso.py b/RATapi/utils/orso.py index ad60314c..abc1037f 100644 --- a/RATapi/utils/orso.py +++ b/RATapi/utils/orso.py @@ -1,6 +1,7 @@ """Readers from file formats.""" from dataclasses import dataclass +from typing import Union import orsopy from orsopy.fileio import load_orso @@ -9,7 +10,29 @@ from RATapi.models import AbsorptionLayer, Background, Contrast, Data, Layer, Parameter, Resolution -def read_ort(filepath: str) -> Project: +def load_ort_data(filepath: str) -> Union[Data, list[Data]]: + """Read data from an .ort file. + + Parameters + ---------- + filepath : str + The path to the .ort file. + + Returns + ------- + Data | list[Data] + If the .ort file contains one dataset, just the data model. + If it contains multiple datasets, returns a list of data models. + + """ + ort_data = load_orso(filepath) + datasets = [Data(name=dataset.info.data_source.sample.name, data=dataset.data) for dataset in ort_data] + if len(datasets) == 1: + return datasets[0] + return datasets + + +def ort_to_project(filepath: str) -> Project: """Create a project from an .ort file. Parameters @@ -27,58 +50,47 @@ def read_ort(filepath: str) -> Project: ort_data = load_orso(filepath) for dataset in ort_data: - metadata = dataset.info - sample = metadata.data_source.sample - model_info = orso_model_to_rat(sample.model) - - # Add all parameters that aren't already defined - project.parameters.union(model_info.parameters) - project.layers.extend(model_info.layers) - project.bulk_in.append(model_info.bulk_in) - project.bulk_out.append(model_info.bulk_out) + sample = dataset.info.data_source.sample project.data.append(Data(name=sample.name, data=dataset.data)) - if dataset.data.shape[1] == 4: - project.resolutions.append( - Resolution( - name=f"{sample.name} Resolution", - type="data", + if sample.model is not None: + model_info = orso_model_to_rat(sample.model) + + # Add all parameters that aren't already defined + project.parameters.union(model_info.parameters) + project.layers.extend(model_info.layers) + project.bulk_in.append(model_info.bulk_in) + project.bulk_out.append(model_info.bulk_out) + + if dataset.data.shape[1] == 4: + project.resolutions.append( + Resolution( + name=f"{sample.name} Resolution", + type="data", + ) ) - ) - else: - project.resolution_parameters.append(Parameter(name=f"{sample.name} Resolution Parameter")) - project.resolutions.append( - Resolution( - name=f"{sample.name} Resolution", - type="constant", - source=f"{sample.name} Resolution Parameter", + else: + project.resolutions.append( + Resolution( + name=f"{sample.name} Resolution", + type="constant", + source="Resolution Param 1", + ) ) - ) - project.background_parameters.append(Parameter(name=f"{sample.name} Background Parameter")) - project.backgrounds.append( - Background( - name=f"{sample.name} Background", - type="constant", - source=f"{sample.name} Background Parameter", - ) - ) - - project.scalefactors.append(Parameter(name=f"{sample.name} Scalefactor")) - - project.contrasts.append( - Contrast( - name=metadata.data_source.experiment.title, - data=sample.name, - background=f"{sample.name} Background", - bulk_in=model_info.bulk_in.name, - bulk_out=model_info.bulk_out.name, - scalefactor=f"{sample.name} Scalefactor", - resolution=f"{sample.name} Resolution", - model=[layer.name for layer in model_info.layers], + project.contrasts.append( + Contrast( + name=dataset.info.data_source.experiment.title, + data=sample.name, + background="Background 1", + bulk_in=model_info.bulk_in.name, + bulk_out=model_info.bulk_out.name, + scalefactor="Scalefactor 1", + resolution=f"{sample.name} Resolution", + model=model_info.model, + ) ) - ) return project @@ -90,10 +102,11 @@ class ORSOSample: bulk_in: Parameter bulk_out: Parameter parameters: ClassList[Parameter] - layers: ClassList[Layer] + layers: ClassList[Layer] | ClassList[AbsorptionLayer] + model: list[str] -def orso_model_to_rat(model: orsopy.fileio.model_language.SampleModel | str) -> ORSOSample: +def orso_model_to_rat(model: orsopy.fileio.model_language.SampleModel | str, absorption: bool = False) -> ORSOSample: """Get information from an ORSO SampleModel object. Parameters @@ -101,6 +114,8 @@ def orso_model_to_rat(model: orsopy.fileio.model_language.SampleModel | str) -> model : orsopy.fileio.model_language.SampleModel or str The sample model to turn into a RAT data. If given as a string, the string is interpreted as a layer stack in ORSO model language. + absorption : bool, default False + Whether to account for absorption in the model. Returns ------- @@ -148,11 +163,16 @@ def orso_model_to_rat(model: orsopy.fileio.model_language.SampleModel | str) -> layers = ClassList() for orso_layer in stack[1:-1]: - layer_params, layer = orso_layer_to_rat_layer(orso_layer) + layer_params, layer = orso_layer_to_rat_layer(orso_layer, absorption) parameters.union(layer_params) - layers.append(layer) + layers.union(layer) + - return ORSOSample(bulk_in=bulk_in, bulk_out=bulk_out, parameters=parameters, layers=layers) + return ORSOSample(bulk_in=bulk_in, + bulk_out=bulk_out, + parameters=parameters, + layers=layers, + model=[layer.material.formula for layer in stack[1:-1]]) def orso_layer_to_rat_layer( @@ -195,7 +215,7 @@ def orso_layer_to_rat_layer( thickness=f"{name} Thickness", roughness=f"{name} Roughness", SLD_real=f"{name} SLD", - SLD_imag=f"{name} SLD imaginary", + SLD_imaginary=f"{name} SLD imaginary", ) else: layer = Layer( From 909c66d00afc41443157e5da45d0bcc697a904df Mon Sep 17 00:00:00 2001 From: alexhroom Date: Mon, 10 Feb 2025 14:42:41 +0000 Subject: [PATCH 03/16] fixed union method --- RATapi/classlist.py | 10 +++++++--- RATapi/utils/orso.py | 15 ++++++++------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/RATapi/classlist.py b/RATapi/classlist.py index f7adbe11..b046f885 100644 --- a/RATapi/classlist.py +++ b/RATapi/classlist.py @@ -300,10 +300,14 @@ def union(self, other: Sequence[T]) -> None: """Extend the ClassList by a sequence, ignoring input items with names that already exist.""" if other and not (isinstance(other, Sequence) and not isinstance(other, str)): other = [other] - if hasattr(other, self.name_field): - other = (item for item in other if getattr(other, self.name_field) not in self.get_names()) - self.extend(other) + self.extend( + [ + item + for item in other + if hasattr(item, self.name_field) and getattr(item, self.name_field) not in self.get_names() + ] + ) def set_fields(self, index: Union[int, slice, str, T], **kwargs) -> None: """Assign the values of an existing object's attributes using keyword arguments.""" diff --git a/RATapi/utils/orso.py b/RATapi/utils/orso.py index abc1037f..5d255faf 100644 --- a/RATapi/utils/orso.py +++ b/RATapi/utils/orso.py @@ -7,7 +7,7 @@ from orsopy.fileio import load_orso from RATapi import ClassList, Project -from RATapi.models import AbsorptionLayer, Background, Contrast, Data, Layer, Parameter, Resolution +from RATapi.models import AbsorptionLayer, Contrast, Data, Layer, Parameter, Resolution def load_ort_data(filepath: str) -> Union[Data, list[Data]]: @@ -167,12 +167,13 @@ def orso_model_to_rat(model: orsopy.fileio.model_language.SampleModel | str, abs parameters.union(layer_params) layers.union(layer) - - return ORSOSample(bulk_in=bulk_in, - bulk_out=bulk_out, - parameters=parameters, - layers=layers, - model=[layer.material.formula for layer in stack[1:-1]]) + return ORSOSample( + bulk_in=bulk_in, + bulk_out=bulk_out, + parameters=parameters, + layers=layers, + model=[layer.material.formula for layer in stack[1:-1]], + ) def orso_layer_to_rat_layer( From 54a66a0d47b833fd2711eee85b5f8afb39b8ab4b Mon Sep 17 00:00:00 2001 From: alexhroom Date: Mon, 10 Feb 2025 14:44:45 +0000 Subject: [PATCH 04/16] added orso integration notebook --- RATapi/examples/data/IvsQ_82043_82044.ort | 151 +++++++++++++++ RATapi/examples/data/prist5_10K_m_025.Rqz.ort | 124 ++++++++++++ .../orso_integration/orso_integration.ipynb | 179 ++++++++++++++++++ 3 files changed, 454 insertions(+) create mode 100644 RATapi/examples/data/IvsQ_82043_82044.ort create mode 100644 RATapi/examples/data/prist5_10K_m_025.Rqz.ort create mode 100644 RATapi/examples/orso_integration/orso_integration.ipynb diff --git a/RATapi/examples/data/IvsQ_82043_82044.ort b/RATapi/examples/data/IvsQ_82043_82044.ort new file mode 100644 index 00000000..8a8909af --- /dev/null +++ b/RATapi/examples/data/IvsQ_82043_82044.ort @@ -0,0 +1,151 @@ +# # ORSO reflectivity data file | 1.1 standard | YAML encoding | https://www.reflectometry.org/ +# # Mantid@ISIS output may not be fully ORSO compliant +# data_source: +# owner: +# name: null +# affiliation: null +# experiment: +# title: null +# instrument: INTER +# start_date: 2024-12-17T11:40:01 +# probe: neutron +# facility: ISIS +# proposalID: '2220534' +# doi: 10.5286/ISIS.E.RB2220534 +# sample: +# name: D2O/air th=0.8 ['Default']=0.75 +# measurement: +# instrument_settings: null +# data_files: +# - file: INTER00082043 +# comment: Reduction input angle 0.80000000000000004 +# - file: INTER00082044 +# comment: Reduction input angle 2.2999999999999998 +# additional_files: +# - file: INTER00082090 +# comment: First transmission run +# - file: INTER00082122 +# comment: First transmission run +# - file: INTER00082088 +# comment: First transmission run +# - file: INTER00082105 +# comment: First transmission run +# - file: INTER00082123 +# comment: Second transmission run +# - file: INTER00082089 +# comment: Second transmission run +# reduction: +# software: {name: Mantid, version: 6.11.0} +# timestamp: 2024-12-19T17:17:04+00:00 +# creator: +# name: SaveISISReflectometryORSO +# affiliation: Mantid +# call: 'ReflectometryISISLoadAndProcess(InputRunList=''82043'', ThetaIn=0.80000000000000004, +# ROIDetectorIDs=''4009-4251,5009-5251,6009-6251,7009-7251,8009-8251,9009-9251'', +# AnalysisMode=''MultiDetectorAnalysis'', ProcessingInstructions=''71-94'', WavelengthMin=1.5, +# WavelengthMax=17, I0MonitorIndex=2, MonitorBackgroundWavelengthMin=17, MonitorBackgroundWavelengthMax=18, +# MonitorIntegrationWavelengthMin=4, MonitorIntegrationWavelengthMax=10, SubtractBackground=True, +# BackgroundProcessingInstructions=''16-68'', FirstTransmissionRunList=''82090,82122'', +# SecondTransmissionRunList=''82123'', StartOverlap=10, EndOverlap=12, ScaleRHSWorkspace=False, +# MomentumTransferMin=0.010323103434172838, MomentumTransferStep=0.045266801490531069, +# MomentumTransferMax=0.069000000000000006, OutputWorkspaceBinned=''IvsQ_binned_82043'', +# OutputWorkspace=''IvsQ_82043'', OutputWorkspaceTransmission=''TRANS_LAM_82090+82122_82123'') +# +# ReflectometryISISLoadAndProcess(InputRunList=''82044'', ThetaIn=2.2999999999999998, +# ROIDetectorIDs=''6032-6181,7032-7181'', AnalysisMode=''MultiDetectorAnalysis'', +# ProcessingInstructions=''74-102'', WavelengthMin=1.5, WavelengthMax=17, I0MonitorIndex=2, +# MonitorBackgroundWavelengthMin=17, MonitorBackgroundWavelengthMax=18, MonitorIntegrationWavelengthMin=4, +# MonitorIntegrationWavelengthMax=10, SubtractBackground=True, BackgroundProcessingInstructions=''16-68'', +# FirstTransmissionRunList=''82088,82105'', SecondTransmissionRunList=''82089'', +# StartOverlap=10, EndOverlap=12, ScaleRHSWorkspace=False, MomentumTransferMin=0.029671264825222473, +# MomentumTransferStep=0.045322888256372033, MomentumTransferMax=0.33576197841892735, +# OutputWorkspaceBinned=''IvsQ_binned_82044'', OutputWorkspace=''IvsQ_82044'', OutputWorkspaceTransmission=''TRANS_LAM_82088+82105_82089'') +# +# Stitch1DMany(InputWorkspaces=''IvsQ_82043,IvsQ_82044'', OutputWorkspace=''IvsQ_82043_82044'', +# Params=''-0.0452668'', OutScaleFactors=''0.947357'', IndexOfReference=-1)' +# data_set: Stitched +# columns: +# - {name: Qz, unit: 1/angstrom, physical_quantity: normal_wavevector_transfer} +# - {name: R, physical_quantity: reflectivity} +# - {error_of: R, error_type: uncertainty, value_is: sigma} +# - {error_of: Qz, error_type: resolution} +# # Qz (1/angstrom) R sR sQz +1.0556750371133298e-02 9.1127427148435880e-01 1.2845873256638439e-02 4.7787030770001681e-04 +1.1034620694568479e-02 9.3105701080877423e-01 1.2249715702986708e-02 4.9950196805689242e-04 +1.1534122679072816e-02 9.4077141047538648e-01 1.1716081192701731e-02 5.2211282448905334e-04 +1.2056235520753838e-02 9.3256374298594358e-01 1.1132709691169007e-02 5.4574720207085990e-04 +1.2601982740794890e-02 9.3551303690717813e-01 1.0747418441092419e-02 5.7045143233101412e-04 +1.3172434191909551e-02 9.3233920181391150e-01 1.0398119173798700e-02 5.9627394407833127e-04 +1.3768708155621805e-02 9.3143980720174668e-01 1.0139124433205205e-02 6.2326535833890110e-04 +1.4391973534483394e-02 9.3175152300275565e-01 9.9353273535217924e-03 6.5147858759075289e-04 +1.5043452143525829e-02 9.3719827580221982e-01 9.8061048255138963e-03 6.8096893949055502e-04 +1.5724421105439118e-02 9.2468859533738756e-01 9.5563170248959238e-03 7.1179422529569147e-04 +1.6436215354172546e-02 9.1115481952879196e-01 9.3249551124849946e-03 7.4401487319425788e-04 +1.7180230251865491e-02 8.0748834890286025e-01 8.2457960049778616e-03 7.7769404676514492e-04 +1.7957924324238303e-02 5.6674294837323991e-01 6.2075300529178317e-03 8.1289776880043047e-04 +1.8770822119805582e-02 3.2483213962969509e-01 3.6251666378265572e-03 8.4969505073281533e-04 +1.9620517198516887e-02 1.7654671113583151e-01 2.0458671238808451e-03 8.8815802792182425e-04 +2.0508675255683704e-02 1.1266987030829290e-01 1.3546716410542719e-03 9.2836210106398310e-04 +2.1437037387316504e-02 7.6738698497744812e-02 9.6075352276065481e-04 9.7038608400417878e-04 +2.2407423503273252e-02 5.6084704975444433e-02 7.2553073429195900e-04 1.0143123582379697e-03 +2.3421735894910180e-02 4.3303196924074701e-02 5.7879603949963286e-04 1.0602270344077201e-03 +2.4481962964228728e-02 3.2572905671769604e-02 4.4924570670612431e-04 1.1082201211091490e-03 +2.5590183121829001e-02 2.5695427836580853e-02 3.6314645146818901e-04 1.1583857013392090e-03 +2.6748568861311172e-02 1.9548456647929823e-02 2.8706148908812945e-04 1.2108221169312007e-03 +2.7959391018111943e-02 1.5424019392730049e-02 2.3366769233558698e-04 1.2656321613386697e-03 +2.9225023221124954e-02 1.2682370259914137e-02 1.9603079085223944e-04 1.3229232811460192e-03 +3.0547946545831779e-02 1.0051673382805906e-02 1.4008596221852472e-04 1.3828077867008581e-03 +3.1930754378065300e-02 8.1024909345494781e-03 1.1499098730548765e-04 1.4454030722810063e-03 +3.3376157497940095e-02 6.5388333592863290e-03 9.5142679402821645e-05 1.5108318462277548e-03 +3.4886989393916046e-02 5.3053542369420840e-03 7.9573515087822972e-05 1.5792223714965190e-03 +3.6466211817412705e-02 4.2914485631401506e-03 6.6337007742828268e-05 1.6507087170964576e-03 +3.8116920588863186e-02 3.5795991167568830e-03 5.7153495306149353e-05 1.7254310209119522e-03 +3.9842351666589594e-02 2.9619599362908661e-03 4.8946149681046327e-05 1.8035357644211780e-03 +4.1645887490397035e-02 2.3902290004456559e-03 4.1760767524343879e-05 1.8851760598503045e-03 +4.3531063612321827e-02 1.9968397538326550e-03 3.6603472547321729e-05 1.9705119503262499e-03 +4.5501575627532480e-02 1.5406381269260571e-03 3.0466569609158641e-05 2.0597107236163875e-03 +4.7561286418970380e-02 1.3889898327570783e-03 2.7589722084910036e-05 2.1529472400702485e-03 +4.9714233729932208e-02 1.0879714552636836e-03 2.3278999171455080e-05 2.2504042754060956e-03 +5.1964638079438907e-02 8.9950834577044627e-04 2.0272024773045830e-05 2.3522728790143451e-03 +5.4316911035908161e-02 7.5978394582628078e-04 1.7715724736182057e-05 2.4587527484802476e-03 +5.6775663865349456e-02 5.8774183698913785e-04 1.5022792839840360e-05 2.5700526210600009e-03 +5.9345716571035351e-02 5.1354653634454737e-04 1.3477705198934909e-05 2.6863906828777434e-03 +6.2032107342369726e-02 3.9911740112583247e-04 1.1504241268311257e-05 2.8079949966455819e-03 +6.4840102431476088e-02 3.4816324332280734e-04 1.0374500443032511e-05 2.9351039487451420e-03 +6.7775206476867425e-02 3.0142711223582935e-04 1.0507228178550673e-05 3.0679667165470627e-03 +7.0843173294435541e-02 2.6218095830548503e-04 9.2217374748867668e-06 3.2068437568845551e-03 +7.4050017156914033e-02 1.9910132286935558e-04 7.5214598115452071e-06 3.3520073166385961e-03 +7.7402024583926476e-02 1.6283770772644484e-04 6.3186052009966844e-06 3.5037419664356831e-03 +8.0905766665732279e-02 1.4602677671944966e-04 5.5999444444886146e-06 3.6623451585043702e-03 +8.4568111944829202e-02 1.2110693157768220e-04 4.7754617500394554e-06 3.8281278097841947e-03 +8.8396239880664793e-02 9.9505093878630215e-05 4.0539081677181128e-06 4.0014149114300773e-03 +9.2397654923852213e-02 8.3763797619041118e-05 3.5131154399346878e-06 4.1825461659070334e-03 +9.6580201227480816e-02 6.9270593427439816e-05 3.0326968530589274e-06 4.3718766529241291e-03 +1.0095207802436074e-01 6.4672273984513564e-05 2.8085635602528419e-06 4.5697775255131327e-03 +1.0552185570034608e-01 5.3627377662719945e-05 2.4398029714583996e-06 4.7766367376164262e-03 +1.1029849259524611e-01 4.3083222210855904e-05 2.1582420369390944e-06 4.9928598046104873e-03 +1.1529135256425993e-01 3.4858542871744015e-05 1.8874428700938758e-06 5.2188705982558420e-03 +1.2051022333436112e-01 3.2890488899472567e-05 1.8031904743329652e-06 5.4551121776318587e-03 +1.2596533569161719e-01 3.1381101540978320e-05 1.7455877009764839e-06 5.7020476576852977e-03 +1.3166738353705773e-01 2.2520432924503166e-05 1.4823681789262068e-06 5.9601611170952851e-03 +1.3762754485040735e-01 2.0502560966788705e-05 1.3678725529143628e-06 6.2299585472344200e-03 +1.4385750360277988e-01 1.8808460294492775e-05 1.2812961563002496e-06 6.5119688440863164e-03 +1.5036947266129028e-01 1.7777338689582184e-05 1.2232631944275082e-06 6.8067448450640951e-03 +1.5717621773048474e-01 1.4261716881208267e-05 1.1053710210878717e-06 7.1148644127623072e-03 +1.6429108237752310e-01 1.4122607450751436e-05 1.0741656554637186e-06 7.4369315677668630e-03 +1.7172801419017092e-01 1.3435883283391740e-05 1.0350681594460688e-06 7.7735776727436293e-03 +1.7950159211888050e-01 1.1349078769729003e-05 9.8706932468810706e-07 8.1254626701269400e-03 +1.8762705505656013e-01 1.0438042773581391e-05 9.5968138912711215e-07 8.4932763758342970e-03 +1.9612033171205839e-01 9.4228847859467391e-06 9.5504634962296442e-07 8.8777398315434061e-03 +2.0499807183592528e-01 1.0403057822366863e-05 1.0476675496525892e-06 9.2796067181824624e-03 +2.1427767885966370e-01 9.2982957336217477e-06 1.1061063274562501e-06 9.6996648334046250e-03 +2.2397734401245589e-01 6.9252828969103226e-06 1.0990870540122200e-06 1.0138737635943040e-02 +2.3411608198224410e-01 8.5110906998799596e-06 1.2869226555654373e-06 1.0597685859873848e-02 +2.4471376819107526e-01 9.5259526376142547e-06 1.5285021985662934e-06 1.1077409201951766e-02 +2.5579117775778049e-01 6.7529700706883579e-06 1.4379485329066072e-06 1.1578848085325898e-02 +2.6737002622437112e-01 7.1240611130925426e-06 1.5166508449663157e-06 1.2102985503093364e-02 +2.7947301212598780e-01 5.9716337438467617e-06 1.5442067243973891e-06 1.2650848945304665e-02 +2.9212386148785568e-01 5.7341096291047458e-06 1.6263758970481508e-06 1.3223512413198467e-02 +3.0534737433647385e-01 6.9752629156982645e-06 1.8626841271634412e-06 1.3822098524614296e-02 +3.1916947331621792e-01 6.0468934312149525e-06 1.8715649046179617e-06 1.4447780714710574e-02 +3.3099772990242848e-01 6.6623605997798478e-06 2.6078953534499003e-06 1.4983208039947250e-02 diff --git a/RATapi/examples/data/prist5_10K_m_025.Rqz.ort b/RATapi/examples/data/prist5_10K_m_025.Rqz.ort new file mode 100644 index 00000000..5b60b8fc --- /dev/null +++ b/RATapi/examples/data/prist5_10K_m_025.Rqz.ort @@ -0,0 +1,124 @@ +# # ORSO reflectivity data file | 1.0 standard | YAML encoding | https://www.reflectometry.org/ +# data_source: +# owner: +# name: Artur Glavic +# affiliation: null +# contact: b'' +# experiment: +# title: Structural evolution of the CO2/Water interface +# instrument: Amor +# start_date: 2023-11-29T10:12:45 +# probe: neutron +# facility: SINQ@PSI +# proposalID: '20230368' +# sample: +# name: prist4 +# sample_parameters: +# tempMean: {magnitude: -9999.0} +# model: +# stack: vacuum | Al2O3 2 | Ti0.27Co0.73 9.3 | Si +# measurement: +# instrument_settings: +# incident_angle: {min: 0.0950000000000002, max: 1.495, unit: deg} +# wavelength: {min: 3.0, max: 12.0, unit: angstrom} +# mu: {magnitude: 0.25, unit: deg, comment: sample angle to referece direction} +# nu: {magnitude: 1.0450000000000002, unit: deg, comment: detector angle to referece +# direction} +# data_files: +# - file: raw/amor2023n000848.hdf +# timestamp: 2023-11-29T10:12:45 +# amor_monitor: 1792.443302905 +# scheme: angle- and energy-dispersive +# references: [] +# amor_monitor: 1792.443302905 +# reduction: +# software: {name: eos, version: '2.0'} +# timestamp: 2023-11-29T10:57:48.480339 +# computer: amor.psi.ch +# call: eos.py -a 0.04 -F 0.0093,0.0101 -n 848 prist5_10K_m_025 +# data_set: 0 +# columns: +# - {name: Qz, unit: 1/angstrom, physical_quantity: normal momentum transfer} +# - {name: R, unit: '', physical_quantity: specular reflectivity} +# - {error_of: R, error_type: uncertainty, value_is: sigma} +# - {error_of: Qz, error_type: resolution, value_is: sigma} +# # Qz (1/angstrom) R () sR sQz +2.1999999999999997e-03 4.7241193897215048e-03 4.7241193897215048e-03 1.9999999999999987e-04 +2.5999999999999999e-03 0.0000000000000000e+00 0.0000000000000000e+00 2.0000000000000009e-04 +3.0000000000000001e-03 4.9441079014990305e-03 2.8632759811688313e-03 2.0000000000000009e-04 +3.4000000000000002e-03 5.3957146642147798e-03 2.7033018099334193e-03 1.9999999999999987e-04 +3.8000000000000000e-03 1.1948517768746966e-02 3.7903477990210636e-03 2.0000000000000009e-04 +4.2000000000000006e-03 1.6302332669940297e-02 3.9723175648453228e-03 2.0000000000000009e-04 +4.5999999999999999e-03 2.2652164871650581e-02 4.5763672802481776e-03 2.0000000000000009e-04 +5.0000000000000001e-03 2.3020814468949415e-02 4.2537271133726200e-03 1.9999999999999966e-04 +5.4000000000000003e-03 2.7305557750665344e-02 4.4287009711273589e-03 2.0000000000000009e-04 +5.7999999999999996e-03 1.9457945835850306e-02 3.7817426451169783e-03 2.0000000000000009e-04 +6.2000000000000006e-03 2.7645506109865266e-02 4.2679939914090732e-03 2.0000000000000009e-04 +6.6000000000000000e-03 2.4223034347324195e-02 3.7655052701117517e-03 2.0000000000000009e-04 +7.0000000000000001e-03 2.8408308819418325e-02 3.7377941755602716e-03 1.9999999999999966e-04 +7.4000000000000003e-03 5.7460495308053604e-02 5.2154049057105455e-03 2.0000000000000009e-04 +7.7999999999999996e-03 1.4898833519509819e-01 7.5478984035617898e-03 2.0000000000000009e-04 +8.1999999999999990e-03 3.5204809294430212e-01 1.1146891694516669e-02 1.9999999999999966e-04 +8.6000000000000000e-03 5.3176577607895481e-01 1.3517251795319620e-02 1.9999999999999966e-04 +8.9999999999999993e-03 7.9145006465015877e-01 1.6276277463585134e-02 2.0000000000000052e-04 +9.3999999999999986e-03 9.6803310478461035e-01 1.7827487993063780e-02 1.9999999999999966e-04 +9.7999999999999997e-03 1.0324643310179094e+00 1.8104900945963596e-02 2.0000000000000052e-04 +1.0204081632653062e-02 6.2876616833212340e-01 1.3873373556929145e-02 2.0408163265306107e-04 +1.0620574760516453e-02 3.5069559151104790e-01 1.0136613757789808e-02 2.1241149521033023e-04 +1.1054067607884473e-02 2.3477751708069897e-01 8.1099626399286761e-03 2.2108135215768900e-04 +1.1505254040859348e-02 1.8964302712880826e-01 7.1805730148316446e-03 2.3010508081718756e-04 +1.1974856246608712e-02 1.4285208497806512e-01 6.0162249267477130e-03 2.3949712493217482e-04 +1.2463625889327434e-02 1.2188457497836602e-01 5.4352795853431970e-03 2.4927251778654805e-04 +1.2972345313381616e-02 1.0530945504618572e-01 5.0275179459601553e-03 2.5944690626763297e-04 +1.3501828795560456e-02 8.0387950876579850e-02 4.1975562768255060e-03 2.7003657591120889e-04 +1.4052923848440476e-02 7.3136722795496253e-02 3.9582003984186967e-03 2.8105847696880976e-04 +1.4626512576948251e-02 6.1298419781514651e-02 3.4783001152817426e-03 2.9253025153896592e-04 +1.5223513090293080e-02 6.2409059365864682e-02 3.4798000624600761e-03 3.0447026180586197e-04 +1.5844880971529533e-02 5.6512800965543043e-02 3.2223775371921573e-03 3.1689761943059103e-04 +1.6491610807102167e-02 5.0440737935525240e-02 2.9021067247837801e-03 3.2983221614204389e-04 +1.7164737778820625e-02 5.0277525044171101e-02 2.8252864493045079e-03 3.4329475557641313e-04 +1.7865339320813300e-02 5.1689705097227867e-02 2.8118143416053952e-03 3.5730678641626538e-04 +1.8594536844111803e-02 5.3007618770583402e-02 2.7685413804410695e-03 3.7189073688223724e-04 +1.9353497531626573e-02 4.9070756677145402e-02 2.5677593751218504e-03 3.8706995063253133e-04 +2.0143436206386842e-02 4.6878831709663782e-02 2.4119133732668076e-03 4.0286872412773761e-04 +2.0965617276035284e-02 4.9199553772144550e-02 2.4276503561561644e-03 4.1931234552070561e-04 +2.1821356756689787e-02 5.2041112703109127e-02 2.4556151556737898e-03 4.3642713513379616e-04 +2.2712024379411822e-02 4.9251781726106690e-02 2.3335505076022252e-03 4.5424048758823873e-04 +2.3639045782653120e-02 4.3172608947743572e-02 2.1138539656044499e-03 4.7278091565306109e-04 +2.4603904794189984e-02 3.8304327635500499e-02 1.9158755178575817e-03 4.9207809588380086e-04 +2.5608145806197739e-02 4.4442200106459967e-02 2.0186419327094269e-03 5.1216291612395451e-04 +2.6653376247267036e-02 3.9587001147536376e-02 1.8488058581743547e-03 5.3306752494534232e-04 +2.7741269155318757e-02 3.6677858215866437e-02 1.7473224966445143e-03 5.5482538310637659e-04 +2.8873565855535847e-02 3.7663512267048754e-02 1.7682821318945074e-03 5.7747131711071743e-04 +3.0052078747598535e-02 3.6755569252809664e-02 1.7350440273063527e-03 6.0104157495196979e-04 +3.1278694206684193e-02 3.8546394417761670e-02 1.7965558626918197e-03 6.2557388413368373e-04 +3.2555375602875386e-02 3.2866785139061716e-02 1.6217721152892931e-03 6.5110751205750897e-04 +3.3884166443809073e-02 3.1513196803753502e-02 1.6061232808323794e-03 6.7768332887618160e-04 +3.5267193645597203e-02 3.0280345918169513e-02 1.5885947028228238e-03 7.0534387291194475e-04 +3.6706670937254229e-02 2.5036982048446406e-02 1.4176844815086535e-03 7.3413341874508514e-04 +3.8204902404080934e-02 2.0831804563285421e-02 1.2803365468167761e-03 7.6409804808161980e-04 +3.9764286175676081e-02 1.9376976329704945e-02 1.2712203272554497e-03 7.9528572351352314e-04 +4.1387318264479181e-02 1.6729675515039004e-02 1.1715497338181137e-03 8.2774636528958404e-04 +4.3076596560988542e-02 1.3996303090353096e-02 1.0654383375290077e-03 8.6153193121977015e-04 +4.4834824992049299e-02 1.0621480384334052e-02 9.2468077823003954e-04 8.9669649984099042e-04 +4.6664817848867640e-02 7.8203324635251256e-03 8.0931024548367521e-04 9.3329635697735405e-04 +4.8569504291678570e-02 6.0428022894521575e-03 7.1838354133842033e-04 9.7139008583356848e-04 +5.0551933038277694e-02 4.0958929714843932e-03 5.8416704469953131e-04 1.0110386607655557e-03 +5.2615277243921690e-02 5.1115251619419473e-03 6.6580030308840434e-04 1.0523055448784409e-03 +5.4762839580408292e-02 2.0207116612746484e-03 4.1438660592314769e-04 1.0952567916081637e-03 +5.6998057522465770e-02 1.7115689314143780e-03 3.8529038925611664e-04 1.1399611504493146e-03 +5.9324508849913360e-02 8.4963058831312487e-04 2.7095330976641694e-04 1.1864901769982721e-03 +6.1745917374399620e-02 8.1421160351772355e-04 2.7251395576638693e-04 1.2349183474879948e-03 +6.4266158899885323e-02 8.9204238262309603e-05 8.9204238263225523e-05 1.2853231779977048e-03 +6.6889267426411256e-02 9.3397363465611626e-05 9.3397363464899779e-05 1.3377853485282282e-03 +6.9619441607081112e-02 4.0599169078880156e-04 2.0303208241886721e-04 1.3923888321416208e-03 +7.2461051468594620e-02 2.1832573520758229e-04 1.5439324988622013e-04 1.4492210293718943e-03 +7.5418645406088280e-02 1.2684339163878999e-04 1.2684339163797725e-04 1.5083729081217731e-03 +7.8496957463479650e-02 0.0000000000000000e+00 0.0000000000000000e+00 1.5699391492695891e-03 +8.1700914910968619e-02 0.0000000000000000e+00 0.0000000000000000e+00 1.6340182982193738e-03 +8.5035646131824488e-02 4.1657483226777538e-04 2.4090333523406435e-04 1.7007129226364950e-03 +8.8506488831082628e-02 0.0000000000000000e+00 0.0000000000000000e+00 1.7701297766216512e-03 +9.2118998579290082e-02 0.0000000000000000e+00 0.0000000000000000e+00 1.8423799715858030e-03 +9.5878957704975398e-02 0.0000000000000000e+00 0.0000000000000000e+00 1.9175791540995135e-03 +9.9792384550076441e-02 0.0000000000000000e+00 0.0000000000000000e+00 1.9958476910015288e-03 +1.0386554310314079e-01 0.0000000000000000e+00 0.0000000000000000e+00 2.0773108620628228e-03 diff --git a/RATapi/examples/orso_integration/orso_integration.ipynb b/RATapi/examples/orso_integration/orso_integration.ipynb new file mode 100644 index 00000000..15ae9db3 --- /dev/null +++ b/RATapi/examples/orso_integration/orso_integration.ipynb @@ -0,0 +1,179 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# ``orsopy`` Integration" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "``python-RAT`` contains some integration with ``orsopy``, allowing for convenient interaction with the ``.ort`` file format. This integration is available through the `RATapi.utils.orso` submodule." + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "import RATapi.utils.orso" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Creating models from the ORSO model description language\n", + "\n", + "The [ORSO model description format](https://www.reflectometry.org/advanced_and_expert_level/file_format/simple_model) allows the description of a standard slab model as a one-line string, provided that all the layer materials are defined [in the ORSO SLD database](https://slddb.esss.dk/slddb/).\n", + "\n", + "The function `RATapi.utils.orso.orso_model_to_rat` function can read a model and return an `ORSOSample` dataclass, which gives bulk in and bulk out parameters for the model, a list of all layers defined in the model, and all the parameters needed to define those layers as RAT models. \n", + "\n", + "**Note:** the ORSO format gives the thicknesses of materials in *nanometres*. When we convert them to RAT parameters, the units will be converted to Angstroms.\n", + "\n", + "For example, the string `air | Ni 100 | SiO2 0.5 | Si` describes a 1000 angstrom nickel film backed by a 5 angstrom silicon oxide layer. The bulk-in and bulk-out are air and silicon respectively. The roughnesses and SLDs will be calculated or taken from the ORSO SLD database." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# create the RAT parameters and layers from this model\n", + "sample = RATapi.utils.orso.orso_model_to_rat(\"air | Ni 100 | SiO2 0.5 | Si\")\n", + "print(\"Bulk in:\\n\", sample.bulk_in, \"\\nBulk out:\\n\", sample.bulk_out)\n", + "print(\"Parameters:\\n\", sample.parameters)\n", + "print(\"Layers:\\n\", sample.layers)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "You can also set `absorption=True` and the model will account for absorption. For example if we change the nickel film for a boron carbide film and want to account for its relatively high absorption, we can add it to the output:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "sample = RATapi.utils.orso.orso_model_to_rat(\"vacuum | B4C 100 | SiO2 0.5 | Si\", absorption=True)\n", + "print(\"Parameters:\\n\", sample.parameters)\n", + "print(\"Layers:\\n\", sample.layers)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Finally, ORSO supports defining repeated layers using parentheses. For example, if we had a polarising multilayer of 5 repetitions of 70 angstrom silicon and 70 angstrom iron, we could represent it as `air | 5 ( Si 7 | Fe 7 ) | Si`.\n", + "\n", + "RAT will only create the number of layers and parameters necessary, but the `ORSOSample` object's `model` attribute will give a list of layer names with the structure of the model preserved, which can be given as the layer model for a Contrast." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "sample = RATapi.utils.orso.orso_model_to_rat(\"air | 5 ( Si 7 | Fe 7 ) | Si\")\n", + "print(\"Parameters:\\n\", sample.parameters)\n", + "print(\"Layers:\\n\", sample.layers)\n", + "print(\"Model:\\n\", sample.model)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Reading in data and models from .ort files\n", + "\n", + "It is possible to read data from .ort format files at two different levels of depth." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Reading data\n", + "\n", + "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", + "\n", + "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." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import pathlib\n", + "data_path = pathlib.Path(\"../data\")\n", + "\n", + "data = RATapi.utils.orso.load_ort_data(data_path / \"IvsQ_82043_82044.ort\")\n", + "print(data)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Reading an entire project\n", + "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", + "\n", + "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. " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "project = RATapi.utils.orso.ort_to_project(data_path / \"prist5_10K_m_025.Rqz.ort\")\n", + "print(project)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "controls = RATapi.Controls()\n", + "project, results = RATapi.run(project, controls)\n", + "RATapi.plotting.plot_ref_sld(project, results)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": ".venv", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.2" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} From f58dcc76fa0e12ac311ded6c3cb782be513b3bce Mon Sep 17 00:00:00 2001 From: alexhroom Date: Tue, 11 Feb 2025 12:41:36 +0000 Subject: [PATCH 05/16] added tests --- tests/test_data/bare_substrate.json | 1 + tests/test_data/bare_substrate.ort | 83 +++++++ tests/test_data/inter_data.ort | 151 ++++++++++++ tests/test_data/polref_data.ort | 280 +++++++++++++++++++++++ tests/test_data/prist.json | 1 + tests/test_data/prist5_10K_m_025.Rqz.ort | 124 ++++++++++ tests/test_orso_utils.py | 121 ++++++++++ 7 files changed, 761 insertions(+) create mode 100644 tests/test_data/bare_substrate.json create mode 100644 tests/test_data/bare_substrate.ort create mode 100644 tests/test_data/inter_data.ort create mode 100644 tests/test_data/polref_data.ort create mode 100644 tests/test_data/prist.json create mode 100644 tests/test_data/prist5_10K_m_025.Rqz.ort create mode 100644 tests/test_orso_utils.py diff --git a/tests/test_data/bare_substrate.json b/tests/test_data/bare_substrate.json new file mode 100644 index 00000000..debb173b --- /dev/null +++ b/tests/test_data/bare_substrate.json @@ -0,0 +1 @@ +{"name": "", "calculation": "normal", "model": "standard layers", "geometry": "air/substrate", "absorption": false, "parameters": [{"name": "Substrate Roughness", "min": 1.0, "value": 3.0, "max": 5.0, "fit": true, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "bulk_in": [{"name": "SLD Air", "min": 0.0, "value": 0.0, "max": 0.0, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "air SLD", "min": 0.00442927130586151, "value": 0.00442927130586151, "max": 0.00442927130586151, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "bulk_out": [{"name": "SLD D2O", "min": 6.2e-06, "value": 6.35e-06, "max": 6.35e-06, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "D2O SLD", "min": 6.360408603667384, "value": 6.360408603667384, "max": 6.360408603667384, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "scalefactors": [{"name": "Scalefactor 1", "min": 0.02, "value": 0.23, "max": 0.25, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "domain_ratios": [], "background_parameters": [{"name": "Background Param 1", "min": 1e-07, "value": 1e-06, "max": 1e-05, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "backgrounds": [{"name": "Background 1", "type": "constant", "source": "Background Param 1", "value_1": "", "value_2": "", "value_3": "", "value_4": "", "value_5": ""}], "resolution_parameters": [{"name": "Resolution Param 1", "min": 0.01, "value": 0.03, "max": 0.05, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "resolutions": [{"name": "Resolution 1", "type": "constant", "source": "Resolution Param 1", "value_1": "", "value_2": "", "value_3": "", "value_4": "", "value_5": ""}, {"name": "D2O substrate Resolution", "type": "data", "source": "", "value_1": "", "value_2": "", "value_3": "", "value_4": "", "value_5": ""}], "custom_files": [], "data": [{"name": "Simulation", "data": [], "data_range": [], "simulation_range": [0.005, 0.7]}, {"name": "D2O substrate", "data": [[0.048866, 0.00012343, 1.3213e-06, 0.03], [0.051309, 0.00010063, 1.0803e-06, 0.03], [0.053874, 8.2165e-05, 8.8779e-07, 0.03], [0.056568, 6.4993e-05, 7.2018e-07, 0.03], [0.059396, 5.3958e-05, 6.0015e-07, 0.03], [0.062366, 4.359e-05, 5.0129e-07, 0.03], [0.065485, 3.578e-05, 4.1957e-07, 0.03], [0.068759, 2.913e-05, 3.5171e-07, 0.03], [0.072197, 2.3481e-05, 3.0586e-07, 0.03], [0.075807, 1.8906e-05, 2.6344e-07, 0.03], [0.079597, 1.4642e-05, 2.2314e-07, 0.03], [0.083577, 1.1589e-05, 1.8938e-07, 0.03], [0.087756, 9.5418e-06, 1.622e-07, 0.03], [0.092143, 7.5694e-06, 1.3809e-07, 0.03], [0.096751, 6.3831e-06, 1.2097e-07, 0.03], [0.10159, 5.0708e-06, 1.0333e-07, 0.03], [0.10667, 4.1041e-06, 8.9548e-08, 0.03], [0.112, 3.4253e-06, 7.983e-08, 0.03], [0.1176, 2.8116e-06, 7.1554e-08, 0.03], [0.12348, 2.3767e-06, 6.3738e-08, 0.03], [0.12966, 1.9241e-06, 5.6586e-08, 0.03], [0.13614, 1.5642e-06, 5.2778e-08, 0.03], [0.14294, 1.2922e-06, 4.973e-08, 0.03], [0.15009, 1.1694e-06, 5.1175e-08, 0.03], [0.1576, 9.7837e-07, 5.0755e-08, 0.03], [0.16548, 8.9138e-07, 5.3542e-08, 0.03], [0.17375, 7.942e-07, 5.4857e-08, 0.03], [0.18244, 7.9131e-07, 5.8067e-08, 0.03], [0.19156, 6.5358e-07, 5.7717e-08, 0.03], [0.20114, 6.297e-07, 5.7951e-08, 0.03], [0.21119, 5.013e-07, 5.5262e-08, 0.03], [0.22175, 5.0218e-07, 5.6461e-08, 0.03], [0.23284, 3.9299e-07, 5.0685e-08, 0.03], [0.24448, 3.5324e-07, 5.0194e-08, 0.03], [0.25671, 4.4475e-07, 5.6485e-08, 0.03], [0.26954, 5.1338e-07, 6.2247e-08, 0.03], [0.28302, 3.4918e-07, 4.9745e-08, 0.03], [0.29717, 4.3037e-07, 5.5488e-08, 0.03], [0.31203, 4.0099e-07, 5.3591e-08, 0.03], [0.32763, 3.8397e-07, 5.1303e-08, 0.03], [0.34401, 3.0995e-07, 4.5965e-08, 0.03], [0.36121, 3.9357e-07, 5.0135e-08, 0.03], [0.37927, 3.0997e-07, 4.368e-08, 0.03], [0.39824, 2.9656e-07, 4.2432e-08, 0.03], [0.41815, 2.1909e-07, 3.6117e-08, 0.03], [0.43906, 2.3153e-07, 3.6307e-08, 0.03], [0.46101, 3.3428e-07, 4.3874e-08, 0.03], [0.48406, 2.3441e-07, 3.7488e-08, 0.03], [0.50826, 1.5496e-07, 3.0585e-08, 0.03], [0.53368, 2.4708e-07, 3.9376e-08, 0.03], [0.56036, 2.2157e-07, 3.8258e-08, 0.03], [0.58838, 2.2798e-07, 4.6976e-08, 0.03], [0.61169, 6.0272e-07, 2.3239e-07, 0.03]], "data_range": [0.048866, 0.61169], "simulation_range": [0.048866, 0.61169]}], "layers": [], "domain_contrasts": [], "contrasts": [{"name": "Bare D2O substrate", "data": "D2O substrate", "background": "Background 1", "background_action": "add", "bulk_in": "air SLD", "bulk_out": "D2O SLD", "scalefactor": "Scalefactor 1", "resolution": "D2O substrate Resolution", "resample": false, "model": []}]} \ No newline at end of file diff --git a/tests/test_data/bare_substrate.ort b/tests/test_data/bare_substrate.ort new file mode 100644 index 00000000..7e4ffb52 --- /dev/null +++ b/tests/test_data/bare_substrate.ort @@ -0,0 +1,83 @@ +# # ORSO reflectivity data file | 1.1 standard | YAML encoding | https://www.reflectometry.org/ +# # handwritten test file header created to test RAT orsopy integration! +# data_source: +# owner: +# name: null +# affiliation: null +# measurement: +# instrument_settings: null +# data_files: null +# experiment: +# title: Bare D2O substrate +# probe: neutron +# instrument: None +# start_date: 1970-01-01T00:00:00 +# sample: +# name: D2O substrate +# model: +# stack: air | D2O +# reduction: +# software: null +# timestamp: null +# data_set: 0 +# columns: +# - {name: Qz, unit: 1/angstrom, physical_quantity: normal momentum transfer} +# - {name: R, unit: '', physical_quantity: specular reflectivity} +# - {error_of: R, error_type: uncertainty, value_is: sigma} +# - {error_of: Qz, error_type: resolution, value_is: sigma} +# # Qz (1/angstrom) R () sR sQz +4.8866e-02 1.2343e-04 1.3213e-06 0.03 +5.1309e-02 1.0063e-04 1.0803e-06 0.03 +5.3874e-02 8.2165e-05 8.8779e-07 0.03 +5.6568e-02 6.4993e-05 7.2018e-07 0.03 +5.9396e-02 5.3958e-05 6.0015e-07 0.03 +6.2366e-02 4.3590e-05 5.0129e-07 0.03 +6.5485e-02 3.5780e-05 4.1957e-07 0.03 +6.8759e-02 2.9130e-05 3.5171e-07 0.03 +7.2197e-02 2.3481e-05 3.0586e-07 0.03 +7.5807e-02 1.8906e-05 2.6344e-07 0.03 +7.9597e-02 1.4642e-05 2.2314e-07 0.03 +8.3577e-02 1.1589e-05 1.8938e-07 0.03 +8.7756e-02 9.5418e-06 1.6220e-07 0.03 +9.2143e-02 7.5694e-06 1.3809e-07 0.03 +9.6751e-02 6.3831e-06 1.2097e-07 0.03 +1.0159e-01 5.0708e-06 1.0333e-07 0.03 +1.0667e-01 4.1041e-06 8.9548e-08 0.03 +1.1200e-01 3.4253e-06 7.9830e-08 0.03 +1.1760e-01 2.8116e-06 7.1554e-08 0.03 +1.2348e-01 2.3767e-06 6.3738e-08 0.03 +1.2966e-01 1.9241e-06 5.6586e-08 0.03 +1.3614e-01 1.5642e-06 5.2778e-08 0.03 +1.4294e-01 1.2922e-06 4.9730e-08 0.03 +1.5009e-01 1.1694e-06 5.1175e-08 0.03 +1.5760e-01 9.7837e-07 5.0755e-08 0.03 +1.6548e-01 8.9138e-07 5.3542e-08 0.03 +1.7375e-01 7.9420e-07 5.4857e-08 0.03 +1.8244e-01 7.9131e-07 5.8067e-08 0.03 +1.9156e-01 6.5358e-07 5.7717e-08 0.03 +2.0114e-01 6.2970e-07 5.7951e-08 0.03 +2.1119e-01 5.0130e-07 5.5262e-08 0.03 +2.2175e-01 5.0218e-07 5.6461e-08 0.03 +2.3284e-01 3.9299e-07 5.0685e-08 0.03 +2.4448e-01 3.5324e-07 5.0194e-08 0.03 +2.5671e-01 4.4475e-07 5.6485e-08 0.03 +2.6954e-01 5.1338e-07 6.2247e-08 0.03 +2.8302e-01 3.4918e-07 4.9745e-08 0.03 +2.9717e-01 4.3037e-07 5.5488e-08 0.03 +3.1203e-01 4.0099e-07 5.3591e-08 0.03 +3.2763e-01 3.8397e-07 5.1303e-08 0.03 +3.4401e-01 3.0995e-07 4.5965e-08 0.03 +3.6121e-01 3.9357e-07 5.0135e-08 0.03 +3.7927e-01 3.0997e-07 4.3680e-08 0.03 +3.9824e-01 2.9656e-07 4.2432e-08 0.03 +4.1815e-01 2.1909e-07 3.6117e-08 0.03 +4.3906e-01 2.3153e-07 3.6307e-08 0.03 +4.6101e-01 3.3428e-07 4.3874e-08 0.03 +4.8406e-01 2.3441e-07 3.7488e-08 0.03 +5.0826e-01 1.5496e-07 3.0585e-08 0.03 +5.3368e-01 2.4708e-07 3.9376e-08 0.03 +5.6036e-01 2.2157e-07 3.8258e-08 0.03 +5.8838e-01 2.2798e-07 4.6976e-08 0.03 +6.1169e-01 6.0272e-07 2.3239e-07 0.03 + + diff --git a/tests/test_data/inter_data.ort b/tests/test_data/inter_data.ort new file mode 100644 index 00000000..8a8909af --- /dev/null +++ b/tests/test_data/inter_data.ort @@ -0,0 +1,151 @@ +# # ORSO reflectivity data file | 1.1 standard | YAML encoding | https://www.reflectometry.org/ +# # Mantid@ISIS output may not be fully ORSO compliant +# data_source: +# owner: +# name: null +# affiliation: null +# experiment: +# title: null +# instrument: INTER +# start_date: 2024-12-17T11:40:01 +# probe: neutron +# facility: ISIS +# proposalID: '2220534' +# doi: 10.5286/ISIS.E.RB2220534 +# sample: +# name: D2O/air th=0.8 ['Default']=0.75 +# measurement: +# instrument_settings: null +# data_files: +# - file: INTER00082043 +# comment: Reduction input angle 0.80000000000000004 +# - file: INTER00082044 +# comment: Reduction input angle 2.2999999999999998 +# additional_files: +# - file: INTER00082090 +# comment: First transmission run +# - file: INTER00082122 +# comment: First transmission run +# - file: INTER00082088 +# comment: First transmission run +# - file: INTER00082105 +# comment: First transmission run +# - file: INTER00082123 +# comment: Second transmission run +# - file: INTER00082089 +# comment: Second transmission run +# reduction: +# software: {name: Mantid, version: 6.11.0} +# timestamp: 2024-12-19T17:17:04+00:00 +# creator: +# name: SaveISISReflectometryORSO +# affiliation: Mantid +# call: 'ReflectometryISISLoadAndProcess(InputRunList=''82043'', ThetaIn=0.80000000000000004, +# ROIDetectorIDs=''4009-4251,5009-5251,6009-6251,7009-7251,8009-8251,9009-9251'', +# AnalysisMode=''MultiDetectorAnalysis'', ProcessingInstructions=''71-94'', WavelengthMin=1.5, +# WavelengthMax=17, I0MonitorIndex=2, MonitorBackgroundWavelengthMin=17, MonitorBackgroundWavelengthMax=18, +# MonitorIntegrationWavelengthMin=4, MonitorIntegrationWavelengthMax=10, SubtractBackground=True, +# BackgroundProcessingInstructions=''16-68'', FirstTransmissionRunList=''82090,82122'', +# SecondTransmissionRunList=''82123'', StartOverlap=10, EndOverlap=12, ScaleRHSWorkspace=False, +# MomentumTransferMin=0.010323103434172838, MomentumTransferStep=0.045266801490531069, +# MomentumTransferMax=0.069000000000000006, OutputWorkspaceBinned=''IvsQ_binned_82043'', +# OutputWorkspace=''IvsQ_82043'', OutputWorkspaceTransmission=''TRANS_LAM_82090+82122_82123'') +# +# ReflectometryISISLoadAndProcess(InputRunList=''82044'', ThetaIn=2.2999999999999998, +# ROIDetectorIDs=''6032-6181,7032-7181'', AnalysisMode=''MultiDetectorAnalysis'', +# ProcessingInstructions=''74-102'', WavelengthMin=1.5, WavelengthMax=17, I0MonitorIndex=2, +# MonitorBackgroundWavelengthMin=17, MonitorBackgroundWavelengthMax=18, MonitorIntegrationWavelengthMin=4, +# MonitorIntegrationWavelengthMax=10, SubtractBackground=True, BackgroundProcessingInstructions=''16-68'', +# FirstTransmissionRunList=''82088,82105'', SecondTransmissionRunList=''82089'', +# StartOverlap=10, EndOverlap=12, ScaleRHSWorkspace=False, MomentumTransferMin=0.029671264825222473, +# MomentumTransferStep=0.045322888256372033, MomentumTransferMax=0.33576197841892735, +# OutputWorkspaceBinned=''IvsQ_binned_82044'', OutputWorkspace=''IvsQ_82044'', OutputWorkspaceTransmission=''TRANS_LAM_82088+82105_82089'') +# +# Stitch1DMany(InputWorkspaces=''IvsQ_82043,IvsQ_82044'', OutputWorkspace=''IvsQ_82043_82044'', +# Params=''-0.0452668'', OutScaleFactors=''0.947357'', IndexOfReference=-1)' +# data_set: Stitched +# columns: +# - {name: Qz, unit: 1/angstrom, physical_quantity: normal_wavevector_transfer} +# - {name: R, physical_quantity: reflectivity} +# - {error_of: R, error_type: uncertainty, value_is: sigma} +# - {error_of: Qz, error_type: resolution} +# # Qz (1/angstrom) R sR sQz +1.0556750371133298e-02 9.1127427148435880e-01 1.2845873256638439e-02 4.7787030770001681e-04 +1.1034620694568479e-02 9.3105701080877423e-01 1.2249715702986708e-02 4.9950196805689242e-04 +1.1534122679072816e-02 9.4077141047538648e-01 1.1716081192701731e-02 5.2211282448905334e-04 +1.2056235520753838e-02 9.3256374298594358e-01 1.1132709691169007e-02 5.4574720207085990e-04 +1.2601982740794890e-02 9.3551303690717813e-01 1.0747418441092419e-02 5.7045143233101412e-04 +1.3172434191909551e-02 9.3233920181391150e-01 1.0398119173798700e-02 5.9627394407833127e-04 +1.3768708155621805e-02 9.3143980720174668e-01 1.0139124433205205e-02 6.2326535833890110e-04 +1.4391973534483394e-02 9.3175152300275565e-01 9.9353273535217924e-03 6.5147858759075289e-04 +1.5043452143525829e-02 9.3719827580221982e-01 9.8061048255138963e-03 6.8096893949055502e-04 +1.5724421105439118e-02 9.2468859533738756e-01 9.5563170248959238e-03 7.1179422529569147e-04 +1.6436215354172546e-02 9.1115481952879196e-01 9.3249551124849946e-03 7.4401487319425788e-04 +1.7180230251865491e-02 8.0748834890286025e-01 8.2457960049778616e-03 7.7769404676514492e-04 +1.7957924324238303e-02 5.6674294837323991e-01 6.2075300529178317e-03 8.1289776880043047e-04 +1.8770822119805582e-02 3.2483213962969509e-01 3.6251666378265572e-03 8.4969505073281533e-04 +1.9620517198516887e-02 1.7654671113583151e-01 2.0458671238808451e-03 8.8815802792182425e-04 +2.0508675255683704e-02 1.1266987030829290e-01 1.3546716410542719e-03 9.2836210106398310e-04 +2.1437037387316504e-02 7.6738698497744812e-02 9.6075352276065481e-04 9.7038608400417878e-04 +2.2407423503273252e-02 5.6084704975444433e-02 7.2553073429195900e-04 1.0143123582379697e-03 +2.3421735894910180e-02 4.3303196924074701e-02 5.7879603949963286e-04 1.0602270344077201e-03 +2.4481962964228728e-02 3.2572905671769604e-02 4.4924570670612431e-04 1.1082201211091490e-03 +2.5590183121829001e-02 2.5695427836580853e-02 3.6314645146818901e-04 1.1583857013392090e-03 +2.6748568861311172e-02 1.9548456647929823e-02 2.8706148908812945e-04 1.2108221169312007e-03 +2.7959391018111943e-02 1.5424019392730049e-02 2.3366769233558698e-04 1.2656321613386697e-03 +2.9225023221124954e-02 1.2682370259914137e-02 1.9603079085223944e-04 1.3229232811460192e-03 +3.0547946545831779e-02 1.0051673382805906e-02 1.4008596221852472e-04 1.3828077867008581e-03 +3.1930754378065300e-02 8.1024909345494781e-03 1.1499098730548765e-04 1.4454030722810063e-03 +3.3376157497940095e-02 6.5388333592863290e-03 9.5142679402821645e-05 1.5108318462277548e-03 +3.4886989393916046e-02 5.3053542369420840e-03 7.9573515087822972e-05 1.5792223714965190e-03 +3.6466211817412705e-02 4.2914485631401506e-03 6.6337007742828268e-05 1.6507087170964576e-03 +3.8116920588863186e-02 3.5795991167568830e-03 5.7153495306149353e-05 1.7254310209119522e-03 +3.9842351666589594e-02 2.9619599362908661e-03 4.8946149681046327e-05 1.8035357644211780e-03 +4.1645887490397035e-02 2.3902290004456559e-03 4.1760767524343879e-05 1.8851760598503045e-03 +4.3531063612321827e-02 1.9968397538326550e-03 3.6603472547321729e-05 1.9705119503262499e-03 +4.5501575627532480e-02 1.5406381269260571e-03 3.0466569609158641e-05 2.0597107236163875e-03 +4.7561286418970380e-02 1.3889898327570783e-03 2.7589722084910036e-05 2.1529472400702485e-03 +4.9714233729932208e-02 1.0879714552636836e-03 2.3278999171455080e-05 2.2504042754060956e-03 +5.1964638079438907e-02 8.9950834577044627e-04 2.0272024773045830e-05 2.3522728790143451e-03 +5.4316911035908161e-02 7.5978394582628078e-04 1.7715724736182057e-05 2.4587527484802476e-03 +5.6775663865349456e-02 5.8774183698913785e-04 1.5022792839840360e-05 2.5700526210600009e-03 +5.9345716571035351e-02 5.1354653634454737e-04 1.3477705198934909e-05 2.6863906828777434e-03 +6.2032107342369726e-02 3.9911740112583247e-04 1.1504241268311257e-05 2.8079949966455819e-03 +6.4840102431476088e-02 3.4816324332280734e-04 1.0374500443032511e-05 2.9351039487451420e-03 +6.7775206476867425e-02 3.0142711223582935e-04 1.0507228178550673e-05 3.0679667165470627e-03 +7.0843173294435541e-02 2.6218095830548503e-04 9.2217374748867668e-06 3.2068437568845551e-03 +7.4050017156914033e-02 1.9910132286935558e-04 7.5214598115452071e-06 3.3520073166385961e-03 +7.7402024583926476e-02 1.6283770772644484e-04 6.3186052009966844e-06 3.5037419664356831e-03 +8.0905766665732279e-02 1.4602677671944966e-04 5.5999444444886146e-06 3.6623451585043702e-03 +8.4568111944829202e-02 1.2110693157768220e-04 4.7754617500394554e-06 3.8281278097841947e-03 +8.8396239880664793e-02 9.9505093878630215e-05 4.0539081677181128e-06 4.0014149114300773e-03 +9.2397654923852213e-02 8.3763797619041118e-05 3.5131154399346878e-06 4.1825461659070334e-03 +9.6580201227480816e-02 6.9270593427439816e-05 3.0326968530589274e-06 4.3718766529241291e-03 +1.0095207802436074e-01 6.4672273984513564e-05 2.8085635602528419e-06 4.5697775255131327e-03 +1.0552185570034608e-01 5.3627377662719945e-05 2.4398029714583996e-06 4.7766367376164262e-03 +1.1029849259524611e-01 4.3083222210855904e-05 2.1582420369390944e-06 4.9928598046104873e-03 +1.1529135256425993e-01 3.4858542871744015e-05 1.8874428700938758e-06 5.2188705982558420e-03 +1.2051022333436112e-01 3.2890488899472567e-05 1.8031904743329652e-06 5.4551121776318587e-03 +1.2596533569161719e-01 3.1381101540978320e-05 1.7455877009764839e-06 5.7020476576852977e-03 +1.3166738353705773e-01 2.2520432924503166e-05 1.4823681789262068e-06 5.9601611170952851e-03 +1.3762754485040735e-01 2.0502560966788705e-05 1.3678725529143628e-06 6.2299585472344200e-03 +1.4385750360277988e-01 1.8808460294492775e-05 1.2812961563002496e-06 6.5119688440863164e-03 +1.5036947266129028e-01 1.7777338689582184e-05 1.2232631944275082e-06 6.8067448450640951e-03 +1.5717621773048474e-01 1.4261716881208267e-05 1.1053710210878717e-06 7.1148644127623072e-03 +1.6429108237752310e-01 1.4122607450751436e-05 1.0741656554637186e-06 7.4369315677668630e-03 +1.7172801419017092e-01 1.3435883283391740e-05 1.0350681594460688e-06 7.7735776727436293e-03 +1.7950159211888050e-01 1.1349078769729003e-05 9.8706932468810706e-07 8.1254626701269400e-03 +1.8762705505656013e-01 1.0438042773581391e-05 9.5968138912711215e-07 8.4932763758342970e-03 +1.9612033171205839e-01 9.4228847859467391e-06 9.5504634962296442e-07 8.8777398315434061e-03 +2.0499807183592528e-01 1.0403057822366863e-05 1.0476675496525892e-06 9.2796067181824624e-03 +2.1427767885966370e-01 9.2982957336217477e-06 1.1061063274562501e-06 9.6996648334046250e-03 +2.2397734401245589e-01 6.9252828969103226e-06 1.0990870540122200e-06 1.0138737635943040e-02 +2.3411608198224410e-01 8.5110906998799596e-06 1.2869226555654373e-06 1.0597685859873848e-02 +2.4471376819107526e-01 9.5259526376142547e-06 1.5285021985662934e-06 1.1077409201951766e-02 +2.5579117775778049e-01 6.7529700706883579e-06 1.4379485329066072e-06 1.1578848085325898e-02 +2.6737002622437112e-01 7.1240611130925426e-06 1.5166508449663157e-06 1.2102985503093364e-02 +2.7947301212598780e-01 5.9716337438467617e-06 1.5442067243973891e-06 1.2650848945304665e-02 +2.9212386148785568e-01 5.7341096291047458e-06 1.6263758970481508e-06 1.3223512413198467e-02 +3.0534737433647385e-01 6.9752629156982645e-06 1.8626841271634412e-06 1.3822098524614296e-02 +3.1916947331621792e-01 6.0468934312149525e-06 1.8715649046179617e-06 1.4447780714710574e-02 +3.3099772990242848e-01 6.6623605997798478e-06 2.6078953534499003e-06 1.4983208039947250e-02 diff --git a/tests/test_data/polref_data.ort b/tests/test_data/polref_data.ort new file mode 100644 index 00000000..2642b456 --- /dev/null +++ b/tests/test_data/polref_data.ort @@ -0,0 +1,280 @@ +# # ORSO reflectivity data file | 1.1 standard | YAML encoding | https://www.reflectometry.org/ +# # Mantid@ISIS output may not be fully ORSO compliant +# data_source: +# owner: +# name: null +# affiliation: null +# experiment: +# title: null +# instrument: POLREF +# start_date: 2022-07-25T14:19:01 +# probe: neutron +# facility: ISIS +# proposalID: '2210369' +# doi: 10.5286/ISIS.E.RB2210369 +# sample: +# name: L5 d-dod restart th=0.400 +# measurement: +# instrument_settings: +# incident_angle: null +# wavelength: null +# polarization: po +# data_files: [] +# reduction: +# software: {name: Mantid, version: 6.11.20250128.1155.dev227} +# timestamp: 2025-02-07T09:09:51+00:00 +# creator: +# name: SaveISISReflectometryORSO +# affiliation: Mantid +# data_set: Stitched po +# columns: +# - name: Qz +# unit: 1/angstrom +# physical_quantity: normal_wavevector_transfer +# - name: R +# physical_quantity: reflectivity +# - error_of: R +# error_type: uncertainty +# value_is: sigma +# - error_of: Qz +# error_type: resolution +# # Qz (1/angstrom) R sR sQz +8.9073628533901002e-03 9.0887593337734229e-01 1.6915130152893582e-01 2.7003739373594499e-04 +9.1774002947621995e-03 1.1226787260627373e+00 2.0048749082146064e-01 2.7822390281606981e-04 +9.4556242466585748e-03 8.8440556760038191e-01 1.0324795667430590e-01 2.8665859578655070e-04 +9.7422828930133574e-03 8.2424627510256443e-01 9.4158785887234850e-02 2.9534899664117157e-04 +1.0037631941755798e-02 9.0445426688136088e-01 9.0695457400728902e-02 3.0430285747265717e-04 +1.0341934852909237e-02 8.3282135233798993e-01 7.7381179628112667e-02 3.1352816538776700e-04 +1.0655463073605185e-02 7.4245185465531027e-01 6.1153010975952785e-02 3.2303314963202950e-04 +1.0978496280222128e-02 7.8099948558201449e-01 5.9035760503453827e-02 3.3282628893047009e-04 +1.1311322627865078e-02 9.2574737993193290e-01 6.0011391892057793e-02 3.4291631905088328e-04 +1.1654239007408383e-02 9.2312111778354744e-01 5.6018808629526531e-02 3.5331224059639404e-04 +1.2007551310331096e-02 8.0224362538000626e-01 4.5753199784791261e-02 3.6402332703425958e-04 +1.2371574701581175e-02 8.7344208065561602e-01 4.4793833988718772e-02 3.7505913296807521e-04 +1.2746633900711847e-02 8.0883901498066402e-01 4.0130195776090116e-02 3.8642950266076055e-04 +1.3133063471541005e-02 8.8120968307686365e-01 3.9758596008382330e-02 3.9814457881593140e-04 +1.3531208120591942e-02 8.2532824523051795e-01 3.5749118725398890e-02 4.1021481162548947e-04 +1.3941423004581694e-02 8.5866228061118122e-01 3.4684505755846459e-02 4.2265096809149960e-04 +1.4364074047231265e-02 8.0201159537604749e-01 3.1028170500932213e-02 4.3546414163067251e-04 +1.4799538265680328e-02 8.1848070336221501e-01 2.9592954364459866e-02 4.4866576197001795e-04 +1.5248204106797579e-02 8.0911271220046710e-01 2.7771918659379710e-02 4.6226760534249676e-04 +1.5710471793686752e-02 7.7414413719774400e-01 2.5615973343028852e-02 4.7628180499176634e-04 +1.6186753682697383e-02 7.1092211263439864e-01 2.3148518197099371e-02 4.9072086199539048e-04 +1.6677474631258765e-02 7.1813750406736809e-01 2.2707938730658295e-02 5.0559765641616696e-04 +1.7183072376865283e-02 7.0143398297518966e-01 2.1327296978929162e-02 5.2092545879152332e-04 +1.7703997927551063e-02 6.9735217241489345e-01 1.9580312856055281e-02 5.3671794197122360e-04 +1.8240715964202434e-02 6.7933790204506295e-01 1.8360662487587411e-02 5.5298919331395386e-04 +1.8793705255066878e-02 6.6609783568071468e-01 1.8169003310533775e-02 5.6975372725365854e-04 +1.9363459082828383e-02 6.3964017772147452e-01 1.7260786351534191e-02 5.8702649824684183e-04 +1.9950485684630093e-02 6.1375241362123667e-01 1.6461242952316310e-02 6.0482291411238288e-04 +2.0555308705436731e-02 6.0439525343546696e-01 1.5853903018798018e-02 6.2315884977576111e-04 +2.1178467665141316e-02 5.3794922090475972e-01 1.4720654371091581e-02 6.4205066142995716e-04 +2.1820518439832719e-02 5.4103195552402294e-01 1.4849023029720380e-02 6.6151520112565671e-04 +2.2482033757653480e-02 4.6847838327252783e-01 1.2809632148943867e-02 6.8156983180377444e-04 +2.3163603709690110e-02 4.2212051353156987e-01 1.1825160097211084e-02 7.0223244278370739e-04 +2.3865836276351676e-02 3.9101238542503014e-01 1.0949722230284452e-02 7.2352146572113275e-04 +2.4589357869706174e-02 3.5522289656360861e-01 1.0126335668350599e-02 7.4545589104958634e-04 +2.5334813892258487e-02 3.0345622365528030e-01 9.0602953071475811e-03 7.6805528492048674e-04 +2.6102869312668364e-02 2.4934084187838049e-01 7.8748408360383715e-03 7.9133980665671674e-04 +2.6894209258921997e-02 2.2736699538637861e-01 7.3588175937197124e-03 8.1533022673533110e-04 +2.7709539629486288e-02 1.8897226879345089e-01 6.4821507274788149e-03 8.4004794531543229e-04 +2.8549587722991033e-02 1.4480189036522836e-01 5.4882952525141309e-03 8.6551501132774080e-04 +2.9415102887000624e-02 1.0616778556796427e-01 4.5313975178576183e-03 8.9175414214288842e-04 +3.0306857186454095e-02 7.5583414731144841e-02 3.7613337837699608e-03 9.1878874383597971e-04 +3.1225646092369715e-02 5.3715122126233757e-02 3.0902647349597741e-03 9.4664293206549882e-04 +3.2172289191428498e-02 2.6012248928840017e-02 1.9879248749265035e-03 9.7534155358518465e-04 +3.3147630917069570e-02 1.5764446738063070e-02 1.4601538402085269e-03 1.0049102084080646e-03 +3.4152541302749598e-02 7.6108329101017506e-03 9.1453945632513796e-04 1.0353752726424174e-03 +3.5187916758038201e-02 2.1483574535293938e-03 4.0432029849194590e-04 1.0667639220200377e-03 +3.6254680868241559e-02 4.4350862186645033e-04 1.5659217072865191e-04 1.0991041561377848e-03 +3.7353785218267668e-02 1.1369658750427084e-03 2.6547494517768755e-04 1.1324248234340464e-03 +3.8486210241467991e-02 3.1005103601512785e-03 5.2756577778690175e-04 1.1667556469223920e-03 +3.9652966094212830e-02 5.4389386941642607e-03 8.0777357376523684e-04 1.2021272507053750e-03 +4.0855093556980394e-02 4.9146554819655200e-03 8.2435104927510729e-04 1.2385711872921290e-03 +4.2093664962763636e-02 7.6264127087991565e-03 1.0891290865760806e-03 1.2761199657441351e-03 +4.3369785153622706e-02 9.6550210158050289e-03 1.7646727218769531e-03 1.3148070806742566e-03 +4.4684592466236531e-02 9.5868793248111289e-03 1.7410180011689883e-03 1.3546670421249200e-03 +4.6039259747332542e-02 9.6720895483684288e-03 1.7493870925176850e-03 1.3957354063520828e-03 +4.7434995399900419e-02 7.9844946529962421e-03 1.4481283567128371e-03 1.4380488075424612e-03 +4.8873044461122998e-02 6.5204672130299377e-03 1.1872902189183350e-03 1.4816449904922972e-03 +5.0354689712986032e-02 5.7895931151187678e-03 1.0568956724687805e-03 1.5265628442768272e-03 +5.1881252826557367e-02 3.9382731472159781e-03 5.0287044509308325e-04 1.5728424369404785e-03 +5.3454095540956342e-02 2.0770917693003128e-03 2.8770354823474189e-04 1.6205250512387407e-03 +5.5074620878065056e-02 9.2780854738596090e-04 1.4483316619671787e-04 1.6696532214635958e-03 +5.6744274394065125e-02 6.0358175551852129e-04 1.1060552577888949e-04 1.7202707713853572e-03 +5.8464545468916190e-02 1.0539254125228068e-04 3.4408891608503737e-05 1.7724228533447571e-03 +6.0236968634926571e-02 1.2415969418838420e-04 3.6583370053329632e-05 1.8261559885301610e-03 +6.2063124945601206e-02 4.6923158357974591e-04 7.9473018790502848e-05 1.8815181084758353e-03 +6.3944643385987709e-02 7.4745715042814377e-04 1.0495586248096887e-04 1.9385585978182807e-03 +6.5883202325778933e-02 1.0462181386669811e-03 1.3244204326663984e-04 1.9973283383487796e-03 +6.7880531016467960e-02 1.1183665888426710e-03 1.3165449767907851e-04 2.0578797544014461e-03 +6.9938411133891279e-02 1.1597434234529912e-03 1.2913570191912862e-04 2.1202668596172749e-03 +7.2058678367535878e-02 9.5439901337071977e-04 1.0714514486996628e-04 2.1845453051258911e-03 +7.4243224058028190e-02 6.7265222225282219e-04 7.9275939256564631e-05 2.2507724291879944e-03 +7.6493996884265433e-02 4.5192009046652308e-04 5.8690506198151980e-05 2.3190073083427677e-03 +7.8813004601694492e-02 2.1750399622788729e-04 3.4731397585933621e-05 2.3893108101058907e-03 +8.1202315833288602e-02 8.0805801270432352e-05 1.8174127970710786e-05 2.4617456472651438e-03 +8.3664061914819898e-02 4.4318797575035088e-05 1.2437516599620603e-05 2.5363764338220633e-03 +8.6200438796073420e-02 7.2047310121355892e-05 1.6072983527759074e-05 2.6132697426295213e-03 +8.8813708999698815e-02 1.5053928587452662e-04 2.3842748216387901e-05 2.6924941647766694e-03 +9.1506203639447017e-02 1.4749793903024274e-04 2.2832605294616991e-05 2.7741203707742040e-03 +9.4280324499592089e-02 1.6479304772892630e-04 2.4124935376514984e-05 2.8582211735945339e-03 +9.7138546177393342e-02 1.3616115264430154e-04 2.0813688844837540e-05 2.9448715936230920e-03 +1.0008341829050879e-01 8.3442231918552727e-05 1.4925263045353322e-05 3.0341489255787226e-03 +1.0311756775132892e-01 5.5352779608665989e-05 1.1234933048069166e-05 3.1261328074628381e-03 +1.0624370111025966e-01 4.3297176893964485e-05 9.8557339239858429e-06 3.2209052915988540e-03 +1.0946460697004481e-01 3.2476538612370273e-05 8.2403052656833020e-06 3.3185509178252728e-03 +1.1278315847328163e-01 4.6889470631079536e-05 9.9601073630652286e-06 3.4191567889077009e-03 +1.1620231586534835e-01 6.6304737778755183e-05 1.2063314535643178e-05 3.5228126482370740e-03 +1.1972512913502992e-01 4.3540573509142195e-05 9.4160954763312928e-06 3.6296109598833943e-03 +1.2335474073519767e-01 3.4184742025560879e-05 8.3414744087159250e-06 3.7396469910763999e-03 +1.2709438838596940e-01 2.4443191804319148e-05 7.0327103988181833e-06 3.8530188971867257e-03 +1.3094740796285093e-01 4.7925519948322068e-05 1.0478781087196047e-05 3.9698278092833812e-03 +1.3491723647243486e-01 4.8856622278712182e-05 1.0370119205928137e-05 4.0901779243456299e-03 +1.3900741511831149e-01 3.5764847136079952e-05 8.5108334092800251e-06 4.2141765982097552e-03 +1.4322159245992633e-01 3.7240860790924077e-05 8.4825890722675456e-06 4.3419344413336185e-03 +1.4756352766720227e-01 4.7102791494915254e-05 9.4017101966586438e-06 4.4735654174644377e-03 +1.5203709387382952e-01 3.8081345805327017e-05 8.1130401885041800e-06 4.6091869452977909e-03 +1.5664628163221450e-01 4.4534562078192710e-05 8.7424511989661173e-06 4.7489200032185411e-03 +1.6139520247316999e-01 3.4182877481079394e-05 7.4041556219955492e-06 4.8928892372171167e-03 +1.6628809257352103e-01 4.1220795231212649e-05 8.0867056607222419e-06 5.0412230720773788e-03 +1.7132931653489930e-01 2.6861206438957707e-05 6.3101783457612563e-06 5.1940538259353146e-03 +1.7652337127709572e-01 1.5830226140932151e-05 4.7957769551587520e-06 5.3515178283106892e-03 +1.8187489004944507e-01 2.2956911225368183e-05 5.7264779969673984e-06 5.5137555417169868e-03 +1.8738864656382037e-01 2.3367830160436411e-05 5.6807511235005174e-06 5.6809116869580914e-03 +1.9306955925292410e-01 2.3791120952873547e-05 5.6771396964490183e-06 5.8531353722234983e-03 +1.9892269565767451e-01 2.1169000636954526e-05 5.3750078616094824e-06 6.0305802260971920e-03 +2.0495327694760088e-01 2.3847323892437319e-05 5.9384559026736575e-06 6.2134045345988579e-03 +2.1116668257828020e-01 2.2026274209707158e-05 5.9155634983381102e-06 6.4017713823796580e-03 +2.1756845508996930e-01 2.1539281391594201e-05 6.0798707914971173e-06 6.5958487981985277e-03 +2.2416430505171364e-01 2.8157952085119461e-05 7.3965106692315626e-06 6.7958099048087616e-03 +2.3096011615534257e-01 1.3474723879396033e-05 5.2537353422702279e-06 7.0018330733885963e-03 +2.3796195046389496e-01 1.8304890445269731e-05 6.6791102423865306e-06 7.2141020826535325e-03 +2.4517605381915777e-01 2.5666054789962143e-05 8.3955755304817827e-06 7.4328062827923513e-03 +2.5041447932533889e-01 2.1631060534838146e-05 1.2612156932855271e-05 7.5916154381228396e-03 +# data_set: Stitched mo +# columns: +# - name: Qz +# unit: 1/angstrom +# physical_quantity: normal_wavevector_transfer +# - name: R +# physical_quantity: reflectivity +# - error_of: R +# error_type: uncertainty +# value_is: sigma +# - error_of: Qz +# error_type: resolution +# # Qz (1/angstrom) R sR sQz +8.9073628533901002e-03 1.0670858962516752e+00 1.2008156296467595e-01 2.7003739373594499e-04 +9.1774002947621995e-03 9.4962989765898975e-01 8.7142174901504332e-02 2.7822390281606981e-04 +9.4556242466585748e-03 9.3153857606445545e-01 6.6994757509359362e-02 2.8665859578655070e-04 +9.7422828930133574e-03 8.7525080520095944e-01 5.6272007131945842e-02 2.9534899664117157e-04 +1.0037631941755798e-02 8.3723818920300763e-01 4.8447543725354508e-02 3.0430285747265717e-04 +1.0341934852909237e-02 9.5330288467907542e-01 5.0450753567442032e-02 3.1352816538776700e-04 +1.0655463073605185e-02 8.2229045183847060e-01 3.7320492661872075e-02 3.2303314963202950e-04 +1.0978496280222128e-02 8.3037365765237714e-01 3.3815542480939598e-02 3.3282628893047009e-04 +1.1311322627865078e-02 8.6012741152446859e-01 3.3370908167835327e-02 3.4291631905088328e-04 +1.1654239007408383e-02 8.3886309597745146e-01 3.0271485780981169e-02 3.5331224059639404e-04 +1.2007551310331096e-02 8.2685360161716737e-01 2.6774779347258568e-02 3.6402332703425958e-04 +1.2371574701581175e-02 8.1926058551459513e-01 2.5017832245514387e-02 3.7505913296807521e-04 +1.2746633900711847e-02 8.1036273242663415e-01 2.3038463587112083e-02 3.8642950266076055e-04 +1.3133063471541005e-02 8.4080121411250497e-01 2.2290812287854761e-02 3.9814457881593140e-04 +1.3531208120591942e-02 8.1883584775935025e-01 2.0486306545512638e-02 4.1021481162548947e-04 +1.3941423004581694e-02 7.9610109910013549e-01 1.8782933470833395e-02 4.2265096809149960e-04 +1.4364074047231265e-02 6.6822727593349651e-01 1.5661306620558462e-02 4.3546414163067251e-04 +1.4799538265680328e-02 3.4840813225869610e-01 9.6332799281835992e-03 4.4866576197001795e-04 +1.5248204106797579e-02 1.6648263561724641e-01 6.0214017721574153e-03 4.6226760534249676e-04 +1.5710471793686752e-02 9.8461690982627498e-02 4.4721310635238076e-03 4.7628180499176634e-04 +1.6186753682697383e-02 7.2141256050329269e-02 3.6711646616899899e-03 4.9072086199539048e-04 +1.6677474631258765e-02 5.0238591311803318e-02 3.1623461025957721e-03 5.0559765641616696e-04 +1.7183072376865283e-02 4.1131315856665636e-02 2.8560482077167383e-03 5.2092545879152332e-04 +1.7703997927551063e-02 3.3916464957877174e-02 2.5285792500553206e-03 5.3671794197122360e-04 +1.8240715964202434e-02 2.8879417360527085e-02 2.3898896629411495e-03 5.5298919331395386e-04 +1.8793705255066878e-02 2.4477564094111958e-02 2.2838873810085403e-03 5.6975372725365854e-04 +1.9363459082828383e-02 2.1757069047748108e-02 2.1653479963211568e-03 5.8702649824684183e-04 +1.9950485684630093e-02 1.8333558088972472e-02 2.0000763007040658e-03 6.0482291411238288e-04 +2.0555308705436731e-02 1.7156769092434371e-02 1.8154115115907221e-03 6.2315884977576111e-04 +2.1178467665141316e-02 1.6984024321860955e-02 1.6813448019959961e-03 6.4205066142995716e-04 +2.1820518439832719e-02 1.3659750778209202e-02 1.6527103590353006e-03 6.6151520112565671e-04 +2.2482033757653480e-02 1.0313552915708355e-02 1.3704172161675958e-03 6.8156983180377444e-04 +2.3163603709690110e-02 1.0220072555963879e-02 1.2659811754965615e-03 7.0223244278370739e-04 +2.3865836276351676e-02 8.3500788268484269e-03 1.1122960753635683e-03 7.2352146572113275e-04 +2.4589357869706174e-02 8.5172005898136033e-03 1.0449221024012624e-03 7.4545589104958634e-04 +2.5334813892258487e-02 7.4545395983401487e-03 9.3937147051564895e-04 7.6805528492048674e-04 +2.6102869312668364e-02 6.4078287877286548e-03 8.1184123114986888e-04 7.9133980665671674e-04 +2.6894209258921997e-02 4.6069659406121847e-03 6.8138689883212068e-04 8.1533022673533110e-04 +2.7709539629486288e-02 3.8882750630013486e-03 5.8043188284579632e-04 8.4004794531543229e-04 +2.8549587722991033e-02 2.6985004554648771e-03 4.8191715874039762e-04 8.6551501132774080e-04 +2.9415102887000624e-02 1.8430160627458205e-03 3.7667840289336366e-04 8.9175414214288842e-04 +3.0306857186454095e-02 1.5590621481933625e-03 3.1536498489852179e-04 9.1878874383597971e-04 +3.1225646092369715e-02 9.7799985984854004e-04 2.4198995013006955e-04 9.4664293206549882e-04 +3.2172289191428498e-02 5.7571719458459584e-04 1.6138372375388107e-04 9.7534155358518465e-04 +3.3147630917069570e-02 3.0648633854844093e-04 1.0708524165671934e-04 1.0049102084080646e-03 +3.4152541302749598e-02 4.3479881619380814e-04 1.1840561445942628e-04 1.0353752726424174e-03 +3.5187916758038201e-02 1.2642748464524511e-04 5.4347537841572826e-05 1.0667639220200377e-03 +3.6254680868241559e-02 5.7267072032025729e-05 2.9766608072309166e-05 1.0991041561377848e-03 +3.7353785218267668e-02 2.8719878585394538e-05 2.3402067503751372e-05 1.1324248234340464e-03 +3.8486210241467991e-02 6.3856577094225603e-05 3.6650312474176338e-05 1.1667556469223920e-03 +3.9652966094212830e-02 1.1780791133707876e-04 6.0542696652367457e-05 1.2021272507053750e-03 +4.0855093556980394e-02 -2.7561477292326609e-05 1.6824879036121416e-05 1.2385711872921290e-03 +4.2093664962763636e-02 1.3583476260999990e-04 6.7060394076843164e-05 1.2761199657441351e-03 +4.3369785153622706e-02 1.1117840125963014e-04 7.0105266424505918e-05 1.3148070806742566e-03 +4.4684592466236531e-02 1.0069564729279244e-04 6.3439502418097726e-05 1.3546670421249200e-03 +4.6039259747332542e-02 9.0031032687062359e-05 5.7548301737924216e-05 1.3957354063520828e-03 +4.7434995399900419e-02 6.1985406885861453e-05 4.1646448692310622e-05 1.4380488075424612e-03 +4.8873044461122998e-02 8.2404042400593066e-05 4.9045376471814276e-05 1.4816449904922972e-03 +5.0354689712986032e-02 8.4749115118562901e-05 4.9293188282131216e-05 1.5265628442768272e-03 +5.1881252826557367e-02 6.2650018367993478e-05 3.4469797002999267e-05 1.5728424369404785e-03 +5.3454095540956342e-02 5.8662331561748551e-05 2.5690782928813255e-05 1.6205250512387407e-03 +5.5074620878065056e-02 7.4538486089252600e-05 2.6850560357222797e-05 1.6696532214635958e-03 +5.6744274394065125e-02 8.5979545710191660e-05 2.8207487991793312e-05 1.7202707713853572e-03 +5.8464545468916190e-02 5.2155625968060939e-05 1.6909293893973021e-05 1.7724228533447571e-03 +6.0236968634926571e-02 1.1007423206402172e-04 2.5209226947706466e-05 1.8261559885301610e-03 +6.2063124945601206e-02 6.6128438738162054e-05 1.9532985620500440e-05 1.8815181084758353e-03 +6.3944643385987709e-02 1.2308255901604304e-04 2.6325585393513821e-05 1.9385585978182807e-03 +6.5883202325778933e-02 7.9545385602833611e-05 2.0613746789859539e-05 1.9973283383487796e-03 +6.7880531016467960e-02 9.0309142698602519e-05 1.9613392774729984e-05 2.0578797544014461e-03 +6.9938411133891279e-02 7.1851468784512877e-05 1.6663878734202349e-05 2.1202668596172749e-03 +7.2058678367535878e-02 9.0698857939866968e-05 1.7735301258986228e-05 2.1845453051258911e-03 +7.4243224058028190e-02 6.9817095727979620e-05 1.3782378321005236e-05 2.2507724291879944e-03 +7.6493996884265433e-02 6.6313646249506166e-05 1.2939638842021612e-05 2.3190073083427677e-03 +7.8813004601694492e-02 6.1691397840550884e-05 1.1625664488145388e-05 2.3893108101058907e-03 +8.1202315833288602e-02 8.5274834410591210e-05 1.3828230644479231e-05 2.4617456472651438e-03 +8.3664061914819898e-02 7.4479812116522661e-05 1.2136537954696514e-05 2.5363764338220633e-03 +8.6200438796073420e-02 6.0017718605551249e-05 1.0050358600460045e-05 2.6132697426295213e-03 +8.8813708999698815e-02 6.1006617660096611e-05 9.9165487804179550e-06 2.6924941647766694e-03 +9.1506203639447017e-02 5.1415244137436146e-05 8.6149270477423768e-06 2.7741203707742040e-03 +9.4280324499592089e-02 5.3652807453248755e-05 8.5383632511397800e-06 2.8582211735945339e-03 +9.7138546177393342e-02 5.6032780618769157e-05 8.7091459590563503e-06 2.9448715936230920e-03 +1.0008341829050879e-01 5.8487802982916058e-05 8.7200795917553610e-06 3.0341489255787226e-03 +1.0311756775132892e-01 6.2470831650059830e-05 8.8816084422123136e-06 3.1261328074628381e-03 +1.0624370111025966e-01 4.2551230618019520e-05 6.5432416959459872e-06 3.2209052915988540e-03 +1.0946460697004481e-01 3.8931074187450295e-05 6.0664853533092915e-06 3.3185509178252728e-03 +1.1278315847328163e-01 3.3256978624285146e-05 5.3372415293044487e-06 3.4191567889077009e-03 +1.1620231586534835e-01 3.2623497888828835e-05 5.2150401401756352e-06 3.5228126482370740e-03 +1.1972512913502992e-01 3.7920110086327935e-05 5.7272785377957491e-06 3.6296109598833943e-03 +1.2335474073519767e-01 3.4991544743109153e-05 5.4148106849537324e-06 3.7396469910763999e-03 +1.2709438838596940e-01 4.4050919915844746e-05 6.3897512683065074e-06 3.8530188971867257e-03 +1.3094740796285093e-01 3.6000138162548935e-05 5.5294013544256396e-06 3.9698278092833812e-03 +1.3491723647243486e-01 3.2459947162948383e-05 5.1000388934412083e-06 4.0901779243456299e-03 +1.3900741511831149e-01 3.1454228132660692e-05 4.8521758587117044e-06 4.2141765982097552e-03 +1.4322159245992633e-01 2.8207476639084297e-05 4.4162458078829776e-06 4.3419344413336185e-03 +1.4756352766720227e-01 3.1147583127163118e-05 4.7065606034551289e-06 4.4735654174644377e-03 +1.5203709387382952e-01 3.2811924970281529e-05 4.8348188626655442e-06 4.6091869452977909e-03 +1.5664628163221450e-01 2.9226448911108225e-05 4.3828046467620018e-06 4.7489200032185411e-03 +1.6139520247316999e-01 2.7960397129458252e-05 4.1913111897447146e-06 4.8928892372171167e-03 +1.6628809257352103e-01 2.4926117568011016e-05 3.8177166508461892e-06 5.0412230720773788e-03 +1.7132931653489930e-01 2.7279748169898713e-05 4.0545725358244537e-06 5.1940538259353146e-03 +1.7652337127709572e-01 2.5188795220300538e-05 3.8179902904681160e-06 5.3515178283106892e-03 +1.8187489004944507e-01 2.6100402964234576e-05 3.8931257872688327e-06 5.5137555417169868e-03 +1.8738864656382037e-01 2.5858998669611182e-05 3.8387508562371303e-06 5.6809116869580914e-03 +1.9306955925292410e-01 1.9739235057656633e-05 3.1082902002828556e-06 5.8531353722234983e-03 +1.9892269565767451e-01 1.9310919002135252e-05 3.0777465185036379e-06 6.0305802260971920e-03 +2.0495327694760088e-01 1.7618139822179594e-05 2.9370998382313292e-06 6.2134045345988579e-03 +2.1116668257828020e-01 1.8877470118067046e-05 3.1445035034957970e-06 6.4017713823796580e-03 +2.1756845508996930e-01 1.9271114689917938e-05 3.2773550000980402e-06 6.5958487981985277e-03 +2.2416430505171364e-01 2.3473316974067762e-05 3.8969472402146087e-06 6.7958099048087616e-03 +2.3096011615534257e-01 2.1262972703188473e-05 3.7374945428798441e-06 7.0018330733885963e-03 +2.3796195046389496e-01 1.7841078199321392e-05 3.4817980260680240e-06 7.2141020826535325e-03 +2.4517605381915777e-01 1.6228401364786267e-05 3.4185602490117741e-06 7.4328062827923513e-03 +2.5041447932533889e-01 1.4025306184514627e-05 4.6723553510419161e-06 7.5916154381228396e-03 diff --git a/tests/test_data/prist.json b/tests/test_data/prist.json new file mode 100644 index 00000000..1f47f007 --- /dev/null +++ b/tests/test_data/prist.json @@ -0,0 +1 @@ +{"name": "", "calculation": "normal", "model": "standard layers", "geometry": "air/substrate", "absorption": false, "parameters": [{"name": "Substrate Roughness", "min": 1.0, "value": 3.0, "max": 5.0, "fit": true, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "Al2O3 Thickness", "min": 20.0, "value": 20.0, "max": 20.0, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "Al2O3 Roughness", "min": 3.0, "value": 3.0, "max": 3.0, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "Al2O3 SLD", "min": 5.715275837467511, "value": 5.715275837467511, "max": 5.715275837467511, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "Ti0.27Co0.73 Thickness", "min": 93.0, "value": 93.0, "max": 93.0, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "Ti0.27Co0.73 Roughness", "min": 3.0, "value": 3.0, "max": 3.0, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "Ti0.27Co0.73 SLD", "min": 0.6720584953375607, "value": 0.6720584953375607, "max": 0.6720584953375607, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "bulk_in": [{"name": "SLD Air", "min": 0.0, "value": 0.0, "max": 0.0, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "vacuum SLD", "min": 0.0, "value": 0.0, "max": 0.0, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "bulk_out": [{"name": "SLD D2O", "min": 6.2e-06, "value": 6.35e-06, "max": 6.35e-06, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "Si SLD", "min": 2.07370547828562, "value": 2.07370547828562, "max": 2.07370547828562, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "scalefactors": [{"name": "Scalefactor 1", "min": 0.02, "value": 0.23, "max": 0.25, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "domain_ratios": [], "background_parameters": [{"name": "Background Param 1", "min": 1e-07, "value": 1e-06, "max": 1e-05, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "backgrounds": [{"name": "Background 1", "type": "constant", "source": "Background Param 1", "value_1": "", "value_2": "", "value_3": "", "value_4": "", "value_5": ""}], "resolution_parameters": [{"name": "Resolution Param 1", "min": 0.01, "value": 0.03, "max": 0.05, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "resolutions": [{"name": "Resolution 1", "type": "constant", "source": "Resolution Param 1", "value_1": "", "value_2": "", "value_3": "", "value_4": "", "value_5": ""}, {"name": "prist4 Resolution", "type": "data", "source": "", "value_1": "", "value_2": "", "value_3": "", "value_4": "", "value_5": ""}], "custom_files": [], "data": [{"name": "Simulation", "data": [], "data_range": [], "simulation_range": [0.005, 0.7]}, {"name": "prist4", "data": [[0.0021999999999999997, 0.004724119389721505, 0.004724119389721505, 0.00019999999999999987], [0.0026, 0.0, 0.0, 0.0002000000000000001], [0.003, 0.0049441079014990305, 0.0028632759811688313, 0.0002000000000000001], [0.0034000000000000002, 0.00539571466421478, 0.0027033018099334193, 0.00019999999999999987], [0.0038, 0.011948517768746966, 0.0037903477990210636, 0.0002000000000000001], [0.004200000000000001, 0.016302332669940297, 0.003972317564845323, 0.0002000000000000001], [0.0046, 0.02265216487165058, 0.0045763672802481776, 0.0002000000000000001], [0.005, 0.023020814468949415, 0.00425372711337262, 0.00019999999999999966], [0.0054, 0.027305557750665344, 0.004428700971127359, 0.0002000000000000001], [0.0058, 0.019457945835850306, 0.0037817426451169783, 0.0002000000000000001], [0.006200000000000001, 0.027645506109865266, 0.004267993991409073, 0.0002000000000000001], [0.0066, 0.024223034347324195, 0.0037655052701117517, 0.0002000000000000001], [0.007, 0.028408308819418325, 0.0037377941755602716, 0.00019999999999999966], [0.0074, 0.057460495308053604, 0.0052154049057105455, 0.0002000000000000001], [0.0078, 0.1489883351950982, 0.00754789840356179, 0.0002000000000000001], [0.008199999999999999, 0.3520480929443021, 0.011146891694516669, 0.00019999999999999966], [0.0086, 0.5317657760789548, 0.01351725179531962, 0.00019999999999999966], [0.009, 0.7914500646501588, 0.016276277463585134, 0.00020000000000000052], [0.009399999999999999, 0.9680331047846104, 0.01782748799306378, 0.00019999999999999966], [0.0098, 1.0324643310179094, 0.018104900945963596, 0.00020000000000000052], [0.010204081632653062, 0.6287661683321234, 0.013873373556929145, 0.00020408163265306107], [0.010620574760516453, 0.3506955915110479, 0.010136613757789808, 0.00021241149521033023], [0.011054067607884473, 0.23477751708069897, 0.008109962639928676, 0.000221081352157689], [0.011505254040859348, 0.18964302712880826, 0.007180573014831645, 0.00023010508081718756], [0.011974856246608712, 0.14285208497806512, 0.006016224926747713, 0.00023949712493217482], [0.012463625889327434, 0.12188457497836602, 0.005435279585343197, 0.00024927251778654805], [0.012972345313381616, 0.10530945504618572, 0.005027517945960155, 0.00025944690626763297], [0.013501828795560456, 0.08038795087657985, 0.004197556276825506, 0.0002700365759112089], [0.014052923848440476, 0.07313672279549625, 0.003958200398418697, 0.00028105847696880976], [0.01462651257694825, 0.06129841978151465, 0.0034783001152817426, 0.0002925302515389659], [0.01522351309029308, 0.06240905936586468, 0.003479800062460076, 0.000304470261805862], [0.015844880971529533, 0.05651280096554304, 0.0032223775371921573, 0.00031689761943059103], [0.016491610807102167, 0.05044073793552524, 0.00290210672478378, 0.0003298322161420439], [0.017164737778820625, 0.0502775250441711, 0.002825286449304508, 0.00034329475557641313], [0.0178653393208133, 0.05168970509722787, 0.002811814341605395, 0.0003573067864162654], [0.018594536844111803, 0.0530076187705834, 0.0027685413804410695, 0.00037189073688223724], [0.019353497531626573, 0.0490707566771454, 0.0025677593751218504, 0.00038706995063253133], [0.020143436206386842, 0.04687883170966378, 0.0024119133732668076, 0.0004028687241277376], [0.020965617276035284, 0.04919955377214455, 0.0024276503561561644, 0.0004193123455207056], [0.021821356756689787, 0.05204111270310913, 0.00245561515567379, 0.00043642713513379616], [0.022712024379411822, 0.04925178172610669, 0.0023335505076022252, 0.00045424048758823873], [0.02363904578265312, 0.04317260894774357, 0.00211385396560445, 0.0004727809156530611], [0.024603904794189984, 0.0383043276355005, 0.0019158755178575817, 0.0004920780958838009], [0.02560814580619774, 0.04444220010645997, 0.002018641932709427, 0.0005121629161239545], [0.026653376247267036, 0.039587001147536376, 0.0018488058581743547, 0.0005330675249453423], [0.027741269155318757, 0.036677858215866437, 0.0017473224966445143, 0.0005548253831063766], [0.028873565855535847, 0.037663512267048754, 0.0017682821318945074, 0.0005774713171107174], [0.030052078747598535, 0.036755569252809664, 0.0017350440273063527, 0.0006010415749519698], [0.03127869420668419, 0.03854639441776167, 0.0017965558626918197, 0.0006255738841336837], [0.032555375602875386, 0.032866785139061716, 0.0016217721152892931, 0.000651107512057509], [0.03388416644380907, 0.0315131968037535, 0.0016061232808323794, 0.0006776833288761816], [0.0352671936455972, 0.030280345918169513, 0.0015885947028228238, 0.0007053438729119448], [0.03670667093725423, 0.025036982048446406, 0.0014176844815086535, 0.0007341334187450851], [0.038204902404080934, 0.02083180456328542, 0.001280336546816776, 0.0007640980480816198], [0.03976428617567608, 0.019376976329704945, 0.0012712203272554497, 0.0007952857235135231], [0.04138731826447918, 0.016729675515039004, 0.0011715497338181137, 0.000827746365289584], [0.04307659656098854, 0.013996303090353096, 0.0010654383375290077, 0.0008615319312197701], [0.0448348249920493, 0.010621480384334052, 0.0009246807782300395, 0.0008966964998409904], [0.04666481784886764, 0.007820332463525126, 0.0008093102454836752, 0.000933296356977354], [0.04856950429167857, 0.0060428022894521575, 0.0007183835413384203, 0.0009713900858335685], [0.050551933038277694, 0.004095892971484393, 0.0005841670446995313, 0.0010110386607655557], [0.05261527724392169, 0.005111525161941947, 0.0006658003030884043, 0.0010523055448784409], [0.05476283958040829, 0.0020207116612746484, 0.0004143866059231477, 0.0010952567916081637], [0.05699805752246577, 0.001711568931414378, 0.00038529038925611664, 0.0011399611504493146], [0.05932450884991336, 0.0008496305883131249, 0.00027095330976641694, 0.001186490176998272], [0.06174591737439962, 0.0008142116035177235, 0.00027251395576638693, 0.0012349183474879948], [0.06426615889988532, 8.92042382623096e-05, 8.920423826322552e-05, 0.0012853231779977048], [0.06688926742641126, 9.339736346561163e-05, 9.339736346489978e-05, 0.0013377853485282282], [0.06961944160708111, 0.00040599169078880156, 0.0002030320824188672, 0.0013923888321416208], [0.07246105146859462, 0.0002183257352075823, 0.00015439324988622013, 0.0014492210293718943], [0.07541864540608828, 0.00012684339163879, 0.00012684339163797725, 0.001508372908121773], [0.07849695746347965, 0.0, 0.0, 0.001569939149269589], [0.08170091491096862, 0.0, 0.0, 0.0016340182982193738], [0.08503564613182449, 0.0004165748322677754, 0.00024090333523406435, 0.001700712922636495], [0.08850648883108263, 0.0, 0.0, 0.0017701297766216512], [0.09211899857929008, 0.0, 0.0, 0.001842379971585803], [0.0958789577049754, 0.0, 0.0, 0.0019175791540995135], [0.09979238455007644, 0.0, 0.0, 0.001995847691001529], [0.10386554310314079, 0.0, 0.0, 0.0020773108620628228]], "data_range": [0.0021999999999999997, 0.10386554310314079], "simulation_range": [0.0021999999999999997, 0.10386554310314079]}], "layers": [{"name": "Al2O3", "thickness": "Al2O3 Thickness", "SLD": "Al2O3 SLD", "roughness": "Al2O3 Roughness", "hydration": "", "hydrate_with": "bulk out"}, {"name": "Ti0.27Co0.73", "thickness": "Ti0.27Co0.73 Thickness", "SLD": "Ti0.27Co0.73 SLD", "roughness": "Ti0.27Co0.73 Roughness", "hydration": "", "hydrate_with": "bulk out"}], "domain_contrasts": [], "contrasts": [{"name": "Structural evolution of the CO2/Water interface", "data": "prist4", "background": "Background 1", "background_action": "add", "bulk_in": "vacuum SLD", "bulk_out": "Si SLD", "scalefactor": "Scalefactor 1", "resolution": "prist4 Resolution", "resample": false, "model": ["Al2O3", "Ti0.27Co0.73"]}]} \ No newline at end of file diff --git a/tests/test_data/prist5_10K_m_025.Rqz.ort b/tests/test_data/prist5_10K_m_025.Rqz.ort new file mode 100644 index 00000000..5b60b8fc --- /dev/null +++ b/tests/test_data/prist5_10K_m_025.Rqz.ort @@ -0,0 +1,124 @@ +# # ORSO reflectivity data file | 1.0 standard | YAML encoding | https://www.reflectometry.org/ +# data_source: +# owner: +# name: Artur Glavic +# affiliation: null +# contact: b'' +# experiment: +# title: Structural evolution of the CO2/Water interface +# instrument: Amor +# start_date: 2023-11-29T10:12:45 +# probe: neutron +# facility: SINQ@PSI +# proposalID: '20230368' +# sample: +# name: prist4 +# sample_parameters: +# tempMean: {magnitude: -9999.0} +# model: +# stack: vacuum | Al2O3 2 | Ti0.27Co0.73 9.3 | Si +# measurement: +# instrument_settings: +# incident_angle: {min: 0.0950000000000002, max: 1.495, unit: deg} +# wavelength: {min: 3.0, max: 12.0, unit: angstrom} +# mu: {magnitude: 0.25, unit: deg, comment: sample angle to referece direction} +# nu: {magnitude: 1.0450000000000002, unit: deg, comment: detector angle to referece +# direction} +# data_files: +# - file: raw/amor2023n000848.hdf +# timestamp: 2023-11-29T10:12:45 +# amor_monitor: 1792.443302905 +# scheme: angle- and energy-dispersive +# references: [] +# amor_monitor: 1792.443302905 +# reduction: +# software: {name: eos, version: '2.0'} +# timestamp: 2023-11-29T10:57:48.480339 +# computer: amor.psi.ch +# call: eos.py -a 0.04 -F 0.0093,0.0101 -n 848 prist5_10K_m_025 +# data_set: 0 +# columns: +# - {name: Qz, unit: 1/angstrom, physical_quantity: normal momentum transfer} +# - {name: R, unit: '', physical_quantity: specular reflectivity} +# - {error_of: R, error_type: uncertainty, value_is: sigma} +# - {error_of: Qz, error_type: resolution, value_is: sigma} +# # Qz (1/angstrom) R () sR sQz +2.1999999999999997e-03 4.7241193897215048e-03 4.7241193897215048e-03 1.9999999999999987e-04 +2.5999999999999999e-03 0.0000000000000000e+00 0.0000000000000000e+00 2.0000000000000009e-04 +3.0000000000000001e-03 4.9441079014990305e-03 2.8632759811688313e-03 2.0000000000000009e-04 +3.4000000000000002e-03 5.3957146642147798e-03 2.7033018099334193e-03 1.9999999999999987e-04 +3.8000000000000000e-03 1.1948517768746966e-02 3.7903477990210636e-03 2.0000000000000009e-04 +4.2000000000000006e-03 1.6302332669940297e-02 3.9723175648453228e-03 2.0000000000000009e-04 +4.5999999999999999e-03 2.2652164871650581e-02 4.5763672802481776e-03 2.0000000000000009e-04 +5.0000000000000001e-03 2.3020814468949415e-02 4.2537271133726200e-03 1.9999999999999966e-04 +5.4000000000000003e-03 2.7305557750665344e-02 4.4287009711273589e-03 2.0000000000000009e-04 +5.7999999999999996e-03 1.9457945835850306e-02 3.7817426451169783e-03 2.0000000000000009e-04 +6.2000000000000006e-03 2.7645506109865266e-02 4.2679939914090732e-03 2.0000000000000009e-04 +6.6000000000000000e-03 2.4223034347324195e-02 3.7655052701117517e-03 2.0000000000000009e-04 +7.0000000000000001e-03 2.8408308819418325e-02 3.7377941755602716e-03 1.9999999999999966e-04 +7.4000000000000003e-03 5.7460495308053604e-02 5.2154049057105455e-03 2.0000000000000009e-04 +7.7999999999999996e-03 1.4898833519509819e-01 7.5478984035617898e-03 2.0000000000000009e-04 +8.1999999999999990e-03 3.5204809294430212e-01 1.1146891694516669e-02 1.9999999999999966e-04 +8.6000000000000000e-03 5.3176577607895481e-01 1.3517251795319620e-02 1.9999999999999966e-04 +8.9999999999999993e-03 7.9145006465015877e-01 1.6276277463585134e-02 2.0000000000000052e-04 +9.3999999999999986e-03 9.6803310478461035e-01 1.7827487993063780e-02 1.9999999999999966e-04 +9.7999999999999997e-03 1.0324643310179094e+00 1.8104900945963596e-02 2.0000000000000052e-04 +1.0204081632653062e-02 6.2876616833212340e-01 1.3873373556929145e-02 2.0408163265306107e-04 +1.0620574760516453e-02 3.5069559151104790e-01 1.0136613757789808e-02 2.1241149521033023e-04 +1.1054067607884473e-02 2.3477751708069897e-01 8.1099626399286761e-03 2.2108135215768900e-04 +1.1505254040859348e-02 1.8964302712880826e-01 7.1805730148316446e-03 2.3010508081718756e-04 +1.1974856246608712e-02 1.4285208497806512e-01 6.0162249267477130e-03 2.3949712493217482e-04 +1.2463625889327434e-02 1.2188457497836602e-01 5.4352795853431970e-03 2.4927251778654805e-04 +1.2972345313381616e-02 1.0530945504618572e-01 5.0275179459601553e-03 2.5944690626763297e-04 +1.3501828795560456e-02 8.0387950876579850e-02 4.1975562768255060e-03 2.7003657591120889e-04 +1.4052923848440476e-02 7.3136722795496253e-02 3.9582003984186967e-03 2.8105847696880976e-04 +1.4626512576948251e-02 6.1298419781514651e-02 3.4783001152817426e-03 2.9253025153896592e-04 +1.5223513090293080e-02 6.2409059365864682e-02 3.4798000624600761e-03 3.0447026180586197e-04 +1.5844880971529533e-02 5.6512800965543043e-02 3.2223775371921573e-03 3.1689761943059103e-04 +1.6491610807102167e-02 5.0440737935525240e-02 2.9021067247837801e-03 3.2983221614204389e-04 +1.7164737778820625e-02 5.0277525044171101e-02 2.8252864493045079e-03 3.4329475557641313e-04 +1.7865339320813300e-02 5.1689705097227867e-02 2.8118143416053952e-03 3.5730678641626538e-04 +1.8594536844111803e-02 5.3007618770583402e-02 2.7685413804410695e-03 3.7189073688223724e-04 +1.9353497531626573e-02 4.9070756677145402e-02 2.5677593751218504e-03 3.8706995063253133e-04 +2.0143436206386842e-02 4.6878831709663782e-02 2.4119133732668076e-03 4.0286872412773761e-04 +2.0965617276035284e-02 4.9199553772144550e-02 2.4276503561561644e-03 4.1931234552070561e-04 +2.1821356756689787e-02 5.2041112703109127e-02 2.4556151556737898e-03 4.3642713513379616e-04 +2.2712024379411822e-02 4.9251781726106690e-02 2.3335505076022252e-03 4.5424048758823873e-04 +2.3639045782653120e-02 4.3172608947743572e-02 2.1138539656044499e-03 4.7278091565306109e-04 +2.4603904794189984e-02 3.8304327635500499e-02 1.9158755178575817e-03 4.9207809588380086e-04 +2.5608145806197739e-02 4.4442200106459967e-02 2.0186419327094269e-03 5.1216291612395451e-04 +2.6653376247267036e-02 3.9587001147536376e-02 1.8488058581743547e-03 5.3306752494534232e-04 +2.7741269155318757e-02 3.6677858215866437e-02 1.7473224966445143e-03 5.5482538310637659e-04 +2.8873565855535847e-02 3.7663512267048754e-02 1.7682821318945074e-03 5.7747131711071743e-04 +3.0052078747598535e-02 3.6755569252809664e-02 1.7350440273063527e-03 6.0104157495196979e-04 +3.1278694206684193e-02 3.8546394417761670e-02 1.7965558626918197e-03 6.2557388413368373e-04 +3.2555375602875386e-02 3.2866785139061716e-02 1.6217721152892931e-03 6.5110751205750897e-04 +3.3884166443809073e-02 3.1513196803753502e-02 1.6061232808323794e-03 6.7768332887618160e-04 +3.5267193645597203e-02 3.0280345918169513e-02 1.5885947028228238e-03 7.0534387291194475e-04 +3.6706670937254229e-02 2.5036982048446406e-02 1.4176844815086535e-03 7.3413341874508514e-04 +3.8204902404080934e-02 2.0831804563285421e-02 1.2803365468167761e-03 7.6409804808161980e-04 +3.9764286175676081e-02 1.9376976329704945e-02 1.2712203272554497e-03 7.9528572351352314e-04 +4.1387318264479181e-02 1.6729675515039004e-02 1.1715497338181137e-03 8.2774636528958404e-04 +4.3076596560988542e-02 1.3996303090353096e-02 1.0654383375290077e-03 8.6153193121977015e-04 +4.4834824992049299e-02 1.0621480384334052e-02 9.2468077823003954e-04 8.9669649984099042e-04 +4.6664817848867640e-02 7.8203324635251256e-03 8.0931024548367521e-04 9.3329635697735405e-04 +4.8569504291678570e-02 6.0428022894521575e-03 7.1838354133842033e-04 9.7139008583356848e-04 +5.0551933038277694e-02 4.0958929714843932e-03 5.8416704469953131e-04 1.0110386607655557e-03 +5.2615277243921690e-02 5.1115251619419473e-03 6.6580030308840434e-04 1.0523055448784409e-03 +5.4762839580408292e-02 2.0207116612746484e-03 4.1438660592314769e-04 1.0952567916081637e-03 +5.6998057522465770e-02 1.7115689314143780e-03 3.8529038925611664e-04 1.1399611504493146e-03 +5.9324508849913360e-02 8.4963058831312487e-04 2.7095330976641694e-04 1.1864901769982721e-03 +6.1745917374399620e-02 8.1421160351772355e-04 2.7251395576638693e-04 1.2349183474879948e-03 +6.4266158899885323e-02 8.9204238262309603e-05 8.9204238263225523e-05 1.2853231779977048e-03 +6.6889267426411256e-02 9.3397363465611626e-05 9.3397363464899779e-05 1.3377853485282282e-03 +6.9619441607081112e-02 4.0599169078880156e-04 2.0303208241886721e-04 1.3923888321416208e-03 +7.2461051468594620e-02 2.1832573520758229e-04 1.5439324988622013e-04 1.4492210293718943e-03 +7.5418645406088280e-02 1.2684339163878999e-04 1.2684339163797725e-04 1.5083729081217731e-03 +7.8496957463479650e-02 0.0000000000000000e+00 0.0000000000000000e+00 1.5699391492695891e-03 +8.1700914910968619e-02 0.0000000000000000e+00 0.0000000000000000e+00 1.6340182982193738e-03 +8.5035646131824488e-02 4.1657483226777538e-04 2.4090333523406435e-04 1.7007129226364950e-03 +8.8506488831082628e-02 0.0000000000000000e+00 0.0000000000000000e+00 1.7701297766216512e-03 +9.2118998579290082e-02 0.0000000000000000e+00 0.0000000000000000e+00 1.8423799715858030e-03 +9.5878957704975398e-02 0.0000000000000000e+00 0.0000000000000000e+00 1.9175791540995135e-03 +9.9792384550076441e-02 0.0000000000000000e+00 0.0000000000000000e+00 1.9958476910015288e-03 +1.0386554310314079e-01 0.0000000000000000e+00 0.0000000000000000e+00 2.0773108620628228e-03 diff --git a/tests/test_orso_utils.py b/tests/test_orso_utils.py new file mode 100644 index 00000000..253bcb36 --- /dev/null +++ b/tests/test_orso_utils.py @@ -0,0 +1,121 @@ +"""Tests for the RATapi.utils.orso module.""" + +import os +from io import StringIO +from pathlib import Path + +import numpy as np +import pytest +from orsopy.fileio.model_language import SampleModel + +from RATapi.examples.bayes_benchmark.bayes_benchmark import get_project +from RATapi.project import Project, class_lists +from RATapi.utils.orso import load_ort_data, orso_model_to_rat, ort_to_project + +TEST_DIR_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "test_data") + + +@pytest.fixture +def bare_subs(): + """The bare substrate project from the Bayes Benchmark example.""" + return get_project() + + +@pytest.fixture +def prist(): + """The project from the model data from prist5_10K_m_025.Rqz.ort""" + return Project.load(Path(TEST_DIR_PATH, "prist.json")) + + +@pytest.mark.parametrize( + "model", + [ + "air | FeO2 0.75 | Fe 10 | Si", + "vacuum | 5 (O3 3 | He2 4) | SiO2 0.75 | Si", + "Si | 5 (O2 2 | 3 (D2O 1 | H2O 1)) | air", + ], +) +@pytest.mark.parametrize("absorption", [True, False]) +def test_orso_model_to_rat(model, absorption): + """Test that orso_model_to_rat gives the expected parameters, layers and model.""" + + expected = SampleModel(model).resolve_to_layers()[1:-1] + expected_layers = [layer.material.formula for layer in expected] + expected_thicknesses = {layer.material.formula: layer.thickness for layer in expected} + expected_roughnesses = {layer.material.formula: layer.roughness for layer in expected} + actual = orso_model_to_rat(model, absorption=absorption) + + assert actual.model == expected_layers + + for layer in actual.layers: + assert layer.name in expected_layers + for layer in expected_layers: + assert layer in [actual_layer.name for actual_layer in actual.layers] + + expected_parameters = [] + # get set of parameters + for layer in set(expected_layers): + expected_parameters.extend([f"{layer} Thickness", f"{layer} Roughness", f"{layer} SLD"]) + if absorption: + expected_parameters.append(f"{layer} SLD imaginary") + + assert actual.parameters[f"{layer} Thickness"].value == expected_thicknesses[layer].as_unit("angstrom") + assert actual.parameters[f"{layer} Roughness"].value == expected_roughnesses[layer].as_unit("angstrom") + + assert set(p.name for p in actual.parameters) == set(expected_parameters) + + +@pytest.mark.parametrize( + "test_data", + [ + "bare_substrate.ort", + "inter_data.ort", + "polref_data.ort", + "prist5_10K_m_025.Rqz.ort", + ], +) +def test_load_ort_data(test_data): + """Test that .ort data is loaded correctly.""" + # manually get the test data for comparison + data_strings = [""] + parsing_data = False + with Path(TEST_DIR_PATH, test_data).open() as file: + for line in file: + if line[0] == "#": + if parsing_data: + parsing_data = False + data_strings.append("") + else: + continue + else: + parsing_data = True + data_strings[-1] += line + + expected_data = list(map(lambda s: np.loadtxt(StringIO(s)), data_strings)) + actual_data = load_ort_data(Path(TEST_DIR_PATH, test_data)) + + if not isinstance(actual_data, list): + actual_data = [actual_data] + + assert len(actual_data) == len(expected_data) + for actual_dataset, expected_dataset in zip(actual_data, expected_data): + np.testing.assert_array_equal(actual_dataset.data, expected_dataset) + + +@pytest.mark.parametrize( + "test_data, expected_data", + [ + ["bare_substrate.ort", "bare_substrate.json"], + ["prist5_10K_m_025.Rqz.ort", "prist.json"], + ], +) +def test_load_ort_project(test_data, expected_data): + """Test that a project with model data is loaded correctly.""" + project = ort_to_project(Path(TEST_DIR_PATH, test_data)) + exp_project = Project.load(Path(TEST_DIR_PATH, expected_data)) + + for class_list in class_lists: + assert getattr(project, class_list) == getattr(exp_project, class_list) + + for data, exp_data in zip(project.data, exp_project.data): + np.testing.assert_array_equal(data.data, exp_data.data) From 0366abb13d3e4c76fce15f7074e83ed5e163f32e Mon Sep 17 00:00:00 2001 From: alexhroom Date: Wed, 12 Feb 2025 11:10:48 +0000 Subject: [PATCH 06/16] added pint to requirements and added orso extras install --- .github/workflows/run_tests.yml | 2 +- requirements.txt | 1 + setup.py | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index e07c6f90..8911dfdc 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -53,5 +53,5 @@ jobs: - name: Install and Test with pytest run: | export PATH="$pythonLocation:$PATH" - python -m pip install -e .[Dev] + python -m pip install -e .[Dev,Orso] pytest tests/ --cov=RATapi --cov-report=term diff --git a/requirements.txt b/requirements.txt index 4092f866..cee9a790 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,3 +11,4 @@ ruff >= 0.4.10 scipy >= 1.13.1 tqdm >= 4.66.5 orsopy >= 1.2.1 +pint >= 0.24.4 diff --git a/setup.py b/setup.py index a3bb0ea4..d41a6ce8 100644 --- a/setup.py +++ b/setup.py @@ -172,11 +172,12 @@ def build_libraries(self, libraries): "pydantic >= 2.7.2", "matplotlib >= 3.8.3", "scipy >= 1.13.1", - "tqdm>=4.66.5", + "tqdm >= 4.66.5", ], extras_require={ ':python_version < "3.11"': ["StrEnum >= 0.4.15"], "Dev": ["pytest>=7.4.0", "pytest-cov>=4.1.0", "ruff>=0.4.10"], + "Orso": ["orsopy>=1.2.1", "pint>=0.24.4"], "Matlab_latest": ["matlabengine"], "Matlab_2025a": ["matlabengine == 25.1.*"], "Matlab_2024b": ["matlabengine == 24.2.2"], From 13a7955df9985d5c38547420bdf1c0797c3a82c3 Mon Sep 17 00:00:00 2001 From: alexhroom Date: Thu, 13 Feb 2025 11:45:28 +0000 Subject: [PATCH 07/16] backwards compatibility --- RATapi/utils/orso.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/RATapi/utils/orso.py b/RATapi/utils/orso.py index 5d255faf..6d43ac28 100644 --- a/RATapi/utils/orso.py +++ b/RATapi/utils/orso.py @@ -20,7 +20,7 @@ def load_ort_data(filepath: str) -> Union[Data, list[Data]]: Returns ------- - Data | list[Data] + Data or list[Data] If the .ort file contains one dataset, just the data model. If it contains multiple datasets, returns a list of data models. @@ -102,11 +102,13 @@ class ORSOSample: bulk_in: Parameter bulk_out: Parameter parameters: ClassList[Parameter] - layers: ClassList[Layer] | ClassList[AbsorptionLayer] + layers: Union[ClassList[Layer], ClassList[AbsorptionLayer]] model: list[str] -def orso_model_to_rat(model: orsopy.fileio.model_language.SampleModel | str, absorption: bool = False) -> ORSOSample: +def orso_model_to_rat( + model: Union[orsopy.fileio.model_language.SampleModel, str], absorption: bool = False +) -> ORSOSample: """Get information from an ORSO SampleModel object. Parameters From ec345454b13bd09ab15db86c2c17831801169eb4 Mon Sep 17 00:00:00 2001 From: alexhroom Date: Tue, 25 Feb 2025 09:31:49 +0000 Subject: [PATCH 08/16] removed to-project and updated notebook --- .../orso_integration/orso_integration.ipynb | 60 ++++++---- RATapi/utils/orso.py | 109 +++--------------- tests/test_data/bare_substrate.json | 2 +- tests/test_data/prist.json | 2 +- tests/test_orso_utils.py | 20 ++-- 5 files changed, 67 insertions(+), 126 deletions(-) diff --git a/RATapi/examples/orso_integration/orso_integration.ipynb b/RATapi/examples/orso_integration/orso_integration.ipynb index 15ae9db3..f8b14ff4 100644 --- a/RATapi/examples/orso_integration/orso_integration.ipynb +++ b/RATapi/examples/orso_integration/orso_integration.ipynb @@ -16,7 +16,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -94,53 +94,37 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Reading in data and models from .ort files\n", - "\n", - "It is possible to read data from .ort format files at two different levels of depth." + "## Reading in data and models from .ort files" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "### Reading data\n", + "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", "\n", - "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", - "\n", - "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." + "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)" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "import pathlib\n", "data_path = pathlib.Path(\"../data\")\n", "\n", - "data = RATapi.utils.orso.load_ort_data(data_path / \"IvsQ_82043_82044.ort\")\n", - "print(data)" + "orso_data = RATapi.utils.orso.ORSOProject(data_path / \"prist5_10K_m_025.Rqz.ort\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "### Reading an entire project\n", - "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", + "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", "\n", - "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. " - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "project = RATapi.utils.orso.ort_to_project(data_path / \"prist5_10K_m_025.Rqz.ort\")\n", - "print(project)" + "It's then easy to access this data to create a RAT `Project` that represents our data." ] }, { @@ -149,6 +133,34 @@ "metadata": {}, "outputs": [], "source": [ + "from RATapi.models import Background, Contrast, Parameter, Resolution\n", + "\n", + "dataset = orso_data.data[0]\n", + "sample = orso_data.samples[0]\n", + "\n", + "project = RATapi.Project(\n", + " name = \"Example Project\",\n", + " parameters = sample.parameters,\n", + " bulk_in = [sample.bulk_in],\n", + " bulk_out = [sample.bulk_out],\n", + " scalefactors = [Parameter(name=\"Scalefactor\", min=0, value=1, max=1.5, fit=True)],\n", + " background_parameters = [Parameter(name=\"Background Parameter\", min=0, value=0.025, max=1, fit=True)],\n", + " backgrounds = [Background(name=\"Background\", type=\"constant\", source=\"Background Parameter\")],\n", + " resolutions = [Resolution(name=\"Data Resolution\", type=\"data\")],\n", + " data = [dataset],\n", + " layers = sample.layers,\n", + " contrasts = [Contrast(\n", + " name = \"prist4\",\n", + " data = dataset.name,\n", + " background = \"Background\",\n", + " bulk_in = sample.bulk_in.name,\n", + " bulk_out = sample.bulk_out.name,\n", + " scalefactor = \"Scalefactor\",\n", + " resolution = \"Data Resolution\",\n", + " model = sample.model,\n", + " )]\n", + ")\n", + "\n", "controls = RATapi.Controls()\n", "project, results = RATapi.run(project, controls)\n", "RATapi.plotting.plot_ref_sld(project, results)" diff --git a/RATapi/utils/orso.py b/RATapi/utils/orso.py index 6d43ac28..5bb339e6 100644 --- a/RATapi/utils/orso.py +++ b/RATapi/utils/orso.py @@ -1,98 +1,32 @@ """Readers from file formats.""" from dataclasses import dataclass +from pathlib import Path from typing import Union import orsopy from orsopy.fileio import load_orso -from RATapi import ClassList, Project -from RATapi.models import AbsorptionLayer, Contrast, Data, Layer, Parameter, Resolution +from RATapi import ClassList +from RATapi.models import AbsorptionLayer, Data, Layer, Parameter -def load_ort_data(filepath: str) -> Union[Data, list[Data]]: - """Read data from an .ort file. +class ORSOProject: + """A class to encapsulate model information and data from an .ort file. Parameters ---------- - filepath : str + filepath : str or Path The path to the .ort file. - - Returns - ------- - Data or list[Data] - If the .ort file contains one dataset, just the data model. - If it contains multiple datasets, returns a list of data models. + absorption : bool, default None + Whether to account for absorption in the model data. """ - ort_data = load_orso(filepath) - datasets = [Data(name=dataset.info.data_source.sample.name, data=dataset.data) for dataset in ort_data] - if len(datasets) == 1: - return datasets[0] - return datasets - -def ort_to_project(filepath: str) -> Project: - """Create a project from an .ort file. - - Parameters - ---------- - filepath : str - The path to the .ort file. - - Returns - ------- - Project - The project data from the .ort file. - """ - project = Project() - - ort_data = load_orso(filepath) - - for dataset in ort_data: - sample = dataset.info.data_source.sample - - project.data.append(Data(name=sample.name, data=dataset.data)) - - if sample.model is not None: - model_info = orso_model_to_rat(sample.model) - - # Add all parameters that aren't already defined - project.parameters.union(model_info.parameters) - project.layers.extend(model_info.layers) - project.bulk_in.append(model_info.bulk_in) - project.bulk_out.append(model_info.bulk_out) - - if dataset.data.shape[1] == 4: - project.resolutions.append( - Resolution( - name=f"{sample.name} Resolution", - type="data", - ) - ) - else: - project.resolutions.append( - Resolution( - name=f"{sample.name} Resolution", - type="constant", - source="Resolution Param 1", - ) - ) - - project.contrasts.append( - Contrast( - name=dataset.info.data_source.experiment.title, - data=sample.name, - background="Background 1", - bulk_in=model_info.bulk_in.name, - bulk_out=model_info.bulk_out.name, - scalefactor="Scalefactor 1", - resolution=f"{sample.name} Resolution", - model=model_info.model, - ) - ) - - return project + def __init__(self, filepath: Union[str, Path], absorption: bool = False): + ort_data = load_orso(filepath) + self.data = [Data(name=dataset.info.data_source.sample.name, data=dataset.data) for dataset in ort_data] + self.samples = [orso_model_to_rat(dataset.info.data_source.sample.model) for dataset in ort_data] @dataclass @@ -108,7 +42,7 @@ class ORSOSample: def orso_model_to_rat( model: Union[orsopy.fileio.model_language.SampleModel, str], absorption: bool = False -) -> ORSOSample: +) -> Union[ORSOSample, None]: """Get information from an ORSO SampleModel object. Parameters @@ -122,21 +56,21 @@ def orso_model_to_rat( Returns ------- ORSOSample - A dataclass containing the sample data. + A dataclass containing the sample data, or None if the model is None. """ + if model is None: + return None + if isinstance(model, str): model = orsopy.fileio.model_language.SampleModel(stack=model) + stack = model.resolve_to_layers() # if bulk in or out is air, it has SLD predefined # else we need to grab it from SLDDB if bulk_in_sld := stack[0].material.sld is None: bulk_in_sld = stack[0].material.get_sld() - # orsopy SLDs are in 10^-6 inverse square Angstroms - # but RAT uses just inverse square Angstroms - bulk_in_sld *= 1e6 - # resolve_to_layers loses the name of bulk in and out bulk_in_name = model.stack.split("|")[0].strip() bulk_in = Parameter( @@ -150,8 +84,6 @@ def orso_model_to_rat( if bulk_out_sld := stack[-1].material.sld is None: bulk_out_sld = stack[-1].material.get_sld() - bulk_out_sld *= 1e6 - bulk_out_name = model.stack.split("|")[-1].strip() bulk_out = Parameter( name=f"{bulk_out_name} SLD", @@ -199,10 +131,7 @@ def orso_layer_to_rat_layer( name = layer.material.formula thickness = layer.thickness.as_unit("angstrom") roughness = layer.roughness.as_unit("angstrom") - - # orsopy SLDs are in 10^-6 inverse square Angstroms - # but RAT uses just inverse square Angstroms - sld = layer.material.get_sld() * 1e6 + sld = layer.material.get_sld() params = ClassList( [ diff --git a/tests/test_data/bare_substrate.json b/tests/test_data/bare_substrate.json index debb173b..65e405c2 100644 --- a/tests/test_data/bare_substrate.json +++ b/tests/test_data/bare_substrate.json @@ -1 +1 @@ -{"name": "", "calculation": "normal", "model": "standard layers", "geometry": "air/substrate", "absorption": false, "parameters": [{"name": "Substrate Roughness", "min": 1.0, "value": 3.0, "max": 5.0, "fit": true, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "bulk_in": [{"name": "SLD Air", "min": 0.0, "value": 0.0, "max": 0.0, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "air SLD", "min": 0.00442927130586151, "value": 0.00442927130586151, "max": 0.00442927130586151, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "bulk_out": [{"name": "SLD D2O", "min": 6.2e-06, "value": 6.35e-06, "max": 6.35e-06, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "D2O SLD", "min": 6.360408603667384, "value": 6.360408603667384, "max": 6.360408603667384, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "scalefactors": [{"name": "Scalefactor 1", "min": 0.02, "value": 0.23, "max": 0.25, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "domain_ratios": [], "background_parameters": [{"name": "Background Param 1", "min": 1e-07, "value": 1e-06, "max": 1e-05, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "backgrounds": [{"name": "Background 1", "type": "constant", "source": "Background Param 1", "value_1": "", "value_2": "", "value_3": "", "value_4": "", "value_5": ""}], "resolution_parameters": [{"name": "Resolution Param 1", "min": 0.01, "value": 0.03, "max": 0.05, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "resolutions": [{"name": "Resolution 1", "type": "constant", "source": "Resolution Param 1", "value_1": "", "value_2": "", "value_3": "", "value_4": "", "value_5": ""}, {"name": "D2O substrate Resolution", "type": "data", "source": "", "value_1": "", "value_2": "", "value_3": "", "value_4": "", "value_5": ""}], "custom_files": [], "data": [{"name": "Simulation", "data": [], "data_range": [], "simulation_range": [0.005, 0.7]}, {"name": "D2O substrate", "data": [[0.048866, 0.00012343, 1.3213e-06, 0.03], [0.051309, 0.00010063, 1.0803e-06, 0.03], [0.053874, 8.2165e-05, 8.8779e-07, 0.03], [0.056568, 6.4993e-05, 7.2018e-07, 0.03], [0.059396, 5.3958e-05, 6.0015e-07, 0.03], [0.062366, 4.359e-05, 5.0129e-07, 0.03], [0.065485, 3.578e-05, 4.1957e-07, 0.03], [0.068759, 2.913e-05, 3.5171e-07, 0.03], [0.072197, 2.3481e-05, 3.0586e-07, 0.03], [0.075807, 1.8906e-05, 2.6344e-07, 0.03], [0.079597, 1.4642e-05, 2.2314e-07, 0.03], [0.083577, 1.1589e-05, 1.8938e-07, 0.03], [0.087756, 9.5418e-06, 1.622e-07, 0.03], [0.092143, 7.5694e-06, 1.3809e-07, 0.03], [0.096751, 6.3831e-06, 1.2097e-07, 0.03], [0.10159, 5.0708e-06, 1.0333e-07, 0.03], [0.10667, 4.1041e-06, 8.9548e-08, 0.03], [0.112, 3.4253e-06, 7.983e-08, 0.03], [0.1176, 2.8116e-06, 7.1554e-08, 0.03], [0.12348, 2.3767e-06, 6.3738e-08, 0.03], [0.12966, 1.9241e-06, 5.6586e-08, 0.03], [0.13614, 1.5642e-06, 5.2778e-08, 0.03], [0.14294, 1.2922e-06, 4.973e-08, 0.03], [0.15009, 1.1694e-06, 5.1175e-08, 0.03], [0.1576, 9.7837e-07, 5.0755e-08, 0.03], [0.16548, 8.9138e-07, 5.3542e-08, 0.03], [0.17375, 7.942e-07, 5.4857e-08, 0.03], [0.18244, 7.9131e-07, 5.8067e-08, 0.03], [0.19156, 6.5358e-07, 5.7717e-08, 0.03], [0.20114, 6.297e-07, 5.7951e-08, 0.03], [0.21119, 5.013e-07, 5.5262e-08, 0.03], [0.22175, 5.0218e-07, 5.6461e-08, 0.03], [0.23284, 3.9299e-07, 5.0685e-08, 0.03], [0.24448, 3.5324e-07, 5.0194e-08, 0.03], [0.25671, 4.4475e-07, 5.6485e-08, 0.03], [0.26954, 5.1338e-07, 6.2247e-08, 0.03], [0.28302, 3.4918e-07, 4.9745e-08, 0.03], [0.29717, 4.3037e-07, 5.5488e-08, 0.03], [0.31203, 4.0099e-07, 5.3591e-08, 0.03], [0.32763, 3.8397e-07, 5.1303e-08, 0.03], [0.34401, 3.0995e-07, 4.5965e-08, 0.03], [0.36121, 3.9357e-07, 5.0135e-08, 0.03], [0.37927, 3.0997e-07, 4.368e-08, 0.03], [0.39824, 2.9656e-07, 4.2432e-08, 0.03], [0.41815, 2.1909e-07, 3.6117e-08, 0.03], [0.43906, 2.3153e-07, 3.6307e-08, 0.03], [0.46101, 3.3428e-07, 4.3874e-08, 0.03], [0.48406, 2.3441e-07, 3.7488e-08, 0.03], [0.50826, 1.5496e-07, 3.0585e-08, 0.03], [0.53368, 2.4708e-07, 3.9376e-08, 0.03], [0.56036, 2.2157e-07, 3.8258e-08, 0.03], [0.58838, 2.2798e-07, 4.6976e-08, 0.03], [0.61169, 6.0272e-07, 2.3239e-07, 0.03]], "data_range": [0.048866, 0.61169], "simulation_range": [0.048866, 0.61169]}], "layers": [], "domain_contrasts": [], "contrasts": [{"name": "Bare D2O substrate", "data": "D2O substrate", "background": "Background 1", "background_action": "add", "bulk_in": "air SLD", "bulk_out": "D2O SLD", "scalefactor": "Scalefactor 1", "resolution": "D2O substrate Resolution", "resample": false, "model": []}]} \ No newline at end of file +{"name": "substrate", "calculation": "normal", "model": "standard layers", "geometry": "air/substrate", "absorption": false, "parameters": [{"name": "Substrate Roughness", "min": 1.0, "value": 3.0, "max": 5.0, "fit": true, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "bulk_in": [{"name": "air SLD", "min": 4.42927130586151e-09, "value": 4.42927130586151e-09, "max": 4.42927130586151e-09, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "bulk_out": [{"name": "D2O SLD", "min": 6.360408603667384e-06, "value": 6.360408603667384e-06, "max": 6.360408603667384e-06, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "scalefactors": [{"name": "Scalefactor 1", "min": 0.02, "value": 0.23, "max": 0.25, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "domain_ratios": [], "background_parameters": [{"name": "Background Param 1", "min": 1e-07, "value": 1e-06, "max": 1e-05, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "backgrounds": [{"name": "Background 1", "type": "constant", "source": "Background Param 1", "value_1": "", "value_2": "", "value_3": "", "value_4": "", "value_5": ""}], "resolution_parameters": [{"name": "Resolution Param 1", "min": 0.01, "value": 0.03, "max": 0.05, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "resolutions": [{"name": "Resolution 1", "type": "constant", "source": "Resolution Param 1", "value_1": "", "value_2": "", "value_3": "", "value_4": "", "value_5": ""}], "custom_files": [], "data": [{"name": "Simulation", "data": [], "data_range": [], "simulation_range": [0.005, 0.7]}, {"name": "D2O substrate", "data": [[0.048866, 0.00012343, 1.3213e-06, 0.03], [0.051309, 0.00010063, 1.0803e-06, 0.03], [0.053874, 8.2165e-05, 8.8779e-07, 0.03], [0.056568, 6.4993e-05, 7.2018e-07, 0.03], [0.059396, 5.3958e-05, 6.0015e-07, 0.03], [0.062366, 4.359e-05, 5.0129e-07, 0.03], [0.065485, 3.578e-05, 4.1957e-07, 0.03], [0.068759, 2.913e-05, 3.5171e-07, 0.03], [0.072197, 2.3481e-05, 3.0586e-07, 0.03], [0.075807, 1.8906e-05, 2.6344e-07, 0.03], [0.079597, 1.4642e-05, 2.2314e-07, 0.03], [0.083577, 1.1589e-05, 1.8938e-07, 0.03], [0.087756, 9.5418e-06, 1.622e-07, 0.03], [0.092143, 7.5694e-06, 1.3809e-07, 0.03], [0.096751, 6.3831e-06, 1.2097e-07, 0.03], [0.10159, 5.0708e-06, 1.0333e-07, 0.03], [0.10667, 4.1041e-06, 8.9548e-08, 0.03], [0.112, 3.4253e-06, 7.983e-08, 0.03], [0.1176, 2.8116e-06, 7.1554e-08, 0.03], [0.12348, 2.3767e-06, 6.3738e-08, 0.03], [0.12966, 1.9241e-06, 5.6586e-08, 0.03], [0.13614, 1.5642e-06, 5.2778e-08, 0.03], [0.14294, 1.2922e-06, 4.973e-08, 0.03], [0.15009, 1.1694e-06, 5.1175e-08, 0.03], [0.1576, 9.7837e-07, 5.0755e-08, 0.03], [0.16548, 8.9138e-07, 5.3542e-08, 0.03], [0.17375, 7.942e-07, 5.4857e-08, 0.03], [0.18244, 7.9131e-07, 5.8067e-08, 0.03], [0.19156, 6.5358e-07, 5.7717e-08, 0.03], [0.20114, 6.297e-07, 5.7951e-08, 0.03], [0.21119, 5.013e-07, 5.5262e-08, 0.03], [0.22175, 5.0218e-07, 5.6461e-08, 0.03], [0.23284, 3.9299e-07, 5.0685e-08, 0.03], [0.24448, 3.5324e-07, 5.0194e-08, 0.03], [0.25671, 4.4475e-07, 5.6485e-08, 0.03], [0.26954, 5.1338e-07, 6.2247e-08, 0.03], [0.28302, 3.4918e-07, 4.9745e-08, 0.03], [0.29717, 4.3037e-07, 5.5488e-08, 0.03], [0.31203, 4.0099e-07, 5.3591e-08, 0.03], [0.32763, 3.8397e-07, 5.1303e-08, 0.03], [0.34401, 3.0995e-07, 4.5965e-08, 0.03], [0.36121, 3.9357e-07, 5.0135e-08, 0.03], [0.37927, 3.0997e-07, 4.368e-08, 0.03], [0.39824, 2.9656e-07, 4.2432e-08, 0.03], [0.41815, 2.1909e-07, 3.6117e-08, 0.03], [0.43906, 2.3153e-07, 3.6307e-08, 0.03], [0.46101, 3.3428e-07, 4.3874e-08, 0.03], [0.48406, 2.3441e-07, 3.7488e-08, 0.03], [0.50826, 1.5496e-07, 3.0585e-08, 0.03], [0.53368, 2.4708e-07, 3.9376e-08, 0.03], [0.56036, 2.2157e-07, 3.8258e-08, 0.03], [0.58838, 2.2798e-07, 4.6976e-08, 0.03], [0.61169, 6.0272e-07, 2.3239e-07, 0.03]], "data_range": [0.048866, 0.61169], "simulation_range": [0.048866, 0.61169]}], "layers": [], "domain_contrasts": [], "contrasts": []} \ No newline at end of file diff --git a/tests/test_data/prist.json b/tests/test_data/prist.json index 1f47f007..3b36893e 100644 --- a/tests/test_data/prist.json +++ b/tests/test_data/prist.json @@ -1 +1 @@ -{"name": "", "calculation": "normal", "model": "standard layers", "geometry": "air/substrate", "absorption": false, "parameters": [{"name": "Substrate Roughness", "min": 1.0, "value": 3.0, "max": 5.0, "fit": true, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "Al2O3 Thickness", "min": 20.0, "value": 20.0, "max": 20.0, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "Al2O3 Roughness", "min": 3.0, "value": 3.0, "max": 3.0, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "Al2O3 SLD", "min": 5.715275837467511, "value": 5.715275837467511, "max": 5.715275837467511, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "Ti0.27Co0.73 Thickness", "min": 93.0, "value": 93.0, "max": 93.0, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "Ti0.27Co0.73 Roughness", "min": 3.0, "value": 3.0, "max": 3.0, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "Ti0.27Co0.73 SLD", "min": 0.6720584953375607, "value": 0.6720584953375607, "max": 0.6720584953375607, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "bulk_in": [{"name": "SLD Air", "min": 0.0, "value": 0.0, "max": 0.0, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "vacuum SLD", "min": 0.0, "value": 0.0, "max": 0.0, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "bulk_out": [{"name": "SLD D2O", "min": 6.2e-06, "value": 6.35e-06, "max": 6.35e-06, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "Si SLD", "min": 2.07370547828562, "value": 2.07370547828562, "max": 2.07370547828562, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "scalefactors": [{"name": "Scalefactor 1", "min": 0.02, "value": 0.23, "max": 0.25, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "domain_ratios": [], "background_parameters": [{"name": "Background Param 1", "min": 1e-07, "value": 1e-06, "max": 1e-05, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "backgrounds": [{"name": "Background 1", "type": "constant", "source": "Background Param 1", "value_1": "", "value_2": "", "value_3": "", "value_4": "", "value_5": ""}], "resolution_parameters": [{"name": "Resolution Param 1", "min": 0.01, "value": 0.03, "max": 0.05, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "resolutions": [{"name": "Resolution 1", "type": "constant", "source": "Resolution Param 1", "value_1": "", "value_2": "", "value_3": "", "value_4": "", "value_5": ""}, {"name": "prist4 Resolution", "type": "data", "source": "", "value_1": "", "value_2": "", "value_3": "", "value_4": "", "value_5": ""}], "custom_files": [], "data": [{"name": "Simulation", "data": [], "data_range": [], "simulation_range": [0.005, 0.7]}, {"name": "prist4", "data": [[0.0021999999999999997, 0.004724119389721505, 0.004724119389721505, 0.00019999999999999987], [0.0026, 0.0, 0.0, 0.0002000000000000001], [0.003, 0.0049441079014990305, 0.0028632759811688313, 0.0002000000000000001], [0.0034000000000000002, 0.00539571466421478, 0.0027033018099334193, 0.00019999999999999987], [0.0038, 0.011948517768746966, 0.0037903477990210636, 0.0002000000000000001], [0.004200000000000001, 0.016302332669940297, 0.003972317564845323, 0.0002000000000000001], [0.0046, 0.02265216487165058, 0.0045763672802481776, 0.0002000000000000001], [0.005, 0.023020814468949415, 0.00425372711337262, 0.00019999999999999966], [0.0054, 0.027305557750665344, 0.004428700971127359, 0.0002000000000000001], [0.0058, 0.019457945835850306, 0.0037817426451169783, 0.0002000000000000001], [0.006200000000000001, 0.027645506109865266, 0.004267993991409073, 0.0002000000000000001], [0.0066, 0.024223034347324195, 0.0037655052701117517, 0.0002000000000000001], [0.007, 0.028408308819418325, 0.0037377941755602716, 0.00019999999999999966], [0.0074, 0.057460495308053604, 0.0052154049057105455, 0.0002000000000000001], [0.0078, 0.1489883351950982, 0.00754789840356179, 0.0002000000000000001], [0.008199999999999999, 0.3520480929443021, 0.011146891694516669, 0.00019999999999999966], [0.0086, 0.5317657760789548, 0.01351725179531962, 0.00019999999999999966], [0.009, 0.7914500646501588, 0.016276277463585134, 0.00020000000000000052], [0.009399999999999999, 0.9680331047846104, 0.01782748799306378, 0.00019999999999999966], [0.0098, 1.0324643310179094, 0.018104900945963596, 0.00020000000000000052], [0.010204081632653062, 0.6287661683321234, 0.013873373556929145, 0.00020408163265306107], [0.010620574760516453, 0.3506955915110479, 0.010136613757789808, 0.00021241149521033023], [0.011054067607884473, 0.23477751708069897, 0.008109962639928676, 0.000221081352157689], [0.011505254040859348, 0.18964302712880826, 0.007180573014831645, 0.00023010508081718756], [0.011974856246608712, 0.14285208497806512, 0.006016224926747713, 0.00023949712493217482], [0.012463625889327434, 0.12188457497836602, 0.005435279585343197, 0.00024927251778654805], [0.012972345313381616, 0.10530945504618572, 0.005027517945960155, 0.00025944690626763297], [0.013501828795560456, 0.08038795087657985, 0.004197556276825506, 0.0002700365759112089], [0.014052923848440476, 0.07313672279549625, 0.003958200398418697, 0.00028105847696880976], [0.01462651257694825, 0.06129841978151465, 0.0034783001152817426, 0.0002925302515389659], [0.01522351309029308, 0.06240905936586468, 0.003479800062460076, 0.000304470261805862], [0.015844880971529533, 0.05651280096554304, 0.0032223775371921573, 0.00031689761943059103], [0.016491610807102167, 0.05044073793552524, 0.00290210672478378, 0.0003298322161420439], [0.017164737778820625, 0.0502775250441711, 0.002825286449304508, 0.00034329475557641313], [0.0178653393208133, 0.05168970509722787, 0.002811814341605395, 0.0003573067864162654], [0.018594536844111803, 0.0530076187705834, 0.0027685413804410695, 0.00037189073688223724], [0.019353497531626573, 0.0490707566771454, 0.0025677593751218504, 0.00038706995063253133], [0.020143436206386842, 0.04687883170966378, 0.0024119133732668076, 0.0004028687241277376], [0.020965617276035284, 0.04919955377214455, 0.0024276503561561644, 0.0004193123455207056], [0.021821356756689787, 0.05204111270310913, 0.00245561515567379, 0.00043642713513379616], [0.022712024379411822, 0.04925178172610669, 0.0023335505076022252, 0.00045424048758823873], [0.02363904578265312, 0.04317260894774357, 0.00211385396560445, 0.0004727809156530611], [0.024603904794189984, 0.0383043276355005, 0.0019158755178575817, 0.0004920780958838009], [0.02560814580619774, 0.04444220010645997, 0.002018641932709427, 0.0005121629161239545], [0.026653376247267036, 0.039587001147536376, 0.0018488058581743547, 0.0005330675249453423], [0.027741269155318757, 0.036677858215866437, 0.0017473224966445143, 0.0005548253831063766], [0.028873565855535847, 0.037663512267048754, 0.0017682821318945074, 0.0005774713171107174], [0.030052078747598535, 0.036755569252809664, 0.0017350440273063527, 0.0006010415749519698], [0.03127869420668419, 0.03854639441776167, 0.0017965558626918197, 0.0006255738841336837], [0.032555375602875386, 0.032866785139061716, 0.0016217721152892931, 0.000651107512057509], [0.03388416644380907, 0.0315131968037535, 0.0016061232808323794, 0.0006776833288761816], [0.0352671936455972, 0.030280345918169513, 0.0015885947028228238, 0.0007053438729119448], [0.03670667093725423, 0.025036982048446406, 0.0014176844815086535, 0.0007341334187450851], [0.038204902404080934, 0.02083180456328542, 0.001280336546816776, 0.0007640980480816198], [0.03976428617567608, 0.019376976329704945, 0.0012712203272554497, 0.0007952857235135231], [0.04138731826447918, 0.016729675515039004, 0.0011715497338181137, 0.000827746365289584], [0.04307659656098854, 0.013996303090353096, 0.0010654383375290077, 0.0008615319312197701], [0.0448348249920493, 0.010621480384334052, 0.0009246807782300395, 0.0008966964998409904], [0.04666481784886764, 0.007820332463525126, 0.0008093102454836752, 0.000933296356977354], [0.04856950429167857, 0.0060428022894521575, 0.0007183835413384203, 0.0009713900858335685], [0.050551933038277694, 0.004095892971484393, 0.0005841670446995313, 0.0010110386607655557], [0.05261527724392169, 0.005111525161941947, 0.0006658003030884043, 0.0010523055448784409], [0.05476283958040829, 0.0020207116612746484, 0.0004143866059231477, 0.0010952567916081637], [0.05699805752246577, 0.001711568931414378, 0.00038529038925611664, 0.0011399611504493146], [0.05932450884991336, 0.0008496305883131249, 0.00027095330976641694, 0.001186490176998272], [0.06174591737439962, 0.0008142116035177235, 0.00027251395576638693, 0.0012349183474879948], [0.06426615889988532, 8.92042382623096e-05, 8.920423826322552e-05, 0.0012853231779977048], [0.06688926742641126, 9.339736346561163e-05, 9.339736346489978e-05, 0.0013377853485282282], [0.06961944160708111, 0.00040599169078880156, 0.0002030320824188672, 0.0013923888321416208], [0.07246105146859462, 0.0002183257352075823, 0.00015439324988622013, 0.0014492210293718943], [0.07541864540608828, 0.00012684339163879, 0.00012684339163797725, 0.001508372908121773], [0.07849695746347965, 0.0, 0.0, 0.001569939149269589], [0.08170091491096862, 0.0, 0.0, 0.0016340182982193738], [0.08503564613182449, 0.0004165748322677754, 0.00024090333523406435, 0.001700712922636495], [0.08850648883108263, 0.0, 0.0, 0.0017701297766216512], [0.09211899857929008, 0.0, 0.0, 0.001842379971585803], [0.0958789577049754, 0.0, 0.0, 0.0019175791540995135], [0.09979238455007644, 0.0, 0.0, 0.001995847691001529], [0.10386554310314079, 0.0, 0.0, 0.0020773108620628228]], "data_range": [0.0021999999999999997, 0.10386554310314079], "simulation_range": [0.0021999999999999997, 0.10386554310314079]}], "layers": [{"name": "Al2O3", "thickness": "Al2O3 Thickness", "SLD": "Al2O3 SLD", "roughness": "Al2O3 Roughness", "hydration": "", "hydrate_with": "bulk out"}, {"name": "Ti0.27Co0.73", "thickness": "Ti0.27Co0.73 Thickness", "SLD": "Ti0.27Co0.73 SLD", "roughness": "Ti0.27Co0.73 Roughness", "hydration": "", "hydrate_with": "bulk out"}], "domain_contrasts": [], "contrasts": [{"name": "Structural evolution of the CO2/Water interface", "data": "prist4", "background": "Background 1", "background_action": "add", "bulk_in": "vacuum SLD", "bulk_out": "Si SLD", "scalefactor": "Scalefactor 1", "resolution": "prist4 Resolution", "resample": false, "model": ["Al2O3", "Ti0.27Co0.73"]}]} \ No newline at end of file +{"name": "Example Project", "calculation": "normal", "model": "standard layers", "geometry": "air/substrate", "absorption": false, "parameters": [{"name": "Substrate Roughness", "min": 1.0, "value": 3.0, "max": 5.0, "fit": true, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "Al2O3 Thickness", "min": 20.0, "value": 20.0, "max": 20.0, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "Al2O3 Roughness", "min": 3.0, "value": 3.0, "max": 3.0, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "Al2O3 SLD", "min": 5.715275837467511e-06, "value": 5.715275837467511e-06, "max": 5.715275837467511e-06, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "Ti0.27Co0.73 Thickness", "min": 93.0, "value": 93.0, "max": 93.0, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "Ti0.27Co0.73 Roughness", "min": 3.0, "value": 3.0, "max": 3.0, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}, {"name": "Ti0.27Co0.73 SLD", "min": 6.720584953375607e-07, "value": 6.720584953375607e-07, "max": 6.720584953375607e-07, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "bulk_in": [{"name": "vacuum SLD", "min": 0.0, "value": 0.0, "max": 0.0, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "bulk_out": [{"name": "Si SLD", "min": 2.07370547828562e-06, "value": 2.07370547828562e-06, "max": 2.07370547828562e-06, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "scalefactors": [{"name": "Scalefactor", "min": 0.0, "value": 1.0, "max": 1.5, "fit": true, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "domain_ratios": [], "background_parameters": [{"name": "Background Parameter", "min": 0.0, "value": 0.025, "max": 1.0, "fit": true, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "backgrounds": [{"name": "Background", "type": "constant", "source": "Background Parameter", "value_1": "", "value_2": "", "value_3": "", "value_4": "", "value_5": ""}], "resolution_parameters": [{"name": "Resolution Param 1", "min": 0.01, "value": 0.03, "max": 0.05, "fit": false, "prior_type": "uniform", "mu": 0.0, "sigma": Infinity, "show_priors": false}], "resolutions": [{"name": "Data Resolution", "type": "data", "source": "", "value_1": "", "value_2": "", "value_3": "", "value_4": "", "value_5": ""}], "custom_files": [], "data": [{"name": "Simulation", "data": [], "data_range": [], "simulation_range": [0.005, 0.7]}, {"name": "prist4", "data": [[0.0021999999999999997, 0.004724119389721505, 0.004724119389721505, 0.00019999999999999987], [0.0026, 0.0, 0.0, 0.0002000000000000001], [0.003, 0.0049441079014990305, 0.0028632759811688313, 0.0002000000000000001], [0.0034000000000000002, 0.00539571466421478, 0.0027033018099334193, 0.00019999999999999987], [0.0038, 0.011948517768746966, 0.0037903477990210636, 0.0002000000000000001], [0.004200000000000001, 0.016302332669940297, 0.003972317564845323, 0.0002000000000000001], [0.0046, 0.02265216487165058, 0.0045763672802481776, 0.0002000000000000001], [0.005, 0.023020814468949415, 0.00425372711337262, 0.00019999999999999966], [0.0054, 0.027305557750665344, 0.004428700971127359, 0.0002000000000000001], [0.0058, 0.019457945835850306, 0.0037817426451169783, 0.0002000000000000001], [0.006200000000000001, 0.027645506109865266, 0.004267993991409073, 0.0002000000000000001], [0.0066, 0.024223034347324195, 0.0037655052701117517, 0.0002000000000000001], [0.007, 0.028408308819418325, 0.0037377941755602716, 0.00019999999999999966], [0.0074, 0.057460495308053604, 0.0052154049057105455, 0.0002000000000000001], [0.0078, 0.1489883351950982, 0.00754789840356179, 0.0002000000000000001], [0.008199999999999999, 0.3520480929443021, 0.011146891694516669, 0.00019999999999999966], [0.0086, 0.5317657760789548, 0.01351725179531962, 0.00019999999999999966], [0.009, 0.7914500646501588, 0.016276277463585134, 0.00020000000000000052], [0.009399999999999999, 0.9680331047846104, 0.01782748799306378, 0.00019999999999999966], [0.0098, 1.0324643310179094, 0.018104900945963596, 0.00020000000000000052], [0.010204081632653062, 0.6287661683321234, 0.013873373556929145, 0.00020408163265306107], [0.010620574760516453, 0.3506955915110479, 0.010136613757789808, 0.00021241149521033023], [0.011054067607884473, 0.23477751708069897, 0.008109962639928676, 0.000221081352157689], [0.011505254040859348, 0.18964302712880826, 0.007180573014831645, 0.00023010508081718756], [0.011974856246608712, 0.14285208497806512, 0.006016224926747713, 0.00023949712493217482], [0.012463625889327434, 0.12188457497836602, 0.005435279585343197, 0.00024927251778654805], [0.012972345313381616, 0.10530945504618572, 0.005027517945960155, 0.00025944690626763297], [0.013501828795560456, 0.08038795087657985, 0.004197556276825506, 0.0002700365759112089], [0.014052923848440476, 0.07313672279549625, 0.003958200398418697, 0.00028105847696880976], [0.01462651257694825, 0.06129841978151465, 0.0034783001152817426, 0.0002925302515389659], [0.01522351309029308, 0.06240905936586468, 0.003479800062460076, 0.000304470261805862], [0.015844880971529533, 0.05651280096554304, 0.0032223775371921573, 0.00031689761943059103], [0.016491610807102167, 0.05044073793552524, 0.00290210672478378, 0.0003298322161420439], [0.017164737778820625, 0.0502775250441711, 0.002825286449304508, 0.00034329475557641313], [0.0178653393208133, 0.05168970509722787, 0.002811814341605395, 0.0003573067864162654], [0.018594536844111803, 0.0530076187705834, 0.0027685413804410695, 0.00037189073688223724], [0.019353497531626573, 0.0490707566771454, 0.0025677593751218504, 0.00038706995063253133], [0.020143436206386842, 0.04687883170966378, 0.0024119133732668076, 0.0004028687241277376], [0.020965617276035284, 0.04919955377214455, 0.0024276503561561644, 0.0004193123455207056], [0.021821356756689787, 0.05204111270310913, 0.00245561515567379, 0.00043642713513379616], [0.022712024379411822, 0.04925178172610669, 0.0023335505076022252, 0.00045424048758823873], [0.02363904578265312, 0.04317260894774357, 0.00211385396560445, 0.0004727809156530611], [0.024603904794189984, 0.0383043276355005, 0.0019158755178575817, 0.0004920780958838009], [0.02560814580619774, 0.04444220010645997, 0.002018641932709427, 0.0005121629161239545], [0.026653376247267036, 0.039587001147536376, 0.0018488058581743547, 0.0005330675249453423], [0.027741269155318757, 0.036677858215866437, 0.0017473224966445143, 0.0005548253831063766], [0.028873565855535847, 0.037663512267048754, 0.0017682821318945074, 0.0005774713171107174], [0.030052078747598535, 0.036755569252809664, 0.0017350440273063527, 0.0006010415749519698], [0.03127869420668419, 0.03854639441776167, 0.0017965558626918197, 0.0006255738841336837], [0.032555375602875386, 0.032866785139061716, 0.0016217721152892931, 0.000651107512057509], [0.03388416644380907, 0.0315131968037535, 0.0016061232808323794, 0.0006776833288761816], [0.0352671936455972, 0.030280345918169513, 0.0015885947028228238, 0.0007053438729119448], [0.03670667093725423, 0.025036982048446406, 0.0014176844815086535, 0.0007341334187450851], [0.038204902404080934, 0.02083180456328542, 0.001280336546816776, 0.0007640980480816198], [0.03976428617567608, 0.019376976329704945, 0.0012712203272554497, 0.0007952857235135231], [0.04138731826447918, 0.016729675515039004, 0.0011715497338181137, 0.000827746365289584], [0.04307659656098854, 0.013996303090353096, 0.0010654383375290077, 0.0008615319312197701], [0.0448348249920493, 0.010621480384334052, 0.0009246807782300395, 0.0008966964998409904], [0.04666481784886764, 0.007820332463525126, 0.0008093102454836752, 0.000933296356977354], [0.04856950429167857, 0.0060428022894521575, 0.0007183835413384203, 0.0009713900858335685], [0.050551933038277694, 0.004095892971484393, 0.0005841670446995313, 0.0010110386607655557], [0.05261527724392169, 0.005111525161941947, 0.0006658003030884043, 0.0010523055448784409], [0.05476283958040829, 0.0020207116612746484, 0.0004143866059231477, 0.0010952567916081637], [0.05699805752246577, 0.001711568931414378, 0.00038529038925611664, 0.0011399611504493146], [0.05932450884991336, 0.0008496305883131249, 0.00027095330976641694, 0.001186490176998272], [0.06174591737439962, 0.0008142116035177235, 0.00027251395576638693, 0.0012349183474879948], [0.06426615889988532, 8.92042382623096e-05, 8.920423826322552e-05, 0.0012853231779977048], [0.06688926742641126, 9.339736346561163e-05, 9.339736346489978e-05, 0.0013377853485282282], [0.06961944160708111, 0.00040599169078880156, 0.0002030320824188672, 0.0013923888321416208], [0.07246105146859462, 0.0002183257352075823, 0.00015439324988622013, 0.0014492210293718943], [0.07541864540608828, 0.00012684339163879, 0.00012684339163797725, 0.001508372908121773], [0.07849695746347965, 0.0, 0.0, 0.001569939149269589], [0.08170091491096862, 0.0, 0.0, 0.0016340182982193738], [0.08503564613182449, 0.0004165748322677754, 0.00024090333523406435, 0.001700712922636495], [0.08850648883108263, 0.0, 0.0, 0.0017701297766216512], [0.09211899857929008, 0.0, 0.0, 0.001842379971585803], [0.0958789577049754, 0.0, 0.0, 0.0019175791540995135], [0.09979238455007644, 0.0, 0.0, 0.001995847691001529], [0.10386554310314079, 0.0, 0.0, 0.0020773108620628228]], "data_range": [0.0021999999999999997, 0.10386554310314079], "simulation_range": [0.0021999999999999997, 0.10386554310314079]}], "layers": [{"name": "Al2O3", "thickness": "Al2O3 Thickness", "SLD": "Al2O3 SLD", "roughness": "Al2O3 Roughness", "hydration": "", "hydrate_with": "bulk out"}, {"name": "Ti0.27Co0.73", "thickness": "Ti0.27Co0.73 Thickness", "SLD": "Ti0.27Co0.73 SLD", "roughness": "Ti0.27Co0.73 Roughness", "hydration": "", "hydrate_with": "bulk out"}], "domain_contrasts": [], "contrasts": [{"name": "prist4", "data": "prist4", "background": "Background", "background_action": "add", "bulk_in": "vacuum SLD", "bulk_out": "Si SLD", "scalefactor": "Scalefactor", "resolution": "Data Resolution", "resample": false, "model": ["Al2O3", "Ti0.27Co0.73"]}]} \ No newline at end of file diff --git a/tests/test_orso_utils.py b/tests/test_orso_utils.py index 253bcb36..4fc0f064 100644 --- a/tests/test_orso_utils.py +++ b/tests/test_orso_utils.py @@ -9,8 +9,8 @@ from orsopy.fileio.model_language import SampleModel from RATapi.examples.bayes_benchmark.bayes_benchmark import get_project -from RATapi.project import Project, class_lists -from RATapi.utils.orso import load_ort_data, orso_model_to_rat, ort_to_project +from RATapi.project import Project +from RATapi.utils.orso import ORSOProject, orso_model_to_rat TEST_DIR_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "test_data") @@ -92,10 +92,7 @@ def test_load_ort_data(test_data): data_strings[-1] += line expected_data = list(map(lambda s: np.loadtxt(StringIO(s)), data_strings)) - actual_data = load_ort_data(Path(TEST_DIR_PATH, test_data)) - - if not isinstance(actual_data, list): - actual_data = [actual_data] + actual_data = ORSOProject(Path(TEST_DIR_PATH, test_data)).data assert len(actual_data) == len(expected_data) for actual_dataset, expected_dataset in zip(actual_data, expected_data): @@ -111,11 +108,14 @@ def test_load_ort_data(test_data): ) def test_load_ort_project(test_data, expected_data): """Test that a project with model data is loaded correctly.""" - project = ort_to_project(Path(TEST_DIR_PATH, test_data)) + ort_data = ORSOProject(Path(TEST_DIR_PATH, test_data)) + sample = ort_data.samples[0] exp_project = Project.load(Path(TEST_DIR_PATH, expected_data)) - for class_list in class_lists: - assert getattr(project, class_list) == getattr(exp_project, class_list) + for class_list in ["bulk_in", "bulk_out"]: + assert getattr(sample, class_list) == getattr(exp_project, class_list)[0] + assert sample.parameters == exp_project.parameters[1:] + assert sample.layers == exp_project.layers - for data, exp_data in zip(project.data, exp_project.data): + for data, exp_data in zip(ort_data.data, exp_project.data[1:]): np.testing.assert_array_equal(data.data, exp_data.data) From b070138b6619f482201a854797a5aaca66801902 Mon Sep 17 00:00:00 2001 From: alexhroom Date: Fri, 28 Feb 2025 11:47:17 +0000 Subject: [PATCH 09/16] fixed print formatting --- .../orso_integration/orso_integration.ipynb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/RATapi/examples/orso_integration/orso_integration.ipynb b/RATapi/examples/orso_integration/orso_integration.ipynb index f8b14ff4..016f3578 100644 --- a/RATapi/examples/orso_integration/orso_integration.ipynb +++ b/RATapi/examples/orso_integration/orso_integration.ipynb @@ -46,9 +46,9 @@ "source": [ "# create the RAT parameters and layers from this model\n", "sample = RATapi.utils.orso.orso_model_to_rat(\"air | Ni 100 | SiO2 0.5 | Si\")\n", - "print(\"Bulk in:\\n\", sample.bulk_in, \"\\nBulk out:\\n\", sample.bulk_out)\n", - "print(\"Parameters:\\n\", sample.parameters)\n", - "print(\"Layers:\\n\", sample.layers)" + "print(\"Bulk in:\\n\", sample.bulk_in, \"\\nBulk out:\\n\", sample.bulk_out, sep=\"\")\n", + "print(\"Parameters:\\n\", sample.parameters, sep=\"\")\n", + "print(\"Layers:\\n\", sample.layers, sep=\"\")" ] }, { @@ -65,8 +65,8 @@ "outputs": [], "source": [ "sample = RATapi.utils.orso.orso_model_to_rat(\"vacuum | B4C 100 | SiO2 0.5 | Si\", absorption=True)\n", - "print(\"Parameters:\\n\", sample.parameters)\n", - "print(\"Layers:\\n\", sample.layers)" + "print(\"Parameters:\\n\", sample.parameters, sep=\"\")\n", + "print(\"Layers:\\n\", sample.layers, sep=\"\")" ] }, { @@ -85,9 +85,9 @@ "outputs": [], "source": [ "sample = RATapi.utils.orso.orso_model_to_rat(\"air | 5 ( Si 7 | Fe 7 ) | Si\")\n", - "print(\"Parameters:\\n\", sample.parameters)\n", - "print(\"Layers:\\n\", sample.layers)\n", - "print(\"Model:\\n\", sample.model)" + "print(\"Parameters:\\n\", sample.parameters, sep=\"\")\n", + "print(\"Layers:\\n\", sample.layers, sep=\"\")\n", + "print(\"Model:\\n\", sample.model, sep=\"\")" ] }, { @@ -108,7 +108,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ From e4140719f0bc61b0745eabe7216a30d6968cbdd7 Mon Sep 17 00:00:00 2001 From: alexhroom Date: Fri, 28 Feb 2025 14:28:35 +0000 Subject: [PATCH 10/16] review fixes --- .../orso_integration/orso_integration.ipynb | 16 +++---- RATapi/utils/orso.py | 48 ++++++++++++++++++- 2 files changed, 52 insertions(+), 12 deletions(-) diff --git a/RATapi/examples/orso_integration/orso_integration.ipynb b/RATapi/examples/orso_integration/orso_integration.ipynb index 016f3578..4d2f3b88 100644 --- a/RATapi/examples/orso_integration/orso_integration.ipynb +++ b/RATapi/examples/orso_integration/orso_integration.ipynb @@ -46,9 +46,7 @@ "source": [ "# create the RAT parameters and layers from this model\n", "sample = RATapi.utils.orso.orso_model_to_rat(\"air | Ni 100 | SiO2 0.5 | Si\")\n", - "print(\"Bulk in:\\n\", sample.bulk_in, \"\\nBulk out:\\n\", sample.bulk_out, sep=\"\")\n", - "print(\"Parameters:\\n\", sample.parameters, sep=\"\")\n", - "print(\"Layers:\\n\", sample.layers, sep=\"\")" + "print(sample)" ] }, { @@ -65,8 +63,7 @@ "outputs": [], "source": [ "sample = RATapi.utils.orso.orso_model_to_rat(\"vacuum | B4C 100 | SiO2 0.5 | Si\", absorption=True)\n", - "print(\"Parameters:\\n\", sample.parameters, sep=\"\")\n", - "print(\"Layers:\\n\", sample.layers, sep=\"\")" + "print(sample)" ] }, { @@ -85,9 +82,7 @@ "outputs": [], "source": [ "sample = RATapi.utils.orso.orso_model_to_rat(\"air | 5 ( Si 7 | Fe 7 ) | Si\")\n", - "print(\"Parameters:\\n\", sample.parameters, sep=\"\")\n", - "print(\"Layers:\\n\", sample.layers, sep=\"\")\n", - "print(\"Model:\\n\", sample.model, sep=\"\")" + "print(sample)" ] }, { @@ -108,14 +103,15 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import pathlib\n", "data_path = pathlib.Path(\"../data\")\n", "\n", - "orso_data = RATapi.utils.orso.ORSOProject(data_path / \"prist5_10K_m_025.Rqz.ort\")" + "orso_data = RATapi.utils.orso.ORSOProject(data_path / \"prist5_10K_m_025.Rqz.ort\")\n", + "print(orso_data)" ] }, { diff --git a/RATapi/utils/orso.py b/RATapi/utils/orso.py index 5bb339e6..16204d78 100644 --- a/RATapi/utils/orso.py +++ b/RATapi/utils/orso.py @@ -2,9 +2,11 @@ from dataclasses import dataclass from pathlib import Path +from textwrap import shorten from typing import Union import orsopy +import prettytable from orsopy.fileio import load_orso from RATapi import ClassList @@ -25,8 +27,36 @@ class ORSOProject: def __init__(self, filepath: Union[str, Path], absorption: bool = False): ort_data = load_orso(filepath) - self.data = [Data(name=dataset.info.data_source.sample.name, data=dataset.data) for dataset in ort_data] - self.samples = [orso_model_to_rat(dataset.info.data_source.sample.model) for dataset in ort_data] + self.data = ClassList( + [Data(name=dataset.info.data_source.sample.name, data=dataset.data) for dataset in ort_data] + ) + self.samples = [ + orso_model_to_rat(dataset.info.data_source.sample.model, absorption=absorption) for dataset in ort_data + ] + + def __str__(self): + data_str = f"Data:\n{str(self.data)}\n\n" + if len(self.samples) == 1: + samples_str = f"Sample:\n{str(self.samples[0])}" + else: + table = prettytable.PrettyTable() + table.field_names = ["index", "bulk in", "bulk out", "parameters", "layers", "model"] + for index, sample in enumerate(self.samples): + if sample is None: + row = [index, "", "", "", "", ""] + else: + row = [ + index, + sample.bulk_in.name, + sample.bulk_out.name, + shorten(", ".join([p.name for p in sample.parameters]), width=20, placeholder="..."), + shorten(", ".join([layer.name for layer in sample.layers]), width=20, placeholder="..."), + shorten(str(sample.model), width=20, placeholder="..."), + ] + table.add_row(row) + samples_str = table.get_string() + + return data_str + samples_str @dataclass @@ -39,6 +69,20 @@ class ORSOSample: layers: Union[ClassList[Layer], ClassList[AbsorptionLayer]] model: list[str] + def __str__(self): + return ( + "Bulk in:\n" + f"{str(self.bulk_in)}\n\n" + "Bulk out:\n" + f"{str(self.bulk_out)}\n\n" + "Parameters:\n" + f"{str(self.parameters)}\n\n" + "Layers:\n" + f"{str(self.layers)}\n\n" + "Model:\n" + f"{self.model}" + ) + def orso_model_to_rat( model: Union[orsopy.fileio.model_language.SampleModel, str], absorption: bool = False From 7b0c83db022563eb4d2df9be3cfad945d14fc769 Mon Sep 17 00:00:00 2001 From: alexhroom Date: Mon, 3 Mar 2025 09:23:44 +0000 Subject: [PATCH 11/16] fixed repeat names --- RATapi/utils/orso.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/RATapi/utils/orso.py b/RATapi/utils/orso.py index 16204d78..e640cc50 100644 --- a/RATapi/utils/orso.py +++ b/RATapi/utils/orso.py @@ -1,6 +1,7 @@ """Readers from file formats.""" from dataclasses import dataclass +from itertools import count from pathlib import Path from textwrap import shorten from typing import Union @@ -27,9 +28,17 @@ class ORSOProject: def __init__(self, filepath: Union[str, Path], absorption: bool = False): ort_data = load_orso(filepath) - self.data = ClassList( - [Data(name=dataset.info.data_source.sample.name, data=dataset.data) for dataset in ort_data] - ) + datasets = [Data(name=dataset.info.data_source.sample.name, data=dataset.data) for dataset in ort_data] + # orso datasets in the same file can have repeated names! + # but classlists do not allow this + # use this dict to keep track of counts for repeated names + name_counts = {d.name: count(1) for d in datasets} + names = [d.name for d in datasets] + if len(names) > len(list(set(names))): + for i, data in enumerate(datasets): + if data.name in names[:i]: + data.name += f"-{name_counts[data.name]}" + self.data = ClassList(datasets) self.samples = [ orso_model_to_rat(dataset.info.data_source.sample.model, absorption=absorption) for dataset in ort_data ] From f895ffd11e49ab718689b20221c2bbfd505d8432 Mon Sep 17 00:00:00 2001 From: "Alex H. Room" <69592136+alexhroom@users.noreply.github.com> Date: Wed, 5 Mar 2025 13:05:15 +0000 Subject: [PATCH 12/16] fix iterator --- RATapi/utils/orso.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RATapi/utils/orso.py b/RATapi/utils/orso.py index e640cc50..e907bb28 100644 --- a/RATapi/utils/orso.py +++ b/RATapi/utils/orso.py @@ -37,7 +37,7 @@ def __init__(self, filepath: Union[str, Path], absorption: bool = False): if len(names) > len(list(set(names))): for i, data in enumerate(datasets): if data.name in names[:i]: - data.name += f"-{name_counts[data.name]}" + data.name += f"-{next(name_counts[data.name])}" self.data = ClassList(datasets) self.samples = [ orso_model_to_rat(dataset.info.data_source.sample.model, absorption=absorption) for dataset in ort_data From adc6d99ee1b50b052f803b1544714d941cc215a0 Mon Sep 17 00:00:00 2001 From: alexhroom Date: Mon, 10 Mar 2025 14:53:18 +0000 Subject: [PATCH 13/16] new data --- RATapi/examples/data/c_PLP0011859_q.ort | 441 ++++++++++++++++++ RATapi/examples/data/prist5_10K_m_025.Rqz.ort | 124 ----- 2 files changed, 441 insertions(+), 124 deletions(-) create mode 100644 RATapi/examples/data/c_PLP0011859_q.ort delete mode 100644 RATapi/examples/data/prist5_10K_m_025.Rqz.ort diff --git a/RATapi/examples/data/c_PLP0011859_q.ort b/RATapi/examples/data/c_PLP0011859_q.ort new file mode 100644 index 00000000..7a7bf1fd --- /dev/null +++ b/RATapi/examples/data/c_PLP0011859_q.ort @@ -0,0 +1,441 @@ +# # ORSO reflectivity data file | 1.1 standard | YAML encoding | https://www.reflectometry.org/ +# # handwritten test file header created to test RAT orsopy integration! +# # example data from refnx: https://refnx.readthedocs.io/en/latest/getting_started.html#fitting-a-neutron-reflectometry-dataset +# data_source: +# owner: +# name: null +# affiliation: null +# measurement: +# instrument_settings: null +# data_files: null +# experiment: +# title: +# probe: neutron +# instrument: None +# start_date: 1970-01-01T00:00:00 +# sample: +# name: film on silicon +# model: +# stack: Si | SiO2 30 | film 250 | D2O +# materials: +# film: +# sld: 2.0e-6 +# roughness: 3 +# reduction: +# software: null +# timestamp: null +# data_set: 0 +# columns: +# - {name: Qz, unit: 1/angstrom, physical_quantity: normal momentum transfer} +# - {name: R, unit: '', physical_quantity: specular reflectivity} +# - {error_of: R, error_type: uncertainty, value_is: sigma} +# - {error_of: Qz, error_type: resolution, value_is: sigma} +# # Qz (1/angstrom) R () sR sQz +0.00806022 0.709581 0.0850676 0.000331422 +0.00813662 0.862281 0.11237 0.000334619 +0.00826375 0.908647 0.0790047 0.000339939 +0.00837067 0.773292 0.0792728 0.000344412 +0.00845033 1.05797 0.125959 0.000347744 +0.00853083 1.01566 0.113295 0.000351111 +0.00861217 0.734717 0.0611566 0.000354512 +0.00869437 0.769216 0.0617058 0.000357949 +0.00877743 1.11574 0.11273 0.000361421 +0.00886136 0.972303 0.089716 0.000364929 +0.00894616 0.751214 0.0549393 0.000368473 +0.00903185 0.797649 0.0567122 0.000372053 +0.00911844 0.922189 0.0685841 0.000375671 +0.00920593 0.975755 0.0729395 0.000379325 +0.00929432 0.819504 0.0521617 0.000383017 +0.00938364 0.78832 0.0479473 0.000386748 +0.00947389 0.794701 0.0460224 0.000390516 +0.00956508 0.8744 0.0515164 0.000394323 +0.00965721 0.839662 0.0474285 0.00039817 +0.0097503 0.800872 0.0439958 0.000402055 +0.00984436 1.1171 0.073733 0.000405981 +0.00993939 0.888411 0.049541 0.000409947 +0.0100354 0.779129 0.0389873 0.000413953 +0.0101324 0.799968 0.0389974 0.000418001 +0.0102304 0.843124 0.041598 0.00042209 +0.0103294 0.961332 0.0492536 0.00042622 +0.0104868 0.880544 0.0299083 0.000432781 +0.0106327 0.755735 0.0320851 0.000438868 +0.0107359 0.971231 0.0453485 0.00044317 +0.0108401 0.895549 0.0390542 0.000447516 +0.0109454 0.862589 0.0358072 0.000451906 +0.0110518 0.890992 0.0361257 0.000456342 +0.0111593 0.900348 0.0367924 0.000460822 +0.0112679 0.845927 0.0321881 0.000465348 +0.0113776 0.943152 0.0365533 0.000469921 +0.0114884 0.995631 0.0390116 0.00047454 +0.0116004 0.969594 0.0363623 0.000479205 +0.0117135 0.905181 0.032041 0.000483919 +0.0118278 0.893381 0.0306119 0.00048868 +0.0119433 0.919602 0.0314677 0.00049349 +0.0120599 0.918998 0.0306097 0.000498349 +0.0121777 0.781056 0.0235542 0.000503257 +0.0122968 0.864915 0.0272025 0.000508215 +0.012417 0.843516 0.0255015 0.000513223 +0.0125385 0.998418 0.0319722 0.000518283 +0.0126612 0.88126 0.0260273 0.000523393 +0.0127852 0.883569 0.0255862 0.000528556 +0.0129105 0.93767 0.0274651 0.000533771 +0.013037 1.0192 0.0305107 0.000539039 +0.0131648 0.845526 0.0226269 0.00054436 +0.0132939 0.873804 0.0232468 0.000549735 +0.0134243 0.865953 0.0224906 0.000555165 +0.0135561 0.877982 0.0224491 0.00056065 +0.0136892 0.947545 0.0248985 0.00056619 +0.0138237 0.888154 0.0220962 0.000571787 +0.0139595 0.891362 0.0218148 0.00057744 +0.0140967 0.888456 0.0215092 0.00058315 +0.0142353 0.913717 0.0222586 0.000588919 +0.0143753 0.810364 0.0188289 0.000594745 +0.0145168 0.738548 0.0168827 0.000600631 +0.0146597 0.68651 0.0159742 0.000606576 +0.014804 0.58224 0.0135021 0.000612582 +0.0149498 0.446855 0.0100626 0.000618648 +0.015097 0.392461 0.00915549 0.000624775 +0.0152458 0.320517 0.00731959 0.000630965 +0.0153961 0.281006 0.00639909 0.000637217 +0.0155479 0.2401 0.00544239 0.000643532 +0.0157012 0.220881 0.00502437 0.000649911 +0.0158561 0.192033 0.00431441 0.000656354 +0.0160126 0.179849 0.00405159 0.000662863 +0.0161707 0.160069 0.00356202 0.000669437 +0.0163303 0.153129 0.00346777 0.000676078 +0.0164916 0.13422 0.003016 0.000682786 +0.0166545 0.12833 0.00288853 0.000689562 +0.016819 0.124794 0.00286182 0.000696406 +0.0169853 0.109127 0.0024831 0.000703319 +0.0171532 0.104429 0.00235392 0.000710302 +0.0173228 0.094683 0.00209162 0.000717355 +0.0175881 0.0896911 0.00143938 0.000728391 +0.0178419 0.0809144 0.00187278 0.000738945 +0.0180185 0.0746544 0.00171422 0.000746287 +0.0181968 0.0703661 0.00163423 0.000753704 +0.018377 0.0690445 0.0016053 0.000761195 +0.0185589 0.0627055 0.00146146 0.000768762 +0.0187427 0.0593915 0.00140007 0.000776405 +0.0189284 0.0575477 0.00136095 0.000784125 +0.0191159 0.0513833 0.00122668 0.000791923 +0.0193054 0.0492267 0.00117824 0.0007998 +0.0194967 0.0452174 0.00107962 0.000807755 +0.01969 0.0424556 0.00102225 0.000815792 +0.0198852 0.0412613 0.000994781 0.000823909 +0.0200824 0.0352333 0.00087779 0.000832108 +0.0202815 0.0335271 0.000836747 0.000840389 +0.0204827 0.0332684 0.000833959 0.000848754 +0.0206859 0.0316644 0.000789886 0.000857204 +0.0208912 0.02916 0.000749613 0.000865738 +0.0210985 0.0265201 0.000706383 0.000874359 +0.021308 0.0251829 0.000671389 0.000883066 +0.0215195 0.0238757 0.000642693 0.000891861 +0.0217331 0.0228929 0.000633068 0.000900745 +0.021949 0.0208646 0.000593128 0.000909718 +0.0221669 0.0208771 0.00059201 0.000918781 +0.0223871 0.0182228 0.000529205 0.000927936 +0.0226095 0.0177346 0.000525152 0.000937183 +0.0228341 0.0158714 0.000481877 0.000946523 +0.023061 0.0143255 0.000451619 0.000955957 +0.0232902 0.0142776 0.000452249 0.000965486 +0.0235217 0.0126624 0.000419845 0.000975112 +0.0237555 0.0122128 0.000413786 0.000984834 +0.0239917 0.0104608 0.000374532 0.000994654 +0.0242302 0.0106133 0.000381052 0.00100457 +0.0244712 0.00987903 0.000364128 0.00101459 +0.0247145 0.00837203 0.000331393 0.00102471 +0.0249603 0.00767048 0.000307705 0.00103493 +0.0252086 0.00734489 0.000304978 0.00104526 +0.0254594 0.00679865 0.000289868 0.00105569 +0.0257127 0.0059163 0.000267178 0.00106622 +0.0259685 0.00534498 0.000251536 0.00107686 +0.0262269 0.00512265 0.000247412 0.0010876 +0.026488 0.00475031 0.000237953 0.00109846 +0.0267516 0.00430715 0.00022385 0.00110942 +0.0270179 0.00401817 0.000220051 0.0011205 +0.0272868 0.00353915 0.000204653 0.00113168 +0.0275585 0.00381819 0.000207944 0.00114298 +0.0278329 0.00286475 0.000181921 0.0011544 +0.02811 0.0027958 0.000176691 0.00116592 +0.02839 0.0026215 0.000175002 0.00117757 +0.0286727 0.00248477 0.000169456 0.00118933 +0.0289583 0.00242009 0.000170925 0.00120121 +0.0292467 0.00235926 0.00017006 0.0012132 +0.0295381 0.00197856 0.000160021 0.00122532 +0.0298323 0.0019472 0.000158282 0.00123757 +0.0301296 0.00173593 0.000152731 0.00124993 +0.0304298 0.00189459 0.000160305 0.00126242 +0.030733 0.00169668 0.000152574 0.00127504 +0.0310392 0.00179369 0.000159245 0.00128778 +0.0313486 0.00178686 0.000155202 0.00130065 +0.031661 0.00187201 0.000158395 0.00131365 +0.0319766 0.00168818 0.000149984 0.00132678 +0.0322953 0.00173237 0.000154325 0.00134004 +0.0326173 0.0015376 0.000145396 0.00135344 +0.0329424 0.00154134 0.000149756 0.00136697 +0.0332708 0.00170033 0.000157208 0.00138064 +0.0336026 0.00214224 0.000172887 0.00139445 +0.0339376 0.00194402 0.000168689 0.0014084 +0.0342205 0.001914 0.000107714 0.00141748 +0.0346645 0.00198641 0.000143828 0.00143727 +0.0350219 0.00184974 0.000127974 0.00145177 +0.035385 0.00193264 0.000122708 0.00146643 +0.0357162 0.00218899 0.000149598 0.00148083 +0.0360773 0.00231432 0.000150345 0.00149568 +0.0364677 0.00183177 0.000104159 0.00151093 +0.0368263 0.00179715 0.000101292 0.00152596 +0.0371616 0.00227874 0.000141733 0.0015409 +0.0375421 0.00218339 0.00012946 0.00155639 +0.0379404 0.001799 9.62498e-05 0.00157213 +0.0383128 0.00182808 9.73464e-05 0.00158778 +0.038684 0.00194985 0.00010826 0.00160356 +0.0390692 0.00204214 0.000112245 0.00161957 +0.0394734 0.00165946 8.39554e-05 0.00163584 +0.0398633 0.00162031 8.07338e-05 0.00165215 +0.0402658 0.00158862 7.61769e-05 0.00166867 +0.0406608 0.00158251 7.82912e-05 0.0016853 +0.0410701 0.0014299 7.03445e-05 0.00170214 +0.0414781 0.00133612 6.49882e-05 0.00171913 +0.0418744 0.0017219 9.20006e-05 0.00173625 +0.0423049 0.00140489 6.78817e-05 0.00175363 +0.0427317 0.00114648 5.31515e-05 0.00177115 +0.0431546 0.00103013 4.8728e-05 0.00178884 +0.0435835 0.00101864 4.85163e-05 0.0018067 +0.0440155 0.00106025 5.14888e-05 0.00182475 +0.0444549 0.000911561 4.51767e-05 0.00184298 +0.0448983 0.000779536 3.74676e-05 0.00186138 +0.045347 0.000595757 2.86778e-05 0.00187998 +0.0457947 0.000647645 3.28669e-05 0.00189877 +0.0462512 0.000526839 2.66621e-05 0.00191774 +0.0467124 0.000436546 2.24095e-05 0.00193691 +0.0471783 0.000369605 1.92965e-05 0.00195626 +0.0476469 0.000331564 1.80855e-05 0.00197583 +0.0481208 0.000254584 1.44062e-05 0.00199557 +0.0485994 0.00020908 1.31243e-05 0.00201553 +0.0490828 0.000192937 1.26159e-05 0.00203569 +0.049571 0.000130922 9.99222e-06 0.00205605 +0.050064 0.000109823 9.08051e-06 0.00207663 +0.0505619 9.56548e-05 8.37009e-06 0.00209741 +0.0510655 7.92572e-05 7.69913e-06 0.00211839 +0.0515734 7.95605e-05 6.89856e-06 0.0021396 +0.0520864 7.22495e-05 6.10273e-06 0.00216102 +0.0526045 7.82513e-05 6.39136e-06 0.00218266 +0.0531279 8.63712e-05 6.56186e-06 0.00220452 +0.0536565 0.000133162 8.78984e-06 0.0022266 +0.0541905 0.000143632 8.17884e-06 0.00224891 +0.0547298 0.000158682 8.56534e-06 0.00227144 +0.0552745 0.000190007 9.75524e-06 0.00229421 +0.0558247 0.00023542 1.14172e-05 0.00231721 +0.0563804 0.000233932 1.03452e-05 0.00234044 +0.0569417 0.00024339 1.05955e-05 0.0023639 +0.0575087 0.000270858 1.12513e-05 0.00238761 +0.0580813 0.000310966 1.23355e-05 0.00241156 +0.0586597 0.000348327 1.35786e-05 0.00243575 +0.0592439 0.000332957 1.27559e-05 0.0024602 +0.059834 0.000354659 1.32236e-05 0.00248489 +0.06043 0.000354467 1.30661e-05 0.00250983 +0.0610319 0.000385515 1.40893e-05 0.00253502 +0.06164 0.000332509 1.20176e-05 0.00256048 +0.0622541 0.000333087 1.19715e-05 0.00258619 +0.0628744 0.000330307 1.19723e-05 0.00261217 +0.0635009 0.000322469 1.16291e-05 0.00263842 +0.0641337 0.000274462 9.94879e-06 0.00266493 +0.0647728 0.000279243 1.02537e-05 0.00269171 +0.0654184 0.000238938 8.96085e-06 0.00271877 +0.0660704 0.000233028 8.72665e-06 0.00274611 +0.066729 0.000186343 7.23614e-06 0.00277372 +0.0673942 0.000164949 6.6195e-06 0.00280162 +0.068066 0.000133244 5.54157e-06 0.00282981 +0.0687446 0.000115376 4.97162e-06 0.00285828 +0.06943 8.25033e-05 3.95115e-06 0.00288705 +0.0701223 6.71923e-05 3.57018e-06 0.00291611 +0.0708215 5.03322e-05 2.92623e-06 0.00294547 +0.0715278 3.33612e-05 2.5097e-06 0.00297513 +0.0722411 2.29052e-05 2.11638e-06 0.0030051 +0.0729338 1.87944e-05 1.86053e-06 0.00303317 +0.0736683 1.55344e-05 1.79821e-06 0.00306431 +0.0744015 1.82452e-05 1.95184e-06 0.00309508 +0.0751405 2.23562e-05 1.801e-06 0.00312604 +0.0758721 2.77362e-05 1.89014e-06 0.00315615 +0.0766402 3.93101e-05 2.30095e-06 0.00318888 +0.0773964 4.59669e-05 2.3324e-06 0.00322041 +0.0781061 5.54131e-05 2.45926e-06 0.00324807 +0.0788682 6.72605e-05 2.72957e-06 0.00327954 +0.0797953 7.65064e-05 2.77309e-06 0.00331828 +0.0807289 7.79472e-05 2.85741e-06 0.00335684 +0.0815334 8.50542e-05 2.9904e-06 0.00339073 +0.0823318 9.68569e-05 3.2227e-06 0.00342487 +0.0831605 9.4624e-05 3.16621e-06 0.00345952 +0.0840252 8.58564e-05 2.82446e-06 0.00349469 +0.0848648 8.10144e-05 2.66254e-06 0.00353001 +0.0857342 7.65592e-05 2.54978e-06 0.00356583 +0.0865553 7.38543e-05 2.48584e-06 0.00360169 +0.0874372 6.24971e-05 2.19092e-06 0.00363822 +0.0883163 5.49543e-05 2.00127e-06 0.00367507 +0.0891108 5.69454e-05 2.08158e-06 0.00371178 +0.0900416 4.2292e-05 1.72971e-06 0.00374959 +0.0909546 3.36754e-05 1.45891e-06 0.00378764 +0.0918504 2.54564e-05 1.24963e-06 0.00382594 +0.0927435 2.09221e-05 1.15976e-06 0.00386459 +0.0936289 1.53112e-05 1.06014e-06 0.00390356 +0.0945527 1.26565e-05 9.57753e-07 0.0039431 +0.0955178 9.33124e-06 8.62139e-07 0.0039832 +0.0964771 8.90152e-06 7.82897e-07 0.00402366 +0.0974189 1.07915e-05 8.93847e-07 0.0040644 +0.0984259 1.21368e-05 9.11308e-07 0.00410584 +0.0994201 1.5408e-05 9.07777e-07 0.0041476 +0.100425 1.93803e-05 9.60253e-07 0.00418981 +0.101434 2.09116e-05 1.04089e-06 0.00423243 +0.102499 2.51925e-05 1.07837e-06 0.0042757 +0.103498 2.8188e-05 1.13217e-06 0.00431908 +0.104546 2.9981e-05 1.17853e-06 0.0043631 +0.105608 3.05628e-05 1.15049e-06 0.0044076 +0.106682 2.81903e-05 1.09907e-06 0.00445257 +0.107758 2.69263e-05 1.0374e-06 0.00449797 +0.108831 2.54192e-05 1.01256e-06 0.0045438 +0.109916 2.2827e-05 9.3671e-07 0.00459012 +0.11104 1.76917e-05 7.9045e-07 0.00463704 +0.112117 1.54751e-05 7.6254e-07 0.00468423 +0.113244 1.17258e-05 6.68805e-07 0.00473208 +0.114319 1.05027e-05 6.59805e-07 0.00478019 +0.115464 8.12153e-06 5.84703e-07 0.00482905 +0.116645 4.98884e-06 5.26719e-07 0.00487853 +0.117762 4.90999e-06 5.36096e-07 0.00492824 +0.118925 5.30434e-06 5.24084e-07 0.00497863 +0.120129 5.68905e-06 4.91234e-07 0.00502965 +0.121346 6.44471e-06 5.06107e-07 0.00508123 +0.122586 7.45619e-06 5.05803e-07 0.0051334 +0.123823 8.24842e-06 5.0256e-07 0.00518608 +0.125091 1.06749e-05 5.84539e-07 0.00523939 +0.126361 1.13162e-05 5.72228e-07 0.00529323 +0.127643 1.1044e-05 5.76255e-07 0.00534765 +0.128932 1.06258e-05 5.65534e-07 0.00540265 +0.13021 9.33766e-06 5.25472e-07 0.00545814 +0.131547 8.9228e-06 5.00068e-07 0.00551441 +0.132854 6.43611e-06 4.44688e-07 0.00557113 +0.134162 6.18113e-06 4.55625e-07 0.00562844 +0.135515 4.68568e-06 4.03478e-07 0.00568647 +0.136824 4.66754e-06 3.80929e-07 0.00574496 +0.138204 4.2625e-06 3.76301e-07 0.00580426 +0.139589 3.8843e-06 3.57158e-07 0.00586419 +0.140989 3.69948e-06 3.79662e-07 0.00592478 +0.14243 3.65993e-06 3.54338e-07 0.00598611 +0.143851 4.55939e-06 3.66569e-07 0.00604802 +0.145263 4.58088e-06 3.47062e-07 0.00611055 +0.14675 4.82929e-06 3.50392e-07 0.00617393 +0.148225 4.93092e-06 3.5333e-07 0.00623794 +0.14971 4.781e-06 3.61256e-07 0.00630265 +0.151225 4.64484e-06 3.39711e-07 0.00636812 +0.152736 4.36508e-06 3.32459e-07 0.00643425 +0.154261 3.80706e-06 3.25378e-07 0.00650113 +0.155825 3.54415e-06 3.05388e-07 0.00656881 +0.157366 2.63269e-06 2.77355e-07 0.00663715 +0.158941 2.12968e-06 2.57061e-07 0.0067063 +0.160511 2.50908e-06 2.68417e-07 0.00677617 +0.162137 2.60626e-06 2.68354e-07 0.00684694 +0.163755 2.46796e-06 2.61811e-07 0.00691843 +0.165404 2.43769e-06 2.45708e-07 0.00699078 +0.167035 2.81846e-06 2.62635e-07 0.00706385 +0.168736 3.20191e-06 2.67722e-07 0.00713789 +0.17041 3.02096e-06 2.54866e-07 0.00721266 +0.172119 2.39855e-06 2.32464e-07 0.00728832 +0.173839 2.45824e-06 2.38546e-07 0.00736483 +0.175574 2.03366e-06 2.23196e-07 0.00744222 +0.177336 1.68404e-06 2.04828e-07 0.00752051 +0.179087 1.29383e-06 2.00765e-07 0.00759963 +0.180907 1.43967e-06 1.88207e-07 0.00767979 +0.182715 1.5402e-06 1.99998e-07 0.0077608 +0.184535 1.33849e-06 1.86482e-07 0.00784273 +0.186383 1.61599e-06 1.86369e-07 0.00792563 +0.188247 1.49347e-06 1.88386e-07 0.00800949 +0.190126 2.05968e-06 1.9207e-07 0.00809433 +0.192038 1.69015e-06 1.7677e-07 0.00818019 +0.193954 1.48837e-06 1.79274e-07 0.00826701 +0.1959 1.40382e-06 1.74728e-07 0.00835488 +0.19786 1.34689e-06 1.70569e-07 0.00844376 +0.199845 9.4771e-07 1.61779e-07 0.00853372 +0.201833 1.08955e-06 1.73502e-07 0.00862469 +0.203863 1.24635e-06 1.65466e-07 0.0087168 +0.205904 1.22737e-06 1.6449e-07 0.00880998 +0.207959 1.16896e-06 1.58456e-07 0.00890425 +0.210042 1.16172e-06 1.52198e-07 0.00899967 +0.21214 1.21689e-06 1.58854e-07 0.00909622 +0.214257 1.31757e-06 1.54607e-07 0.00919392 +0.216399 1.03279e-06 1.47292e-07 0.00929281 +0.21857 1.03066e-06 1.51473e-07 0.00939292 +0.220781 5.94535e-07 1.51172e-07 0.00949429 +0.222988 7.27996e-07 1.42928e-07 0.00959682 +0.225216 7.80631e-07 1.48525e-07 0.0097006 +0.227467 1.06339e-06 1.4993e-07 0.00980565 +0.229741 6.52697e-07 1.29668e-07 0.00991199 +0.232037 1.07438e-06 1.48453e-07 0.0100196 +0.234356 8.68763e-07 1.46862e-07 0.0101286 +0.236698 9.21868e-07 1.45082e-07 0.0102389 +0.239064 6.47149e-07 1.36809e-07 0.0103506 +0.241454 5.36393e-07 1.35688e-07 0.0104637 +0.243867 6.33717e-07 1.30403e-07 0.0105782 +0.246304 6.2927e-07 1.36557e-07 0.0106942 +0.248766 6.33292e-07 1.22453e-07 0.0108116 +0.251253 1.03705e-06 1.35409e-07 0.0109304 +0.253764 8.25286e-07 1.43161e-07 0.0110508 +0.256301 6.26825e-07 1.19257e-07 0.0111727 +0.258863 5.25259e-07 1.22741e-07 0.0112962 +0.26145 5.21832e-07 1.30918e-07 0.0114212 +0.264064 3.91659e-07 1.2137e-07 0.0115479 +0.266703 4.72439e-07 1.39973e-07 0.0116762 +0.269369 5.59536e-07 1.39151e-07 0.0118061 +0.272062 6.6407e-07 1.44867e-07 0.0119377 +0.274782 4.59378e-07 1.51466e-07 0.012071 +0.277529 3.66961e-07 1.43546e-07 0.0122061 +0.280303 5.31531e-07 1.48308e-07 0.012343 +0.283105 4.28914e-07 1.36145e-07 0.0124816 +0.285935 5.52006e-07 1.41983e-07 0.0126221 +0.288793 5.70264e-07 1.529e-07 0.0127644 +0.29168 5.04731e-07 1.36429e-07 0.0129086 +0.294596 6.61923e-07 1.40793e-07 0.0130548 +0.297541 7.60132e-07 1.60721e-07 0.0132029 +0.300516 4.68527e-07 1.34887e-07 0.0133529 +0.30352 4.4286e-07 1.47134e-07 0.0135051 +0.306554 4.89979e-07 1.4043e-07 0.0136592 +0.309619 3.60163e-07 1.33728e-07 0.0138155 +0.312714 2.90563e-07 1.48062e-07 0.0139739 +0.315841 5.19963e-07 1.51562e-07 0.0141344 +0.318998 4.66665e-07 1.56256e-07 0.0142972 +0.322187 3.88883e-07 1.57011e-07 0.0144622 +0.325408 4.46778e-07 1.55512e-07 0.0146295 +0.328662 3.23885e-07 1.52586e-07 0.0147991 +0.331947 3.78736e-07 1.5818e-07 0.0149711 +0.335266 3.88199e-07 1.53911e-07 0.0151455 +0.338618 4.42877e-07 1.49098e-07 0.0153224 +0.342003 2.47787e-07 1.46321e-07 0.0155017 +0.345423 2.85769e-07 1.35135e-07 0.0156836 +0.348876 4.75964e-07 1.53664e-07 0.0158681 +0.352364 4.49639e-07 1.53956e-07 0.0160552 +0.355887 2.47147e-07 1.44322e-07 0.0162449 +0.359445 2.16764e-07 1.49181e-07 0.0164375 +0.363039 5.20585e-07 1.57369e-07 0.0166327 +0.366669 5.24697e-07 1.54541e-07 0.0168309 +0.370335 3.64403e-07 1.55024e-07 0.0170319 +0.374037 4.59752e-07 1.65308e-07 0.0172358 +0.377777 5.35922e-07 1.82043e-07 0.0174427 +0.381554 4.26807e-07 1.77003e-07 0.0176527 +0.385369 4.03666e-07 1.8111e-07 0.0178658 +0.389222 2.55454e-07 1.59729e-07 0.018082 +0.393113 9.26972e-08 1.65402e-07 0.0183015 +0.397044 1.10672e-07 1.80888e-07 0.0185242 +0.401014 4.52163e-07 1.73191e-07 0.0187503 +0.405023 3.78066e-07 1.51597e-07 0.0189798 +0.409073 3.09136e-07 1.57195e-07 0.0192128 +0.413163 3.41774e-07 1.44818e-07 0.0194493 +0.417294 3.44924e-07 1.59581e-07 0.0196894 +0.421466 2.5184e-07 1.59757e-07 0.0199332 +0.42568 4.01737e-07 1.53814e-07 0.0201807 +0.429936 3.17279e-07 1.6913e-07 0.0204321 +0.434235 5.50631e-07 1.61142e-07 0.0206873 +0.438577 5.0851e-07 1.6499e-07 0.0209465 +0.442962 6.02593e-07 1.73835e-07 0.0212097 +0.447391 4.38454e-07 1.6535e-07 0.0214771 +0.451865 3.38757e-07 1.87639e-07 0.0217487 +0.456383 4.35846e-07 1.97826e-07 0.0220245 +0.460946 3.85579e-07 1.76143e-07 0.0223047 +0.465555 3.83415e-07 1.88454e-07 0.0225894 diff --git a/RATapi/examples/data/prist5_10K_m_025.Rqz.ort b/RATapi/examples/data/prist5_10K_m_025.Rqz.ort deleted file mode 100644 index 5b60b8fc..00000000 --- a/RATapi/examples/data/prist5_10K_m_025.Rqz.ort +++ /dev/null @@ -1,124 +0,0 @@ -# # ORSO reflectivity data file | 1.0 standard | YAML encoding | https://www.reflectometry.org/ -# data_source: -# owner: -# name: Artur Glavic -# affiliation: null -# contact: b'' -# experiment: -# title: Structural evolution of the CO2/Water interface -# instrument: Amor -# start_date: 2023-11-29T10:12:45 -# probe: neutron -# facility: SINQ@PSI -# proposalID: '20230368' -# sample: -# name: prist4 -# sample_parameters: -# tempMean: {magnitude: -9999.0} -# model: -# stack: vacuum | Al2O3 2 | Ti0.27Co0.73 9.3 | Si -# measurement: -# instrument_settings: -# incident_angle: {min: 0.0950000000000002, max: 1.495, unit: deg} -# wavelength: {min: 3.0, max: 12.0, unit: angstrom} -# mu: {magnitude: 0.25, unit: deg, comment: sample angle to referece direction} -# nu: {magnitude: 1.0450000000000002, unit: deg, comment: detector angle to referece -# direction} -# data_files: -# - file: raw/amor2023n000848.hdf -# timestamp: 2023-11-29T10:12:45 -# amor_monitor: 1792.443302905 -# scheme: angle- and energy-dispersive -# references: [] -# amor_monitor: 1792.443302905 -# reduction: -# software: {name: eos, version: '2.0'} -# timestamp: 2023-11-29T10:57:48.480339 -# computer: amor.psi.ch -# call: eos.py -a 0.04 -F 0.0093,0.0101 -n 848 prist5_10K_m_025 -# data_set: 0 -# columns: -# - {name: Qz, unit: 1/angstrom, physical_quantity: normal momentum transfer} -# - {name: R, unit: '', physical_quantity: specular reflectivity} -# - {error_of: R, error_type: uncertainty, value_is: sigma} -# - {error_of: Qz, error_type: resolution, value_is: sigma} -# # Qz (1/angstrom) R () sR sQz -2.1999999999999997e-03 4.7241193897215048e-03 4.7241193897215048e-03 1.9999999999999987e-04 -2.5999999999999999e-03 0.0000000000000000e+00 0.0000000000000000e+00 2.0000000000000009e-04 -3.0000000000000001e-03 4.9441079014990305e-03 2.8632759811688313e-03 2.0000000000000009e-04 -3.4000000000000002e-03 5.3957146642147798e-03 2.7033018099334193e-03 1.9999999999999987e-04 -3.8000000000000000e-03 1.1948517768746966e-02 3.7903477990210636e-03 2.0000000000000009e-04 -4.2000000000000006e-03 1.6302332669940297e-02 3.9723175648453228e-03 2.0000000000000009e-04 -4.5999999999999999e-03 2.2652164871650581e-02 4.5763672802481776e-03 2.0000000000000009e-04 -5.0000000000000001e-03 2.3020814468949415e-02 4.2537271133726200e-03 1.9999999999999966e-04 -5.4000000000000003e-03 2.7305557750665344e-02 4.4287009711273589e-03 2.0000000000000009e-04 -5.7999999999999996e-03 1.9457945835850306e-02 3.7817426451169783e-03 2.0000000000000009e-04 -6.2000000000000006e-03 2.7645506109865266e-02 4.2679939914090732e-03 2.0000000000000009e-04 -6.6000000000000000e-03 2.4223034347324195e-02 3.7655052701117517e-03 2.0000000000000009e-04 -7.0000000000000001e-03 2.8408308819418325e-02 3.7377941755602716e-03 1.9999999999999966e-04 -7.4000000000000003e-03 5.7460495308053604e-02 5.2154049057105455e-03 2.0000000000000009e-04 -7.7999999999999996e-03 1.4898833519509819e-01 7.5478984035617898e-03 2.0000000000000009e-04 -8.1999999999999990e-03 3.5204809294430212e-01 1.1146891694516669e-02 1.9999999999999966e-04 -8.6000000000000000e-03 5.3176577607895481e-01 1.3517251795319620e-02 1.9999999999999966e-04 -8.9999999999999993e-03 7.9145006465015877e-01 1.6276277463585134e-02 2.0000000000000052e-04 -9.3999999999999986e-03 9.6803310478461035e-01 1.7827487993063780e-02 1.9999999999999966e-04 -9.7999999999999997e-03 1.0324643310179094e+00 1.8104900945963596e-02 2.0000000000000052e-04 -1.0204081632653062e-02 6.2876616833212340e-01 1.3873373556929145e-02 2.0408163265306107e-04 -1.0620574760516453e-02 3.5069559151104790e-01 1.0136613757789808e-02 2.1241149521033023e-04 -1.1054067607884473e-02 2.3477751708069897e-01 8.1099626399286761e-03 2.2108135215768900e-04 -1.1505254040859348e-02 1.8964302712880826e-01 7.1805730148316446e-03 2.3010508081718756e-04 -1.1974856246608712e-02 1.4285208497806512e-01 6.0162249267477130e-03 2.3949712493217482e-04 -1.2463625889327434e-02 1.2188457497836602e-01 5.4352795853431970e-03 2.4927251778654805e-04 -1.2972345313381616e-02 1.0530945504618572e-01 5.0275179459601553e-03 2.5944690626763297e-04 -1.3501828795560456e-02 8.0387950876579850e-02 4.1975562768255060e-03 2.7003657591120889e-04 -1.4052923848440476e-02 7.3136722795496253e-02 3.9582003984186967e-03 2.8105847696880976e-04 -1.4626512576948251e-02 6.1298419781514651e-02 3.4783001152817426e-03 2.9253025153896592e-04 -1.5223513090293080e-02 6.2409059365864682e-02 3.4798000624600761e-03 3.0447026180586197e-04 -1.5844880971529533e-02 5.6512800965543043e-02 3.2223775371921573e-03 3.1689761943059103e-04 -1.6491610807102167e-02 5.0440737935525240e-02 2.9021067247837801e-03 3.2983221614204389e-04 -1.7164737778820625e-02 5.0277525044171101e-02 2.8252864493045079e-03 3.4329475557641313e-04 -1.7865339320813300e-02 5.1689705097227867e-02 2.8118143416053952e-03 3.5730678641626538e-04 -1.8594536844111803e-02 5.3007618770583402e-02 2.7685413804410695e-03 3.7189073688223724e-04 -1.9353497531626573e-02 4.9070756677145402e-02 2.5677593751218504e-03 3.8706995063253133e-04 -2.0143436206386842e-02 4.6878831709663782e-02 2.4119133732668076e-03 4.0286872412773761e-04 -2.0965617276035284e-02 4.9199553772144550e-02 2.4276503561561644e-03 4.1931234552070561e-04 -2.1821356756689787e-02 5.2041112703109127e-02 2.4556151556737898e-03 4.3642713513379616e-04 -2.2712024379411822e-02 4.9251781726106690e-02 2.3335505076022252e-03 4.5424048758823873e-04 -2.3639045782653120e-02 4.3172608947743572e-02 2.1138539656044499e-03 4.7278091565306109e-04 -2.4603904794189984e-02 3.8304327635500499e-02 1.9158755178575817e-03 4.9207809588380086e-04 -2.5608145806197739e-02 4.4442200106459967e-02 2.0186419327094269e-03 5.1216291612395451e-04 -2.6653376247267036e-02 3.9587001147536376e-02 1.8488058581743547e-03 5.3306752494534232e-04 -2.7741269155318757e-02 3.6677858215866437e-02 1.7473224966445143e-03 5.5482538310637659e-04 -2.8873565855535847e-02 3.7663512267048754e-02 1.7682821318945074e-03 5.7747131711071743e-04 -3.0052078747598535e-02 3.6755569252809664e-02 1.7350440273063527e-03 6.0104157495196979e-04 -3.1278694206684193e-02 3.8546394417761670e-02 1.7965558626918197e-03 6.2557388413368373e-04 -3.2555375602875386e-02 3.2866785139061716e-02 1.6217721152892931e-03 6.5110751205750897e-04 -3.3884166443809073e-02 3.1513196803753502e-02 1.6061232808323794e-03 6.7768332887618160e-04 -3.5267193645597203e-02 3.0280345918169513e-02 1.5885947028228238e-03 7.0534387291194475e-04 -3.6706670937254229e-02 2.5036982048446406e-02 1.4176844815086535e-03 7.3413341874508514e-04 -3.8204902404080934e-02 2.0831804563285421e-02 1.2803365468167761e-03 7.6409804808161980e-04 -3.9764286175676081e-02 1.9376976329704945e-02 1.2712203272554497e-03 7.9528572351352314e-04 -4.1387318264479181e-02 1.6729675515039004e-02 1.1715497338181137e-03 8.2774636528958404e-04 -4.3076596560988542e-02 1.3996303090353096e-02 1.0654383375290077e-03 8.6153193121977015e-04 -4.4834824992049299e-02 1.0621480384334052e-02 9.2468077823003954e-04 8.9669649984099042e-04 -4.6664817848867640e-02 7.8203324635251256e-03 8.0931024548367521e-04 9.3329635697735405e-04 -4.8569504291678570e-02 6.0428022894521575e-03 7.1838354133842033e-04 9.7139008583356848e-04 -5.0551933038277694e-02 4.0958929714843932e-03 5.8416704469953131e-04 1.0110386607655557e-03 -5.2615277243921690e-02 5.1115251619419473e-03 6.6580030308840434e-04 1.0523055448784409e-03 -5.4762839580408292e-02 2.0207116612746484e-03 4.1438660592314769e-04 1.0952567916081637e-03 -5.6998057522465770e-02 1.7115689314143780e-03 3.8529038925611664e-04 1.1399611504493146e-03 -5.9324508849913360e-02 8.4963058831312487e-04 2.7095330976641694e-04 1.1864901769982721e-03 -6.1745917374399620e-02 8.1421160351772355e-04 2.7251395576638693e-04 1.2349183474879948e-03 -6.4266158899885323e-02 8.9204238262309603e-05 8.9204238263225523e-05 1.2853231779977048e-03 -6.6889267426411256e-02 9.3397363465611626e-05 9.3397363464899779e-05 1.3377853485282282e-03 -6.9619441607081112e-02 4.0599169078880156e-04 2.0303208241886721e-04 1.3923888321416208e-03 -7.2461051468594620e-02 2.1832573520758229e-04 1.5439324988622013e-04 1.4492210293718943e-03 -7.5418645406088280e-02 1.2684339163878999e-04 1.2684339163797725e-04 1.5083729081217731e-03 -7.8496957463479650e-02 0.0000000000000000e+00 0.0000000000000000e+00 1.5699391492695891e-03 -8.1700914910968619e-02 0.0000000000000000e+00 0.0000000000000000e+00 1.6340182982193738e-03 -8.5035646131824488e-02 4.1657483226777538e-04 2.4090333523406435e-04 1.7007129226364950e-03 -8.8506488831082628e-02 0.0000000000000000e+00 0.0000000000000000e+00 1.7701297766216512e-03 -9.2118998579290082e-02 0.0000000000000000e+00 0.0000000000000000e+00 1.8423799715858030e-03 -9.5878957704975398e-02 0.0000000000000000e+00 0.0000000000000000e+00 1.9175791540995135e-03 -9.9792384550076441e-02 0.0000000000000000e+00 0.0000000000000000e+00 1.9958476910015288e-03 -1.0386554310314079e-01 0.0000000000000000e+00 0.0000000000000000e+00 2.0773108620628228e-03 From ef4c58e503cd09f3c657e4f624f248f0b2cbe4f9 Mon Sep 17 00:00:00 2001 From: alexhroom Date: Tue, 11 Mar 2025 09:40:11 +0000 Subject: [PATCH 14/16] updated example data and better name resolution --- .../orso_integration/orso_integration.ipynb | 9 ++-- RATapi/utils/orso.py | 47 ++++++++++++++++--- 2 files changed, 46 insertions(+), 10 deletions(-) diff --git a/RATapi/examples/orso_integration/orso_integration.ipynb b/RATapi/examples/orso_integration/orso_integration.ipynb index 4d2f3b88..aa6f0797 100644 --- a/RATapi/examples/orso_integration/orso_integration.ipynb +++ b/RATapi/examples/orso_integration/orso_integration.ipynb @@ -98,7 +98,7 @@ "source": [ "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", "\n", - "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)" + "The example data file we use here is example data for an unknown film on deposited on silicon." ] }, { @@ -110,7 +110,7 @@ "import pathlib\n", "data_path = pathlib.Path(\"../data\")\n", "\n", - "orso_data = RATapi.utils.orso.ORSOProject(data_path / \"prist5_10K_m_025.Rqz.ort\")\n", + "orso_data = RATapi.utils.orso.ORSOProject(data_path / \"c_PLP0011859_q.ort\")\n", "print(orso_data)" ] }, @@ -136,11 +136,12 @@ "\n", "project = RATapi.Project(\n", " name = \"Example Project\",\n", + " geometry = \"substrate/liquid\",\n", " parameters = sample.parameters,\n", " bulk_in = [sample.bulk_in],\n", " bulk_out = [sample.bulk_out],\n", - " scalefactors = [Parameter(name=\"Scalefactor\", min=0, value=1, max=1.5, fit=True)],\n", - " background_parameters = [Parameter(name=\"Background Parameter\", min=0, value=0.025, max=1, fit=True)],\n", + " scalefactors = [Parameter(name=\"Scalefactor\", min=0, value=0.34, max=1.5)],\n", + " background_parameters = [Parameter(name=\"Background Parameter\", min=0, value=2e-6, max=1)],\n", " backgrounds = [Background(name=\"Background\", type=\"constant\", source=\"Background Parameter\")],\n", " resolutions = [Resolution(name=\"Data Resolution\", type=\"data\")],\n", " data = [dataset],\n", diff --git a/RATapi/utils/orso.py b/RATapi/utils/orso.py index e907bb28..50550619 100644 --- a/RATapi/utils/orso.py +++ b/RATapi/utils/orso.py @@ -148,9 +148,12 @@ def orso_model_to_rat( parameters = ClassList() layers = ClassList() + contrast_model = [] for orso_layer in stack[1:-1]: - layer_params, layer = orso_layer_to_rat_layer(orso_layer, absorption) + name = get_material_name(orso_layer.material, model) + contrast_model.append(name) + layer_params, layer = orso_layer_to_rat_layer(orso_layer, name, absorption) parameters.union(layer_params) layers.union(layer) @@ -159,12 +162,12 @@ def orso_model_to_rat( bulk_out=bulk_out, parameters=parameters, layers=layers, - model=[layer.material.formula for layer in stack[1:-1]], + model=contrast_model, ) def orso_layer_to_rat_layer( - layer: orsopy.fileio.model_language.Layer, absorption: bool = False + layer: orsopy.fileio.model_language.Layer, name: str, absorption: bool = False ) -> tuple[ClassList[Parameter], Layer]: """Convert an ``orsopy`` layer to a RAT layer. @@ -172,6 +175,8 @@ def orso_layer_to_rat_layer( ---------- layer : orsopy.fileio.model_language.Layer An ``orsopy`` Layer. + name : str + The name of the material in the layer. absorption : bool, default True Whether absorption should be accounted for in the layer. @@ -181,7 +186,6 @@ def orso_layer_to_rat_layer( The parameters required for the RAT layer and the layer itself. """ - name = layer.material.formula thickness = layer.thickness.as_unit("angstrom") roughness = layer.roughness.as_unit("angstrom") sld = layer.material.get_sld() @@ -196,7 +200,7 @@ def orso_layer_to_rat_layer( if absorption: params.append(Parameter(name=f"{name} SLD imaginary", min=sld.imag, value=sld.imag, max=sld.imag, fit=False)) layer = AbsorptionLayer( - name=f"{name}", + name=name, thickness=f"{name} Thickness", roughness=f"{name} Roughness", SLD_real=f"{name} SLD", @@ -204,10 +208,41 @@ def orso_layer_to_rat_layer( ) else: layer = Layer( - name=f"{name}", + name=name, thickness=f"{name} Thickness", roughness=f"{name} Roughness", SLD=f"{name} SLD", ) return params, layer + + +def get_material_name( + material: orsopy.fileio.model_language.Material, model: orsopy.fileio.model_language.SampleModel +) -> str: + """Get the name of a material in the model. + + Layers with custom property definitions may not have a formula, so this adjusts the name for that. + + Parameters + ---------- + material : Material + The material to get the name of. + model : SampleModel + The sample model from which the material came. + + Returns + ------- + str + The name of the material. + + """ + if material.formula is not None: + return material.formula + else: + matching_materials = [k for k, v in model.materials.items() if v == material] + if matching_materials: + return matching_materials[0] + else: + # orsopy should catch that this is the case before we get here, but just in case... + raise ValueError("ORSO model contains layers with undefined materials!") From 063e1a06f1cace3bd3c1b4f2de000dceef44b951 Mon Sep 17 00:00:00 2001 From: alexhroom Date: Thu, 13 Mar 2025 14:09:29 +0000 Subject: [PATCH 15/16] removed some data --- RATapi/examples/data/IvsQ_82043_82044.ort | 151 ------------ tests/test_data/inter_data.ort | 151 ------------ tests/test_data/polref_data.ort | 280 ---------------------- tests/test_orso_utils.py | 2 - 4 files changed, 584 deletions(-) delete mode 100644 RATapi/examples/data/IvsQ_82043_82044.ort delete mode 100644 tests/test_data/inter_data.ort delete mode 100644 tests/test_data/polref_data.ort diff --git a/RATapi/examples/data/IvsQ_82043_82044.ort b/RATapi/examples/data/IvsQ_82043_82044.ort deleted file mode 100644 index 8a8909af..00000000 --- a/RATapi/examples/data/IvsQ_82043_82044.ort +++ /dev/null @@ -1,151 +0,0 @@ -# # ORSO reflectivity data file | 1.1 standard | YAML encoding | https://www.reflectometry.org/ -# # Mantid@ISIS output may not be fully ORSO compliant -# data_source: -# owner: -# name: null -# affiliation: null -# experiment: -# title: null -# instrument: INTER -# start_date: 2024-12-17T11:40:01 -# probe: neutron -# facility: ISIS -# proposalID: '2220534' -# doi: 10.5286/ISIS.E.RB2220534 -# sample: -# name: D2O/air th=0.8 ['Default']=0.75 -# measurement: -# instrument_settings: null -# data_files: -# - file: INTER00082043 -# comment: Reduction input angle 0.80000000000000004 -# - file: INTER00082044 -# comment: Reduction input angle 2.2999999999999998 -# additional_files: -# - file: INTER00082090 -# comment: First transmission run -# - file: INTER00082122 -# comment: First transmission run -# - file: INTER00082088 -# comment: First transmission run -# - file: INTER00082105 -# comment: First transmission run -# - file: INTER00082123 -# comment: Second transmission run -# - file: INTER00082089 -# comment: Second transmission run -# reduction: -# software: {name: Mantid, version: 6.11.0} -# timestamp: 2024-12-19T17:17:04+00:00 -# creator: -# name: SaveISISReflectometryORSO -# affiliation: Mantid -# call: 'ReflectometryISISLoadAndProcess(InputRunList=''82043'', ThetaIn=0.80000000000000004, -# ROIDetectorIDs=''4009-4251,5009-5251,6009-6251,7009-7251,8009-8251,9009-9251'', -# AnalysisMode=''MultiDetectorAnalysis'', ProcessingInstructions=''71-94'', WavelengthMin=1.5, -# WavelengthMax=17, I0MonitorIndex=2, MonitorBackgroundWavelengthMin=17, MonitorBackgroundWavelengthMax=18, -# MonitorIntegrationWavelengthMin=4, MonitorIntegrationWavelengthMax=10, SubtractBackground=True, -# BackgroundProcessingInstructions=''16-68'', FirstTransmissionRunList=''82090,82122'', -# SecondTransmissionRunList=''82123'', StartOverlap=10, EndOverlap=12, ScaleRHSWorkspace=False, -# MomentumTransferMin=0.010323103434172838, MomentumTransferStep=0.045266801490531069, -# MomentumTransferMax=0.069000000000000006, OutputWorkspaceBinned=''IvsQ_binned_82043'', -# OutputWorkspace=''IvsQ_82043'', OutputWorkspaceTransmission=''TRANS_LAM_82090+82122_82123'') -# -# ReflectometryISISLoadAndProcess(InputRunList=''82044'', ThetaIn=2.2999999999999998, -# ROIDetectorIDs=''6032-6181,7032-7181'', AnalysisMode=''MultiDetectorAnalysis'', -# ProcessingInstructions=''74-102'', WavelengthMin=1.5, WavelengthMax=17, I0MonitorIndex=2, -# MonitorBackgroundWavelengthMin=17, MonitorBackgroundWavelengthMax=18, MonitorIntegrationWavelengthMin=4, -# MonitorIntegrationWavelengthMax=10, SubtractBackground=True, BackgroundProcessingInstructions=''16-68'', -# FirstTransmissionRunList=''82088,82105'', SecondTransmissionRunList=''82089'', -# StartOverlap=10, EndOverlap=12, ScaleRHSWorkspace=False, MomentumTransferMin=0.029671264825222473, -# MomentumTransferStep=0.045322888256372033, MomentumTransferMax=0.33576197841892735, -# OutputWorkspaceBinned=''IvsQ_binned_82044'', OutputWorkspace=''IvsQ_82044'', OutputWorkspaceTransmission=''TRANS_LAM_82088+82105_82089'') -# -# Stitch1DMany(InputWorkspaces=''IvsQ_82043,IvsQ_82044'', OutputWorkspace=''IvsQ_82043_82044'', -# Params=''-0.0452668'', OutScaleFactors=''0.947357'', IndexOfReference=-1)' -# data_set: Stitched -# columns: -# - {name: Qz, unit: 1/angstrom, physical_quantity: normal_wavevector_transfer} -# - {name: R, physical_quantity: reflectivity} -# - {error_of: R, error_type: uncertainty, value_is: sigma} -# - {error_of: Qz, error_type: resolution} -# # Qz (1/angstrom) R sR sQz -1.0556750371133298e-02 9.1127427148435880e-01 1.2845873256638439e-02 4.7787030770001681e-04 -1.1034620694568479e-02 9.3105701080877423e-01 1.2249715702986708e-02 4.9950196805689242e-04 -1.1534122679072816e-02 9.4077141047538648e-01 1.1716081192701731e-02 5.2211282448905334e-04 -1.2056235520753838e-02 9.3256374298594358e-01 1.1132709691169007e-02 5.4574720207085990e-04 -1.2601982740794890e-02 9.3551303690717813e-01 1.0747418441092419e-02 5.7045143233101412e-04 -1.3172434191909551e-02 9.3233920181391150e-01 1.0398119173798700e-02 5.9627394407833127e-04 -1.3768708155621805e-02 9.3143980720174668e-01 1.0139124433205205e-02 6.2326535833890110e-04 -1.4391973534483394e-02 9.3175152300275565e-01 9.9353273535217924e-03 6.5147858759075289e-04 -1.5043452143525829e-02 9.3719827580221982e-01 9.8061048255138963e-03 6.8096893949055502e-04 -1.5724421105439118e-02 9.2468859533738756e-01 9.5563170248959238e-03 7.1179422529569147e-04 -1.6436215354172546e-02 9.1115481952879196e-01 9.3249551124849946e-03 7.4401487319425788e-04 -1.7180230251865491e-02 8.0748834890286025e-01 8.2457960049778616e-03 7.7769404676514492e-04 -1.7957924324238303e-02 5.6674294837323991e-01 6.2075300529178317e-03 8.1289776880043047e-04 -1.8770822119805582e-02 3.2483213962969509e-01 3.6251666378265572e-03 8.4969505073281533e-04 -1.9620517198516887e-02 1.7654671113583151e-01 2.0458671238808451e-03 8.8815802792182425e-04 -2.0508675255683704e-02 1.1266987030829290e-01 1.3546716410542719e-03 9.2836210106398310e-04 -2.1437037387316504e-02 7.6738698497744812e-02 9.6075352276065481e-04 9.7038608400417878e-04 -2.2407423503273252e-02 5.6084704975444433e-02 7.2553073429195900e-04 1.0143123582379697e-03 -2.3421735894910180e-02 4.3303196924074701e-02 5.7879603949963286e-04 1.0602270344077201e-03 -2.4481962964228728e-02 3.2572905671769604e-02 4.4924570670612431e-04 1.1082201211091490e-03 -2.5590183121829001e-02 2.5695427836580853e-02 3.6314645146818901e-04 1.1583857013392090e-03 -2.6748568861311172e-02 1.9548456647929823e-02 2.8706148908812945e-04 1.2108221169312007e-03 -2.7959391018111943e-02 1.5424019392730049e-02 2.3366769233558698e-04 1.2656321613386697e-03 -2.9225023221124954e-02 1.2682370259914137e-02 1.9603079085223944e-04 1.3229232811460192e-03 -3.0547946545831779e-02 1.0051673382805906e-02 1.4008596221852472e-04 1.3828077867008581e-03 -3.1930754378065300e-02 8.1024909345494781e-03 1.1499098730548765e-04 1.4454030722810063e-03 -3.3376157497940095e-02 6.5388333592863290e-03 9.5142679402821645e-05 1.5108318462277548e-03 -3.4886989393916046e-02 5.3053542369420840e-03 7.9573515087822972e-05 1.5792223714965190e-03 -3.6466211817412705e-02 4.2914485631401506e-03 6.6337007742828268e-05 1.6507087170964576e-03 -3.8116920588863186e-02 3.5795991167568830e-03 5.7153495306149353e-05 1.7254310209119522e-03 -3.9842351666589594e-02 2.9619599362908661e-03 4.8946149681046327e-05 1.8035357644211780e-03 -4.1645887490397035e-02 2.3902290004456559e-03 4.1760767524343879e-05 1.8851760598503045e-03 -4.3531063612321827e-02 1.9968397538326550e-03 3.6603472547321729e-05 1.9705119503262499e-03 -4.5501575627532480e-02 1.5406381269260571e-03 3.0466569609158641e-05 2.0597107236163875e-03 -4.7561286418970380e-02 1.3889898327570783e-03 2.7589722084910036e-05 2.1529472400702485e-03 -4.9714233729932208e-02 1.0879714552636836e-03 2.3278999171455080e-05 2.2504042754060956e-03 -5.1964638079438907e-02 8.9950834577044627e-04 2.0272024773045830e-05 2.3522728790143451e-03 -5.4316911035908161e-02 7.5978394582628078e-04 1.7715724736182057e-05 2.4587527484802476e-03 -5.6775663865349456e-02 5.8774183698913785e-04 1.5022792839840360e-05 2.5700526210600009e-03 -5.9345716571035351e-02 5.1354653634454737e-04 1.3477705198934909e-05 2.6863906828777434e-03 -6.2032107342369726e-02 3.9911740112583247e-04 1.1504241268311257e-05 2.8079949966455819e-03 -6.4840102431476088e-02 3.4816324332280734e-04 1.0374500443032511e-05 2.9351039487451420e-03 -6.7775206476867425e-02 3.0142711223582935e-04 1.0507228178550673e-05 3.0679667165470627e-03 -7.0843173294435541e-02 2.6218095830548503e-04 9.2217374748867668e-06 3.2068437568845551e-03 -7.4050017156914033e-02 1.9910132286935558e-04 7.5214598115452071e-06 3.3520073166385961e-03 -7.7402024583926476e-02 1.6283770772644484e-04 6.3186052009966844e-06 3.5037419664356831e-03 -8.0905766665732279e-02 1.4602677671944966e-04 5.5999444444886146e-06 3.6623451585043702e-03 -8.4568111944829202e-02 1.2110693157768220e-04 4.7754617500394554e-06 3.8281278097841947e-03 -8.8396239880664793e-02 9.9505093878630215e-05 4.0539081677181128e-06 4.0014149114300773e-03 -9.2397654923852213e-02 8.3763797619041118e-05 3.5131154399346878e-06 4.1825461659070334e-03 -9.6580201227480816e-02 6.9270593427439816e-05 3.0326968530589274e-06 4.3718766529241291e-03 -1.0095207802436074e-01 6.4672273984513564e-05 2.8085635602528419e-06 4.5697775255131327e-03 -1.0552185570034608e-01 5.3627377662719945e-05 2.4398029714583996e-06 4.7766367376164262e-03 -1.1029849259524611e-01 4.3083222210855904e-05 2.1582420369390944e-06 4.9928598046104873e-03 -1.1529135256425993e-01 3.4858542871744015e-05 1.8874428700938758e-06 5.2188705982558420e-03 -1.2051022333436112e-01 3.2890488899472567e-05 1.8031904743329652e-06 5.4551121776318587e-03 -1.2596533569161719e-01 3.1381101540978320e-05 1.7455877009764839e-06 5.7020476576852977e-03 -1.3166738353705773e-01 2.2520432924503166e-05 1.4823681789262068e-06 5.9601611170952851e-03 -1.3762754485040735e-01 2.0502560966788705e-05 1.3678725529143628e-06 6.2299585472344200e-03 -1.4385750360277988e-01 1.8808460294492775e-05 1.2812961563002496e-06 6.5119688440863164e-03 -1.5036947266129028e-01 1.7777338689582184e-05 1.2232631944275082e-06 6.8067448450640951e-03 -1.5717621773048474e-01 1.4261716881208267e-05 1.1053710210878717e-06 7.1148644127623072e-03 -1.6429108237752310e-01 1.4122607450751436e-05 1.0741656554637186e-06 7.4369315677668630e-03 -1.7172801419017092e-01 1.3435883283391740e-05 1.0350681594460688e-06 7.7735776727436293e-03 -1.7950159211888050e-01 1.1349078769729003e-05 9.8706932468810706e-07 8.1254626701269400e-03 -1.8762705505656013e-01 1.0438042773581391e-05 9.5968138912711215e-07 8.4932763758342970e-03 -1.9612033171205839e-01 9.4228847859467391e-06 9.5504634962296442e-07 8.8777398315434061e-03 -2.0499807183592528e-01 1.0403057822366863e-05 1.0476675496525892e-06 9.2796067181824624e-03 -2.1427767885966370e-01 9.2982957336217477e-06 1.1061063274562501e-06 9.6996648334046250e-03 -2.2397734401245589e-01 6.9252828969103226e-06 1.0990870540122200e-06 1.0138737635943040e-02 -2.3411608198224410e-01 8.5110906998799596e-06 1.2869226555654373e-06 1.0597685859873848e-02 -2.4471376819107526e-01 9.5259526376142547e-06 1.5285021985662934e-06 1.1077409201951766e-02 -2.5579117775778049e-01 6.7529700706883579e-06 1.4379485329066072e-06 1.1578848085325898e-02 -2.6737002622437112e-01 7.1240611130925426e-06 1.5166508449663157e-06 1.2102985503093364e-02 -2.7947301212598780e-01 5.9716337438467617e-06 1.5442067243973891e-06 1.2650848945304665e-02 -2.9212386148785568e-01 5.7341096291047458e-06 1.6263758970481508e-06 1.3223512413198467e-02 -3.0534737433647385e-01 6.9752629156982645e-06 1.8626841271634412e-06 1.3822098524614296e-02 -3.1916947331621792e-01 6.0468934312149525e-06 1.8715649046179617e-06 1.4447780714710574e-02 -3.3099772990242848e-01 6.6623605997798478e-06 2.6078953534499003e-06 1.4983208039947250e-02 diff --git a/tests/test_data/inter_data.ort b/tests/test_data/inter_data.ort deleted file mode 100644 index 8a8909af..00000000 --- a/tests/test_data/inter_data.ort +++ /dev/null @@ -1,151 +0,0 @@ -# # ORSO reflectivity data file | 1.1 standard | YAML encoding | https://www.reflectometry.org/ -# # Mantid@ISIS output may not be fully ORSO compliant -# data_source: -# owner: -# name: null -# affiliation: null -# experiment: -# title: null -# instrument: INTER -# start_date: 2024-12-17T11:40:01 -# probe: neutron -# facility: ISIS -# proposalID: '2220534' -# doi: 10.5286/ISIS.E.RB2220534 -# sample: -# name: D2O/air th=0.8 ['Default']=0.75 -# measurement: -# instrument_settings: null -# data_files: -# - file: INTER00082043 -# comment: Reduction input angle 0.80000000000000004 -# - file: INTER00082044 -# comment: Reduction input angle 2.2999999999999998 -# additional_files: -# - file: INTER00082090 -# comment: First transmission run -# - file: INTER00082122 -# comment: First transmission run -# - file: INTER00082088 -# comment: First transmission run -# - file: INTER00082105 -# comment: First transmission run -# - file: INTER00082123 -# comment: Second transmission run -# - file: INTER00082089 -# comment: Second transmission run -# reduction: -# software: {name: Mantid, version: 6.11.0} -# timestamp: 2024-12-19T17:17:04+00:00 -# creator: -# name: SaveISISReflectometryORSO -# affiliation: Mantid -# call: 'ReflectometryISISLoadAndProcess(InputRunList=''82043'', ThetaIn=0.80000000000000004, -# ROIDetectorIDs=''4009-4251,5009-5251,6009-6251,7009-7251,8009-8251,9009-9251'', -# AnalysisMode=''MultiDetectorAnalysis'', ProcessingInstructions=''71-94'', WavelengthMin=1.5, -# WavelengthMax=17, I0MonitorIndex=2, MonitorBackgroundWavelengthMin=17, MonitorBackgroundWavelengthMax=18, -# MonitorIntegrationWavelengthMin=4, MonitorIntegrationWavelengthMax=10, SubtractBackground=True, -# BackgroundProcessingInstructions=''16-68'', FirstTransmissionRunList=''82090,82122'', -# SecondTransmissionRunList=''82123'', StartOverlap=10, EndOverlap=12, ScaleRHSWorkspace=False, -# MomentumTransferMin=0.010323103434172838, MomentumTransferStep=0.045266801490531069, -# MomentumTransferMax=0.069000000000000006, OutputWorkspaceBinned=''IvsQ_binned_82043'', -# OutputWorkspace=''IvsQ_82043'', OutputWorkspaceTransmission=''TRANS_LAM_82090+82122_82123'') -# -# ReflectometryISISLoadAndProcess(InputRunList=''82044'', ThetaIn=2.2999999999999998, -# ROIDetectorIDs=''6032-6181,7032-7181'', AnalysisMode=''MultiDetectorAnalysis'', -# ProcessingInstructions=''74-102'', WavelengthMin=1.5, WavelengthMax=17, I0MonitorIndex=2, -# MonitorBackgroundWavelengthMin=17, MonitorBackgroundWavelengthMax=18, MonitorIntegrationWavelengthMin=4, -# MonitorIntegrationWavelengthMax=10, SubtractBackground=True, BackgroundProcessingInstructions=''16-68'', -# FirstTransmissionRunList=''82088,82105'', SecondTransmissionRunList=''82089'', -# StartOverlap=10, EndOverlap=12, ScaleRHSWorkspace=False, MomentumTransferMin=0.029671264825222473, -# MomentumTransferStep=0.045322888256372033, MomentumTransferMax=0.33576197841892735, -# OutputWorkspaceBinned=''IvsQ_binned_82044'', OutputWorkspace=''IvsQ_82044'', OutputWorkspaceTransmission=''TRANS_LAM_82088+82105_82089'') -# -# Stitch1DMany(InputWorkspaces=''IvsQ_82043,IvsQ_82044'', OutputWorkspace=''IvsQ_82043_82044'', -# Params=''-0.0452668'', OutScaleFactors=''0.947357'', IndexOfReference=-1)' -# data_set: Stitched -# columns: -# - {name: Qz, unit: 1/angstrom, physical_quantity: normal_wavevector_transfer} -# - {name: R, physical_quantity: reflectivity} -# - {error_of: R, error_type: uncertainty, value_is: sigma} -# - {error_of: Qz, error_type: resolution} -# # Qz (1/angstrom) R sR sQz -1.0556750371133298e-02 9.1127427148435880e-01 1.2845873256638439e-02 4.7787030770001681e-04 -1.1034620694568479e-02 9.3105701080877423e-01 1.2249715702986708e-02 4.9950196805689242e-04 -1.1534122679072816e-02 9.4077141047538648e-01 1.1716081192701731e-02 5.2211282448905334e-04 -1.2056235520753838e-02 9.3256374298594358e-01 1.1132709691169007e-02 5.4574720207085990e-04 -1.2601982740794890e-02 9.3551303690717813e-01 1.0747418441092419e-02 5.7045143233101412e-04 -1.3172434191909551e-02 9.3233920181391150e-01 1.0398119173798700e-02 5.9627394407833127e-04 -1.3768708155621805e-02 9.3143980720174668e-01 1.0139124433205205e-02 6.2326535833890110e-04 -1.4391973534483394e-02 9.3175152300275565e-01 9.9353273535217924e-03 6.5147858759075289e-04 -1.5043452143525829e-02 9.3719827580221982e-01 9.8061048255138963e-03 6.8096893949055502e-04 -1.5724421105439118e-02 9.2468859533738756e-01 9.5563170248959238e-03 7.1179422529569147e-04 -1.6436215354172546e-02 9.1115481952879196e-01 9.3249551124849946e-03 7.4401487319425788e-04 -1.7180230251865491e-02 8.0748834890286025e-01 8.2457960049778616e-03 7.7769404676514492e-04 -1.7957924324238303e-02 5.6674294837323991e-01 6.2075300529178317e-03 8.1289776880043047e-04 -1.8770822119805582e-02 3.2483213962969509e-01 3.6251666378265572e-03 8.4969505073281533e-04 -1.9620517198516887e-02 1.7654671113583151e-01 2.0458671238808451e-03 8.8815802792182425e-04 -2.0508675255683704e-02 1.1266987030829290e-01 1.3546716410542719e-03 9.2836210106398310e-04 -2.1437037387316504e-02 7.6738698497744812e-02 9.6075352276065481e-04 9.7038608400417878e-04 -2.2407423503273252e-02 5.6084704975444433e-02 7.2553073429195900e-04 1.0143123582379697e-03 -2.3421735894910180e-02 4.3303196924074701e-02 5.7879603949963286e-04 1.0602270344077201e-03 -2.4481962964228728e-02 3.2572905671769604e-02 4.4924570670612431e-04 1.1082201211091490e-03 -2.5590183121829001e-02 2.5695427836580853e-02 3.6314645146818901e-04 1.1583857013392090e-03 -2.6748568861311172e-02 1.9548456647929823e-02 2.8706148908812945e-04 1.2108221169312007e-03 -2.7959391018111943e-02 1.5424019392730049e-02 2.3366769233558698e-04 1.2656321613386697e-03 -2.9225023221124954e-02 1.2682370259914137e-02 1.9603079085223944e-04 1.3229232811460192e-03 -3.0547946545831779e-02 1.0051673382805906e-02 1.4008596221852472e-04 1.3828077867008581e-03 -3.1930754378065300e-02 8.1024909345494781e-03 1.1499098730548765e-04 1.4454030722810063e-03 -3.3376157497940095e-02 6.5388333592863290e-03 9.5142679402821645e-05 1.5108318462277548e-03 -3.4886989393916046e-02 5.3053542369420840e-03 7.9573515087822972e-05 1.5792223714965190e-03 -3.6466211817412705e-02 4.2914485631401506e-03 6.6337007742828268e-05 1.6507087170964576e-03 -3.8116920588863186e-02 3.5795991167568830e-03 5.7153495306149353e-05 1.7254310209119522e-03 -3.9842351666589594e-02 2.9619599362908661e-03 4.8946149681046327e-05 1.8035357644211780e-03 -4.1645887490397035e-02 2.3902290004456559e-03 4.1760767524343879e-05 1.8851760598503045e-03 -4.3531063612321827e-02 1.9968397538326550e-03 3.6603472547321729e-05 1.9705119503262499e-03 -4.5501575627532480e-02 1.5406381269260571e-03 3.0466569609158641e-05 2.0597107236163875e-03 -4.7561286418970380e-02 1.3889898327570783e-03 2.7589722084910036e-05 2.1529472400702485e-03 -4.9714233729932208e-02 1.0879714552636836e-03 2.3278999171455080e-05 2.2504042754060956e-03 -5.1964638079438907e-02 8.9950834577044627e-04 2.0272024773045830e-05 2.3522728790143451e-03 -5.4316911035908161e-02 7.5978394582628078e-04 1.7715724736182057e-05 2.4587527484802476e-03 -5.6775663865349456e-02 5.8774183698913785e-04 1.5022792839840360e-05 2.5700526210600009e-03 -5.9345716571035351e-02 5.1354653634454737e-04 1.3477705198934909e-05 2.6863906828777434e-03 -6.2032107342369726e-02 3.9911740112583247e-04 1.1504241268311257e-05 2.8079949966455819e-03 -6.4840102431476088e-02 3.4816324332280734e-04 1.0374500443032511e-05 2.9351039487451420e-03 -6.7775206476867425e-02 3.0142711223582935e-04 1.0507228178550673e-05 3.0679667165470627e-03 -7.0843173294435541e-02 2.6218095830548503e-04 9.2217374748867668e-06 3.2068437568845551e-03 -7.4050017156914033e-02 1.9910132286935558e-04 7.5214598115452071e-06 3.3520073166385961e-03 -7.7402024583926476e-02 1.6283770772644484e-04 6.3186052009966844e-06 3.5037419664356831e-03 -8.0905766665732279e-02 1.4602677671944966e-04 5.5999444444886146e-06 3.6623451585043702e-03 -8.4568111944829202e-02 1.2110693157768220e-04 4.7754617500394554e-06 3.8281278097841947e-03 -8.8396239880664793e-02 9.9505093878630215e-05 4.0539081677181128e-06 4.0014149114300773e-03 -9.2397654923852213e-02 8.3763797619041118e-05 3.5131154399346878e-06 4.1825461659070334e-03 -9.6580201227480816e-02 6.9270593427439816e-05 3.0326968530589274e-06 4.3718766529241291e-03 -1.0095207802436074e-01 6.4672273984513564e-05 2.8085635602528419e-06 4.5697775255131327e-03 -1.0552185570034608e-01 5.3627377662719945e-05 2.4398029714583996e-06 4.7766367376164262e-03 -1.1029849259524611e-01 4.3083222210855904e-05 2.1582420369390944e-06 4.9928598046104873e-03 -1.1529135256425993e-01 3.4858542871744015e-05 1.8874428700938758e-06 5.2188705982558420e-03 -1.2051022333436112e-01 3.2890488899472567e-05 1.8031904743329652e-06 5.4551121776318587e-03 -1.2596533569161719e-01 3.1381101540978320e-05 1.7455877009764839e-06 5.7020476576852977e-03 -1.3166738353705773e-01 2.2520432924503166e-05 1.4823681789262068e-06 5.9601611170952851e-03 -1.3762754485040735e-01 2.0502560966788705e-05 1.3678725529143628e-06 6.2299585472344200e-03 -1.4385750360277988e-01 1.8808460294492775e-05 1.2812961563002496e-06 6.5119688440863164e-03 -1.5036947266129028e-01 1.7777338689582184e-05 1.2232631944275082e-06 6.8067448450640951e-03 -1.5717621773048474e-01 1.4261716881208267e-05 1.1053710210878717e-06 7.1148644127623072e-03 -1.6429108237752310e-01 1.4122607450751436e-05 1.0741656554637186e-06 7.4369315677668630e-03 -1.7172801419017092e-01 1.3435883283391740e-05 1.0350681594460688e-06 7.7735776727436293e-03 -1.7950159211888050e-01 1.1349078769729003e-05 9.8706932468810706e-07 8.1254626701269400e-03 -1.8762705505656013e-01 1.0438042773581391e-05 9.5968138912711215e-07 8.4932763758342970e-03 -1.9612033171205839e-01 9.4228847859467391e-06 9.5504634962296442e-07 8.8777398315434061e-03 -2.0499807183592528e-01 1.0403057822366863e-05 1.0476675496525892e-06 9.2796067181824624e-03 -2.1427767885966370e-01 9.2982957336217477e-06 1.1061063274562501e-06 9.6996648334046250e-03 -2.2397734401245589e-01 6.9252828969103226e-06 1.0990870540122200e-06 1.0138737635943040e-02 -2.3411608198224410e-01 8.5110906998799596e-06 1.2869226555654373e-06 1.0597685859873848e-02 -2.4471376819107526e-01 9.5259526376142547e-06 1.5285021985662934e-06 1.1077409201951766e-02 -2.5579117775778049e-01 6.7529700706883579e-06 1.4379485329066072e-06 1.1578848085325898e-02 -2.6737002622437112e-01 7.1240611130925426e-06 1.5166508449663157e-06 1.2102985503093364e-02 -2.7947301212598780e-01 5.9716337438467617e-06 1.5442067243973891e-06 1.2650848945304665e-02 -2.9212386148785568e-01 5.7341096291047458e-06 1.6263758970481508e-06 1.3223512413198467e-02 -3.0534737433647385e-01 6.9752629156982645e-06 1.8626841271634412e-06 1.3822098524614296e-02 -3.1916947331621792e-01 6.0468934312149525e-06 1.8715649046179617e-06 1.4447780714710574e-02 -3.3099772990242848e-01 6.6623605997798478e-06 2.6078953534499003e-06 1.4983208039947250e-02 diff --git a/tests/test_data/polref_data.ort b/tests/test_data/polref_data.ort deleted file mode 100644 index 2642b456..00000000 --- a/tests/test_data/polref_data.ort +++ /dev/null @@ -1,280 +0,0 @@ -# # ORSO reflectivity data file | 1.1 standard | YAML encoding | https://www.reflectometry.org/ -# # Mantid@ISIS output may not be fully ORSO compliant -# data_source: -# owner: -# name: null -# affiliation: null -# experiment: -# title: null -# instrument: POLREF -# start_date: 2022-07-25T14:19:01 -# probe: neutron -# facility: ISIS -# proposalID: '2210369' -# doi: 10.5286/ISIS.E.RB2210369 -# sample: -# name: L5 d-dod restart th=0.400 -# measurement: -# instrument_settings: -# incident_angle: null -# wavelength: null -# polarization: po -# data_files: [] -# reduction: -# software: {name: Mantid, version: 6.11.20250128.1155.dev227} -# timestamp: 2025-02-07T09:09:51+00:00 -# creator: -# name: SaveISISReflectometryORSO -# affiliation: Mantid -# data_set: Stitched po -# columns: -# - name: Qz -# unit: 1/angstrom -# physical_quantity: normal_wavevector_transfer -# - name: R -# physical_quantity: reflectivity -# - error_of: R -# error_type: uncertainty -# value_is: sigma -# - error_of: Qz -# error_type: resolution -# # Qz (1/angstrom) R sR sQz -8.9073628533901002e-03 9.0887593337734229e-01 1.6915130152893582e-01 2.7003739373594499e-04 -9.1774002947621995e-03 1.1226787260627373e+00 2.0048749082146064e-01 2.7822390281606981e-04 -9.4556242466585748e-03 8.8440556760038191e-01 1.0324795667430590e-01 2.8665859578655070e-04 -9.7422828930133574e-03 8.2424627510256443e-01 9.4158785887234850e-02 2.9534899664117157e-04 -1.0037631941755798e-02 9.0445426688136088e-01 9.0695457400728902e-02 3.0430285747265717e-04 -1.0341934852909237e-02 8.3282135233798993e-01 7.7381179628112667e-02 3.1352816538776700e-04 -1.0655463073605185e-02 7.4245185465531027e-01 6.1153010975952785e-02 3.2303314963202950e-04 -1.0978496280222128e-02 7.8099948558201449e-01 5.9035760503453827e-02 3.3282628893047009e-04 -1.1311322627865078e-02 9.2574737993193290e-01 6.0011391892057793e-02 3.4291631905088328e-04 -1.1654239007408383e-02 9.2312111778354744e-01 5.6018808629526531e-02 3.5331224059639404e-04 -1.2007551310331096e-02 8.0224362538000626e-01 4.5753199784791261e-02 3.6402332703425958e-04 -1.2371574701581175e-02 8.7344208065561602e-01 4.4793833988718772e-02 3.7505913296807521e-04 -1.2746633900711847e-02 8.0883901498066402e-01 4.0130195776090116e-02 3.8642950266076055e-04 -1.3133063471541005e-02 8.8120968307686365e-01 3.9758596008382330e-02 3.9814457881593140e-04 -1.3531208120591942e-02 8.2532824523051795e-01 3.5749118725398890e-02 4.1021481162548947e-04 -1.3941423004581694e-02 8.5866228061118122e-01 3.4684505755846459e-02 4.2265096809149960e-04 -1.4364074047231265e-02 8.0201159537604749e-01 3.1028170500932213e-02 4.3546414163067251e-04 -1.4799538265680328e-02 8.1848070336221501e-01 2.9592954364459866e-02 4.4866576197001795e-04 -1.5248204106797579e-02 8.0911271220046710e-01 2.7771918659379710e-02 4.6226760534249676e-04 -1.5710471793686752e-02 7.7414413719774400e-01 2.5615973343028852e-02 4.7628180499176634e-04 -1.6186753682697383e-02 7.1092211263439864e-01 2.3148518197099371e-02 4.9072086199539048e-04 -1.6677474631258765e-02 7.1813750406736809e-01 2.2707938730658295e-02 5.0559765641616696e-04 -1.7183072376865283e-02 7.0143398297518966e-01 2.1327296978929162e-02 5.2092545879152332e-04 -1.7703997927551063e-02 6.9735217241489345e-01 1.9580312856055281e-02 5.3671794197122360e-04 -1.8240715964202434e-02 6.7933790204506295e-01 1.8360662487587411e-02 5.5298919331395386e-04 -1.8793705255066878e-02 6.6609783568071468e-01 1.8169003310533775e-02 5.6975372725365854e-04 -1.9363459082828383e-02 6.3964017772147452e-01 1.7260786351534191e-02 5.8702649824684183e-04 -1.9950485684630093e-02 6.1375241362123667e-01 1.6461242952316310e-02 6.0482291411238288e-04 -2.0555308705436731e-02 6.0439525343546696e-01 1.5853903018798018e-02 6.2315884977576111e-04 -2.1178467665141316e-02 5.3794922090475972e-01 1.4720654371091581e-02 6.4205066142995716e-04 -2.1820518439832719e-02 5.4103195552402294e-01 1.4849023029720380e-02 6.6151520112565671e-04 -2.2482033757653480e-02 4.6847838327252783e-01 1.2809632148943867e-02 6.8156983180377444e-04 -2.3163603709690110e-02 4.2212051353156987e-01 1.1825160097211084e-02 7.0223244278370739e-04 -2.3865836276351676e-02 3.9101238542503014e-01 1.0949722230284452e-02 7.2352146572113275e-04 -2.4589357869706174e-02 3.5522289656360861e-01 1.0126335668350599e-02 7.4545589104958634e-04 -2.5334813892258487e-02 3.0345622365528030e-01 9.0602953071475811e-03 7.6805528492048674e-04 -2.6102869312668364e-02 2.4934084187838049e-01 7.8748408360383715e-03 7.9133980665671674e-04 -2.6894209258921997e-02 2.2736699538637861e-01 7.3588175937197124e-03 8.1533022673533110e-04 -2.7709539629486288e-02 1.8897226879345089e-01 6.4821507274788149e-03 8.4004794531543229e-04 -2.8549587722991033e-02 1.4480189036522836e-01 5.4882952525141309e-03 8.6551501132774080e-04 -2.9415102887000624e-02 1.0616778556796427e-01 4.5313975178576183e-03 8.9175414214288842e-04 -3.0306857186454095e-02 7.5583414731144841e-02 3.7613337837699608e-03 9.1878874383597971e-04 -3.1225646092369715e-02 5.3715122126233757e-02 3.0902647349597741e-03 9.4664293206549882e-04 -3.2172289191428498e-02 2.6012248928840017e-02 1.9879248749265035e-03 9.7534155358518465e-04 -3.3147630917069570e-02 1.5764446738063070e-02 1.4601538402085269e-03 1.0049102084080646e-03 -3.4152541302749598e-02 7.6108329101017506e-03 9.1453945632513796e-04 1.0353752726424174e-03 -3.5187916758038201e-02 2.1483574535293938e-03 4.0432029849194590e-04 1.0667639220200377e-03 -3.6254680868241559e-02 4.4350862186645033e-04 1.5659217072865191e-04 1.0991041561377848e-03 -3.7353785218267668e-02 1.1369658750427084e-03 2.6547494517768755e-04 1.1324248234340464e-03 -3.8486210241467991e-02 3.1005103601512785e-03 5.2756577778690175e-04 1.1667556469223920e-03 -3.9652966094212830e-02 5.4389386941642607e-03 8.0777357376523684e-04 1.2021272507053750e-03 -4.0855093556980394e-02 4.9146554819655200e-03 8.2435104927510729e-04 1.2385711872921290e-03 -4.2093664962763636e-02 7.6264127087991565e-03 1.0891290865760806e-03 1.2761199657441351e-03 -4.3369785153622706e-02 9.6550210158050289e-03 1.7646727218769531e-03 1.3148070806742566e-03 -4.4684592466236531e-02 9.5868793248111289e-03 1.7410180011689883e-03 1.3546670421249200e-03 -4.6039259747332542e-02 9.6720895483684288e-03 1.7493870925176850e-03 1.3957354063520828e-03 -4.7434995399900419e-02 7.9844946529962421e-03 1.4481283567128371e-03 1.4380488075424612e-03 -4.8873044461122998e-02 6.5204672130299377e-03 1.1872902189183350e-03 1.4816449904922972e-03 -5.0354689712986032e-02 5.7895931151187678e-03 1.0568956724687805e-03 1.5265628442768272e-03 -5.1881252826557367e-02 3.9382731472159781e-03 5.0287044509308325e-04 1.5728424369404785e-03 -5.3454095540956342e-02 2.0770917693003128e-03 2.8770354823474189e-04 1.6205250512387407e-03 -5.5074620878065056e-02 9.2780854738596090e-04 1.4483316619671787e-04 1.6696532214635958e-03 -5.6744274394065125e-02 6.0358175551852129e-04 1.1060552577888949e-04 1.7202707713853572e-03 -5.8464545468916190e-02 1.0539254125228068e-04 3.4408891608503737e-05 1.7724228533447571e-03 -6.0236968634926571e-02 1.2415969418838420e-04 3.6583370053329632e-05 1.8261559885301610e-03 -6.2063124945601206e-02 4.6923158357974591e-04 7.9473018790502848e-05 1.8815181084758353e-03 -6.3944643385987709e-02 7.4745715042814377e-04 1.0495586248096887e-04 1.9385585978182807e-03 -6.5883202325778933e-02 1.0462181386669811e-03 1.3244204326663984e-04 1.9973283383487796e-03 -6.7880531016467960e-02 1.1183665888426710e-03 1.3165449767907851e-04 2.0578797544014461e-03 -6.9938411133891279e-02 1.1597434234529912e-03 1.2913570191912862e-04 2.1202668596172749e-03 -7.2058678367535878e-02 9.5439901337071977e-04 1.0714514486996628e-04 2.1845453051258911e-03 -7.4243224058028190e-02 6.7265222225282219e-04 7.9275939256564631e-05 2.2507724291879944e-03 -7.6493996884265433e-02 4.5192009046652308e-04 5.8690506198151980e-05 2.3190073083427677e-03 -7.8813004601694492e-02 2.1750399622788729e-04 3.4731397585933621e-05 2.3893108101058907e-03 -8.1202315833288602e-02 8.0805801270432352e-05 1.8174127970710786e-05 2.4617456472651438e-03 -8.3664061914819898e-02 4.4318797575035088e-05 1.2437516599620603e-05 2.5363764338220633e-03 -8.6200438796073420e-02 7.2047310121355892e-05 1.6072983527759074e-05 2.6132697426295213e-03 -8.8813708999698815e-02 1.5053928587452662e-04 2.3842748216387901e-05 2.6924941647766694e-03 -9.1506203639447017e-02 1.4749793903024274e-04 2.2832605294616991e-05 2.7741203707742040e-03 -9.4280324499592089e-02 1.6479304772892630e-04 2.4124935376514984e-05 2.8582211735945339e-03 -9.7138546177393342e-02 1.3616115264430154e-04 2.0813688844837540e-05 2.9448715936230920e-03 -1.0008341829050879e-01 8.3442231918552727e-05 1.4925263045353322e-05 3.0341489255787226e-03 -1.0311756775132892e-01 5.5352779608665989e-05 1.1234933048069166e-05 3.1261328074628381e-03 -1.0624370111025966e-01 4.3297176893964485e-05 9.8557339239858429e-06 3.2209052915988540e-03 -1.0946460697004481e-01 3.2476538612370273e-05 8.2403052656833020e-06 3.3185509178252728e-03 -1.1278315847328163e-01 4.6889470631079536e-05 9.9601073630652286e-06 3.4191567889077009e-03 -1.1620231586534835e-01 6.6304737778755183e-05 1.2063314535643178e-05 3.5228126482370740e-03 -1.1972512913502992e-01 4.3540573509142195e-05 9.4160954763312928e-06 3.6296109598833943e-03 -1.2335474073519767e-01 3.4184742025560879e-05 8.3414744087159250e-06 3.7396469910763999e-03 -1.2709438838596940e-01 2.4443191804319148e-05 7.0327103988181833e-06 3.8530188971867257e-03 -1.3094740796285093e-01 4.7925519948322068e-05 1.0478781087196047e-05 3.9698278092833812e-03 -1.3491723647243486e-01 4.8856622278712182e-05 1.0370119205928137e-05 4.0901779243456299e-03 -1.3900741511831149e-01 3.5764847136079952e-05 8.5108334092800251e-06 4.2141765982097552e-03 -1.4322159245992633e-01 3.7240860790924077e-05 8.4825890722675456e-06 4.3419344413336185e-03 -1.4756352766720227e-01 4.7102791494915254e-05 9.4017101966586438e-06 4.4735654174644377e-03 -1.5203709387382952e-01 3.8081345805327017e-05 8.1130401885041800e-06 4.6091869452977909e-03 -1.5664628163221450e-01 4.4534562078192710e-05 8.7424511989661173e-06 4.7489200032185411e-03 -1.6139520247316999e-01 3.4182877481079394e-05 7.4041556219955492e-06 4.8928892372171167e-03 -1.6628809257352103e-01 4.1220795231212649e-05 8.0867056607222419e-06 5.0412230720773788e-03 -1.7132931653489930e-01 2.6861206438957707e-05 6.3101783457612563e-06 5.1940538259353146e-03 -1.7652337127709572e-01 1.5830226140932151e-05 4.7957769551587520e-06 5.3515178283106892e-03 -1.8187489004944507e-01 2.2956911225368183e-05 5.7264779969673984e-06 5.5137555417169868e-03 -1.8738864656382037e-01 2.3367830160436411e-05 5.6807511235005174e-06 5.6809116869580914e-03 -1.9306955925292410e-01 2.3791120952873547e-05 5.6771396964490183e-06 5.8531353722234983e-03 -1.9892269565767451e-01 2.1169000636954526e-05 5.3750078616094824e-06 6.0305802260971920e-03 -2.0495327694760088e-01 2.3847323892437319e-05 5.9384559026736575e-06 6.2134045345988579e-03 -2.1116668257828020e-01 2.2026274209707158e-05 5.9155634983381102e-06 6.4017713823796580e-03 -2.1756845508996930e-01 2.1539281391594201e-05 6.0798707914971173e-06 6.5958487981985277e-03 -2.2416430505171364e-01 2.8157952085119461e-05 7.3965106692315626e-06 6.7958099048087616e-03 -2.3096011615534257e-01 1.3474723879396033e-05 5.2537353422702279e-06 7.0018330733885963e-03 -2.3796195046389496e-01 1.8304890445269731e-05 6.6791102423865306e-06 7.2141020826535325e-03 -2.4517605381915777e-01 2.5666054789962143e-05 8.3955755304817827e-06 7.4328062827923513e-03 -2.5041447932533889e-01 2.1631060534838146e-05 1.2612156932855271e-05 7.5916154381228396e-03 -# data_set: Stitched mo -# columns: -# - name: Qz -# unit: 1/angstrom -# physical_quantity: normal_wavevector_transfer -# - name: R -# physical_quantity: reflectivity -# - error_of: R -# error_type: uncertainty -# value_is: sigma -# - error_of: Qz -# error_type: resolution -# # Qz (1/angstrom) R sR sQz -8.9073628533901002e-03 1.0670858962516752e+00 1.2008156296467595e-01 2.7003739373594499e-04 -9.1774002947621995e-03 9.4962989765898975e-01 8.7142174901504332e-02 2.7822390281606981e-04 -9.4556242466585748e-03 9.3153857606445545e-01 6.6994757509359362e-02 2.8665859578655070e-04 -9.7422828930133574e-03 8.7525080520095944e-01 5.6272007131945842e-02 2.9534899664117157e-04 -1.0037631941755798e-02 8.3723818920300763e-01 4.8447543725354508e-02 3.0430285747265717e-04 -1.0341934852909237e-02 9.5330288467907542e-01 5.0450753567442032e-02 3.1352816538776700e-04 -1.0655463073605185e-02 8.2229045183847060e-01 3.7320492661872075e-02 3.2303314963202950e-04 -1.0978496280222128e-02 8.3037365765237714e-01 3.3815542480939598e-02 3.3282628893047009e-04 -1.1311322627865078e-02 8.6012741152446859e-01 3.3370908167835327e-02 3.4291631905088328e-04 -1.1654239007408383e-02 8.3886309597745146e-01 3.0271485780981169e-02 3.5331224059639404e-04 -1.2007551310331096e-02 8.2685360161716737e-01 2.6774779347258568e-02 3.6402332703425958e-04 -1.2371574701581175e-02 8.1926058551459513e-01 2.5017832245514387e-02 3.7505913296807521e-04 -1.2746633900711847e-02 8.1036273242663415e-01 2.3038463587112083e-02 3.8642950266076055e-04 -1.3133063471541005e-02 8.4080121411250497e-01 2.2290812287854761e-02 3.9814457881593140e-04 -1.3531208120591942e-02 8.1883584775935025e-01 2.0486306545512638e-02 4.1021481162548947e-04 -1.3941423004581694e-02 7.9610109910013549e-01 1.8782933470833395e-02 4.2265096809149960e-04 -1.4364074047231265e-02 6.6822727593349651e-01 1.5661306620558462e-02 4.3546414163067251e-04 -1.4799538265680328e-02 3.4840813225869610e-01 9.6332799281835992e-03 4.4866576197001795e-04 -1.5248204106797579e-02 1.6648263561724641e-01 6.0214017721574153e-03 4.6226760534249676e-04 -1.5710471793686752e-02 9.8461690982627498e-02 4.4721310635238076e-03 4.7628180499176634e-04 -1.6186753682697383e-02 7.2141256050329269e-02 3.6711646616899899e-03 4.9072086199539048e-04 -1.6677474631258765e-02 5.0238591311803318e-02 3.1623461025957721e-03 5.0559765641616696e-04 -1.7183072376865283e-02 4.1131315856665636e-02 2.8560482077167383e-03 5.2092545879152332e-04 -1.7703997927551063e-02 3.3916464957877174e-02 2.5285792500553206e-03 5.3671794197122360e-04 -1.8240715964202434e-02 2.8879417360527085e-02 2.3898896629411495e-03 5.5298919331395386e-04 -1.8793705255066878e-02 2.4477564094111958e-02 2.2838873810085403e-03 5.6975372725365854e-04 -1.9363459082828383e-02 2.1757069047748108e-02 2.1653479963211568e-03 5.8702649824684183e-04 -1.9950485684630093e-02 1.8333558088972472e-02 2.0000763007040658e-03 6.0482291411238288e-04 -2.0555308705436731e-02 1.7156769092434371e-02 1.8154115115907221e-03 6.2315884977576111e-04 -2.1178467665141316e-02 1.6984024321860955e-02 1.6813448019959961e-03 6.4205066142995716e-04 -2.1820518439832719e-02 1.3659750778209202e-02 1.6527103590353006e-03 6.6151520112565671e-04 -2.2482033757653480e-02 1.0313552915708355e-02 1.3704172161675958e-03 6.8156983180377444e-04 -2.3163603709690110e-02 1.0220072555963879e-02 1.2659811754965615e-03 7.0223244278370739e-04 -2.3865836276351676e-02 8.3500788268484269e-03 1.1122960753635683e-03 7.2352146572113275e-04 -2.4589357869706174e-02 8.5172005898136033e-03 1.0449221024012624e-03 7.4545589104958634e-04 -2.5334813892258487e-02 7.4545395983401487e-03 9.3937147051564895e-04 7.6805528492048674e-04 -2.6102869312668364e-02 6.4078287877286548e-03 8.1184123114986888e-04 7.9133980665671674e-04 -2.6894209258921997e-02 4.6069659406121847e-03 6.8138689883212068e-04 8.1533022673533110e-04 -2.7709539629486288e-02 3.8882750630013486e-03 5.8043188284579632e-04 8.4004794531543229e-04 -2.8549587722991033e-02 2.6985004554648771e-03 4.8191715874039762e-04 8.6551501132774080e-04 -2.9415102887000624e-02 1.8430160627458205e-03 3.7667840289336366e-04 8.9175414214288842e-04 -3.0306857186454095e-02 1.5590621481933625e-03 3.1536498489852179e-04 9.1878874383597971e-04 -3.1225646092369715e-02 9.7799985984854004e-04 2.4198995013006955e-04 9.4664293206549882e-04 -3.2172289191428498e-02 5.7571719458459584e-04 1.6138372375388107e-04 9.7534155358518465e-04 -3.3147630917069570e-02 3.0648633854844093e-04 1.0708524165671934e-04 1.0049102084080646e-03 -3.4152541302749598e-02 4.3479881619380814e-04 1.1840561445942628e-04 1.0353752726424174e-03 -3.5187916758038201e-02 1.2642748464524511e-04 5.4347537841572826e-05 1.0667639220200377e-03 -3.6254680868241559e-02 5.7267072032025729e-05 2.9766608072309166e-05 1.0991041561377848e-03 -3.7353785218267668e-02 2.8719878585394538e-05 2.3402067503751372e-05 1.1324248234340464e-03 -3.8486210241467991e-02 6.3856577094225603e-05 3.6650312474176338e-05 1.1667556469223920e-03 -3.9652966094212830e-02 1.1780791133707876e-04 6.0542696652367457e-05 1.2021272507053750e-03 -4.0855093556980394e-02 -2.7561477292326609e-05 1.6824879036121416e-05 1.2385711872921290e-03 -4.2093664962763636e-02 1.3583476260999990e-04 6.7060394076843164e-05 1.2761199657441351e-03 -4.3369785153622706e-02 1.1117840125963014e-04 7.0105266424505918e-05 1.3148070806742566e-03 -4.4684592466236531e-02 1.0069564729279244e-04 6.3439502418097726e-05 1.3546670421249200e-03 -4.6039259747332542e-02 9.0031032687062359e-05 5.7548301737924216e-05 1.3957354063520828e-03 -4.7434995399900419e-02 6.1985406885861453e-05 4.1646448692310622e-05 1.4380488075424612e-03 -4.8873044461122998e-02 8.2404042400593066e-05 4.9045376471814276e-05 1.4816449904922972e-03 -5.0354689712986032e-02 8.4749115118562901e-05 4.9293188282131216e-05 1.5265628442768272e-03 -5.1881252826557367e-02 6.2650018367993478e-05 3.4469797002999267e-05 1.5728424369404785e-03 -5.3454095540956342e-02 5.8662331561748551e-05 2.5690782928813255e-05 1.6205250512387407e-03 -5.5074620878065056e-02 7.4538486089252600e-05 2.6850560357222797e-05 1.6696532214635958e-03 -5.6744274394065125e-02 8.5979545710191660e-05 2.8207487991793312e-05 1.7202707713853572e-03 -5.8464545468916190e-02 5.2155625968060939e-05 1.6909293893973021e-05 1.7724228533447571e-03 -6.0236968634926571e-02 1.1007423206402172e-04 2.5209226947706466e-05 1.8261559885301610e-03 -6.2063124945601206e-02 6.6128438738162054e-05 1.9532985620500440e-05 1.8815181084758353e-03 -6.3944643385987709e-02 1.2308255901604304e-04 2.6325585393513821e-05 1.9385585978182807e-03 -6.5883202325778933e-02 7.9545385602833611e-05 2.0613746789859539e-05 1.9973283383487796e-03 -6.7880531016467960e-02 9.0309142698602519e-05 1.9613392774729984e-05 2.0578797544014461e-03 -6.9938411133891279e-02 7.1851468784512877e-05 1.6663878734202349e-05 2.1202668596172749e-03 -7.2058678367535878e-02 9.0698857939866968e-05 1.7735301258986228e-05 2.1845453051258911e-03 -7.4243224058028190e-02 6.9817095727979620e-05 1.3782378321005236e-05 2.2507724291879944e-03 -7.6493996884265433e-02 6.6313646249506166e-05 1.2939638842021612e-05 2.3190073083427677e-03 -7.8813004601694492e-02 6.1691397840550884e-05 1.1625664488145388e-05 2.3893108101058907e-03 -8.1202315833288602e-02 8.5274834410591210e-05 1.3828230644479231e-05 2.4617456472651438e-03 -8.3664061914819898e-02 7.4479812116522661e-05 1.2136537954696514e-05 2.5363764338220633e-03 -8.6200438796073420e-02 6.0017718605551249e-05 1.0050358600460045e-05 2.6132697426295213e-03 -8.8813708999698815e-02 6.1006617660096611e-05 9.9165487804179550e-06 2.6924941647766694e-03 -9.1506203639447017e-02 5.1415244137436146e-05 8.6149270477423768e-06 2.7741203707742040e-03 -9.4280324499592089e-02 5.3652807453248755e-05 8.5383632511397800e-06 2.8582211735945339e-03 -9.7138546177393342e-02 5.6032780618769157e-05 8.7091459590563503e-06 2.9448715936230920e-03 -1.0008341829050879e-01 5.8487802982916058e-05 8.7200795917553610e-06 3.0341489255787226e-03 -1.0311756775132892e-01 6.2470831650059830e-05 8.8816084422123136e-06 3.1261328074628381e-03 -1.0624370111025966e-01 4.2551230618019520e-05 6.5432416959459872e-06 3.2209052915988540e-03 -1.0946460697004481e-01 3.8931074187450295e-05 6.0664853533092915e-06 3.3185509178252728e-03 -1.1278315847328163e-01 3.3256978624285146e-05 5.3372415293044487e-06 3.4191567889077009e-03 -1.1620231586534835e-01 3.2623497888828835e-05 5.2150401401756352e-06 3.5228126482370740e-03 -1.1972512913502992e-01 3.7920110086327935e-05 5.7272785377957491e-06 3.6296109598833943e-03 -1.2335474073519767e-01 3.4991544743109153e-05 5.4148106849537324e-06 3.7396469910763999e-03 -1.2709438838596940e-01 4.4050919915844746e-05 6.3897512683065074e-06 3.8530188971867257e-03 -1.3094740796285093e-01 3.6000138162548935e-05 5.5294013544256396e-06 3.9698278092833812e-03 -1.3491723647243486e-01 3.2459947162948383e-05 5.1000388934412083e-06 4.0901779243456299e-03 -1.3900741511831149e-01 3.1454228132660692e-05 4.8521758587117044e-06 4.2141765982097552e-03 -1.4322159245992633e-01 2.8207476639084297e-05 4.4162458078829776e-06 4.3419344413336185e-03 -1.4756352766720227e-01 3.1147583127163118e-05 4.7065606034551289e-06 4.4735654174644377e-03 -1.5203709387382952e-01 3.2811924970281529e-05 4.8348188626655442e-06 4.6091869452977909e-03 -1.5664628163221450e-01 2.9226448911108225e-05 4.3828046467620018e-06 4.7489200032185411e-03 -1.6139520247316999e-01 2.7960397129458252e-05 4.1913111897447146e-06 4.8928892372171167e-03 -1.6628809257352103e-01 2.4926117568011016e-05 3.8177166508461892e-06 5.0412230720773788e-03 -1.7132931653489930e-01 2.7279748169898713e-05 4.0545725358244537e-06 5.1940538259353146e-03 -1.7652337127709572e-01 2.5188795220300538e-05 3.8179902904681160e-06 5.3515178283106892e-03 -1.8187489004944507e-01 2.6100402964234576e-05 3.8931257872688327e-06 5.5137555417169868e-03 -1.8738864656382037e-01 2.5858998669611182e-05 3.8387508562371303e-06 5.6809116869580914e-03 -1.9306955925292410e-01 1.9739235057656633e-05 3.1082902002828556e-06 5.8531353722234983e-03 -1.9892269565767451e-01 1.9310919002135252e-05 3.0777465185036379e-06 6.0305802260971920e-03 -2.0495327694760088e-01 1.7618139822179594e-05 2.9370998382313292e-06 6.2134045345988579e-03 -2.1116668257828020e-01 1.8877470118067046e-05 3.1445035034957970e-06 6.4017713823796580e-03 -2.1756845508996930e-01 1.9271114689917938e-05 3.2773550000980402e-06 6.5958487981985277e-03 -2.2416430505171364e-01 2.3473316974067762e-05 3.8969472402146087e-06 6.7958099048087616e-03 -2.3096011615534257e-01 2.1262972703188473e-05 3.7374945428798441e-06 7.0018330733885963e-03 -2.3796195046389496e-01 1.7841078199321392e-05 3.4817980260680240e-06 7.2141020826535325e-03 -2.4517605381915777e-01 1.6228401364786267e-05 3.4185602490117741e-06 7.4328062827923513e-03 -2.5041447932533889e-01 1.4025306184514627e-05 4.6723553510419161e-06 7.5916154381228396e-03 diff --git a/tests/test_orso_utils.py b/tests/test_orso_utils.py index 4fc0f064..958abd88 100644 --- a/tests/test_orso_utils.py +++ b/tests/test_orso_utils.py @@ -69,8 +69,6 @@ def test_orso_model_to_rat(model, absorption): "test_data", [ "bare_substrate.ort", - "inter_data.ort", - "polref_data.ort", "prist5_10K_m_025.Rqz.ort", ], ) From e1010953b9f2198f12286344629b80eaaf6938c8 Mon Sep 17 00:00:00 2001 From: alexhroom Date: Fri, 14 Mar 2025 10:08:04 +0000 Subject: [PATCH 16/16] review fixes --- RATapi/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RATapi/__init__.py b/RATapi/__init__.py index 8484ea45..1c0b820f 100644 --- a/RATapi/__init__.py +++ b/RATapi/__init__.py @@ -6,6 +6,6 @@ from RATapi.controls import Controls from RATapi.project import Project from RATapi.run import run -from RATapi.utils import convert, plotting +from RATapi.utils import convert, orso, plotting -__all__ = ["examples", "models", "events", "ClassList", "Controls", "Project", "run", "plotting", "convert"] +__all__ = ["examples", "models", "events", "ClassList", "Controls", "Project", "run", "plotting", "convert", "orso"]