Skip to content
Snippets Groups Projects
Commit adef8a50 authored by Gemma Guest's avatar Gemma Guest
Browse files

Re #18829 Add unit test for invalid spectrum mapping

This tests an attempt to normalise by a transmission run with strict
spectrum checking enabled but where the requested spectrum does not
exist in the transmission run
parent 7ada45bd
No related branches found
No related tags found
No related merge requests found
...@@ -288,6 +288,22 @@ public: ...@@ -288,6 +288,22 @@ public:
TS_ASSERT_DELTA(outLam->y(0)[7], 0.08, 0.0001); TS_ASSERT_DELTA(outLam->y(0)[7], 0.08, 0.0001);
} }
void test_transmission_correction_with_bad_mapped_spectra() {
// Run workspace spectrum numbers are 1,2,3,4.
// Transmission workspace has spectrum numbers 2,3,4,5.
// Processing instructions 0 in the run workspace maps to
// spectrum 1, which doesn't exist in the transmission
// workspace.
ReflectometryReductionOne2 alg;
setupAlgorithm(alg, 1.5, 15.0, "0");
alg.setProperty("FirstTransmissionRun", m_transmissionWS);
alg.setProperty("SecondTransmissionRun", m_transmissionWS);
alg.setProperty("StartOverlap", 2.5);
alg.setProperty("EndOverlap", 3.0);
alg.setProperty("Params", "0.1");
TS_ASSERT_THROWS_ANYTHING(alg.execute());
}
void test_exponential_correction() { void test_exponential_correction() {
// CorrectionAlgorithm: ExponentialCorrection // CorrectionAlgorithm: ExponentialCorrection
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment