Skip to content

Commit

Permalink
fix: rename to ReflectivityOverQ
Browse files Browse the repository at this point in the history
  • Loading branch information
jokasimr committed Oct 11, 2024
1 parent 0ca0f6a commit 6d6411a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/ess/reflectometry/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)))

Expand Down Expand Up @@ -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
Expand All @@ -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(
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions tests/tools_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 6d6411a

Please sign in to comment.