v1.0.0-rc.70
This commit is contained in:
@@ -209,7 +209,7 @@ TEST_CASE("DiffractionGeometry_DirectBeam_RotY") {
|
||||
geom.DetectorDistance_mm(100);
|
||||
geom.PixelSize_mm(1.0);
|
||||
geom.BeamX_pxl(1230).BeamY_pxl(1450);
|
||||
geom.PoniRot2_rad(M_PI_4); // 45 deg rotation
|
||||
geom.PoniRot2_rad(-M_PI_4); // 45 deg rotation
|
||||
|
||||
auto [x, y] = geom.GetDirectBeam_pxl();
|
||||
CHECK(x == Catch::Approx(1230.0f)); // no Change for X
|
||||
@@ -321,11 +321,11 @@ Wavelength: 1e-10
|
||||
// PyFAI uses nm^-1 for Q?
|
||||
DiffractionExperiment x(DetJF4M());
|
||||
x.DetectorDistance_mm(1000).BeamX_pxl(2000).BeamY_pxl(1000).IncidentEnergy_keV(WVL_1A_IN_KEV)
|
||||
.PoniRot1_rad(0.2).PoniRot2_rad(0.1).PoniRot3_rad(0.5);
|
||||
.PoniRot1_rad(0.2).PoniRot2_rad(-0.1).PoniRot3_rad(0.5);
|
||||
DiffractionGeometry geom = x.GetDiffractionGeometry();
|
||||
|
||||
REQUIRE(geom.GetPoniRot1_rad() == Catch::Approx(0.2f));
|
||||
REQUIRE(geom.GetPoniRot2_rad() == Catch::Approx(0.1f));
|
||||
REQUIRE(geom.GetPoniRot2_rad() == Catch::Approx(-0.1f));
|
||||
REQUIRE(geom.GetPoniRot3_rad() == Catch::Approx(0.5f));
|
||||
|
||||
float phi_800_400 = fabs(geom.Phi_rad(800,400) - 2 * M_PI + 1.4175001633470816);
|
||||
@@ -383,7 +383,7 @@ Wavelength: 1e-10
|
||||
DiffractionExperiment x(DetJF4M());
|
||||
x.DetectorDistance_mm(1000).BeamX_pxl(2000).BeamY_pxl(1000).IncidentEnergy_keV(WVL_1A_IN_KEV);
|
||||
DiffractionGeometry geom = x.GetDiffractionGeometry();
|
||||
geom.PoniRot1_rad(0.2).PoniRot2_rad(0.1);
|
||||
geom.PoniRot1_rad(0.2).PoniRot2_rad(-0.1);
|
||||
|
||||
float diff_800_400 = fabs(geom.PxlToQ( 800,400)*10.0 - 11.412737079654118);
|
||||
float diff_400_800 = fabs(geom.PxlToQ( 400,800)*10.0 - 8.805012278158177);
|
||||
@@ -442,11 +442,11 @@ TEST_CASE("ResPhiToPxl_poni_rot") {
|
||||
DiffractionExperiment x(DetJF4M());
|
||||
x.DetectorDistance_mm(75).IncidentEnergy_keV(WVL_1A_IN_KEV);
|
||||
DiffractionGeometry geom = x.GetDiffractionGeometry();
|
||||
geom.PoniRot3_rad(0.5).PoniRot2_rad(0.1).PoniRot2_rad(0.3);
|
||||
geom.PoniRot3_rad(0.5).PoniRot2_rad(-0.1).PoniRot2_rad(0.3);
|
||||
|
||||
auto out = geom.ResPhiToPxl(1.0, 0);
|
||||
CHECK(geom.PxlToRes(out.first, out.second) == Catch::Approx(1.0));
|
||||
CHECK(fabs(geom.Phi_rad(out.first, out.second) - 2 * M_PI) < 0.001 );
|
||||
CHECK(fabs(geom.Phi_rad(out.first, out.second)) < 0.001 );
|
||||
|
||||
out = geom.ResPhiToPxl(1.0, M_PI);
|
||||
CHECK(geom.PxlToRes(out.first, out.second) == Catch::Approx(1.0));
|
||||
|
||||
Reference in New Issue
Block a user