Commit 4be610a8 authored by Peterson, Peter's avatar Peterson, Peter
Browse files

Merge branch 'copy_sample' into ornl-next

parents ae75dfa8 2920d5a5
......@@ -8,7 +8,7 @@ from mantid.api import mtd, AlgorithmFactory, DistributedDataProcessorAlgorithm,
MatrixWorkspaceProperty, MultipleFileProperty, PropertyMode
from mantid.kernel import Direction, PropertyManagerDataService
from mantid.simpleapi import AlignAndFocusPowder, CompressEvents, ConvertDiffCal, ConvertUnits, CopyLogs, \
CreateCacheFilename, DeleteWorkspace, DetermineChunking, Divide, EditInstrumentGeometry, FilterBadPulses, \
CopySample, CreateCacheFilename, DeleteWorkspace, DetermineChunking, Divide, EditInstrumentGeometry, FilterBadPulses, \
LoadDiffCal, Load, LoadIDFFromNexus, LoadNexusProcessed, PDDetermineCharacterizations, Plus, \
RebinToWorkspace, RemoveLogs, RenameWorkspace, SaveNexusProcessed
import os
......@@ -436,6 +436,11 @@ class AlignAndFocusPowderFromFiles(DistributedDataProcessorAlgorithm):
if not mtd.doesExist(wkspname):
raise RuntimeError('Failed to process any data from file "{}"'.format(filename))
# copy the sample object from the absorption workspace
if self.absorption is not None and len(str(self.absorption)) > 0:
CopySample(InputWorkspace=self.absorption, OutputWorkspace=wkspname,
CopyEnvironment=False)
# write out the cachefile for the main reduced data independent of whether
# the unfocussed workspace was requested
if self.useCaching and not os.path.exists(cachefile):
......
......@@ -292,4 +292,7 @@ class AbsorptionCompare(systemtesting.MantidSystemTest):
return "ValidateWorkspaceToWorkspace"
def validate(self):
# verify the material name
assert mtd[self.wksp_file].sample().getMaterial().name() == 'V'
# use standard method
return (self.wksp_mem, self.wksp_file)
......@@ -125,6 +125,7 @@ class PG3AbsorptionCorrection(systemtesting.MantidSystemTest):
Binning=-0.001,
SaveAs="nexus",
OutputDirectory=savedir)
assert not mtd['PG3_46577'].sample().getMaterial().name().strip()
# Silicon Full Paalman-Pings test
SNSPowderReduction("PG3_46577.nxs.h5",
......@@ -138,6 +139,7 @@ class PG3AbsorptionCorrection(systemtesting.MantidSystemTest):
ContainerShape="PAC06",
OutputFilePrefix='PP_absorption_',
OutputDirectory=savedir)
assert mtd['PG3_46577'].sample().getMaterial().name() == 'Si'
LoadNexus(Filename="PG3_46577.nxs", OutputWorkspace="PG3_46577")
LoadNexus(Filename="PP_absorption_PG3_46577.nxs", OutputWorkspace="PP_46577")
......
......@@ -25,6 +25,7 @@ New features
- New algorithm to clip peaks, providing a background estimation :ref:`ClipPeaks <algm-ClipPeaks>`.
- Scripts for pixel calibration of CORELLI 16-packs. Produce a calibration table, a masking table, and a goodness of fit workspace.
- New algorithm :ref:`PaalmanPingsAbsorptionCorrection <algm-PaalmanPingsAbsorptionCorrection>` uses a numerical integration method to calculate attenuation factors for all Paalmin Pings terms
- Modified :ref:`AlignAndFocusPowderFromFiles <algm-AlignAndFocusPowderFromFiles>` Copies the sample from the absorption workspace to the output workspace
- Modified :ref:`SNSPowderReduction <algm-SNSPowderReduction>` to include several different absorption correction methods.
- Modified he vanadium absorption correction in :ref:`SNSPowderReduction <algm-SNSPowderReduction>` to be calculated using numerical integration rather than Carpenter method.
- Added new absorption options from :ref:`SNSPowderReduction <algm-SNSPowderReduction>` to Powder Diffraction Reduction GUI
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment