fixed hardcoded values of nchip nchan etc from detPArameters

This commit is contained in:
2025-05-01 12:41:05 +02:00
parent aabec193ff
commit 5073769403
6 changed files with 69 additions and 34 deletions

View File

@ -57,11 +57,16 @@ TEST_CASE("eiger_acquire_check_file_size", "[.cmdcall]") {
test_frames_caught(det, num_frames_to_acquire);
// check file size (assuming local pc)
// pixels_row_per_chip * pixels_col_per_chip * num_chips *
// bytes_per_pixel
size_t expected_image_size = 256 * 256 * 2 * 2;
test_acquire_binary_file_size(test_file_info, num_frames_to_acquire,
expected_image_size);
{
detParameters par(det_type);
// data split into half due to 2 udp interfaces per half module
int num_chips = (par.nChipX / 2);
int bytes_per_pixel = (dynamic_range / 8);
size_t expected_image_size =
par.nChanX * par.nChanY * num_chips * bytes_per_pixel;
test_acquire_binary_file_size(test_file_info, num_frames_to_acquire,
expected_image_size);
}
// restore previous state
set_file_state(det, prev_file_info);