Skip to content

Commit 15a7cef

Browse files
authored
Merge pull request #97 from scipp/upgrade-essreduce
fix: dont use removed essreduce function
2 parents c9318ba + 1408659 commit 15a7cef

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/ess/amor/load.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
import scipp as sc
77

8-
from ess.reduce import nexus
9-
108
from ..reflectometry.load import load_nx
119
from ..reflectometry.types import (
1210
DetectorRotation,
@@ -51,7 +49,7 @@ def wrapped(*args, **kwargs):
5149
def load_detector(
5250
file_path: Filename[RunType], detector_name: NeXusDetectorName[RunType]
5351
) -> LoadedNeXusDetector[RunType]:
54-
return nexus.load_detector(file_path=file_path, detector_name=detector_name)
52+
return next(load_nx(file_path, f"NXentry/NXinstrument/{detector_name}"))
5553

5654

5755
@ignore_amor_warnings
@@ -66,7 +64,7 @@ def load_events(
6664
dtype="int32",
6765
)
6866
data = (
69-
nexus.extract_detector_data(detector)
67+
detector['data']
7068
.bins.constituents["data"]
7169
.group(detector_numbers)
7270
.fold(

0 commit comments

Comments
 (0)