Skip to content

Commit 1b2b488

Browse files
authored
Merge pull request #101 from neutrons/bugFix
force pixelWeight loading for makeResolutionCalculation
2 parents ce02432 + d524786 commit 1b2b488

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/snapwrap/utils.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -664,8 +664,14 @@ def makeResolutionWorkspace(prefix,
664664

665665
if isLite:
666666
donorWSName = f"dsp_unfoc_lite_{str(runNumber).zfill(6)}"
667+
668+
# load pixel weight workspace
669+
LoadNexus(Filename="/SNS/SNAP/shared/Calibration/Auxiliary/pixWeightLite.nxs",
670+
OutputWorkspace="pixWeightLite")
667671
else:
668-
donorWSName = f"dsp_unfoc_{str(runNumber).zfill(6)}"
672+
# donorWSName = f"dsp_unfoc_{str(runNumber).zfill(6)}"
673+
raise Exception("Error: Currently makeResolutionWorkspace only works with Lite data")
674+
669675

670676
#unfocused workspace must exist to proceed
671677
if donorWSName not in mtd.getObjectNames():
@@ -929,7 +935,7 @@ def makeResolutionWorkspace(prefix,
929935
gpWSName,
930936
outWS,
931937
behaviour="Average",
932-
weightWorkspaceName="pixWeights"
938+
weightWorkspaceName="pixWeightsLite"
933939
)
934940

935941
ConvertToPointData(InputWorkspace=outWS,
@@ -948,7 +954,7 @@ def makeResolutionWorkspace(prefix,
948954
print(f"created resolution workspace: {outWS}")
949955

950956
# keep resolution workspaces, but tidy up into group
951-
GroupWorkspaces(InputWorkspaces=["d2t","delThetaPix","omega","delDOverD"],OutputWorkspace="resolutionWorkspaces")
957+
GroupWorkspaces(InputWorkspaces=["d2t","delThetaPix","omega","delDOverD","pixWeightsLite"],OutputWorkspace="resolutionWorkspaces")
952958

953959
return
954960

0 commit comments

Comments
 (0)