DiffractionExperiment: Solid angle correction is not anymore preference of a dataset; it can be now turned on and off when asking for plot

This commit is contained in:
2023-05-17 22:33:03 +02:00
parent 97bf8f7e4a
commit 11e478a5d0
10 changed files with 127 additions and 144 deletions

View File

@@ -753,7 +753,6 @@ TEST_CASE("DiffractionExperiment_LoadDatasetSettings", "[DiffractionExperiment]"
settings.set_sample_name("lyso1");
settings.set_apply_pixel_mask(true);
settings.set_binning2x2(true);
settings.set_rad_int_solid_angle_corr(true);
REQUIRE_NOTHROW(x.LoadDatasetSettings(settings));
@@ -768,7 +767,6 @@ TEST_CASE("DiffractionExperiment_LoadDatasetSettings", "[DiffractionExperiment]"
REQUIRE(x.GetDetectorDistance_mm() == Approx(57.6));
REQUIRE(x.GetApplyPixelMaskInFPGA());
REQUIRE(x.GetBinning2x2());
REQUIRE(x.GetSolidAngleCorrection());
}
TEST_CASE("DiffractionExperiment_ImageTimeUs", "[DiffractionExperiment]") {
@@ -987,12 +985,6 @@ TEST_CASE("DiffractionExperiment_DetectorModuleHostname","[DiffractionExperiment
TEST_CASE("DiffractionExperiment_SolidAngleCorrection","[DiffractionExperiment]") {
DiffractionExperiment x;
x.PhotonEnergy_keV(WVL_1A_IN_KEV);
x.RadIntSolidAngleCorr(false);
REQUIRE (x.CalcRadIntSolidAngleCorr(0.0) == 1.0f);
REQUIRE (x.CalcRadIntSolidAngleCorr(1.0) == 1.0f);
x.RadIntSolidAngleCorr(true);
REQUIRE(x.CalcRadIntSolidAngleCorr(0.0) == 1.0f);
REQUIRE(x.CalcRadIntSolidAngleCorr(2*M_PI) == Approx(0.5f*0.5f*0.5f));
}