CheckConversionWithGeomTransform: Use fill value for gaps consistent with JFJochReceiver
This commit is contained in:
@@ -404,12 +404,11 @@ TEST_CASE("HLS_C_Simulation_check_convert_full_range", "[FPGA][Full]") {
|
||||
TEST_CASE("HLS_C_Simulation_internal_packet_generator_convert_full_range", "[FPGA][Full]") {
|
||||
double energy = 6.0;
|
||||
|
||||
const uint16_t nmodules = 1;
|
||||
DiffractionExperiment x((DetectorGeometry(nmodules)));
|
||||
const uint16_t nmodules = 4;
|
||||
DiffractionExperiment x((DetectorGeometry(nmodules, 2, 8, 36, true)));
|
||||
|
||||
std::vector<uint16_t> data(RAW_MODULE_SIZE);
|
||||
JFModulePedestal pedestal_g0, pedestal_g1, pedestal_g2;
|
||||
std::vector<double> gain(3 * RAW_MODULE_SIZE);
|
||||
|
||||
for (int i = 0; i < RAW_MODULE_SIZE; i++) {
|
||||
pedestal_g0.GetPedestal()[i] = 0 + (i / 65536) * 1000 + 100 * (i % 5);
|
||||
@@ -428,12 +427,12 @@ TEST_CASE("HLS_C_Simulation_internal_packet_generator_convert_full_range", "[FPG
|
||||
auto gain_from_file = GainCalibrationFromTestFile();
|
||||
|
||||
JFCalibration c(x);
|
||||
c.Pedestal(0,0) = pedestal_g0;
|
||||
c.Pedestal(0,1) = pedestal_g1;
|
||||
c.Pedestal(0,2) = pedestal_g2;
|
||||
|
||||
for (int i = 0; i < x.GetModulesNum(); i++)
|
||||
for (int i = 0; i < x.GetModulesNum(); i++) {
|
||||
c.Pedestal(i, 0) = pedestal_g0;
|
||||
c.Pedestal(i, 1) = pedestal_g1;
|
||||
c.Pedestal(i, 2) = pedestal_g2;
|
||||
c.GainCalibration(i) = gain_from_file;
|
||||
}
|
||||
|
||||
HLSSimulatedDevice test(0, 64);
|
||||
|
||||
@@ -444,7 +443,7 @@ TEST_CASE("HLS_C_Simulation_internal_packet_generator_convert_full_range", "[FPG
|
||||
REQUIRE_NOTHROW(test.OutputStream().read());
|
||||
REQUIRE(test.OutputStream().size() == 0);
|
||||
|
||||
REQUIRE(test.GetBytesReceived() == 128 * JUNGFRAU_PACKET_SIZE_BYTES);
|
||||
REQUIRE(test.GetBytesReceived() == nmodules * 128 * JUNGFRAU_PACKET_SIZE_BYTES);
|
||||
|
||||
double mean_error = CheckConversion(x, c, data.data(), test.GetFrameBuffer(0,0));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user