Commit 87c8cf16 authored by Peterson, Peter's avatar Peterson, Peter
Browse files

Rename parameter to DeltaRagged

parent 24018374
......@@ -19,7 +19,7 @@ PROPS_FOR_INSTR = ["PrimaryFlightPath", "SpectrumIDs", "L2", "Polar", "Azimuthal
CAL_FILE, GROUP_FILE = "CalFileName", "GroupFilename"
CAL_WKSP, GRP_WKSP, MASK_WKSP = "CalibrationWorkspace", "GroupingWorkspace", "MaskWorkspace"
# AlignAndFocusPowder only uses the ranges
PROPS_IN_PD_CHARACTER = ["DMin", "DMax", "Delta", "TMin", "TMax", "CropWavelengthMin", "CropWavelengthMax"]
PROPS_IN_PD_CHARACTER = ["DMin", "DMax", "DeltaRagged", "TMin", "TMax", "CropWavelengthMin", "CropWavelengthMax"]
PROPS_FOR_ALIGN = [CAL_FILE, GROUP_FILE,
GRP_WKSP, CAL_WKSP, "OffsetsWorkspace",
MASK_WKSP, "MaskBinTable",
......
......@@ -159,7 +159,7 @@ class SNSPowderReduction(DistributedDataProcessorAlgorithm):
return "The algorithm used for reduction of powder diffraction data obtained on SNS instruments (e.g. PG3) "
def PyInit(self):
self.copyProperties('AlignAndFocusPowderFromFiles', ['Filename', 'PreserveEvents', 'DMin', 'DMax', 'Delta'])
self.copyProperties('AlignAndFocusPowderFromFiles', ['Filename', 'PreserveEvents', 'DMin', 'DMax', 'DeltaRagged'])
self.declareProperty("Sum", False,
"Sum the runs. Does nothing for characterization runs")
......
......@@ -113,7 +113,7 @@ private:
int m_resampleX{0};
std::vector<double> m_dmins;
std::vector<double> m_dmaxs;
std::vector<double> m_delta;
std::vector<double> m_delta_ragged;
bool dspace{false};
double xmin{0.0};
double xmax{0.0};
......
......@@ -56,7 +56,7 @@ const std::string RESAMPLEX("ResampleX");
const std::string BIN_IN_D("Dspacing");
const std::string D_MINS("DMin");
const std::string D_MAXS("DMax");
const std::string DELTA("Delta");
const std::string RAGGED_DELTA("DeltaRagged");
const std::string TOF_MIN("TMin");
const std::string TOF_MAX("TMax");
const std::string WL_MIN("CropWavelengthMin");
......@@ -160,9 +160,10 @@ void AlignAndFocusPowder::init() {
std::make_unique<ArrayProperty<double>>(PropertyNames::D_MAXS),
"Maximum for Dspace axis. (Default 0.) ");
mapPropertyName(PropertyNames::D_MAXS, "d_max");
declareProperty(std::make_unique<ArrayProperty<double>>(PropertyNames::DELTA),
"Step parameter for rebin");
mapPropertyName(PropertyNames::DELTA, "delta");
declareProperty(
std::make_unique<ArrayProperty<double>>(PropertyNames::RAGGED_DELTA),
"Step parameter for rebin");
mapPropertyName(PropertyNames::RAGGED_DELTA, "delta");
declareProperty(PropertyNames::TOF_MIN, EMPTY_DBL(),
"Minimum for TOF axis. Defaults to 0. ");
mapPropertyName(PropertyNames::TOF_MIN, "tof_min");
......@@ -358,7 +359,7 @@ void AlignAndFocusPowder::exec() {
dspace = getProperty(PropertyNames::BIN_IN_D);
auto dmin = getVecPropertyFromPmOrSelf(PropertyNames::D_MINS, m_dmins);
auto dmax = getVecPropertyFromPmOrSelf(PropertyNames::D_MAXS, m_dmaxs);
this->getVecPropertyFromPmOrSelf(PropertyNames::DELTA, m_delta);
this->getVecPropertyFromPmOrSelf(PropertyNames::RAGGED_DELTA, m_delta_ragged);
LRef = getProperty(PropertyNames::UNWRAP_REF);
DIFCref = getProperty(PropertyNames::LOWRES_REF);
const bool applyLorentz = getProperty(PropertyNames::LORENTZ);
......@@ -749,13 +750,13 @@ void AlignAndFocusPowder::exec() {
// this next call should probably be in for rebin as well
// but it changes the system tests
if (dspace && m_resampleX != 0) {
if (m_delta.empty()) {
if (m_delta_ragged.empty()) {
m_outputW = rebin(m_outputW);
} else {
m_outputW = rebinRagged(m_outputW);
}
if (m_processLowResTOF) {
if (m_delta.empty()) {
if (m_delta_ragged.empty()) {
m_lowResW = rebin(m_lowResW);
} else {
m_lowResW = rebinRagged(m_lowResW);
......@@ -801,7 +802,7 @@ void AlignAndFocusPowder::exec() {
m_outputW = convertUnits(m_outputW, "TOF");
m_progress->report();
if (!dspace && !m_delta.empty()) {
if (!dspace && !m_delta_ragged.empty()) {
m_outputW = rebinRagged(m_outputW);
}
......@@ -919,7 +920,7 @@ AlignAndFocusPowder::convertUnits(API::MatrixWorkspace_sptr matrixws,
*/
API::MatrixWorkspace_sptr
AlignAndFocusPowder::rebin(API::MatrixWorkspace_sptr matrixws) {
if (!m_delta.empty()) {
if (!m_delta_ragged.empty()) {
return matrixws;
} else if (m_resampleX != 0) {
// ResampleX
......@@ -992,7 +993,7 @@ AlignAndFocusPowder::rebinRagged(API::MatrixWorkspace_sptr matrixws) {
}
alg->setProperty("InputWorkspace", matrixws);
alg->setProperty("OutputWorkspace", matrixws);
alg->setProperty("Delta", m_delta);
alg->setProperty("Delta", m_delta_ragged);
alg->executeAsChildAlg();
matrixws = alg->getProperty("OutputWorkspace");
return matrixws;
......
......@@ -343,7 +343,7 @@ class VulcanRaggedInD(systemtesting.MantidSystemTest):
PreserveEvents=True, Dspacing=True,
Params=delta.max(),
CompressTolerance=0.01,
DMin=dmin, DMax=dmax, Delta=delta) # bonus bit for RebinRagged
DMin=dmin, DMax=dmax, DeltaRagged=delta) # bonus bit for RebinRagged
ConvertUnits(InputWorkspace=self.wksp_obs, OutputWorkspace=self.wksp_obs, Target='dSpacing')
def validateMethod(self):
......@@ -404,7 +404,7 @@ class VulcanRaggedInTOF(systemtesting.MantidSystemTest):
PreserveEvents=True, Dspacing=False,
Params=delta.max(),
CompressTolerance=0.01,
DMin=dmin, DMax=dmax, Delta=delta) # bonus bit for RebinRagged
DMin=dmin, DMax=dmax, DeltaRagged=delta) # bonus bit for RebinRagged
def validateMethod(self):
self.tolerance = 1.0e-2
......
Supports Markdown
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