DiffractionExperiment: solid angle correction
This commit is contained in:
@@ -967,4 +967,17 @@ TEST_CASE("DiffractionExperiment_DetectorModuleHostname","[DiffractionExperiment
|
||||
REQUIRE(h == h_out);
|
||||
|
||||
REQUIRE_NOTHROW(det_cfg = x.DetectorConfig(net_cfg));
|
||||
}
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user