From 6d6411a55ab82bf298820a64b438a412b8d27460 Mon Sep 17 00:00:00 2001 From: Johannes Kasimir Date: Fri, 11 Oct 2024 16:23:39 +0200 Subject: [PATCH] fix: rename to ReflectivityOverQ --- src/ess/reflectometry/tools.py | 8 ++++---- tests/tools_test.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ess/reflectometry/tools.py b/src/ess/reflectometry/tools.py index 426fd365..a7e661af 100644 --- a/src/ess/reflectometry/tools.py +++ b/src/ess/reflectometry/tools.py @@ -11,7 +11,7 @@ from orsopy.fileio.orso import OrsoDataset from ess.reflectometry import orso -from ess.reflectometry.types import NormalizedIofQ +from ess.reflectometry.types import ReflectivityOverQ _STD_TO_FWHM = sc.scalar(2.0) * sc.sqrt(sc.scalar(2.0) * sc.log(sc.scalar(2.0))) @@ -295,7 +295,7 @@ def orso_datasets_from_measurements( Parameters ----------- workflow: - The sciline workflow used to compute `NormalizedIofQ` for each of the runs. + The sciline workflow used to compute `ReflectivityOverQ` for each of the runs. runs: The sciline parameters to be used for each run @@ -314,7 +314,7 @@ def orso_datasets_from_measurements( wf = workflow.copy() for name, value in parameters.items(): wf[name] = value - reflectivity_curves.append(wf.compute(NormalizedIofQ)) + reflectivity_curves.append(wf.compute(ReflectivityOverQ)) scale_factors = ( scale_reflectivity_curves_to_overlap( @@ -331,7 +331,7 @@ def orso_datasets_from_measurements( wf = workflow.copy() for name, value in parameters.items(): wf[name] = value - wf[NormalizedIofQ] = scale_factor * curve + wf[ReflectivityOverQ] = scale_factor * curve dataset = wf.compute(orso.OrsoIofQDataset) dataset.info.reduction.corrections = orso.find_corrections( wf.get(orso.OrsoIofQDataset) diff --git a/tests/tools_test.py b/tests/tools_test.py index c54326ba..6c04b6a4 100644 --- a/tests/tools_test.py +++ b/tests/tools_test.py @@ -13,7 +13,7 @@ orso_datasets_from_measurements, scale_reflectivity_curves_to_overlap, ) -from ess.reflectometry.types import Filename, NormalizedIofQ, SampleRun +from ess.reflectometry.types import Filename, ReflectivityOverQ, SampleRun def curve(d, qmin, qmax): @@ -140,7 +140,7 @@ def test_combined_curves(): @pytest.mark.filterwarnings("ignore:No suitable") def test_orso_datasets_tool(): - def normalized_ioq(filename: Filename[SampleRun]) -> NormalizedIofQ: + def normalized_ioq(filename: Filename[SampleRun]) -> ReflectivityOverQ: return filename def orso_dataset(filename: Filename[SampleRun]) -> OrsoIofQDataset: