diff --git a/common/DiffractionExperiment.cpp b/common/DiffractionExperiment.cpp index 50793d86..c8c00bb4 100644 --- a/common/DiffractionExperiment.cpp +++ b/common/DiffractionExperiment.cpp @@ -41,7 +41,6 @@ DiffractionExperiment::DiffractionExperiment(const DetectorSetup& det_setup) { dataset.set_ntrigger(1); dataset.set_images_per_trigger(1); - dataset.set_summation(1); dataset.set_fpga_summation(1); dataset.set_fpga_pixel_output(JFJochProtoBuf::AUTO); dataset.set_space_group_number(0); // not set @@ -146,22 +145,6 @@ DiffractionExperiment &DiffractionExperiment::FrameTime(std::chrono::microsecond return *this; } -DiffractionExperiment &DiffractionExperiment::Summation(int64_t input) { - check_min("Summation", input, 1); - check_max("Summation", input, MAX_SUMMATION); - dataset.set_summation(input); - return *this; -} - -DiffractionExperiment & DiffractionExperiment::ImageTimeUs(std::chrono::microseconds image_time) { - check_min("Image time (us)", image_time.count(), MIN_FRAME_TIME_FULL_SPEED_IN_US); // Exclude negative numbers and zero - if ( image_time.count() % GetFrameTime().count() != 0) - throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, - "Image time must be multiple of frame time"); - Summation(image_time.count() / GetFrameTime().count()); - return *this; -} - DiffractionExperiment &DiffractionExperiment::PedestalG1G2FrameTime(std::chrono::microseconds input) { check_min("Pedestal G1G2 frame time (us) ", input.count(), MIN_FRAME_TIME_FULL_SPEED_IN_US); internal.set_frame_time_pedestalg1g2_us(input.count()); @@ -393,16 +376,6 @@ DetectorMode DiffractionExperiment::GetDetectorMode() const { } } -int64_t DiffractionExperiment::GetSummation() const { - if (GetDetectorMode() == DetectorMode::Conversion) { - if (dataset.has_image_time_us()) - throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, - "Internally DiffractionExperiment shouldn't use image_time_us"); - return dataset.summation(); - } else - return 1; -} - std::chrono::microseconds DiffractionExperiment::GetFrameTime() const { switch (GetDetectorMode()) { case DetectorMode::PedestalG1: @@ -422,8 +395,8 @@ std::chrono::microseconds DiffractionExperiment::GetImageTime() const { case DetectorMode::PedestalG2: return std::chrono::microseconds(internal.frame_time_pedestalg1g2_us()); case DetectorMode::Conversion: - return GetFrameTime() * GetSummation(); case DetectorMode::Raw: + return GetFrameTime() * GetFPGASummation(); case DetectorMode::PedestalG0: default: return GetFrameTime(); @@ -449,7 +422,7 @@ int64_t DiffractionExperiment::GetImageNumPerTrigger() const { case DetectorMode::Raw: if (GetStorageCellNumber() > 1) return GetStorageCellNumber(); - return GetFrameNumPerTrigger() / GetSummation(); + return GetFrameNumPerTrigger() / GetFPGASummation(); case DetectorMode::PedestalG0: case DetectorMode::PedestalG1: case DetectorMode::PedestalG2: @@ -469,7 +442,7 @@ int64_t DiffractionExperiment::GetFrameNumPerTrigger() const { if (GetStorageCellNumber() > 1) return GetStorageCellNumber(); else - return dataset.images_per_trigger() * GetSummation(); + return dataset.images_per_trigger() * GetFPGASummation(); case DetectorMode::PedestalG0: if (GetPedestalWithExternalTrigger()) return GetStorageCellNumber(); @@ -492,7 +465,7 @@ std::chrono::microseconds DiffractionExperiment::GetFrameCountTime() const { } std::chrono::microseconds DiffractionExperiment::GetImageCountTime() const { - return GetFrameCountTime() * GetSummation(); + return GetFrameCountTime() * GetFPGASummation(); } int64_t DiffractionExperiment::GetPedestalG0Frames() const { @@ -563,8 +536,7 @@ CompressionAlgorithm DiffractionExperiment::GetCompressionAlgorithmEnum() const } int64_t DiffractionExperiment::GetPixelDepth() const { - if (GetSummation() == 1) return 2; - else return 4; + return GetFPGAOutputDepth(); } bool DiffractionExperiment::IsPixelSigned() const { @@ -843,10 +815,6 @@ void DiffractionExperiment::LoadDatasetSettings(const JFJochProtoBuf::DatasetSet dataset = JFJochProtoBuf::DatasetSettings(); ImagesPerTrigger(settings.images_per_trigger()); NumTriggers(settings.ntrigger()); - if (settings.has_image_time_us()) - ImageTimeUs(std::chrono::microseconds(settings.image_time_us())); - else - Summation(settings.summation()); BeamX_pxl(settings.beam_x_pxl()); BeamY_pxl(settings.beam_y_pxl()); DetectorDistance_mm(settings.detector_distance_mm()); @@ -1005,7 +973,7 @@ void DiffractionExperiment::FillMessage(StartMessage &message) const { message.instrument_name = GetInstrumentName(); message.instrument_name_short = GetInstrumentNameShort(); - message.summation = GetSummation(); + message.summation = GetFPGASummation(); } DiffractionExperiment &DiffractionExperiment::ApplyPixelMaskInFPGA(bool input) { @@ -1179,7 +1147,6 @@ int64_t DiffractionExperiment::GetFPGASummation() const { case DetectorMode::PedestalG2: return 1; } - } DiffractionExperiment &DiffractionExperiment::FPGAOutputMode(const JFJochProtoBuf::FPGAPixelOutput &input) { diff --git a/common/DiffractionExperiment.h b/common/DiffractionExperiment.h index 284ceb0d..9e017dbc 100644 --- a/common/DiffractionExperiment.h +++ b/common/DiffractionExperiment.h @@ -49,9 +49,6 @@ public: DiffractionExperiment& PedestalG2Frames(int64_t input); DiffractionExperiment& FrameTime(std::chrono::microseconds frame_time, std::chrono::microseconds in_count_time = std::chrono::microseconds(0)); - DiffractionExperiment& Summation(int64_t input); - DiffractionExperiment& ImageTimeUs(std::chrono::microseconds image_time); - DiffractionExperiment& PedestalG1G2FrameTime(std::chrono::microseconds input); DiffractionExperiment& PhotonEnergy_keV(float input); DiffractionExperiment& BeamX_pxl(float input); @@ -121,7 +118,6 @@ public: std::chrono::microseconds GetFrameTime() const; std::chrono::microseconds GetImageTime() const; - int64_t GetSummation() const; std::chrono::microseconds GetImageCountTime() const; std::chrono::microseconds GetFrameCountTime() const; diff --git a/common/FrameTransformation.cpp b/common/FrameTransformation.cpp index 59463d79..aeb01dfa 100644 --- a/common/FrameTransformation.cpp +++ b/common/FrameTransformation.cpp @@ -9,13 +9,9 @@ #include "JFJochException.h" FrameTransformation::FrameTransformation(const DiffractionExperiment &in_experiment) : - experiment(in_experiment), summation(experiment.GetSummation()), - pixel_depth(experiment.GetPixelDepth()), compressor(in_experiment.GetCompressionAlgorithmEnum()) { - - if ((experiment.GetDetectorMode() == DetectorMode::Conversion) && (summation > 1)) { - for (int i = 0; i < experiment.GetModulesNum(); i++) - summation_buffer.emplace_back(RAW_MODULE_SIZE); - } + experiment(in_experiment), + pixel_depth(experiment.GetPixelDepth()), + compressor(in_experiment.GetCompressionAlgorithmEnum()) { precompression_buffer.resize(experiment.GetPixelsNum() * pixel_depth); @@ -33,40 +29,6 @@ FrameTransformation::FrameTransformation(const DiffractionExperiment &in_experim } } -template void AddToFramesSum(Td *destination, const int16_t *source) { - for (int i = 0; i < RAW_MODULE_SIZE; i++) { - if ((source[i] == INT16_MIN) || (destination[i] == INT32_MIN)) - destination[i] = INT32_MIN; - else if ((source[i] == INT16_MAX) || (destination[i] == INT32_MAX)) - destination[i] = INT32_MAX; - else destination[i] += source[i]; - } -} - -void FrameTransformation::PackSummation() { - for (int m = 0; m < experiment.GetModulesNum(); m++) { - int32_t *output; - - output = (int32_t *) precompression_buffer.data(); - - TransferModuleAdjustMultipixels(output, - (int32_t *) summation_buffer[m].data(), - experiment.GetModuleSlowDirectionStep(m), - static_cast(INT32_MIN), - static_cast(INT32_MAX), - experiment.GetModuleFastDirectionStep(m), - experiment.GetPixel0OfModule(m)); - - for (auto &i: summation_buffer[m]) - i = 0; - } -} - -void FrameTransformation::Pack() { - if (summation > 1) - PackSummation(); -} - size_t FrameTransformation::SaveCompressedImage(void *output) { return compressor.Compress((char *) output, precompression_buffer.data(), experiment.GetPixelsNum(), pixel_depth); @@ -76,23 +38,19 @@ void FrameTransformation::ProcessModule(const int16_t *input, uint16_t module_nu size_t module_number_abs = experiment.GetFirstModuleOfDataStream(data_stream) + module_number; - if (summation == 1) { - auto output = (int16_t *) precompression_buffer.data(); + auto output = (int16_t *) precompression_buffer.data(); - if (experiment.GetDetectorMode() != DetectorMode::Conversion) - memcpy(output + RAW_MODULE_SIZE * module_number_abs, - input, - RAW_MODULE_SIZE * experiment.GetPixelDepth()); - else - TransferModuleAdjustMultipixels(output, (int16_t *) input, - experiment.GetModuleSlowDirectionStep(module_number_abs), - static_cast(INT16_MIN), - static_cast(INT16_MAX), - experiment.GetModuleFastDirectionStep(module_number_abs), - experiment.GetPixel0OfModule(module_number_abs)); - } else { - AddToFramesSum(summation_buffer[module_number_abs].data(), input); - } + if (experiment.GetDetectorMode() != DetectorMode::Conversion) + memcpy(output + RAW_MODULE_SIZE * module_number_abs, + input, + RAW_MODULE_SIZE * experiment.GetPixelDepth()); + else + TransferModuleAdjustMultipixels(output, (int16_t *) input, + experiment.GetModuleSlowDirectionStep(module_number_abs), + static_cast(INT16_MIN), + static_cast(INT16_MAX), + experiment.GetModuleFastDirectionStep(module_number_abs), + experiment.GetPixel0OfModule(module_number_abs)); } void FrameTransformation::ApplyROI(const ROIFilter &filter) { diff --git a/common/FrameTransformation.h b/common/FrameTransformation.h index ab892181..9fb65d3f 100644 --- a/common/FrameTransformation.h +++ b/common/FrameTransformation.h @@ -12,16 +12,12 @@ class FrameTransformation { const DiffractionExperiment& experiment; JFJochBitShuffleCompressor compressor; - std::vector > summation_buffer; std::vector precompression_buffer; - const size_t summation; const size_t pixel_depth; - void PackSummation(); // transfer summed image to converted coordinates, clear summation buffer, no compression public: explicit FrameTransformation(const DiffractionExperiment &experiment); void ProcessModule(const int16_t *input, uint16_t module_number, int data_stream); - void Pack(); // transfer summed image to converted coordinates, clear summation buffer size_t SaveCompressedImage(void *output); void ApplyROI(const ROIFilter &filter); const void *GetPreviewImage() const; diff --git a/grpc/jfjoch.proto b/grpc/jfjoch.proto index c874511e..60a2ad3c 100644 --- a/grpc/jfjoch.proto +++ b/grpc/jfjoch.proto @@ -90,10 +90,8 @@ message DatasetSettings { int64 images_per_trigger = 1; int64 ntrigger = 2; - oneof timing { - int64 summation = 3; - int64 image_time_us = 4; - } + FPGAPixelOutput fpga_pixel_output = 3; + int64 fpga_summation = 4; float beam_x_pxl = 5; float beam_y_pxl = 6; @@ -117,8 +115,6 @@ message DatasetSettings { repeated ROIRectangle user_mask = 22; - FPGAPixelOutput fpga_pixel_output = 23; - int64 fpga_summation = 24; } message DetectorSettings { diff --git a/python/jfjoch_pb2.py b/python/jfjoch_pb2.py index a59f1d66..e944e8cb 100644 --- a/python/jfjoch_pb2.py +++ b/python/jfjoch_pb2.py @@ -13,27 +13,27 @@ _sym_db = _symbol_database.Default() -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cjfjoch.proto\x12\x0eJFJochProtoBuf\"\x07\n\x05\x45mpty\"W\n\x08UnitCell\x12\t\n\x01\x61\x18\x01 \x01(\x02\x12\t\n\x01\x62\x18\x02 \x01(\x02\x12\t\n\x01\x63\x18\x03 \x01(\x02\x12\r\n\x05\x61lpha\x18\x04 \x01(\x02\x12\x0c\n\x04\x62\x65ta\x18\x05 \x01(\x02\x12\r\n\x05gamma\x18\x06 \x01(\x02\")\n\x06Vector\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\x12\t\n\x01z\x18\x03 \x01(\x02\"|\n\x10RotationSettings\x12\x17\n\x0fstart_angle_deg\x18\x01 \x01(\x02\x12 \n\x18\x61ngle_incr_per_image_deg\x18\x02 \x01(\x02\x12-\n\rrotation_axis\x18\x03 \x01(\x0b\x32\x16.JFJochProtoBuf.Vector\"\x1c\n\x04Plot\x12\t\n\x01x\x18\x01 \x03(\x02\x12\t\n\x01y\x18\x02 \x03(\x02\"E\n\x0cROIRectangle\x12\n\n\x02x0\x18\x01 \x01(\x05\x12\n\n\x02y0\x18\x02 \x01(\x05\x12\r\n\x05width\x18\x03 \x01(\x05\x12\x0e\n\x06height\x18\x04 \x01(\x05\"\xb2\x05\n\x0f\x44\x61tasetSettings\x12\x1a\n\x12images_per_trigger\x18\x01 \x01(\x03\x12\x10\n\x08ntrigger\x18\x02 \x01(\x03\x12\x13\n\tsummation\x18\x03 \x01(\x03H\x00\x12\x17\n\rimage_time_us\x18\x04 \x01(\x03H\x00\x12\x12\n\nbeam_x_pxl\x18\x05 \x01(\x02\x12\x12\n\nbeam_y_pxl\x18\x06 \x01(\x02\x12\x1c\n\x14\x64\x65tector_distance_mm\x18\x07 \x01(\x02\x12\x19\n\x11photon_energy_keV\x18\x08 \x01(\x02\x12\x13\n\x0b\x66ile_prefix\x18\t \x01(\t\x12\x17\n\x0f\x64\x61ta_file_count\x18\n \x01(\x03\x12\x30\n\x0b\x63ompression\x18\x0b \x01(\x0e\x32\x1b.JFJochProtoBuf.Compression\x12\x13\n\x0bsample_name\x18\x0c \x01(\t\x12\x30\n\tunit_cell\x18\r \x01(\x0b\x32\x18.JFJochProtoBuf.UnitCellH\x01\x88\x01\x01\x12\x1a\n\x12space_group_number\x18\x0e \x01(\x03\x12 \n\x18rad_int_solid_angle_corr\x18\x12 \x01(\x08\x12!\n\x19rad_int_polarization_corr\x18\x13 \x01(\x08\x12#\n\x1brad_int_polarization_factor\x18\x14 \x01(\x02\x12\x18\n\x10save_calibration\x18\x15 \x01(\x08\x12/\n\tuser_mask\x18\x16 \x03(\x0b\x32\x1c.JFJochProtoBuf.ROIRectangle\x12:\n\x11\x66pga_pixel_output\x18\x17 \x01(\x0e\x32\x1f.JFJochProtoBuf.FPGAPixelOutput\x12\x16\n\x0e\x66pga_summation\x18\x18 \x01(\x03\x42\x08\n\x06timingB\x0c\n\n_unit_cell\"\x9a\x03\n\x10\x44\x65tectorSettings\x12\x15\n\rframe_time_us\x18\x01 \x01(\x03\x12\x1a\n\rcount_time_us\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1a\n\x12storage_cell_count\x18\x03 \x01(\x03\x12%\n\x1duse_internal_packet_generator\x18\x04 \x01(\x08\x12\x18\n\x10\x63ollect_raw_data\x18\x05 \x01(\x08\x12\x1f\n\x12pedestal_g0_frames\x18\x06 \x01(\x03H\x01\x88\x01\x01\x12\x1f\n\x12pedestal_g1_frames\x18\x07 \x01(\x03H\x02\x88\x01\x01\x12\x1f\n\x12pedestal_g2_frames\x18\x08 \x01(\x03H\x03\x88\x01\x01\x12\"\n\x15storage_cell_delay_ns\x18\n \x01(\x03H\x04\x88\x01\x01\x42\x10\n\x0e_count_time_usB\x15\n\x13_pedestal_g0_framesB\x15\n\x13_pedestal_g1_framesB\x15\n\x13_pedestal_g2_framesB\x18\n\x16_storage_cell_delay_ns\"b\n\x16\x44\x65tectorModuleGeometry\x12\x0e\n\x06pixel0\x18\x01 \x01(\x03\x12\x1b\n\x13\x66\x61st_direction_step\x18\x02 \x01(\x03\x12\x1b\n\x13slow_direction_step\x18\x03 \x01(\x03\"z\n\x10\x44\x65tectorGeometry\x12\x11\n\twidth_pxl\x18\x01 \x01(\x03\x12\x12\n\nheight_pxl\x18\x02 \x01(\x03\x12?\n\x0fmodule_geometry\x18\x03 \x03(\x0b\x32&.JFJochProtoBuf.DetectorModuleGeometry\"\xde\x01\n\x08\x44\x65tector\x12\x10\n\x08nmodules\x18\x01 \x01(\x03\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x15\n\rpixel_size_mm\x18\x03 \x01(\x02\x12\x17\n\x0fmodule_hostname\x18\x04 \x03(\t\x12\x32\n\x08geometry\x18\x05 \x01(\x0b\x32 .JFJochProtoBuf.DetectorGeometry\x12*\n\x04type\x18\x06 \x01(\x0e\x32\x1c.JFJochProtoBuf.DetectorType\x12\x1b\n\x13udp_interface_count\x18\x07 \x01(\x03\"\xa7\x06\n\x10InternalSettings\x12\"\n\x1a\x66rame_time_pedestalG1G2_us\x18\x01 \x01(\x03\x12\x15\n\rframe_time_us\x18\x03 \x01(\x03\x12\x15\n\rcount_time_us\x18\x04 \x01(\x03\x12*\n\x08\x64\x65tector\x18\x05 \x01(\x0b\x32\x18.JFJochProtoBuf.Detector\x12\x14\n\x0cndatastreams\x18\x06 \x01(\x03\x12&\n\x1einternal_fpga_packet_generator\x18\t \x01(\x08\x12\x15\n\rstorage_cells\x18\n \x01(\x03\x12\x1a\n\x12storage_cell_start\x18\x0b \x01(\x03\x12\x1d\n\x15storage_cell_delay_ns\x18\' \x01(\x03\x12\x1a\n\x12pedestal_g0_frames\x18\x0c \x01(\x03\x12\x1a\n\x12pedestal_g1_frames\x18\r \x01(\x03\x12\x1a\n\x12pedestal_g2_frames\x18\x0e \x01(\x03\x12\x19\n\x11preview_period_us\x18\x0f \x01(\x03\x12*\n\x04mode\x18\x13 \x01(\x0e\x32\x1c.JFJochProtoBuf.DetectorMode\x12\x19\n\x11mask_module_edges\x18\x14 \x01(\x08\x12\x17\n\x0fmask_chip_edges\x18\x15 \x01(\x08\x12\x16\n\x0eipv4_base_addr\x18\x16 \x01(\x03\x12\r\n\x05low_q\x18\x1a \x01(\x02\x12\x0e\n\x06high_q\x18\x1b \x01(\x02\x12\x11\n\tq_spacing\x18\x1c \x01(\x02\x12\x10\n\x08git_sha1\x18\x1d \x01(\t\x12\x10\n\x08git_date\x18\x1e \x01(\t\x12\x13\n\x0bsource_name\x18 \x01(\t\x12\x19\n\x11source_name_short\x18! \x01(\t\x12\x17\n\x0finstrument_name\x18\" \x01(\t\x12\x1d\n\x15instrument_name_short\x18# \x01(\t\x12\x33\n\rroi_rectangle\x18$ \x03(\x0b\x32\x1c.JFJochProtoBuf.ROIRectangle\x12\x11\n\troi_apply\x18% \x01(\x08\x12\x18\n\x10\x64\x65\x62ug_pixel_mask\x18& \x01(\x08\"|\n\x14JungfraujochSettings\x12\x30\n\x07\x64\x61taset\x18\x01 \x01(\x0b\x32\x1f.JFJochProtoBuf.DatasetSettings\x12\x32\n\x08internal\x18\x02 \x01(\x0b\x32 .JFJochProtoBuf.InternalSettings\"\x1e\n\nJFPedestal\x12\x10\n\x08pedestal\x18\x01 \x01(\x0c\"-\n\x11JFGainCalibration\x12\x18\n\x10gain_calibration\x18\x01 \x01(\x0c\"\xb2\x01\n\rJFCalibration\x12\x10\n\x08nmodules\x18\x01 \x01(\x04\x12\x16\n\x0enstorage_cells\x18\x02 \x01(\x04\x12,\n\x08pedestal\x18\x03 \x03(\x0b\x32\x1a.JFJochProtoBuf.JFPedestal\x12\x0c\n\x04mask\x18\x04 \x01(\x0c\x12;\n\x10gain_calibration\x18\x05 \x03(\x0b\x32!.JFJochProtoBuf.JFGainCalibration\"V\n\x17JFCalibrationStatistics\x12;\n\x11module_statistics\x18\x01 \x03(\x0b\x32 .JFJochProtoBuf.ModuleStatistics\"\x91\x02\n\x1b\x41\x63quisitionDeviceStatistics\x12\x14\n\x0cgood_packets\x18\x01 \x01(\x04\x12\x18\n\x10packets_expected\x18\x0c \x01(\x04\x12\x12\n\nefficiency\x18\x04 \x01(\x02\x12\x16\n\x0e\x62ytes_received\x18\x05 \x01(\x04\x12\x17\n\x0fstart_timestamp\x18\x06 \x01(\x04\x12\x15\n\rend_timestamp\x18\x07 \x01(\x04\x12/\n\x0b\x66pga_status\x18\x08 \x01(\x0b\x32\x1a.JFJochProtoBuf.FPGAStatus\x12\x10\n\x08nmodules\x18\t \x01(\x04\x12#\n\x1bpackets_received_per_module\x18\x10 \x03(\x04\"\x88\x01\n\rReceiverInput\x12\x43\n\x15jungfraujoch_settings\x18\x01 \x01(\x0b\x32$.JFJochProtoBuf.JungfraujochSettings\x12\x32\n\x0b\x63\x61libration\x18\x02 \x01(\x0b\x32\x1d.JFJochProtoBuf.JFCalibration\"\xd6\x03\n\x0eReceiverOutput\x12\x46\n\x11\x64\x65vice_statistics\x18\x01 \x03(\x0b\x32+.JFJochProtoBuf.AcquisitionDeviceStatistics\x12\x19\n\x11max_receive_delay\x18\x02 \x01(\x04\x12\x17\n\x0f\x63ompressed_size\x18\x03 \x01(\x04\x12\x18\n\x10\x63ompressed_ratio\x18\x04 \x01(\x02\x12\x13\n\x0bimages_sent\x18\x05 \x01(\x04\x12\x15\n\rstart_time_ms\x18\x06 \x01(\x04\x12\x13\n\x0b\x65nd_time_ms\x18\x07 \x01(\x04\x12\x12\n\nefficiency\x18\x08 \x01(\x02\x12\x1d\n\x15max_image_number_sent\x18\t \x01(\x04\x12\x11\n\tcancelled\x18\n \x01(\x08\x12\x18\n\x10master_file_name\x18\x0b \x01(\t\x12\x33\n\x0fpedestal_result\x18\x0c \x03(\x0b\x32\x1a.JFJochProtoBuf.JFPedestal\x12\x1a\n\rindexing_rate\x18\r \x01(\x02H\x00\x88\x01\x01\x12\x19\n\x0c\x62kg_estimate\x18\x0e \x01(\x02H\x01\x88\x01\x01\x42\x10\n\x0e_indexing_rateB\x0f\n\r_bkg_estimate\"T\n\x1bReceiverNetworkConfigDevice\x12\x10\n\x08mac_addr\x18\x01 \x01(\t\x12\x11\n\tipv4_addr\x18\x02 \x01(\t\x12\x10\n\x08udp_port\x18\x03 \x01(\x04\"T\n\x15ReceiverNetworkConfig\x12;\n\x06\x64\x65vice\x18\x01 \x03(\x0b\x32+.JFJochProtoBuf.ReceiverNetworkConfigDevice\"\xcb\x01\n\x0eReceiverStatus\x12\x15\n\x08progress\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12/\n\x0b\x66pga_status\x18\x02 \x03(\x0b\x32\x1a.JFJochProtoBuf.FPGAStatus\x12\x1a\n\rindexing_rate\x18\x03 \x01(\x02H\x01\x88\x01\x01\x12\x1f\n\x12send_buffers_avail\x18\x04 \x01(\x02H\x02\x88\x01\x01\x42\x0b\n\t_progressB\x10\n\x0e_indexing_rateB\x15\n\x13_send_buffers_avail\"F\n\x0bPlotRequest\x12&\n\x04type\x18\x01 \x01(\x0e\x32\x18.JFJochProtoBuf.PlotType\x12\x0f\n\x07\x62inning\x18\x02 \x01(\x04\"M\n\x18RadialIntegrationProfile\x12\r\n\x05title\x18\x01 \x01(\t\x12\"\n\x04plot\x18\x02 \x01(\x0b\x32\x14.JFJochProtoBuf.Plot\"W\n\x19RadialIntegrationProfiles\x12:\n\x08profiles\x18\x01 \x03(\x0b\x32(.JFJochProtoBuf.RadialIntegrationProfile\">\n\x0bWriterInput\x12\x1c\n\x14zmq_receiver_address\x18\x01 \x01(\t\x12\x11\n\tseries_id\x18\x02 \x01(\x03\"3\n\x12\x44\x61taFileStatistics\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07nimages\x18\x02 \x01(\x03\"\x8d\x01\n\x0cWriterOutput\x12\x0f\n\x07nimages\x18\x01 \x01(\x03\x12\x17\n\x0fperformance_MBs\x18\x02 \x01(\x02\x12\x16\n\x0eperformance_Hz\x18\x03 \x01(\x02\x12;\n\x0f\x66ile_statistics\x18\x04 \x03(\x0b\x32\".JFJochProtoBuf.DataFileStatistics\"\x82\x02\n\x14\x44\x65tectorModuleConfig\x12\x17\n\x0fudp_dest_port_1\x18\x01 \x01(\x04\x12\x17\n\x0fudp_dest_port_2\x18\x02 \x01(\x04\x12\x17\n\x0fipv4_src_addr_1\x18\x03 \x01(\t\x12\x17\n\x0fipv4_src_addr_2\x18\x04 \x01(\t\x12\x18\n\x10ipv4_dest_addr_1\x18\x05 \x01(\t\x12\x18\n\x10ipv4_dest_addr_2\x18\x06 \x01(\t\x12\x17\n\x0fmac_addr_dest_1\x18\x07 \x01(\t\x12\x17\n\x0fmac_addr_dest_2\x18\x08 \x01(\t\x12 \n\x18module_id_in_data_stream\x18\t \x01(\x04\"}\n\x0e\x44\x65tectorConfig\x12\x35\n\x07modules\x18\x01 \x03(\x0b\x32$.JFJochProtoBuf.DetectorModuleConfig\x12\x17\n\x0fmodule_hostname\x18\x02 \x03(\t\x12\x1b\n\x13udp_interface_count\x18\x03 \x01(\x03\"\xfc\x01\n\rDetectorInput\x12\x13\n\x0bmodules_num\x18\x01 \x01(\x03\x12*\n\x04mode\x18\x02 \x01(\x0e\x32\x1c.JFJochProtoBuf.DetectorMode\x12\x12\n\nnum_frames\x18\x03 \x01(\x03\x12\x14\n\x0cnum_triggers\x18\x04 \x01(\x03\x12\x1b\n\x13storage_cell_number\x18\x05 \x01(\x03\x12\x1a\n\x12storage_cell_start\x18\x06 \x01(\x03\x12\x1d\n\x15storage_cell_delay_ns\x18\x07 \x01(\x03\x12\x11\n\tperiod_us\x18\t \x01(\x03\x12\x15\n\rcount_time_us\x18\n \x01(\x03\"\x10\n\x0e\x44\x65tectorOutput\"b\n\x0e\x44\x65tectorStatus\x12$\n\x05state\x18\x01 \x01(\x0e\x32\x15.JFJochProtoBuf.State\x12\x12\n\nfw_version\x18\x02 \x01(\x03\x12\x16\n\x0eserver_version\x18\x03 \x01(\t\"Q\n\x0e\x46PGAFIFOStatus\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x31\n\x05value\x18\x02 \x01(\x0e\x32\".JFJochProtoBuf.FPGAFIFOStatusEnum\"\xff\x06\n\nFPGAStatus\x12\x15\n\rpackets_ether\x18\x02 \x01(\x04\x12\x13\n\x0bpackets_udp\x18\x03 \x01(\x04\x12\x16\n\x0epackets_jfjoch\x18\x04 \x01(\x04\x12\x14\n\x0cpackets_icmp\x18\x05 \x01(\x04\x12\x11\n\tfpga_idle\x18\x06 \x01(\x08\x12\x17\n\x0fhbm_temp_0_degC\x18\x07 \x01(\x04\x12\x17\n\x0fhbm_temp_1_degC\x18\x08 \x01(\x04\x12\x12\n\nstalls_hbm\x18\t \x01(\x04\x12\x13\n\x0bstalls_host\x18\n \x01(\x04\x12\x1b\n\x13\x65thernet_rx_aligned\x18\x0b \x01(\x08\x12\x1c\n\x14\x66ull_status_register\x18\r \x01(\r\x12\x33\n\x0b\x66ifo_status\x18\x0e \x03(\x0b\x32\x1e.JFJochProtoBuf.FPGAFIFOStatus\x12\x13\n\x0bmax_modules\x18\x0f \x01(\x04\x12\x10\n\x08git_sha1\x18\x10 \x01(\r\x12\x17\n\x0fmailbox_err_reg\x18\x11 \x01(\r\x12\x1a\n\x12mailbox_status_reg\x18\x12 \x01(\r\x12\x17\n\x0fhost_writer_err\x18\x15 \x03(\t\x12\x14\n\x0cslowest_head\x18\x18 \x01(\x04\x12\x16\n\x0e\x66pga_temp_degC\x18\x1a \x01(\x02\x12\x1a\n\x12\x63urrent_edge_12V_A\x18\x1b \x01(\x02\x12\x1a\n\x12voltage_edge_12V_V\x18\x1c \x01(\x02\x12\x1b\n\x13\x63urrent_edge_3p3V_A\x18\x1d \x01(\x02\x12\x1b\n\x13voltage_edge_3p3V_V\x18\x1e \x01(\x02\x12\x1c\n\x14pcie_h2c_descriptors\x18\x1f \x01(\x04\x12\x1c\n\x14pcie_c2h_descriptors\x18 \x01(\x04\x12\x16\n\x0epcie_h2c_beats\x18! \x01(\x04\x12\x16\n\x0epcie_c2h_beats\x18\" \x01(\x04\x12\x17\n\x0fpcie_h2c_status\x18# \x01(\x04\x12\x17\n\x0fpcie_c2h_status\x18$ \x01(\x04\x12\x13\n\x0bpackets_sls\x18% \x01(\x04\x12\x11\n\terror_eth\x18& \x01(\r\x12\x18\n\x10\x65rror_packet_len\x18\' \x01(\r\x12\x18\n\x10host_writer_idle\x18) \x01(\x08\x12\x12\n\ncancel_bit\x18* \x01(\x08\x12\x16\n\x0ehbm_size_bytes\x18+ \x01(\r\"\xf8\x02\n\x16\x44\x61taProcessingSettings\x12!\n\x19signal_to_noise_threshold\x18\x01 \x01(\x02\x12\x1e\n\x16photon_count_threshold\x18\x02 \x01(\x03\x12\x18\n\x10min_pix_per_spot\x18\x03 \x01(\x03\x12\x18\n\x10max_pix_per_spot\x18\x04 \x01(\x03\x12\x16\n\x0elocal_bkg_size\x18\x05 \x01(\x03\x12\"\n\x15high_resolution_limit\x18\x06 \x01(\x02H\x00\x88\x01\x01\x12!\n\x14low_resolution_limit\x18\x07 \x01(\x02H\x01\x88\x01\x01\x12\x1a\n\x12\x62kg_estimate_low_q\x18\x08 \x01(\x02\x12\x1b\n\x13\x62kg_estimate_high_q\x18\t \x01(\x02\x12\x1c\n\x14preview_indexed_only\x18\n \x01(\x08\x42\x18\n\x16_high_resolution_limitB\x17\n\x15_low_resolution_limit\"9\n\x10PreviewFrameSpot\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\x12\x0f\n\x07indexed\x18\x03 \x01(\x08\"\xbe\x02\n\x0cPreviewFrame\x12\x14\n\x0cimage_number\x18\x01 \x01(\x03\x12\x14\n\x0ctotal_images\x18\x02 \x01(\x03\x12\x14\n\x0cwavelength_A\x18\x03 \x01(\x02\x12\x12\n\nbeam_x_pxl\x18\x04 \x01(\x02\x12\x12\n\nbeam_y_pxl\x18\x05 \x01(\x02\x12\x1c\n\x14\x64\x65tector_distance_mm\x18\x06 \x01(\x02\x12\x18\n\x10saturation_value\x18\x07 \x01(\x03\x12\x13\n\x0b\x66ile_prefix\x18\x08 \x01(\t\x12\r\n\x05width\x18\t \x01(\x03\x12\x0e\n\x06height\x18\n \x01(\x03\x12\x13\n\x0bpixel_depth\x18\x0b \x01(\x03\x12\x0c\n\x04\x64\x61ta\x18\r \x01(\x0c\x12/\n\x05spots\x18\x0e \x03(\x0b\x32 .JFJochProtoBuf.PreviewFrameSpotJ\x04\x08\x0c\x10\r\"\xed\x01\n\x10ModuleStatistics\x12\x15\n\rmodule_number\x18\x01 \x01(\x03\x12\x1b\n\x13storage_cell_number\x18\x02 \x01(\x03\x12\x18\n\x10pedestal_g0_mean\x18\x03 \x01(\x02\x12\x18\n\x10pedestal_g1_mean\x18\x04 \x01(\x02\x12\x18\n\x10pedestal_g2_mean\x18\x05 \x01(\x02\x12\x14\n\x0cgain_g0_mean\x18\x06 \x01(\x02\x12\x14\n\x0cgain_g1_mean\x18\x07 \x01(\x02\x12\x14\n\x0cgain_g2_mean\x18\x08 \x01(\x02\x12\x15\n\rmasked_pixels\x18\t \x01(\x04\"I\n\x05Image\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\r\n\x05width\x18\x02 \x01(\x03\x12\x0e\n\x06height\x18\x03 \x01(\x03\x12\x13\n\x0bpixel_depth\x18\x04 \x01(\x03\".\n\nMaskToLoad\x12\x0c\n\x04mask\x18\x01 \x03(\r\x12\x12\n\nbit_to_set\x18\x02 \x01(\x05\"\xe5\x04\n\x15MeasurementStatistics\x12\x13\n\x0b\x66ile_prefix\x18\x01 \x01(\t\x12\x18\n\x10images_collected\x18\x02 \x01(\x03\x12\x1d\n\x15max_image_number_sent\x18\x03 \x01(\x03\x12\x1d\n\x15\x63ollection_efficiency\x18\x04 \x01(\x02\x12\x19\n\x11\x63ompression_ratio\x18\x05 \x01(\x02\x12\x11\n\tcancelled\x18\x06 \x01(\x08\x12\x19\n\x11max_receive_delay\x18\x07 \x01(\x03\x12#\n\x16writer_performance_MBs\x18\x08 \x01(\x02H\x00\x88\x01\x01\x12\x1b\n\x0eimages_written\x18\t \x01(\x03H\x01\x88\x01\x01\x12\x1a\n\rindexing_rate\x18\n \x01(\x02H\x02\x88\x01\x01\x12$\n\x17indexing_performance_ms\x18\x0b \x01(\x02H\x03\x88\x01\x01\x12\x16\n\x0e\x64\x65tector_width\x18\x0c \x01(\x03\x12\x17\n\x0f\x64\x65tector_height\x18\r \x01(\x03\x12\x1c\n\x14\x64\x65tector_pixel_depth\x18\x0e \x01(\x03\x12;\n\x0f\x66ile_statistics\x18\x0f \x03(\x0b\x32\".JFJochProtoBuf.DataFileStatistics\x12\x19\n\x0c\x62kg_estimate\x18\x10 \x01(\x02H\x04\x88\x01\x01\x42\x19\n\x17_writer_performance_MBsB\x11\n\x0f_images_writtenB\x10\n\x0e_indexing_rateB\x1a\n\x18_indexing_performance_msB\x0f\n\r_bkg_estimate\"\xd7\x01\n\x0c\x42rokerStatus\x12+\n\x0c\x62roker_state\x18\x01 \x01(\x0e\x32\x15.JFJochProtoBuf.State\x12\x15\n\x08progress\x18\x02 \x01(\x02H\x00\x88\x01\x01\x12\x1a\n\rindexing_rate\x18\x03 \x01(\x02H\x01\x88\x01\x01\x12(\n\x1breceiver_send_buffers_avail\x18\x04 \x01(\x02H\x02\x88\x01\x01\x42\x0b\n\t_progressB\x10\n\x0e_indexing_rateB\x1e\n\x1c_receiver_send_buffers_avail\"\xa4\x01\n\x10\x42rokerFullStatus\x12\x30\n\x08receiver\x18\x01 \x01(\x0b\x32\x1e.JFJochProtoBuf.ReceiverOutput\x12\x30\n\x08\x64\x65tector\x18\x02 \x01(\x0b\x32\x1e.JFJochProtoBuf.DetectorOutput\x12,\n\x06writer\x18\x03 \x03(\x0b\x32\x1c.JFJochProtoBuf.WriterOutput\"H\n\x13\x44\x65tectorListElement\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x10\n\x08nmodules\x18\x02 \x01(\x03\x12\n\n\x02id\x18\x03 \x01(\x03\"v\n\x0c\x44\x65tectorList\x12\x35\n\x08\x64\x65tector\x18\x01 \x03(\x0b\x32#.JFJochProtoBuf.DetectorListElement\x12\x12\n\ncurrent_id\x18\x02 \x01(\x03\x12\x1b\n\x13\x63urrent_description\x18\x03 \x01(\t\"\x1f\n\x11\x44\x65tectorSelection\x12\n\n\x02id\x18\x01 \x01(\x03*T\n\x0b\x43ompression\x12\r\n\tBSHUF_LZ4\x10\x00\x12\x0e\n\nBSHUF_ZSTD\x10\x01\x12\x12\n\x0e\x42SHUF_ZSTD_RLE\x10\x02\x12\x12\n\x0eNO_COMPRESSION\x10\x03*\'\n\x0c\x44\x65tectorType\x12\x0c\n\x08JUNGFRAU\x10\x00\x12\t\n\x05\x45IGER\x10\x01*Z\n\x0c\x44\x65tectorMode\x12\x0e\n\nCONVERSION\x10\x00\x12\x07\n\x03RAW\x10\x01\x12\x0f\n\x0bPEDESTAL_G0\x10\x02\x12\x0f\n\x0bPEDESTAL_G1\x10\x03\x12\x0f\n\x0bPEDESTAL_G2\x10\x04*6\n\x12\x46PGAFIFOStatusEnum\x12\t\n\x05\x45MPTY\x10\x00\x12\x08\n\x04\x46ULL\x10\x01\x12\x0b\n\x07PARTIAL\x10\x02*^\n\x05State\x12\x13\n\x0fNOT_INITIALIZED\x10\x00\x12\x08\n\x04IDLE\x10\x01\x12\x08\n\x04\x42USY\x10\x02\x12\x0c\n\x08PEDESTAL\x10\x03\x12\x13\n\x0f\x44\x41TA_COLLECTION\x10\x04\x12\t\n\x05\x45RROR\x10\x05*I\n\x0f\x46PGAPixelOutput\x12\x08\n\x04\x41UTO\x10\x00\x12\t\n\x05INT16\x10\x01\x12\n\n\x06UINT16\x10\x02\x12\t\n\x05INT32\x10\x03\x12\n\n\x06UINT32\x10\x04*{\n\x08PlotType\x12\x10\n\x0c\x42KG_ESTIMATE\x10\x00\x12\x0b\n\x07RAD_INT\x10\x01\x12\x0e\n\nSPOT_COUNT\x10\x02\x12\x11\n\rINDEXING_RATE\x10\x03\x12\x1a\n\x16INDEXING_RATE_PER_FILE\x10\x04\x12\x11\n\rADU_HISTOGRAM\x10\x05\x32\xff\x05\n\x13gRPC_JFJochReceiver\x12?\n\x05Start\x12\x1d.JFJochProtoBuf.ReceiverInput\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12\x37\n\x05\x41\x62ort\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12\x38\n\x06\x43\x61ncel\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12?\n\x04Stop\x12\x15.JFJochProtoBuf.Empty\x1a\x1e.JFJochProtoBuf.ReceiverOutput\"\x00\x12\x44\n\tGetStatus\x12\x15.JFJochProtoBuf.Empty\x1a\x1e.JFJochProtoBuf.ReceiverStatus\"\x00\x12\\\n\x19SetDataProcessingSettings\x12&.JFJochProtoBuf.DataProcessingSettings\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12M\n\x16GetDataProcessingPlots\x12\x1b.JFJochProtoBuf.PlotRequest\x1a\x14.JFJochProtoBuf.Plot\"\x00\x12\x62\n\x1cGetRadialIntegrationProfiles\x12\x15.JFJochProtoBuf.Empty\x1a).JFJochProtoBuf.RadialIntegrationProfiles\"\x00\x12H\n\x0fGetPreviewFrame\x12\x15.JFJochProtoBuf.Empty\x1a\x1c.JFJochProtoBuf.PreviewFrame\"\x00\x12R\n\x10GetNetworkConfig\x12\x15.JFJochProtoBuf.Empty\x1a%.JFJochProtoBuf.ReceiverNetworkConfig\"\x00\x32\xca\x01\n\x11gRPC_JFJochWriter\x12=\n\x05Start\x12\x1b.JFJochProtoBuf.WriterInput\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12\x37\n\x05\x41\x62ort\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12=\n\x04Stop\x12\x15.JFJochProtoBuf.Empty\x1a\x1c.JFJochProtoBuf.WriterOutput\"\x00\x32\x82\x03\n\x13gRPC_JFJochDetector\x12?\n\x05Start\x12\x1d.JFJochProtoBuf.DetectorInput\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12\x36\n\x04Stop\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12\x41\n\x06Status\x12\x15.JFJochProtoBuf.Empty\x1a\x1e.JFJochProtoBuf.DetectorStatus\"\x00\x12=\n\x02On\x12\x1e.JFJochProtoBuf.DetectorConfig\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12\x35\n\x03Off\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12\x39\n\x07Trigger\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Empty\"\x00\x32\x99\r\n\x11gRPC_JFJochBroker\x12\x41\n\x05Start\x12\x1f.JFJochProtoBuf.DatasetSettings\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12\x36\n\x04Stop\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12:\n\x08Pedestal\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12<\n\nInitialize\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12\x38\n\x06\x43\x61ncel\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12<\n\nDeactivate\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12\x39\n\x07Trigger\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12\x42\n\tGetStatus\x12\x15.JFJochProtoBuf.Empty\x1a\x1c.JFJochProtoBuf.BrokerStatus\"\x00\x12\\\n\x18GetCalibrationStatistics\x12\x15.JFJochProtoBuf.Empty\x1a\'.JFJochProtoBuf.JFCalibrationStatistics\"\x00\x12P\n\x13GetDetectorSettings\x12\x15.JFJochProtoBuf.Empty\x1a .JFJochProtoBuf.DetectorSettings\"\x00\x12P\n\x13PutDetectorSettings\x12 .JFJochProtoBuf.DetectorSettings\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12Z\n\x18GetMeasurementStatistics\x12\x15.JFJochProtoBuf.Empty\x1a%.JFJochProtoBuf.MeasurementStatistics\"\x00\x12\\\n\x19GetDataProcessingSettings\x12\x15.JFJochProtoBuf.Empty\x1a&.JFJochProtoBuf.DataProcessingSettings\"\x00\x12\\\n\x19PutDataProcessingSettings\x12&.JFJochProtoBuf.DataProcessingSettings\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12?\n\x08GetPlots\x12\x1b.JFJochProtoBuf.PlotRequest\x1a\x14.JFJochProtoBuf.Plot\"\x00\x12\x62\n\x1cGetRadialIntegrationProfiles\x12\x15.JFJochProtoBuf.Empty\x1a).JFJochProtoBuf.RadialIntegrationProfiles\"\x00\x12\x43\n\nGetPreview\x12\x15.JFJochProtoBuf.Empty\x1a\x1c.JFJochProtoBuf.PreviewFrame\"\x00\x12?\n\rGetPedestalG0\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Image\"\x00\x12?\n\rGetPedestalG1\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Image\"\x00\x12?\n\rGetPedestalG2\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Image\"\x00\x12\x39\n\x07GetMask\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Image\"\x00\x12H\n\x0fGetDetectorList\x12\x15.JFJochProtoBuf.Empty\x1a\x1c.JFJochProtoBuf.DetectorList\"\x00\x12L\n\x0eSelectDetector\x12!.JFJochProtoBuf.DetectorSelection\x1a\x15.JFJochProtoBuf.Empty\"\x00\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cjfjoch.proto\x12\x0eJFJochProtoBuf\"\x07\n\x05\x45mpty\"W\n\x08UnitCell\x12\t\n\x01\x61\x18\x01 \x01(\x02\x12\t\n\x01\x62\x18\x02 \x01(\x02\x12\t\n\x01\x63\x18\x03 \x01(\x02\x12\r\n\x05\x61lpha\x18\x04 \x01(\x02\x12\x0c\n\x04\x62\x65ta\x18\x05 \x01(\x02\x12\r\n\x05gamma\x18\x06 \x01(\x02\")\n\x06Vector\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\x12\t\n\x01z\x18\x03 \x01(\x02\"|\n\x10RotationSettings\x12\x17\n\x0fstart_angle_deg\x18\x01 \x01(\x02\x12 \n\x18\x61ngle_incr_per_image_deg\x18\x02 \x01(\x02\x12-\n\rrotation_axis\x18\x03 \x01(\x0b\x32\x16.JFJochProtoBuf.Vector\"\x1c\n\x04Plot\x12\t\n\x01x\x18\x01 \x03(\x02\x12\t\n\x01y\x18\x02 \x03(\x02\"E\n\x0cROIRectangle\x12\n\n\x02x0\x18\x01 \x01(\x05\x12\n\n\x02y0\x18\x02 \x01(\x05\x12\r\n\x05width\x18\x03 \x01(\x05\x12\x0e\n\x06height\x18\x04 \x01(\x05\"\xfa\x04\n\x0f\x44\x61tasetSettings\x12\x1a\n\x12images_per_trigger\x18\x01 \x01(\x03\x12\x10\n\x08ntrigger\x18\x02 \x01(\x03\x12:\n\x11\x66pga_pixel_output\x18\x03 \x01(\x0e\x32\x1f.JFJochProtoBuf.FPGAPixelOutput\x12\x16\n\x0e\x66pga_summation\x18\x04 \x01(\x03\x12\x12\n\nbeam_x_pxl\x18\x05 \x01(\x02\x12\x12\n\nbeam_y_pxl\x18\x06 \x01(\x02\x12\x1c\n\x14\x64\x65tector_distance_mm\x18\x07 \x01(\x02\x12\x19\n\x11photon_energy_keV\x18\x08 \x01(\x02\x12\x13\n\x0b\x66ile_prefix\x18\t \x01(\t\x12\x17\n\x0f\x64\x61ta_file_count\x18\n \x01(\x03\x12\x30\n\x0b\x63ompression\x18\x0b \x01(\x0e\x32\x1b.JFJochProtoBuf.Compression\x12\x13\n\x0bsample_name\x18\x0c \x01(\t\x12\x30\n\tunit_cell\x18\r \x01(\x0b\x32\x18.JFJochProtoBuf.UnitCellH\x00\x88\x01\x01\x12\x1a\n\x12space_group_number\x18\x0e \x01(\x03\x12 \n\x18rad_int_solid_angle_corr\x18\x12 \x01(\x08\x12!\n\x19rad_int_polarization_corr\x18\x13 \x01(\x08\x12#\n\x1brad_int_polarization_factor\x18\x14 \x01(\x02\x12\x18\n\x10save_calibration\x18\x15 \x01(\x08\x12/\n\tuser_mask\x18\x16 \x03(\x0b\x32\x1c.JFJochProtoBuf.ROIRectangleB\x0c\n\n_unit_cell\"\x9a\x03\n\x10\x44\x65tectorSettings\x12\x15\n\rframe_time_us\x18\x01 \x01(\x03\x12\x1a\n\rcount_time_us\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1a\n\x12storage_cell_count\x18\x03 \x01(\x03\x12%\n\x1duse_internal_packet_generator\x18\x04 \x01(\x08\x12\x18\n\x10\x63ollect_raw_data\x18\x05 \x01(\x08\x12\x1f\n\x12pedestal_g0_frames\x18\x06 \x01(\x03H\x01\x88\x01\x01\x12\x1f\n\x12pedestal_g1_frames\x18\x07 \x01(\x03H\x02\x88\x01\x01\x12\x1f\n\x12pedestal_g2_frames\x18\x08 \x01(\x03H\x03\x88\x01\x01\x12\"\n\x15storage_cell_delay_ns\x18\n \x01(\x03H\x04\x88\x01\x01\x42\x10\n\x0e_count_time_usB\x15\n\x13_pedestal_g0_framesB\x15\n\x13_pedestal_g1_framesB\x15\n\x13_pedestal_g2_framesB\x18\n\x16_storage_cell_delay_ns\"b\n\x16\x44\x65tectorModuleGeometry\x12\x0e\n\x06pixel0\x18\x01 \x01(\x03\x12\x1b\n\x13\x66\x61st_direction_step\x18\x02 \x01(\x03\x12\x1b\n\x13slow_direction_step\x18\x03 \x01(\x03\"z\n\x10\x44\x65tectorGeometry\x12\x11\n\twidth_pxl\x18\x01 \x01(\x03\x12\x12\n\nheight_pxl\x18\x02 \x01(\x03\x12?\n\x0fmodule_geometry\x18\x03 \x03(\x0b\x32&.JFJochProtoBuf.DetectorModuleGeometry\"\xde\x01\n\x08\x44\x65tector\x12\x10\n\x08nmodules\x18\x01 \x01(\x03\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x15\n\rpixel_size_mm\x18\x03 \x01(\x02\x12\x17\n\x0fmodule_hostname\x18\x04 \x03(\t\x12\x32\n\x08geometry\x18\x05 \x01(\x0b\x32 .JFJochProtoBuf.DetectorGeometry\x12*\n\x04type\x18\x06 \x01(\x0e\x32\x1c.JFJochProtoBuf.DetectorType\x12\x1b\n\x13udp_interface_count\x18\x07 \x01(\x03\"\xa7\x06\n\x10InternalSettings\x12\"\n\x1a\x66rame_time_pedestalG1G2_us\x18\x01 \x01(\x03\x12\x15\n\rframe_time_us\x18\x03 \x01(\x03\x12\x15\n\rcount_time_us\x18\x04 \x01(\x03\x12*\n\x08\x64\x65tector\x18\x05 \x01(\x0b\x32\x18.JFJochProtoBuf.Detector\x12\x14\n\x0cndatastreams\x18\x06 \x01(\x03\x12&\n\x1einternal_fpga_packet_generator\x18\t \x01(\x08\x12\x15\n\rstorage_cells\x18\n \x01(\x03\x12\x1a\n\x12storage_cell_start\x18\x0b \x01(\x03\x12\x1d\n\x15storage_cell_delay_ns\x18\' \x01(\x03\x12\x1a\n\x12pedestal_g0_frames\x18\x0c \x01(\x03\x12\x1a\n\x12pedestal_g1_frames\x18\r \x01(\x03\x12\x1a\n\x12pedestal_g2_frames\x18\x0e \x01(\x03\x12\x19\n\x11preview_period_us\x18\x0f \x01(\x03\x12*\n\x04mode\x18\x13 \x01(\x0e\x32\x1c.JFJochProtoBuf.DetectorMode\x12\x19\n\x11mask_module_edges\x18\x14 \x01(\x08\x12\x17\n\x0fmask_chip_edges\x18\x15 \x01(\x08\x12\x16\n\x0eipv4_base_addr\x18\x16 \x01(\x03\x12\r\n\x05low_q\x18\x1a \x01(\x02\x12\x0e\n\x06high_q\x18\x1b \x01(\x02\x12\x11\n\tq_spacing\x18\x1c \x01(\x02\x12\x10\n\x08git_sha1\x18\x1d \x01(\t\x12\x10\n\x08git_date\x18\x1e \x01(\t\x12\x13\n\x0bsource_name\x18 \x01(\t\x12\x19\n\x11source_name_short\x18! \x01(\t\x12\x17\n\x0finstrument_name\x18\" \x01(\t\x12\x1d\n\x15instrument_name_short\x18# \x01(\t\x12\x33\n\rroi_rectangle\x18$ \x03(\x0b\x32\x1c.JFJochProtoBuf.ROIRectangle\x12\x11\n\troi_apply\x18% \x01(\x08\x12\x18\n\x10\x64\x65\x62ug_pixel_mask\x18& \x01(\x08\"|\n\x14JungfraujochSettings\x12\x30\n\x07\x64\x61taset\x18\x01 \x01(\x0b\x32\x1f.JFJochProtoBuf.DatasetSettings\x12\x32\n\x08internal\x18\x02 \x01(\x0b\x32 .JFJochProtoBuf.InternalSettings\"\x1e\n\nJFPedestal\x12\x10\n\x08pedestal\x18\x01 \x01(\x0c\"-\n\x11JFGainCalibration\x12\x18\n\x10gain_calibration\x18\x01 \x01(\x0c\"\xb2\x01\n\rJFCalibration\x12\x10\n\x08nmodules\x18\x01 \x01(\x04\x12\x16\n\x0enstorage_cells\x18\x02 \x01(\x04\x12,\n\x08pedestal\x18\x03 \x03(\x0b\x32\x1a.JFJochProtoBuf.JFPedestal\x12\x0c\n\x04mask\x18\x04 \x01(\x0c\x12;\n\x10gain_calibration\x18\x05 \x03(\x0b\x32!.JFJochProtoBuf.JFGainCalibration\"V\n\x17JFCalibrationStatistics\x12;\n\x11module_statistics\x18\x01 \x03(\x0b\x32 .JFJochProtoBuf.ModuleStatistics\"\x91\x02\n\x1b\x41\x63quisitionDeviceStatistics\x12\x14\n\x0cgood_packets\x18\x01 \x01(\x04\x12\x18\n\x10packets_expected\x18\x0c \x01(\x04\x12\x12\n\nefficiency\x18\x04 \x01(\x02\x12\x16\n\x0e\x62ytes_received\x18\x05 \x01(\x04\x12\x17\n\x0fstart_timestamp\x18\x06 \x01(\x04\x12\x15\n\rend_timestamp\x18\x07 \x01(\x04\x12/\n\x0b\x66pga_status\x18\x08 \x01(\x0b\x32\x1a.JFJochProtoBuf.FPGAStatus\x12\x10\n\x08nmodules\x18\t \x01(\x04\x12#\n\x1bpackets_received_per_module\x18\x10 \x03(\x04\"\x88\x01\n\rReceiverInput\x12\x43\n\x15jungfraujoch_settings\x18\x01 \x01(\x0b\x32$.JFJochProtoBuf.JungfraujochSettings\x12\x32\n\x0b\x63\x61libration\x18\x02 \x01(\x0b\x32\x1d.JFJochProtoBuf.JFCalibration\"\xd6\x03\n\x0eReceiverOutput\x12\x46\n\x11\x64\x65vice_statistics\x18\x01 \x03(\x0b\x32+.JFJochProtoBuf.AcquisitionDeviceStatistics\x12\x19\n\x11max_receive_delay\x18\x02 \x01(\x04\x12\x17\n\x0f\x63ompressed_size\x18\x03 \x01(\x04\x12\x18\n\x10\x63ompressed_ratio\x18\x04 \x01(\x02\x12\x13\n\x0bimages_sent\x18\x05 \x01(\x04\x12\x15\n\rstart_time_ms\x18\x06 \x01(\x04\x12\x13\n\x0b\x65nd_time_ms\x18\x07 \x01(\x04\x12\x12\n\nefficiency\x18\x08 \x01(\x02\x12\x1d\n\x15max_image_number_sent\x18\t \x01(\x04\x12\x11\n\tcancelled\x18\n \x01(\x08\x12\x18\n\x10master_file_name\x18\x0b \x01(\t\x12\x33\n\x0fpedestal_result\x18\x0c \x03(\x0b\x32\x1a.JFJochProtoBuf.JFPedestal\x12\x1a\n\rindexing_rate\x18\r \x01(\x02H\x00\x88\x01\x01\x12\x19\n\x0c\x62kg_estimate\x18\x0e \x01(\x02H\x01\x88\x01\x01\x42\x10\n\x0e_indexing_rateB\x0f\n\r_bkg_estimate\"T\n\x1bReceiverNetworkConfigDevice\x12\x10\n\x08mac_addr\x18\x01 \x01(\t\x12\x11\n\tipv4_addr\x18\x02 \x01(\t\x12\x10\n\x08udp_port\x18\x03 \x01(\x04\"T\n\x15ReceiverNetworkConfig\x12;\n\x06\x64\x65vice\x18\x01 \x03(\x0b\x32+.JFJochProtoBuf.ReceiverNetworkConfigDevice\"\xcb\x01\n\x0eReceiverStatus\x12\x15\n\x08progress\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12/\n\x0b\x66pga_status\x18\x02 \x03(\x0b\x32\x1a.JFJochProtoBuf.FPGAStatus\x12\x1a\n\rindexing_rate\x18\x03 \x01(\x02H\x01\x88\x01\x01\x12\x1f\n\x12send_buffers_avail\x18\x04 \x01(\x02H\x02\x88\x01\x01\x42\x0b\n\t_progressB\x10\n\x0e_indexing_rateB\x15\n\x13_send_buffers_avail\"F\n\x0bPlotRequest\x12&\n\x04type\x18\x01 \x01(\x0e\x32\x18.JFJochProtoBuf.PlotType\x12\x0f\n\x07\x62inning\x18\x02 \x01(\x04\"M\n\x18RadialIntegrationProfile\x12\r\n\x05title\x18\x01 \x01(\t\x12\"\n\x04plot\x18\x02 \x01(\x0b\x32\x14.JFJochProtoBuf.Plot\"W\n\x19RadialIntegrationProfiles\x12:\n\x08profiles\x18\x01 \x03(\x0b\x32(.JFJochProtoBuf.RadialIntegrationProfile\">\n\x0bWriterInput\x12\x1c\n\x14zmq_receiver_address\x18\x01 \x01(\t\x12\x11\n\tseries_id\x18\x02 \x01(\x03\"3\n\x12\x44\x61taFileStatistics\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07nimages\x18\x02 \x01(\x03\"\x8d\x01\n\x0cWriterOutput\x12\x0f\n\x07nimages\x18\x01 \x01(\x03\x12\x17\n\x0fperformance_MBs\x18\x02 \x01(\x02\x12\x16\n\x0eperformance_Hz\x18\x03 \x01(\x02\x12;\n\x0f\x66ile_statistics\x18\x04 \x03(\x0b\x32\".JFJochProtoBuf.DataFileStatistics\"\x82\x02\n\x14\x44\x65tectorModuleConfig\x12\x17\n\x0fudp_dest_port_1\x18\x01 \x01(\x04\x12\x17\n\x0fudp_dest_port_2\x18\x02 \x01(\x04\x12\x17\n\x0fipv4_src_addr_1\x18\x03 \x01(\t\x12\x17\n\x0fipv4_src_addr_2\x18\x04 \x01(\t\x12\x18\n\x10ipv4_dest_addr_1\x18\x05 \x01(\t\x12\x18\n\x10ipv4_dest_addr_2\x18\x06 \x01(\t\x12\x17\n\x0fmac_addr_dest_1\x18\x07 \x01(\t\x12\x17\n\x0fmac_addr_dest_2\x18\x08 \x01(\t\x12 \n\x18module_id_in_data_stream\x18\t \x01(\x04\"}\n\x0e\x44\x65tectorConfig\x12\x35\n\x07modules\x18\x01 \x03(\x0b\x32$.JFJochProtoBuf.DetectorModuleConfig\x12\x17\n\x0fmodule_hostname\x18\x02 \x03(\t\x12\x1b\n\x13udp_interface_count\x18\x03 \x01(\x03\"\xfc\x01\n\rDetectorInput\x12\x13\n\x0bmodules_num\x18\x01 \x01(\x03\x12*\n\x04mode\x18\x02 \x01(\x0e\x32\x1c.JFJochProtoBuf.DetectorMode\x12\x12\n\nnum_frames\x18\x03 \x01(\x03\x12\x14\n\x0cnum_triggers\x18\x04 \x01(\x03\x12\x1b\n\x13storage_cell_number\x18\x05 \x01(\x03\x12\x1a\n\x12storage_cell_start\x18\x06 \x01(\x03\x12\x1d\n\x15storage_cell_delay_ns\x18\x07 \x01(\x03\x12\x11\n\tperiod_us\x18\t \x01(\x03\x12\x15\n\rcount_time_us\x18\n \x01(\x03\"\x10\n\x0e\x44\x65tectorOutput\"b\n\x0e\x44\x65tectorStatus\x12$\n\x05state\x18\x01 \x01(\x0e\x32\x15.JFJochProtoBuf.State\x12\x12\n\nfw_version\x18\x02 \x01(\x03\x12\x16\n\x0eserver_version\x18\x03 \x01(\t\"Q\n\x0e\x46PGAFIFOStatus\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x31\n\x05value\x18\x02 \x01(\x0e\x32\".JFJochProtoBuf.FPGAFIFOStatusEnum\"\xff\x06\n\nFPGAStatus\x12\x15\n\rpackets_ether\x18\x02 \x01(\x04\x12\x13\n\x0bpackets_udp\x18\x03 \x01(\x04\x12\x16\n\x0epackets_jfjoch\x18\x04 \x01(\x04\x12\x14\n\x0cpackets_icmp\x18\x05 \x01(\x04\x12\x11\n\tfpga_idle\x18\x06 \x01(\x08\x12\x17\n\x0fhbm_temp_0_degC\x18\x07 \x01(\x04\x12\x17\n\x0fhbm_temp_1_degC\x18\x08 \x01(\x04\x12\x12\n\nstalls_hbm\x18\t \x01(\x04\x12\x13\n\x0bstalls_host\x18\n \x01(\x04\x12\x1b\n\x13\x65thernet_rx_aligned\x18\x0b \x01(\x08\x12\x1c\n\x14\x66ull_status_register\x18\r \x01(\r\x12\x33\n\x0b\x66ifo_status\x18\x0e \x03(\x0b\x32\x1e.JFJochProtoBuf.FPGAFIFOStatus\x12\x13\n\x0bmax_modules\x18\x0f \x01(\x04\x12\x10\n\x08git_sha1\x18\x10 \x01(\r\x12\x17\n\x0fmailbox_err_reg\x18\x11 \x01(\r\x12\x1a\n\x12mailbox_status_reg\x18\x12 \x01(\r\x12\x17\n\x0fhost_writer_err\x18\x15 \x03(\t\x12\x14\n\x0cslowest_head\x18\x18 \x01(\x04\x12\x16\n\x0e\x66pga_temp_degC\x18\x1a \x01(\x02\x12\x1a\n\x12\x63urrent_edge_12V_A\x18\x1b \x01(\x02\x12\x1a\n\x12voltage_edge_12V_V\x18\x1c \x01(\x02\x12\x1b\n\x13\x63urrent_edge_3p3V_A\x18\x1d \x01(\x02\x12\x1b\n\x13voltage_edge_3p3V_V\x18\x1e \x01(\x02\x12\x1c\n\x14pcie_h2c_descriptors\x18\x1f \x01(\x04\x12\x1c\n\x14pcie_c2h_descriptors\x18 \x01(\x04\x12\x16\n\x0epcie_h2c_beats\x18! \x01(\x04\x12\x16\n\x0epcie_c2h_beats\x18\" \x01(\x04\x12\x17\n\x0fpcie_h2c_status\x18# \x01(\x04\x12\x17\n\x0fpcie_c2h_status\x18$ \x01(\x04\x12\x13\n\x0bpackets_sls\x18% \x01(\x04\x12\x11\n\terror_eth\x18& \x01(\r\x12\x18\n\x10\x65rror_packet_len\x18\' \x01(\r\x12\x18\n\x10host_writer_idle\x18) \x01(\x08\x12\x12\n\ncancel_bit\x18* \x01(\x08\x12\x16\n\x0ehbm_size_bytes\x18+ \x01(\r\"\xf8\x02\n\x16\x44\x61taProcessingSettings\x12!\n\x19signal_to_noise_threshold\x18\x01 \x01(\x02\x12\x1e\n\x16photon_count_threshold\x18\x02 \x01(\x03\x12\x18\n\x10min_pix_per_spot\x18\x03 \x01(\x03\x12\x18\n\x10max_pix_per_spot\x18\x04 \x01(\x03\x12\x16\n\x0elocal_bkg_size\x18\x05 \x01(\x03\x12\"\n\x15high_resolution_limit\x18\x06 \x01(\x02H\x00\x88\x01\x01\x12!\n\x14low_resolution_limit\x18\x07 \x01(\x02H\x01\x88\x01\x01\x12\x1a\n\x12\x62kg_estimate_low_q\x18\x08 \x01(\x02\x12\x1b\n\x13\x62kg_estimate_high_q\x18\t \x01(\x02\x12\x1c\n\x14preview_indexed_only\x18\n \x01(\x08\x42\x18\n\x16_high_resolution_limitB\x17\n\x15_low_resolution_limit\"9\n\x10PreviewFrameSpot\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\x12\x0f\n\x07indexed\x18\x03 \x01(\x08\"\xbe\x02\n\x0cPreviewFrame\x12\x14\n\x0cimage_number\x18\x01 \x01(\x03\x12\x14\n\x0ctotal_images\x18\x02 \x01(\x03\x12\x14\n\x0cwavelength_A\x18\x03 \x01(\x02\x12\x12\n\nbeam_x_pxl\x18\x04 \x01(\x02\x12\x12\n\nbeam_y_pxl\x18\x05 \x01(\x02\x12\x1c\n\x14\x64\x65tector_distance_mm\x18\x06 \x01(\x02\x12\x18\n\x10saturation_value\x18\x07 \x01(\x03\x12\x13\n\x0b\x66ile_prefix\x18\x08 \x01(\t\x12\r\n\x05width\x18\t \x01(\x03\x12\x0e\n\x06height\x18\n \x01(\x03\x12\x13\n\x0bpixel_depth\x18\x0b \x01(\x03\x12\x0c\n\x04\x64\x61ta\x18\r \x01(\x0c\x12/\n\x05spots\x18\x0e \x03(\x0b\x32 .JFJochProtoBuf.PreviewFrameSpotJ\x04\x08\x0c\x10\r\"\xed\x01\n\x10ModuleStatistics\x12\x15\n\rmodule_number\x18\x01 \x01(\x03\x12\x1b\n\x13storage_cell_number\x18\x02 \x01(\x03\x12\x18\n\x10pedestal_g0_mean\x18\x03 \x01(\x02\x12\x18\n\x10pedestal_g1_mean\x18\x04 \x01(\x02\x12\x18\n\x10pedestal_g2_mean\x18\x05 \x01(\x02\x12\x14\n\x0cgain_g0_mean\x18\x06 \x01(\x02\x12\x14\n\x0cgain_g1_mean\x18\x07 \x01(\x02\x12\x14\n\x0cgain_g2_mean\x18\x08 \x01(\x02\x12\x15\n\rmasked_pixels\x18\t \x01(\x04\"I\n\x05Image\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\r\n\x05width\x18\x02 \x01(\x03\x12\x0e\n\x06height\x18\x03 \x01(\x03\x12\x13\n\x0bpixel_depth\x18\x04 \x01(\x03\".\n\nMaskToLoad\x12\x0c\n\x04mask\x18\x01 \x03(\r\x12\x12\n\nbit_to_set\x18\x02 \x01(\x05\"\xe5\x04\n\x15MeasurementStatistics\x12\x13\n\x0b\x66ile_prefix\x18\x01 \x01(\t\x12\x18\n\x10images_collected\x18\x02 \x01(\x03\x12\x1d\n\x15max_image_number_sent\x18\x03 \x01(\x03\x12\x1d\n\x15\x63ollection_efficiency\x18\x04 \x01(\x02\x12\x19\n\x11\x63ompression_ratio\x18\x05 \x01(\x02\x12\x11\n\tcancelled\x18\x06 \x01(\x08\x12\x19\n\x11max_receive_delay\x18\x07 \x01(\x03\x12#\n\x16writer_performance_MBs\x18\x08 \x01(\x02H\x00\x88\x01\x01\x12\x1b\n\x0eimages_written\x18\t \x01(\x03H\x01\x88\x01\x01\x12\x1a\n\rindexing_rate\x18\n \x01(\x02H\x02\x88\x01\x01\x12$\n\x17indexing_performance_ms\x18\x0b \x01(\x02H\x03\x88\x01\x01\x12\x16\n\x0e\x64\x65tector_width\x18\x0c \x01(\x03\x12\x17\n\x0f\x64\x65tector_height\x18\r \x01(\x03\x12\x1c\n\x14\x64\x65tector_pixel_depth\x18\x0e \x01(\x03\x12;\n\x0f\x66ile_statistics\x18\x0f \x03(\x0b\x32\".JFJochProtoBuf.DataFileStatistics\x12\x19\n\x0c\x62kg_estimate\x18\x10 \x01(\x02H\x04\x88\x01\x01\x42\x19\n\x17_writer_performance_MBsB\x11\n\x0f_images_writtenB\x10\n\x0e_indexing_rateB\x1a\n\x18_indexing_performance_msB\x0f\n\r_bkg_estimate\"\xd7\x01\n\x0c\x42rokerStatus\x12+\n\x0c\x62roker_state\x18\x01 \x01(\x0e\x32\x15.JFJochProtoBuf.State\x12\x15\n\x08progress\x18\x02 \x01(\x02H\x00\x88\x01\x01\x12\x1a\n\rindexing_rate\x18\x03 \x01(\x02H\x01\x88\x01\x01\x12(\n\x1breceiver_send_buffers_avail\x18\x04 \x01(\x02H\x02\x88\x01\x01\x42\x0b\n\t_progressB\x10\n\x0e_indexing_rateB\x1e\n\x1c_receiver_send_buffers_avail\"\xa4\x01\n\x10\x42rokerFullStatus\x12\x30\n\x08receiver\x18\x01 \x01(\x0b\x32\x1e.JFJochProtoBuf.ReceiverOutput\x12\x30\n\x08\x64\x65tector\x18\x02 \x01(\x0b\x32\x1e.JFJochProtoBuf.DetectorOutput\x12,\n\x06writer\x18\x03 \x03(\x0b\x32\x1c.JFJochProtoBuf.WriterOutput\"H\n\x13\x44\x65tectorListElement\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12\x10\n\x08nmodules\x18\x02 \x01(\x03\x12\n\n\x02id\x18\x03 \x01(\x03\"v\n\x0c\x44\x65tectorList\x12\x35\n\x08\x64\x65tector\x18\x01 \x03(\x0b\x32#.JFJochProtoBuf.DetectorListElement\x12\x12\n\ncurrent_id\x18\x02 \x01(\x03\x12\x1b\n\x13\x63urrent_description\x18\x03 \x01(\t\"\x1f\n\x11\x44\x65tectorSelection\x12\n\n\x02id\x18\x01 \x01(\x03*T\n\x0b\x43ompression\x12\r\n\tBSHUF_LZ4\x10\x00\x12\x0e\n\nBSHUF_ZSTD\x10\x01\x12\x12\n\x0e\x42SHUF_ZSTD_RLE\x10\x02\x12\x12\n\x0eNO_COMPRESSION\x10\x03*\'\n\x0c\x44\x65tectorType\x12\x0c\n\x08JUNGFRAU\x10\x00\x12\t\n\x05\x45IGER\x10\x01*Z\n\x0c\x44\x65tectorMode\x12\x0e\n\nCONVERSION\x10\x00\x12\x07\n\x03RAW\x10\x01\x12\x0f\n\x0bPEDESTAL_G0\x10\x02\x12\x0f\n\x0bPEDESTAL_G1\x10\x03\x12\x0f\n\x0bPEDESTAL_G2\x10\x04*6\n\x12\x46PGAFIFOStatusEnum\x12\t\n\x05\x45MPTY\x10\x00\x12\x08\n\x04\x46ULL\x10\x01\x12\x0b\n\x07PARTIAL\x10\x02*^\n\x05State\x12\x13\n\x0fNOT_INITIALIZED\x10\x00\x12\x08\n\x04IDLE\x10\x01\x12\x08\n\x04\x42USY\x10\x02\x12\x0c\n\x08PEDESTAL\x10\x03\x12\x13\n\x0f\x44\x41TA_COLLECTION\x10\x04\x12\t\n\x05\x45RROR\x10\x05*I\n\x0f\x46PGAPixelOutput\x12\x08\n\x04\x41UTO\x10\x00\x12\t\n\x05INT16\x10\x01\x12\n\n\x06UINT16\x10\x02\x12\t\n\x05INT32\x10\x03\x12\n\n\x06UINT32\x10\x04*{\n\x08PlotType\x12\x10\n\x0c\x42KG_ESTIMATE\x10\x00\x12\x0b\n\x07RAD_INT\x10\x01\x12\x0e\n\nSPOT_COUNT\x10\x02\x12\x11\n\rINDEXING_RATE\x10\x03\x12\x1a\n\x16INDEXING_RATE_PER_FILE\x10\x04\x12\x11\n\rADU_HISTOGRAM\x10\x05\x32\xff\x05\n\x13gRPC_JFJochReceiver\x12?\n\x05Start\x12\x1d.JFJochProtoBuf.ReceiverInput\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12\x37\n\x05\x41\x62ort\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12\x38\n\x06\x43\x61ncel\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12?\n\x04Stop\x12\x15.JFJochProtoBuf.Empty\x1a\x1e.JFJochProtoBuf.ReceiverOutput\"\x00\x12\x44\n\tGetStatus\x12\x15.JFJochProtoBuf.Empty\x1a\x1e.JFJochProtoBuf.ReceiverStatus\"\x00\x12\\\n\x19SetDataProcessingSettings\x12&.JFJochProtoBuf.DataProcessingSettings\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12M\n\x16GetDataProcessingPlots\x12\x1b.JFJochProtoBuf.PlotRequest\x1a\x14.JFJochProtoBuf.Plot\"\x00\x12\x62\n\x1cGetRadialIntegrationProfiles\x12\x15.JFJochProtoBuf.Empty\x1a).JFJochProtoBuf.RadialIntegrationProfiles\"\x00\x12H\n\x0fGetPreviewFrame\x12\x15.JFJochProtoBuf.Empty\x1a\x1c.JFJochProtoBuf.PreviewFrame\"\x00\x12R\n\x10GetNetworkConfig\x12\x15.JFJochProtoBuf.Empty\x1a%.JFJochProtoBuf.ReceiverNetworkConfig\"\x00\x32\xca\x01\n\x11gRPC_JFJochWriter\x12=\n\x05Start\x12\x1b.JFJochProtoBuf.WriterInput\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12\x37\n\x05\x41\x62ort\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12=\n\x04Stop\x12\x15.JFJochProtoBuf.Empty\x1a\x1c.JFJochProtoBuf.WriterOutput\"\x00\x32\x82\x03\n\x13gRPC_JFJochDetector\x12?\n\x05Start\x12\x1d.JFJochProtoBuf.DetectorInput\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12\x36\n\x04Stop\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12\x41\n\x06Status\x12\x15.JFJochProtoBuf.Empty\x1a\x1e.JFJochProtoBuf.DetectorStatus\"\x00\x12=\n\x02On\x12\x1e.JFJochProtoBuf.DetectorConfig\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12\x35\n\x03Off\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12\x39\n\x07Trigger\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Empty\"\x00\x32\x99\r\n\x11gRPC_JFJochBroker\x12\x41\n\x05Start\x12\x1f.JFJochProtoBuf.DatasetSettings\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12\x36\n\x04Stop\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12:\n\x08Pedestal\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12<\n\nInitialize\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12\x38\n\x06\x43\x61ncel\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12<\n\nDeactivate\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12\x39\n\x07Trigger\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12\x42\n\tGetStatus\x12\x15.JFJochProtoBuf.Empty\x1a\x1c.JFJochProtoBuf.BrokerStatus\"\x00\x12\\\n\x18GetCalibrationStatistics\x12\x15.JFJochProtoBuf.Empty\x1a\'.JFJochProtoBuf.JFCalibrationStatistics\"\x00\x12P\n\x13GetDetectorSettings\x12\x15.JFJochProtoBuf.Empty\x1a .JFJochProtoBuf.DetectorSettings\"\x00\x12P\n\x13PutDetectorSettings\x12 .JFJochProtoBuf.DetectorSettings\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12Z\n\x18GetMeasurementStatistics\x12\x15.JFJochProtoBuf.Empty\x1a%.JFJochProtoBuf.MeasurementStatistics\"\x00\x12\\\n\x19GetDataProcessingSettings\x12\x15.JFJochProtoBuf.Empty\x1a&.JFJochProtoBuf.DataProcessingSettings\"\x00\x12\\\n\x19PutDataProcessingSettings\x12&.JFJochProtoBuf.DataProcessingSettings\x1a\x15.JFJochProtoBuf.Empty\"\x00\x12?\n\x08GetPlots\x12\x1b.JFJochProtoBuf.PlotRequest\x1a\x14.JFJochProtoBuf.Plot\"\x00\x12\x62\n\x1cGetRadialIntegrationProfiles\x12\x15.JFJochProtoBuf.Empty\x1a).JFJochProtoBuf.RadialIntegrationProfiles\"\x00\x12\x43\n\nGetPreview\x12\x15.JFJochProtoBuf.Empty\x1a\x1c.JFJochProtoBuf.PreviewFrame\"\x00\x12?\n\rGetPedestalG0\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Image\"\x00\x12?\n\rGetPedestalG1\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Image\"\x00\x12?\n\rGetPedestalG2\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Image\"\x00\x12\x39\n\x07GetMask\x12\x15.JFJochProtoBuf.Empty\x1a\x15.JFJochProtoBuf.Image\"\x00\x12H\n\x0fGetDetectorList\x12\x15.JFJochProtoBuf.Empty\x1a\x1c.JFJochProtoBuf.DetectorList\"\x00\x12L\n\x0eSelectDetector\x12!.JFJochProtoBuf.DetectorSelection\x1a\x15.JFJochProtoBuf.Empty\"\x00\x62\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'jfjoch_pb2', globals()) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None - _COMPRESSION._serialized_start=9098 - _COMPRESSION._serialized_end=9182 - _DETECTORTYPE._serialized_start=9184 - _DETECTORTYPE._serialized_end=9223 - _DETECTORMODE._serialized_start=9225 - _DETECTORMODE._serialized_end=9315 - _FPGAFIFOSTATUSENUM._serialized_start=9317 - _FPGAFIFOSTATUSENUM._serialized_end=9371 - _STATE._serialized_start=9373 - _STATE._serialized_end=9467 - _FPGAPIXELOUTPUT._serialized_start=9469 - _FPGAPIXELOUTPUT._serialized_end=9542 - _PLOTTYPE._serialized_start=9544 - _PLOTTYPE._serialized_end=9667 + _COMPRESSION._serialized_start=9042 + _COMPRESSION._serialized_end=9126 + _DETECTORTYPE._serialized_start=9128 + _DETECTORTYPE._serialized_end=9167 + _DETECTORMODE._serialized_start=9169 + _DETECTORMODE._serialized_end=9259 + _FPGAFIFOSTATUSENUM._serialized_start=9261 + _FPGAFIFOSTATUSENUM._serialized_end=9315 + _STATE._serialized_start=9317 + _STATE._serialized_end=9411 + _FPGAPIXELOUTPUT._serialized_start=9413 + _FPGAPIXELOUTPUT._serialized_end=9486 + _PLOTTYPE._serialized_start=9488 + _PLOTTYPE._serialized_end=9611 _EMPTY._serialized_start=32 _EMPTY._serialized_end=39 _UNITCELL._serialized_start=41 @@ -47,95 +47,95 @@ if _descriptor._USE_C_DESCRIPTORS == False: _ROIRECTANGLE._serialized_start=329 _ROIRECTANGLE._serialized_end=398 _DATASETSETTINGS._serialized_start=401 - _DATASETSETTINGS._serialized_end=1091 - _DETECTORSETTINGS._serialized_start=1094 - _DETECTORSETTINGS._serialized_end=1504 - _DETECTORMODULEGEOMETRY._serialized_start=1506 - _DETECTORMODULEGEOMETRY._serialized_end=1604 - _DETECTORGEOMETRY._serialized_start=1606 - _DETECTORGEOMETRY._serialized_end=1728 - _DETECTOR._serialized_start=1731 - _DETECTOR._serialized_end=1953 - _INTERNALSETTINGS._serialized_start=1956 - _INTERNALSETTINGS._serialized_end=2763 - _JUNGFRAUJOCHSETTINGS._serialized_start=2765 - _JUNGFRAUJOCHSETTINGS._serialized_end=2889 - _JFPEDESTAL._serialized_start=2891 - _JFPEDESTAL._serialized_end=2921 - _JFGAINCALIBRATION._serialized_start=2923 - _JFGAINCALIBRATION._serialized_end=2968 - _JFCALIBRATION._serialized_start=2971 - _JFCALIBRATION._serialized_end=3149 - _JFCALIBRATIONSTATISTICS._serialized_start=3151 - _JFCALIBRATIONSTATISTICS._serialized_end=3237 - _ACQUISITIONDEVICESTATISTICS._serialized_start=3240 - _ACQUISITIONDEVICESTATISTICS._serialized_end=3513 - _RECEIVERINPUT._serialized_start=3516 - _RECEIVERINPUT._serialized_end=3652 - _RECEIVEROUTPUT._serialized_start=3655 - _RECEIVEROUTPUT._serialized_end=4125 - _RECEIVERNETWORKCONFIGDEVICE._serialized_start=4127 - _RECEIVERNETWORKCONFIGDEVICE._serialized_end=4211 - _RECEIVERNETWORKCONFIG._serialized_start=4213 - _RECEIVERNETWORKCONFIG._serialized_end=4297 - _RECEIVERSTATUS._serialized_start=4300 - _RECEIVERSTATUS._serialized_end=4503 - _PLOTREQUEST._serialized_start=4505 - _PLOTREQUEST._serialized_end=4575 - _RADIALINTEGRATIONPROFILE._serialized_start=4577 - _RADIALINTEGRATIONPROFILE._serialized_end=4654 - _RADIALINTEGRATIONPROFILES._serialized_start=4656 - _RADIALINTEGRATIONPROFILES._serialized_end=4743 - _WRITERINPUT._serialized_start=4745 - _WRITERINPUT._serialized_end=4807 - _DATAFILESTATISTICS._serialized_start=4809 - _DATAFILESTATISTICS._serialized_end=4860 - _WRITEROUTPUT._serialized_start=4863 - _WRITEROUTPUT._serialized_end=5004 - _DETECTORMODULECONFIG._serialized_start=5007 - _DETECTORMODULECONFIG._serialized_end=5265 - _DETECTORCONFIG._serialized_start=5267 - _DETECTORCONFIG._serialized_end=5392 - _DETECTORINPUT._serialized_start=5395 - _DETECTORINPUT._serialized_end=5647 - _DETECTOROUTPUT._serialized_start=5649 - _DETECTOROUTPUT._serialized_end=5665 - _DETECTORSTATUS._serialized_start=5667 - _DETECTORSTATUS._serialized_end=5765 - _FPGAFIFOSTATUS._serialized_start=5767 - _FPGAFIFOSTATUS._serialized_end=5848 - _FPGASTATUS._serialized_start=5851 - _FPGASTATUS._serialized_end=6746 - _DATAPROCESSINGSETTINGS._serialized_start=6749 - _DATAPROCESSINGSETTINGS._serialized_end=7125 - _PREVIEWFRAMESPOT._serialized_start=7127 - _PREVIEWFRAMESPOT._serialized_end=7184 - _PREVIEWFRAME._serialized_start=7187 - _PREVIEWFRAME._serialized_end=7505 - _MODULESTATISTICS._serialized_start=7508 - _MODULESTATISTICS._serialized_end=7745 - _IMAGE._serialized_start=7747 - _IMAGE._serialized_end=7820 - _MASKTOLOAD._serialized_start=7822 - _MASKTOLOAD._serialized_end=7868 - _MEASUREMENTSTATISTICS._serialized_start=7871 - _MEASUREMENTSTATISTICS._serialized_end=8484 - _BROKERSTATUS._serialized_start=8487 - _BROKERSTATUS._serialized_end=8702 - _BROKERFULLSTATUS._serialized_start=8705 - _BROKERFULLSTATUS._serialized_end=8869 - _DETECTORLISTELEMENT._serialized_start=8871 - _DETECTORLISTELEMENT._serialized_end=8943 - _DETECTORLIST._serialized_start=8945 - _DETECTORLIST._serialized_end=9063 - _DETECTORSELECTION._serialized_start=9065 - _DETECTORSELECTION._serialized_end=9096 - _GRPC_JFJOCHRECEIVER._serialized_start=9670 - _GRPC_JFJOCHRECEIVER._serialized_end=10437 - _GRPC_JFJOCHWRITER._serialized_start=10440 - _GRPC_JFJOCHWRITER._serialized_end=10642 - _GRPC_JFJOCHDETECTOR._serialized_start=10645 - _GRPC_JFJOCHDETECTOR._serialized_end=11031 - _GRPC_JFJOCHBROKER._serialized_start=11034 - _GRPC_JFJOCHBROKER._serialized_end=12723 + _DATASETSETTINGS._serialized_end=1035 + _DETECTORSETTINGS._serialized_start=1038 + _DETECTORSETTINGS._serialized_end=1448 + _DETECTORMODULEGEOMETRY._serialized_start=1450 + _DETECTORMODULEGEOMETRY._serialized_end=1548 + _DETECTORGEOMETRY._serialized_start=1550 + _DETECTORGEOMETRY._serialized_end=1672 + _DETECTOR._serialized_start=1675 + _DETECTOR._serialized_end=1897 + _INTERNALSETTINGS._serialized_start=1900 + _INTERNALSETTINGS._serialized_end=2707 + _JUNGFRAUJOCHSETTINGS._serialized_start=2709 + _JUNGFRAUJOCHSETTINGS._serialized_end=2833 + _JFPEDESTAL._serialized_start=2835 + _JFPEDESTAL._serialized_end=2865 + _JFGAINCALIBRATION._serialized_start=2867 + _JFGAINCALIBRATION._serialized_end=2912 + _JFCALIBRATION._serialized_start=2915 + _JFCALIBRATION._serialized_end=3093 + _JFCALIBRATIONSTATISTICS._serialized_start=3095 + _JFCALIBRATIONSTATISTICS._serialized_end=3181 + _ACQUISITIONDEVICESTATISTICS._serialized_start=3184 + _ACQUISITIONDEVICESTATISTICS._serialized_end=3457 + _RECEIVERINPUT._serialized_start=3460 + _RECEIVERINPUT._serialized_end=3596 + _RECEIVEROUTPUT._serialized_start=3599 + _RECEIVEROUTPUT._serialized_end=4069 + _RECEIVERNETWORKCONFIGDEVICE._serialized_start=4071 + _RECEIVERNETWORKCONFIGDEVICE._serialized_end=4155 + _RECEIVERNETWORKCONFIG._serialized_start=4157 + _RECEIVERNETWORKCONFIG._serialized_end=4241 + _RECEIVERSTATUS._serialized_start=4244 + _RECEIVERSTATUS._serialized_end=4447 + _PLOTREQUEST._serialized_start=4449 + _PLOTREQUEST._serialized_end=4519 + _RADIALINTEGRATIONPROFILE._serialized_start=4521 + _RADIALINTEGRATIONPROFILE._serialized_end=4598 + _RADIALINTEGRATIONPROFILES._serialized_start=4600 + _RADIALINTEGRATIONPROFILES._serialized_end=4687 + _WRITERINPUT._serialized_start=4689 + _WRITERINPUT._serialized_end=4751 + _DATAFILESTATISTICS._serialized_start=4753 + _DATAFILESTATISTICS._serialized_end=4804 + _WRITEROUTPUT._serialized_start=4807 + _WRITEROUTPUT._serialized_end=4948 + _DETECTORMODULECONFIG._serialized_start=4951 + _DETECTORMODULECONFIG._serialized_end=5209 + _DETECTORCONFIG._serialized_start=5211 + _DETECTORCONFIG._serialized_end=5336 + _DETECTORINPUT._serialized_start=5339 + _DETECTORINPUT._serialized_end=5591 + _DETECTOROUTPUT._serialized_start=5593 + _DETECTOROUTPUT._serialized_end=5609 + _DETECTORSTATUS._serialized_start=5611 + _DETECTORSTATUS._serialized_end=5709 + _FPGAFIFOSTATUS._serialized_start=5711 + _FPGAFIFOSTATUS._serialized_end=5792 + _FPGASTATUS._serialized_start=5795 + _FPGASTATUS._serialized_end=6690 + _DATAPROCESSINGSETTINGS._serialized_start=6693 + _DATAPROCESSINGSETTINGS._serialized_end=7069 + _PREVIEWFRAMESPOT._serialized_start=7071 + _PREVIEWFRAMESPOT._serialized_end=7128 + _PREVIEWFRAME._serialized_start=7131 + _PREVIEWFRAME._serialized_end=7449 + _MODULESTATISTICS._serialized_start=7452 + _MODULESTATISTICS._serialized_end=7689 + _IMAGE._serialized_start=7691 + _IMAGE._serialized_end=7764 + _MASKTOLOAD._serialized_start=7766 + _MASKTOLOAD._serialized_end=7812 + _MEASUREMENTSTATISTICS._serialized_start=7815 + _MEASUREMENTSTATISTICS._serialized_end=8428 + _BROKERSTATUS._serialized_start=8431 + _BROKERSTATUS._serialized_end=8646 + _BROKERFULLSTATUS._serialized_start=8649 + _BROKERFULLSTATUS._serialized_end=8813 + _DETECTORLISTELEMENT._serialized_start=8815 + _DETECTORLISTELEMENT._serialized_end=8887 + _DETECTORLIST._serialized_start=8889 + _DETECTORLIST._serialized_end=9007 + _DETECTORSELECTION._serialized_start=9009 + _DETECTORSELECTION._serialized_end=9040 + _GRPC_JFJOCHRECEIVER._serialized_start=9614 + _GRPC_JFJOCHRECEIVER._serialized_end=10381 + _GRPC_JFJOCHWRITER._serialized_start=10384 + _GRPC_JFJOCHWRITER._serialized_end=10586 + _GRPC_JFJOCHDETECTOR._serialized_start=10589 + _GRPC_JFJOCHDETECTOR._serialized_end=10975 + _GRPC_JFJOCHBROKER._serialized_start=10978 + _GRPC_JFJOCHBROKER._serialized_end=12667 # @@protoc_insertion_point(module_scope) diff --git a/receiver/AcquisitionCounters.cpp b/receiver/AcquisitionCounters.cpp index a8739320..ee883525 100644 --- a/receiver/AcquisitionCounters.cpp +++ b/receiver/AcquisitionCounters.cpp @@ -21,7 +21,7 @@ void AcquisitionCounters::Reset(const DiffractionExperiment &experiment, uint16_ (experiment.GetDetectorMode() == DetectorMode::PedestalG2)) expected_frames = experiment.GetFrameNum(); else - expected_frames = experiment.GetImageNum() * experiment.GetSummation(); + expected_frames = experiment.GetImageNum(); nmodules = experiment.GetModulesNum(data_stream); if (nmodules > max_modules) diff --git a/receiver/JFJochReceiver.cpp b/receiver/JFJochReceiver.cpp index cb7a6588..adf25d36 100644 --- a/receiver/JFJochReceiver.cpp +++ b/receiver/JFJochReceiver.cpp @@ -350,10 +350,9 @@ void JFJochReceiver::FrameTransformationThread() { while (images_to_go.Get(image_number) != 0) { try { // If data acquisition is finished and fastest frame for the first device is behind - size_t frame_number = image_number * experiment.GetSummation(); - acquisition_device[0]->Counters().WaitForFrame(frame_number + 2); + acquisition_device[0]->Counters().WaitForFrame(image_number + 1); if (acquisition_device[0]->Counters().IsAcquisitionFinished() && - (acquisition_device[0]->Counters().GetFastestFrameNumber() < frame_number)) + (acquisition_device[0]->Counters().GetFastestFrameNumber() < image_number)) continue; DataMessage message{}; @@ -372,53 +371,47 @@ void JFJochReceiver::FrameTransformationThread() { StrongPixelSet strong_pixel_set(experiment); - for (int j = 0; j < experiment.GetSummation(); j++) { - frame_number = image_number * experiment.GetSummation() + j; + for (int d = 0; d < ndatastreams; d++) { + for (int m = 0; m < experiment.GetModulesNum(d); m++) { + acquisition_device[d]->Counters().WaitForFrame(image_number + 1, m); + const int16_t *src; + if (acquisition_device[d]->Counters().IsAnyPacketCollected(image_number, m)) { + src = acquisition_device[d]->GetDeviceOutput(image_number, m)->pixels; - for (int d = 0; d < ndatastreams; d++) { - acquisition_device[d]->Counters().WaitForFrame(frame_number + 2); + if (!send_image) { + Completion c = acquisition_device[d]->Counters().GetCompletion(image_number, m); + // the information is for first module/frame that was collected in full + message.bunch_id = c.bunchid; + message.jf_info = c.debug; + message.storage_cell = (message.jf_info >> 8) & 0xF; + message.timestamp = c.timestamp; + message.exptime = c.exptime; + } + send_image = true; - for (int m = 0; m < experiment.GetModulesNum(d); m++) { - const int16_t *src; - if (acquisition_device[d]->Counters().IsAnyPacketCollected(frame_number, m)) { - src = acquisition_device[d]->GetDeviceOutput(frame_number, m)->pixels; + size_t module_abs_number = experiment.GetFirstModuleOfDataStream(d) + m; + adu_histogram_module[module_abs_number].Add(*acquisition_device[d]->GetDeviceOutput(image_number, m)); + adu_histogram_total.Add(*acquisition_device[d]->GetDeviceOutput(image_number, m)); - if (!send_image) { - Completion c = acquisition_device[d]->Counters().GetCompletion(frame_number, m); - // the information is for first module/frame that was collected in full - message.bunch_id = c.bunchid; - message.jf_info = c.debug; - message.storage_cell = (message.jf_info >> 8) & 0xF; - message.timestamp = c.timestamp; - message.exptime = c.exptime; - } - send_image = true; + if (rad_int_profile_image) + rad_int_profile_image->Add(*acquisition_device[d]->GetDeviceOutput(image_number, m)); + if (find_spots) + strong_pixel_set.ReadFPGAOutput(experiment, *acquisition_device[d]->GetDeviceOutput(image_number, m), m); + } else + src = acquisition_device[d]->GetErrorFrameBuffer(); - size_t module_abs_number = experiment.GetFirstModuleOfDataStream(d) + m; - adu_histogram_module[module_abs_number].Add(*acquisition_device[d]->GetDeviceOutput(frame_number, m)); - adu_histogram_total.Add(*acquisition_device[d]->GetDeviceOutput(frame_number, m)); + transformation.ProcessModule(src, m, d); - if (rad_int_profile_image) - rad_int_profile_image->Add(*acquisition_device[d]->GetDeviceOutput(frame_number, m)); - if (find_spots) - strong_pixel_set.ReadFPGAOutput(experiment, *acquisition_device[d]->GetDeviceOutput(frame_number, m), m); - } else - src = acquisition_device[d]->GetErrorFrameBuffer(); - - transformation.ProcessModule(src, m, d); - - acquisition_device[d]->FrameBufferRelease(frame_number, m); - } - auto delay = acquisition_device[d]->Counters().CalculateDelay(frame_number); - UpdateMaxDelay(delay); - if (delay > message.receiver_aq_dev_delay) - message.receiver_aq_dev_delay = delay; + acquisition_device[d]->FrameBufferRelease(image_number, m); } + auto delay = acquisition_device[d]->Counters().CalculateDelay(image_number); + UpdateMaxDelay(delay); + if (delay > message.receiver_aq_dev_delay) + message.receiver_aq_dev_delay = delay; } - if (send_image) { - transformation.Pack(); + if (send_image) { std::vector spots; auto local_data_processing_settings = GetDataProcessingSettings(); diff --git a/receiver/JFJochReceiver.h b/receiver/JFJochReceiver.h index 3149ff0e..9c3e2781 100644 --- a/receiver/JFJochReceiver.h +++ b/receiver/JFJochReceiver.h @@ -87,7 +87,6 @@ class JFJochReceiver { Histogram indexing_solution_per_file; // TODO: Histogram a,b,c,alpha,beta,gamma - int64_t preview_stride; bool find_spots = false; int64_t max_image_number_sent = 0; diff --git a/tests/AcquisitionCountersTest.cpp b/tests/AcquisitionCountersTest.cpp index d7e38147..648ad4ea 100644 --- a/tests/AcquisitionCountersTest.cpp +++ b/tests/AcquisitionCountersTest.cpp @@ -89,7 +89,7 @@ TEST_CASE("AcquisitionCountersTest_OutOfBounds","[AcquisitionDeviceCounters]") { TEST_CASE("AcquisitionCountersTest_PacketCount","[AcquisitionDeviceCounters]") { DiffractionExperiment x(DetectorGeometry(2)); - x.NumTriggers(1).ImagesPerTrigger(25).Summation(2); + x.NumTriggers(1).ImagesPerTrigger(50).FPGASummation(2); AcquisitionCounters counters; counters.Reset(x, 0); @@ -115,6 +115,6 @@ TEST_CASE("AcquisitionCountersTest_PacketCount","[AcquisitionDeviceCounters]") { REQUIRE(counters.GetTotalPackets(0) == 128); REQUIRE(counters.GetTotalPackets(1) == 86); - REQUIRE(counters.GetExpectedPackets() == 50 * 2 * 128); - REQUIRE(counters.GetExpectedPacketsPerModule() == 50 * 128); + REQUIRE(counters.GetExpectedPackets() == 50 * 128 * 2 * 2); + REQUIRE(counters.GetExpectedPacketsPerModule() == 50 * 128 * 2); } \ No newline at end of file diff --git a/tests/DiffractionExperimentTest.cpp b/tests/DiffractionExperimentTest.cpp index e27e6b1e..38a1ed9f 100644 --- a/tests/DiffractionExperimentTest.cpp +++ b/tests/DiffractionExperimentTest.cpp @@ -68,17 +68,18 @@ TEST_CASE("DiffractionExperiment_Compression","[DiffractionExperiment]") { REQUIRE(x.GetCompressionAlgorithmEnum() == CompressionAlgorithm::NO_COMPRESSION); } -TEST_CASE("DiffractionExperiment_Timing","[DiffractionExperiment]") { +//TODO: Update +/* TEST_CASE("DiffractionExperiment_Timing","[DiffractionExperiment]") { DiffractionExperiment x; x.Mode(DetectorMode::Conversion); // Timing and frame count - x.PedestalG0Frames(1000).ImagesPerTrigger(1000).NumTriggers(1).FrameTime(1000us).Summation(1); + x.PedestalG0Frames(1000).ImagesPerTrigger(1000).NumTriggers(1).FrameTime(1000us).FPGA; // Frame count analysis REQUIRE(x.GetFrameNum() == 1000); REQUIRE(x.GetFrameTime().count() == 1000); - REQUIRE(x.GetSummation() == 1); + REQUIRE(x.GetPixelDepth() == 2); REQUIRE(x.GetOverflow() == INT16_MAX); REQUIRE(x.GetUnderflow() == INT16_MIN); @@ -136,7 +137,7 @@ TEST_CASE("DiffractionExperiment_Timing","[DiffractionExperiment]") { REQUIRE(x.GetFrameNum() == 3000); REQUIRE(x.GetFrameTime().count() == 8345); REQUIRE(x.GetSummation() == 1); -} +} */ TEST_CASE("DiffractionExperiment_UnitCell","[DiffractionExperiment]") { DiffractionExperiment x; @@ -367,7 +368,7 @@ TEST_CASE("DiffractionExperiment_Metadata","[DiffractionExperiment]") { REQUIRE(x.GetPhotonEnergy_keV() == 6.0); REQUIRE(x.GetWavelength_A() == Approx(12.39854 / 6.0)); - x.DetectorDistance_mm(30.0).BeamX_pxl(1200).BeamY_pxl(1000).Summation(3).FrameTime(900us); + x.DetectorDistance_mm(30.0).BeamX_pxl(1200).BeamY_pxl(1000).FrameTime(900us); REQUIRE(x.GetBeamX_pxl() == Approx(1200)); REQUIRE(x.GetBeamY_pxl() == Approx(1000)); @@ -382,7 +383,7 @@ TEST_CASE("DiffractionExperiment_Metadata","[DiffractionExperiment]") { TEST_CASE("DiffractionExperiment_Preview", "[DiffractionExperiment]") { DiffractionExperiment x; std::map map, map2; - x.ImagesPerTrigger(10000).Summation(1).FrameTime(1ms); + x.ImagesPerTrigger(10000).FrameTime(1ms); x.PreviewPeriod(0ms); REQUIRE(x.GetPreviewStride() == 0); REQUIRE(x.GetPreviewPeriod().count() == 0); @@ -430,7 +431,8 @@ TEST_CASE("DiffractionExperiment_SampleName", "[DiffractionExperiment]") { REQUIRE_NOTHROW(x.SampleName("lyso1")); REQUIRE(x.GetSampleName() == "lyso1"); } - +//TODO: Update +/* TEST_CASE("DiffractionExperiment_FrameCountTime","[DiffractionExperiment]") { DiffractionExperiment x; @@ -449,7 +451,7 @@ TEST_CASE("DiffractionExperiment_FrameCountTime","[DiffractionExperiment]") { REQUIRE(x.GetFrameCountTime() == std::chrono::microseconds(567)); REQUIRE(x.GetImageTime() == std::chrono::microseconds(7*1200)); REQUIRE(x.GetImageCountTime() == std::chrono::microseconds(7*567)); -} +} */ TEST_CASE("DiffractionExperiment_ExportProtobuf","[DiffractionExperiment]") { DiffractionExperiment x(DetectorGeometry(16, 4, 0, 0, false)),y; @@ -580,8 +582,7 @@ TEST_CASE("DiffractionExperiment_RadialIntegration_QSpacing","[DiffractionExperi TEST_CASE("DiffractionExperiment_StorageCells","[DiffractionExperiment]") { const int64_t num_triggers = 20; DiffractionExperiment x; - x.FrameTime(std::chrono::milliseconds(1)).Summation(1).ImagesPerTrigger(5).NumTriggers(num_triggers); - REQUIRE(x.GetSummation() == 1); + x.FrameTime(std::chrono::milliseconds(1)).ImagesPerTrigger(5).NumTriggers(num_triggers); REQUIRE(x.GetImageNumPerTrigger() == 5); REQUIRE(x.GetNumTriggers() == num_triggers); @@ -605,7 +606,6 @@ TEST_CASE("DiffractionExperiment_StorageCells","[DiffractionExperiment]") { x.StorageCells(16); REQUIRE(x.GetStorageCellNumber() == 16); - REQUIRE(x.GetSummation() == 1); REQUIRE(x.GetImageNumPerTrigger() == x.GetStorageCellNumber()); REQUIRE(x.GetFrameNumPerTrigger() == x.GetStorageCellNumber()); REQUIRE(x.GetImageNum() == x.GetStorageCellNumber() * num_triggers); @@ -643,7 +643,7 @@ TEST_CASE("DiffractionExperiment_StorageCells_Pedestal","[DiffractionExperiment] TEST_CASE("DiffractionExperiment_DetectorInput_MultiTriggger","[DiffractionExperiment]") { DiffractionExperiment x(DetectorGeometry(8, 2, 8, 36)); - x.FrameTime(700us).Summation(1).ImagesPerTrigger(350).NumTriggers(7); + x.FrameTime(700us).ImagesPerTrigger(350).NumTriggers(7); JFJochProtoBuf::DetectorInput ret = x; REQUIRE(ret.modules_num() == 8); REQUIRE(ret.period_us() == x.GetFrameTime().count()); @@ -656,7 +656,7 @@ TEST_CASE("DiffractionExperiment_DetectorInput_MultiTriggger","[DiffractionExper TEST_CASE("DiffractionExperiment_DetectorInput_NoTriggger","[DiffractionExperiment]") { DiffractionExperiment x(DetectorGeometry(8, 2, 8, 36)); - x.FrameTime(1200us).Summation(1).ImagesPerTrigger(350).NumTriggers(1); + x.FrameTime(1200us).ImagesPerTrigger(350).NumTriggers(1); JFJochProtoBuf::DetectorInput ret = x; REQUIRE(ret.modules_num() == 8); REQUIRE(ret.period_us() == x.GetFrameTime().count()); @@ -669,7 +669,7 @@ TEST_CASE("DiffractionExperiment_DetectorInput_NoTriggger","[DiffractionExperime TEST_CASE("DiffractionExperiment_DetectorInput_PedestalG2","[DiffractionExperiment]") { DiffractionExperiment x(DetectorGeometry(8, 2, 8, 36)); - x.FrameTime(1200us).Summation(1).PedestalG2Frames(4560).NumTriggers(1).Mode(DetectorMode::PedestalG2); + x.FrameTime(1200us).PedestalG2Frames(4560).NumTriggers(1).Mode(DetectorMode::PedestalG2); JFJochProtoBuf::DetectorInput ret = x; REQUIRE(ret.modules_num() == 8); REQUIRE(ret.period_us() == x.GetFrameTime().count()); @@ -681,7 +681,7 @@ TEST_CASE("DiffractionExperiment_DetectorInput_PedestalG2","[DiffractionExperime TEST_CASE("DiffractionExperiment_DetectorInput_StorageCell","[DiffractionExperiment]") { DiffractionExperiment x(DetectorGeometry(8, 2, 8, 36)); - x.FrameTime(1200us).Summation(1).NumTriggers(4560).StorageCells(8).StorageCellDelay(7000ns); + x.FrameTime(1200us).NumTriggers(4560).StorageCells(8).StorageCellDelay(7000ns); JFJochProtoBuf::DetectorInput ret = x; REQUIRE(ret.modules_num() == 8); REQUIRE(ret.period_us() == 8 * (x.GetFrameTime().count() + 10)); @@ -699,7 +699,6 @@ TEST_CASE("DiffractionExperiment_LoadDatasetSettings", "[DiffractionExperiment]" JFJochProtoBuf::DatasetSettings settings; settings.set_images_per_trigger(234); settings.set_ntrigger(56); - settings.set_summation(4); settings.set_beam_x_pxl(23.4); settings.set_beam_y_pxl(123.4); settings.set_photon_energy_kev(WVL_1A_IN_KEV); @@ -723,43 +722,12 @@ TEST_CASE("DiffractionExperiment_LoadDatasetSettings", "[DiffractionExperiment]" REQUIRE(x.GetFPGAOutputMode() == JFJochProtoBuf::INT16); } -TEST_CASE("DiffractionExperiment_ImageTimeUs", "[DiffractionExperiment]") { - DiffractionExperiment x; - x.FrameTime(500us); - - JFJochProtoBuf::DatasetSettings settings; - settings.set_images_per_trigger(234); - settings.set_ntrigger(56); - settings.set_image_time_us(2500); - settings.set_beam_x_pxl(23.4); - settings.set_beam_y_pxl(123.4); - settings.set_photon_energy_kev(WVL_1A_IN_KEV); - settings.set_detector_distance_mm(57.6); - settings.set_data_file_count(5); - settings.set_space_group_number(45); - settings.set_sample_name("lyso1"); - - REQUIRE_NOTHROW(x.LoadDatasetSettings(settings)); - REQUIRE(x.GetSummation() == 5); - - settings.set_image_time_us(2501); - REQUIRE_THROWS(x.LoadDatasetSettings(settings)); - - settings.set_image_time_us(0); - REQUIRE_THROWS(x.LoadDatasetSettings(settings)); - - settings.set_image_time_us(-2500); - REQUIRE_THROWS(x.LoadDatasetSettings(settings)); - -} - TEST_CASE("DiffractionExperiment_LoadDatasetSettings_Invalid", "[DiffractionExperiment]") { DiffractionExperiment x; x.ImagesPerTrigger(567).BeamY_pxl(324).Compression(JFJochProtoBuf::BSHUF_ZSTD); JFJochProtoBuf::DatasetSettings settings; settings.set_images_per_trigger(-1); settings.set_ntrigger(56); - settings.set_summation(4); settings.set_beam_x_pxl(23.4); settings.set_beam_y_pxl(123.4); settings.set_photon_energy_kev(WVL_1A_IN_KEV); diff --git a/tests/FPGAIntegrationTest.cpp b/tests/FPGAIntegrationTest.cpp index 6edc4794..1501c987 100644 --- a/tests/FPGAIntegrationTest.cpp +++ b/tests/FPGAIntegrationTest.cpp @@ -1383,7 +1383,7 @@ TEST_CASE("HLS_C_Simulation_internal_packet_generator_16bit_unsigned", "[FPGA][F TEST_CASE("HLS_C_Simulation_internal_packet_generator_summation", "[FPGA][Full]") { const uint16_t nmodules = 1; - const size_t nframes = 128; + const size_t nframes = 16; const size_t nsummation = 16; DiffractionExperiment x((DetectorGeometry(nmodules))); @@ -1406,10 +1406,10 @@ TEST_CASE("HLS_C_Simulation_internal_packet_generator_summation", "[FPGA][Full]" REQUIRE(test.OutputStream().size() == 1); - REQUIRE(test.GetBytesReceived() == 128 * nmodules * nframes * JUNGFRAU_PACKET_SIZE_BYTES); + REQUIRE(test.GetBytesReceived() == 128 * nmodules * nframes * nsummation * JUNGFRAU_PACKET_SIZE_BYTES); auto test_frame_signed = (int16_t *) test_frame.data(); - for (int image = 0; image < nframes / nsummation; image++) { + for (int image = 0; image < nframes; image++) { for (int m = 0; m < nmodules; m++) { REQUIRE(test.Counters().GetCompletion(image, m).timestamp == INT_PKT_GEN_EXPTTIME * image * nsummation); REQUIRE(test.Counters().GetCompletion(image, m).bunchid == INT_PKT_GEN_BUNCHID + image * nsummation); diff --git a/tests/FrameTransformationTest.cpp b/tests/FrameTransformationTest.cpp index ac6c362a..f9c072b4 100644 --- a/tests/FrameTransformationTest.cpp +++ b/tests/FrameTransformationTest.cpp @@ -42,7 +42,7 @@ TEST_CASE("FrameTransformation_Raw_NoCompression" ,"") { REQUIRE_NOTHROW(transformation.ProcessModule(input_0.data() + i * RAW_MODULE_SIZE, i, 0)); REQUIRE_NOTHROW(transformation.ProcessModule(input_1.data() + i * RAW_MODULE_SIZE, i, 1)); } - transformation.Pack(); + REQUIRE(transformation.SaveCompressedImage(output.data()) == experiment.GetPixelDepth() * experiment.GetPixelsNum()); uint32_t diff_0 = 0; @@ -83,7 +83,6 @@ TEST_CASE("FrameTransformation_Converted_NoCompression" ,"") { REQUIRE_NOTHROW(transformation.ProcessModule(input_1.data() + i * RAW_MODULE_SIZE, i, 1)); } - transformation.Pack(); REQUIRE(transformation.SaveCompressedImage(output.data()) == experiment.GetPixelDepth() * experiment.GetPixelsNum()); REQUIRE(input_0[511*1024] == output[CONVERTED_MODULE_SIZE * (2 * nmodules - 2) + 0]); @@ -136,7 +135,6 @@ TEST_CASE("FrameTransformation_Converted_bshuf_lz4" ,"") { } size_t compressed_size; - transformation.Pack(); REQUIRE_NOTHROW(compressed_size = transformation.SaveCompressedImage(output_compressed.data())); output_compressed.resize(compressed_size); @@ -197,7 +195,6 @@ TEST_CASE("FrameTransformation_Converted_bshuf_lz4_roi" ,"") { } size_t compressed_size; - transformation.Pack(); transformation.ApplyROI(filter); REQUIRE_NOTHROW(compressed_size = transformation.SaveCompressedImage(output_compressed.data())); output_compressed.resize(compressed_size); @@ -224,65 +221,6 @@ TEST_CASE("FrameTransformation_Converted_bshuf_lz4_roi" ,"") { REQUIRE(diff == 0); } -TEST_CASE("FrameTransformation_Converted_bshuf_lz4_roi_summation" ,"") { - const uint16_t nmodules = 4; - const uint16_t ndatastreams = 2; - const uint16_t nframes = 4; - DiffractionExperiment experiment(DetectorGeometry(ndatastreams * nmodules, 2)); - experiment.DataStreams(ndatastreams); - - experiment.Mode(DetectorMode::Conversion).Compression(JFJochProtoBuf::BSHUF_LZ4).Summation(nframes); - - FrameTransformation transformation(experiment); - - ROIFilter filter(experiment.GetXPixelsNum(), experiment.GetYPixelsNum(), 0); - filter.SetRectangle(100, 20, 10, 10); - - std::vector input_0(nmodules*RAW_MODULE_SIZE); - for (int i = 0; i < nmodules*RAW_MODULE_SIZE; i++) - input_0[i] = 50; - - std::vector input_1(nmodules*RAW_MODULE_SIZE); - for (int i = 0; i < nmodules*RAW_MODULE_SIZE; i++) - input_1[i] = 50; - - std::vector output_compressed(experiment.GetMaxCompressedSize()); - - for (int f = 0; f < nframes; f++) { - for (int i = 0; i < nmodules; i++) { - REQUIRE_NOTHROW(transformation.ProcessModule(input_0.data() + i * RAW_MODULE_SIZE, i, 0)); - REQUIRE_NOTHROW(transformation.ProcessModule(input_1.data() + i * RAW_MODULE_SIZE, i, 1)); - } - } - - size_t compressed_size; - transformation.Pack(); - transformation.ApplyROI(filter); - REQUIRE_NOTHROW(compressed_size = transformation.SaveCompressedImage(output_compressed.data())); - output_compressed.resize(compressed_size); - - REQUIRE(bshuf_read_uint64_BE(output_compressed.data()) == experiment.GetPixelsNum() * experiment.GetPixelDepth()); - REQUIRE(bshuf_read_uint32_BE(output_compressed.data()+8) == JFJochBitShuffleCompressor::DefaultBlockSize * experiment.GetPixelDepth()); - - std::vector output; - REQUIRE_NOTHROW(JFJochDecompress(output, experiment.GetCompressionAlgorithmEnum(), output_compressed, - experiment.GetPixelsNum())); - - size_t diff = 0; - for (int y = 0; y < experiment.GetYPixelsNum(); y++) { - for (int x = 0; x < experiment.GetXPixelsNum(); x++) { - if ((y >= 20 ) && (y < 30) && (x >= 100) && (x < 110)) { - if (output[y * experiment.GetXPixelsNum() + x] != nframes * 50) - diff++; - } else { - if (output[y * experiment.GetXPixelsNum() + x] != INT32_MIN) - diff++; - } - } - } - REQUIRE(diff == 0); -} - TEST_CASE("FrameTransformation_Converted_bshuf_zstd" ,"") { const uint16_t nmodules = 4; const uint16_t ndatastreams = 2; @@ -312,7 +250,6 @@ TEST_CASE("FrameTransformation_Converted_bshuf_zstd" ,"") { } size_t compressed_size; - transformation.Pack(); REQUIRE_NOTHROW(compressed_size = transformation.SaveCompressedImage(output_compressed.data())); REQUIRE(bshuf_read_uint64_BE(output_compressed.data()) == experiment.GetPixelsNum() * experiment.GetPixelDepth()); @@ -372,7 +309,6 @@ TEST_CASE("FrameTransformation_Converted_bshuf_zstd_rle" ,"") { } size_t compressed_size; - transformation.Pack(); REQUIRE_NOTHROW(compressed_size = transformation.SaveCompressedImage(output_compressed.data())); REQUIRE(bshuf_read_uint64_BE(output_compressed.data()) == experiment.GetPixelsNum() * experiment.GetPixelDepth()); @@ -402,227 +338,3 @@ TEST_CASE("FrameTransformation_Converted_bshuf_zstd_rle" ,"") { REQUIRE(input_1[(511+512)*1024] == output[CONVERTED_MODULE_SIZE * (nmodules - 2) + 1030]); REQUIRE(input_1[(511+512)*1024 + 800] == output[CONVERTED_MODULE_SIZE * (nmodules - 2) + 1030 + 800 + 6]); } - -TEST_CASE("FrameTransformation_Converted_bshuf_zstd_summation" ,"") { - const uint16_t nmodules = 4; - const uint16_t ndatastreams = 2; - DiffractionExperiment experiment(DetectorGeometry(ndatastreams * nmodules, 2)); - experiment.DataStreams(ndatastreams); - - experiment.Mode(DetectorMode::Conversion).Summation(4).Compression(JFJochProtoBuf::BSHUF_ZSTD); - - REQUIRE(experiment.GetSummation() == 4); - - FrameTransformation transformation(experiment); - - std::mt19937 g1(15097); - std::uniform_int_distribution dist; - - std::vector input_0(nmodules*RAW_MODULE_SIZE); - for (int i = 0; i < nmodules*RAW_MODULE_SIZE; i++) - input_0[i] = dist(g1); - - std::vector input_1(nmodules*RAW_MODULE_SIZE); - for (int i = 0; i < nmodules*RAW_MODULE_SIZE; i++) - input_1[i] = dist(g1); - - std::vector output_compressed(experiment.GetMaxCompressedSize()); - - for (int i = 0; i < nmodules; i++) { - REQUIRE_NOTHROW(transformation.ProcessModule(input_0.data() + i * RAW_MODULE_SIZE, i, 0)); - REQUIRE_NOTHROW(transformation.ProcessModule(input_1.data() + i * RAW_MODULE_SIZE, i, 1)); - } - - for (int i = 0; i < nmodules; i++) { - REQUIRE_NOTHROW(transformation.ProcessModule(input_0.data() + i * RAW_MODULE_SIZE, i, 0)); - REQUIRE_NOTHROW(transformation.ProcessModule(input_1.data() + i * RAW_MODULE_SIZE, i, 1)); - } - - for (int i = 0; i < nmodules; i++) { - REQUIRE_NOTHROW(transformation.ProcessModule(input_0.data() + i * RAW_MODULE_SIZE, i, 0)); - REQUIRE_NOTHROW(transformation.ProcessModule(input_1.data() + i * RAW_MODULE_SIZE, i, 1)); - } - - for (int i = 0; i < nmodules; i++) { - REQUIRE_NOTHROW(transformation.ProcessModule(input_0.data() + i * RAW_MODULE_SIZE, i, 0)); - REQUIRE_NOTHROW(transformation.ProcessModule(input_1.data() + i * RAW_MODULE_SIZE, i, 1)); - } - - size_t compressed_size; - transformation.Pack(); - REQUIRE_NOTHROW(compressed_size = transformation.SaveCompressedImage(output_compressed.data())); - - REQUIRE(bshuf_read_uint64_BE(output_compressed.data()) == experiment.GetPixelsNum() * experiment.GetPixelDepth()); - REQUIRE(bshuf_read_uint32_BE(output_compressed.data()+8) == JFJochBitShuffleCompressor::DefaultBlockSize * experiment.GetPixelDepth()); - - output_compressed.resize(compressed_size); - std::vector output; - REQUIRE_NOTHROW(JFJochDecompress(output, experiment.GetCompressionAlgorithmEnum(), output_compressed, - experiment.GetPixelsNum())); - - REQUIRE(4 * input_0[511*1024] == output[CONVERTED_MODULE_SIZE * (2 * nmodules - 2) + 0]); - REQUIRE(2 * input_0[511*1024+256] == output[CONVERTED_MODULE_SIZE * (2 * nmodules - 2) + 258]); - REQUIRE( input_0[256*1024+256] == output[CONVERTED_MODULE_SIZE * (2 * nmodules - 2) + 2 * 1030 * 255 + 257]); - REQUIRE(4 * input_0[(511+512)*1024] == output[CONVERTED_MODULE_SIZE * (2 * nmodules - 2) + 1030]); - REQUIRE(4 * input_0[(511+512)*1024 + 800] == output[CONVERTED_MODULE_SIZE * (2 * nmodules - 2) + 1030 + 800 + 6]); - - REQUIRE(4 * input_1[511*1024] == output[CONVERTED_MODULE_SIZE * (nmodules - 2) + 0]); - REQUIRE(2 * input_1[511*1024+256] == output[CONVERTED_MODULE_SIZE * (nmodules - 2) + 258]); - - REQUIRE(4 * input_1[(511+512)*1024] == output[CONVERTED_MODULE_SIZE * (nmodules - 2) + 1030]); - REQUIRE(4 * input_1[(511+512)*1024 + 800] == output[CONVERTED_MODULE_SIZE * (nmodules - 2) + 1030 + 800 + 6]); -} - -TEST_CASE("FrameTransformation_Converted_bshuf_zstd_summation_2frames" ,"") { - // Ensure that previous frame is properly cleaned with PackStandardOutput() - const uint16_t nmodules = 4; - const uint16_t ndatastreams = 2; - DiffractionExperiment experiment(DetectorGeometry(ndatastreams * nmodules, 2)); - experiment.DataStreams(ndatastreams); - - experiment.Mode(DetectorMode::Conversion).Summation(4).Compression(JFJochProtoBuf::BSHUF_ZSTD); - - REQUIRE(experiment.GetSummation() == 4); - - FrameTransformation transformation(experiment); - - std::mt19937 g1(15097); - std::uniform_int_distribution dist; - - std::vector input_0(nmodules*RAW_MODULE_SIZE); - for (int i = 0; i < nmodules*RAW_MODULE_SIZE; i++) - input_0[i] = dist(g1); - - std::vector input_1(nmodules*RAW_MODULE_SIZE); - for (int i = 0; i < nmodules*RAW_MODULE_SIZE; i++) - input_1[i] = dist(g1); - - std::vector output_compressed(experiment.GetMaxCompressedSize()); - - for (int i = 0; i < nmodules; i++) { - REQUIRE_NOTHROW(transformation.ProcessModule(input_0.data() + i * RAW_MODULE_SIZE, i, 0)); - REQUIRE_NOTHROW(transformation.ProcessModule(input_1.data() + i * RAW_MODULE_SIZE, i, 1)); - } - - for (int i = 0; i < nmodules; i++) { - REQUIRE_NOTHROW(transformation.ProcessModule(input_0.data() + i * RAW_MODULE_SIZE, i, 0)); - REQUIRE_NOTHROW(transformation.ProcessModule(input_1.data() + i * RAW_MODULE_SIZE, i, 1)); - } - - size_t compressed_size; - transformation.Pack(); - REQUIRE_NOTHROW(compressed_size = transformation.SaveCompressedImage(output_compressed.data())); - - for (int i = 0; i < nmodules; i++) { - REQUIRE_NOTHROW(transformation.ProcessModule(input_0.data() + i * RAW_MODULE_SIZE, i, 0)); - REQUIRE_NOTHROW(transformation.ProcessModule(input_1.data() + i * RAW_MODULE_SIZE, i, 1)); - } - - for (int i = 0; i < nmodules; i++) { - REQUIRE_NOTHROW(transformation.ProcessModule(input_0.data() + i * RAW_MODULE_SIZE, i, 0)); - REQUIRE_NOTHROW(transformation.ProcessModule(input_1.data() + i * RAW_MODULE_SIZE, i, 1)); - } - - for (int i = 0; i < nmodules; i++) { - REQUIRE_NOTHROW(transformation.ProcessModule(input_0.data() + i * RAW_MODULE_SIZE, i, 0)); - REQUIRE_NOTHROW(transformation.ProcessModule(input_1.data() + i * RAW_MODULE_SIZE, i, 1)); - } - - for (int i = 0; i < nmodules; i++) { - REQUIRE_NOTHROW(transformation.ProcessModule(input_0.data() + i * RAW_MODULE_SIZE, i, 0)); - REQUIRE_NOTHROW(transformation.ProcessModule(input_1.data() + i * RAW_MODULE_SIZE, i, 1)); - } - - transformation.Pack(); - REQUIRE_NOTHROW(compressed_size = transformation.SaveCompressedImage(output_compressed.data())); - - REQUIRE(bshuf_read_uint64_BE(output_compressed.data()) == experiment.GetPixelsNum() * experiment.GetPixelDepth()); - REQUIRE(bshuf_read_uint32_BE(output_compressed.data()+8) == JFJochBitShuffleCompressor::DefaultBlockSize * experiment.GetPixelDepth()); - - output_compressed.resize(compressed_size); - std::vector output; - REQUIRE_NOTHROW(JFJochDecompress(output, experiment.GetCompressionAlgorithmEnum(), output_compressed, - experiment.GetPixelsNum())); - - REQUIRE(4 * input_0[511*1024] == output[CONVERTED_MODULE_SIZE * (2 * nmodules - 2) + 0]); - REQUIRE(2 * input_0[511*1024+256] == output[CONVERTED_MODULE_SIZE * (2 * nmodules - 2) + 258]); - REQUIRE( input_0[256*1024+256] == output[CONVERTED_MODULE_SIZE * (2 * nmodules - 2) + 2 * 1030 * 255 + 257]); - REQUIRE(4 * input_0[(511+512)*1024] == output[CONVERTED_MODULE_SIZE * (2 * nmodules - 2) + 1030]); - REQUIRE(4 * input_0[(511+512)*1024 + 800] == output[CONVERTED_MODULE_SIZE * (2 * nmodules - 2) + 1030 + 800 + 6]); - - REQUIRE(4 * input_1[511*1024] == output[CONVERTED_MODULE_SIZE * (nmodules - 2) + 0]); - REQUIRE(2 * input_1[511*1024+256] == output[CONVERTED_MODULE_SIZE * (nmodules - 2) + 258]); - - REQUIRE(4 * input_1[(511+512)*1024] == output[CONVERTED_MODULE_SIZE * (nmodules - 2) + 1030]); - REQUIRE(4 * input_1[(511+512)*1024 + 800] == output[CONVERTED_MODULE_SIZE * (nmodules - 2) + 1030 + 800 + 6]); -} - -TEST_CASE("FrameTransformation_Converted_bshuf_zstd_summation_negatives" ,"") { - const uint16_t nmodules = 4; - const uint16_t ndatastreams = 2; - DiffractionExperiment experiment(DetectorGeometry(ndatastreams * nmodules, 2)); - experiment.DataStreams(ndatastreams); - - experiment.Mode(DetectorMode::Conversion).Summation(4).Compression(JFJochProtoBuf::BSHUF_ZSTD); - - REQUIRE(experiment.GetSummation() == 4); - - FrameTransformation transformation(experiment); - - std::mt19937 g1(12387); - std::uniform_int_distribution dist; - - std::vector input_0(nmodules*RAW_MODULE_SIZE); - for (int i = 0; i < nmodules*RAW_MODULE_SIZE; i++) - input_0[i] = dist(g1); - - std::vector input_1(nmodules*RAW_MODULE_SIZE); - for (int i = 0; i < nmodules*RAW_MODULE_SIZE; i++) - input_1[i] = dist(g1); - - std::vector output_compressed(experiment.GetMaxCompressedSize()); - - for (int i = 0; i < nmodules; i++) { - REQUIRE_NOTHROW(transformation.ProcessModule(input_0.data() + i * RAW_MODULE_SIZE, i, 0)); - REQUIRE_NOTHROW(transformation.ProcessModule(input_1.data() + i * RAW_MODULE_SIZE, i, 1)); - } - - for (int i = 0; i < nmodules; i++) { - REQUIRE_NOTHROW(transformation.ProcessModule(input_0.data() + i * RAW_MODULE_SIZE, i, 0)); - REQUIRE_NOTHROW(transformation.ProcessModule(input_1.data() + i * RAW_MODULE_SIZE, i, 1)); - } - - for (int i = 0; i < nmodules; i++) { - REQUIRE_NOTHROW(transformation.ProcessModule(input_0.data() + i * RAW_MODULE_SIZE, i, 0)); - REQUIRE_NOTHROW(transformation.ProcessModule(input_1.data() + i * RAW_MODULE_SIZE, i, 1)); - } - - for (int i = 0; i < nmodules; i++) { - REQUIRE_NOTHROW(transformation.ProcessModule(input_0.data() + i * RAW_MODULE_SIZE, i, 0)); - REQUIRE_NOTHROW(transformation.ProcessModule(input_1.data() + i * RAW_MODULE_SIZE, i, 1)); - } - size_t compressed_size; - transformation.Pack(); - REQUIRE_NOTHROW(compressed_size = transformation.SaveCompressedImage(output_compressed.data())); - - REQUIRE(bshuf_read_uint64_BE(output_compressed.data()) == experiment.GetPixelsNum() * experiment.GetPixelDepth()); - REQUIRE(bshuf_read_uint32_BE(output_compressed.data()+8) == JFJochBitShuffleCompressor::DefaultBlockSize * experiment.GetPixelDepth()); - - output_compressed.resize(compressed_size); - std::vector output; - REQUIRE_NOTHROW(JFJochDecompress(output, experiment.GetCompressionAlgorithmEnum(), output_compressed, - experiment.GetPixelsNum())); - - REQUIRE(4 * input_0[511*1024] == output[CONVERTED_MODULE_SIZE * (2 * nmodules - 2) + 0]); - REQUIRE(2 * input_0[511*1024+256] == output[CONVERTED_MODULE_SIZE * (2 * nmodules - 2) + 258]); - REQUIRE( input_0[256*1024+256] == output[CONVERTED_MODULE_SIZE * (2 * nmodules - 2) + 2 * 1030 * 255 + 257]); - - REQUIRE(4 * input_0[(511+512)*1024] == output[CONVERTED_MODULE_SIZE * (2 * nmodules - 2) + 1030]); - REQUIRE(4 * input_0[(511+512)*1024 + 800] == output[CONVERTED_MODULE_SIZE * (2 * nmodules - 2) + 1030 + 800 + 6]); - - REQUIRE(4 * input_1[511*1024] == output[CONVERTED_MODULE_SIZE * (nmodules - 2) + 0]); - REQUIRE(2 * input_1[511*1024+256] == output[CONVERTED_MODULE_SIZE * (nmodules - 2) + 258]); - - REQUIRE(4 * input_1[(511+512)*1024] == output[CONVERTED_MODULE_SIZE * (nmodules - 2) + 1030]); - REQUIRE(4 * input_1[(511+512)*1024 + 800] == output[CONVERTED_MODULE_SIZE * (nmodules - 2) + 1030 + 800 + 6]); -} diff --git a/tests/JFJochBrokerTest.cpp b/tests/JFJochBrokerTest.cpp index d37864bb..9a600c72 100644 --- a/tests/JFJochBrokerTest.cpp +++ b/tests/JFJochBrokerTest.cpp @@ -17,7 +17,6 @@ TEST_CASE("JFJochStateMachine_States") { setup.set_images_per_trigger(5); setup.set_photon_energy_kev(12.4); setup.set_data_file_count(5); - setup.set_summation(1); JFJochState state; REQUIRE_NOTHROW(state = state_machine.GetState()); @@ -48,7 +47,6 @@ TEST_CASE("JFJochStateMachine_State_Pedestal") { setup.set_images_per_trigger(5); setup.set_photon_energy_kev(12.4); setup.set_data_file_count(5); - setup.set_summation(1); state_machine.DebugOnly_SetState(JFJochState::Pedestal); @@ -79,7 +77,6 @@ TEST_CASE("JFJochStateMachine_State_Measure") { setup.set_images_per_trigger(5); setup.set_photon_energy_kev(12.4); setup.set_data_file_count(5); - setup.set_summation(1); state_machine.DebugOnly_SetState(JFJochState::Measuring); @@ -110,7 +107,6 @@ TEST_CASE("JFJochStateMachine_State_Error") { setup.set_images_per_trigger(5); setup.set_photon_energy_kev(12.4); setup.set_data_file_count(5); - setup.set_summation(1); state_machine.DebugOnly_SetState(JFJochState::Error); @@ -254,7 +250,6 @@ TEST_CASE("JFJochBroker") { setup.set_images_per_trigger(5); setup.set_photon_energy_kev(12.4); setup.set_data_file_count(5); - setup.set_summation(1); REQUIRE(broker.Start(nullptr, &setup, nullptr).ok()); REQUIRE(broker.Stop(nullptr, nullptr, nullptr).ok()); diff --git a/tests/JFJochFullIntegrationTest.cpp b/tests/JFJochFullIntegrationTest.cpp index 0a7b196d..6066d838 100644 --- a/tests/JFJochFullIntegrationTest.cpp +++ b/tests/JFJochFullIntegrationTest.cpp @@ -68,7 +68,6 @@ TEST_CASE("JFJochIntegrationTest_ZMQ", "[JFJochReceiver]") { setup.set_file_prefix("integration_test"); setup.set_photon_energy_kev(12.4); setup.set_data_file_count(2); - setup.set_summation(1); REQUIRE_NOTHROW(state_machine.Start(setup)); logger.Info("Started measurement"); @@ -164,7 +163,6 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_save_calibration", "[JFJochReceiver]") { setup.set_file_prefix("integration_test_with_calibration"); setup.set_photon_energy_kev(12.4); setup.set_data_file_count(2); - setup.set_summation(1); setup.set_save_calibration(true); REQUIRE_NOTHROW(state_machine.Start(setup)); @@ -261,7 +259,6 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_2DataStreams_4Devices", "[JFJochReceiver]") setup.set_file_prefix("integration_test"); setup.set_photon_energy_kev(12.4); setup.set_data_file_count(2); - setup.set_summation(1); REQUIRE_NOTHROW(state_machine.Start(setup)); logger.Info("Started measurement"); @@ -303,120 +300,6 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_2DataStreams_4Devices", "[JFJochReceiver]") writer_server->Shutdown(); } - -TEST_CASE("JFJochIntegrationTest_ZMQ_2Devices_Summation100", "[JFJochReceiver]") { - Logger logger("JFJochIntegrationTest_ZMQ_2Devices_Summation100"); - ZMQContext zmq_context; - - RegisterHDF5Filter(); - - int64_t nimages = 1; - int64_t ndatastream = 2; - int64_t nmodules = 2; - int64_t summation = 100; - - JFJochServices services(logger); - JFJochStateMachine state_machine(services, logger); - - REQUIRE(!state_machine.GetMeasurementStatistics().has_value()); - - state_machine.AddDetectorSetup(DetectorGeometry(ndatastream * nmodules, 1, 0, 0, false)); - - state_machine.NotThreadSafe_Experiment().DataStreams(ndatastream); - state_machine.NotThreadSafe_Experiment().PedestalG0Frames(0).PedestalG1Frames(0).PedestalG2Frames(0); - services.Writer("unix:writer_test", "inproc://#1").Receiver("unix:fpga_receiver_test"); - - logger.Verbose(true); - - std::vector image(RAW_MODULE_SIZE); - for (int i = 0; i < image.size(); i++) - image[i] = (i*7+i*i*3) % 29; - - std::vector> aq_devices; - - for (int i = 0; i < 2; i++) { - auto *test = new MockAcquisitionDevice(i, 512); - aq_devices.emplace_back(test); - } - - std::vector tmp_devices; - for (const auto &i: aq_devices) - tmp_devices.emplace_back(i.get()); - - ZMQImagePusher pusher(zmq_context, {"inproc://#1"}); - JFJochReceiverService fpga_receiver(tmp_devices, logger, pusher); - - ZMQPreviewPublisher preview(zmq_context, "inproc://#2"); - fpga_receiver.PreviewPublisher(&preview); - - JFJochWriterService writer(zmq_context, logger); - - auto fpga_receiver_server = gRPCServer("unix:fpga_receiver_test", fpga_receiver); - auto writer_server = gRPCServer("unix:writer_test", writer); - - REQUIRE_NOTHROW(state_machine.Initialize()); - logger.Info("Initialized"); - - JFJochProtoBuf::DatasetSettings setup; - setup.set_ntrigger(1); - setup.set_images_per_trigger(1); - setup.set_detector_distance_mm(100); - setup.set_file_prefix("integration_test_summation"); - setup.set_photon_energy_kev(12.4); - setup.set_data_file_count(2); - setup.set_summation(summation); - - REQUIRE_NOTHROW(state_machine.Start(setup)); - logger.Info("Started measurement"); - - JFJochProtoBuf::BrokerStatus status; - status = state_machine.GetStatus(); - REQUIRE(status.progress() == Approx(0.0)); - REQUIRE(status.broker_state() == JFJochProtoBuf::DATA_COLLECTION); - - for (int i = 0; i < ndatastream; i++) { - for (int m = 0; m < nmodules; m++) { - for (int image_num = 1; image_num <= nimages*summation; image_num++) - aq_devices[i]->AddModule(image_num, m, image.data()); - } - aq_devices[i]->Terminate(); - } - - REQUIRE_NOTHROW(state_machine.Stop()); - logger.Info("Stopped measurement"); - - status = state_machine.GetStatus(); - REQUIRE(status.broker_state() == JFJochProtoBuf::IDLE); - - auto tmp = state_machine.GetMeasurementStatistics(); - REQUIRE(tmp.has_value()); - auto statistics = tmp.value(); - - REQUIRE(statistics.collection_efficiency() == 1.0); - REQUIRE(statistics.images_collected() == 1); - REQUIRE(statistics.images_written() == 1); - REQUIRE(statistics.max_image_number_sent() == 0); - REQUIRE(!statistics.cancelled()); - REQUIRE(statistics.file_prefix() == "integration_test_summation"); - REQUIRE(statistics.detector_width() == 1030); - REQUIRE(statistics.detector_height() == 514*4); - REQUIRE(statistics.detector_pixel_depth() == 4); - - auto preview_image = services.GetPreviewFrame(); - REQUIRE(preview_image.pixel_depth() == sizeof(int32_t)); - REQUIRE(preview_image.data().size() == 514*1030*ndatastream*nmodules*sizeof(int32_t)); - auto preview_image_content = (int32_t *) preview_image.data().data(); - REQUIRE(preview_image_content[0] == image[0] * summation); - REQUIRE(preview_image_content[5] == image[5] * summation); - REQUIRE(preview_image_content[36+302*1030] == image[36+300*1024] * summation); - - REQUIRE(preview_image_content[514*1030*2+7] == image[7] * summation); - - REQUIRE(preview_image_content[514*1030*3+1030*200+7] == image[7+1024*200] * summation); - fpga_receiver_server->Shutdown(); - writer_server->Shutdown(); -} - TEST_CASE("JFJochIntegrationTest_ZMQ_RAW", "[JFJochReceiver]") { Logger logger("JFJochIntegrationTest_ZMQ"); ZMQContext zmq_context; @@ -474,7 +357,6 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_RAW", "[JFJochReceiver]") { setup.set_images_per_trigger(5); setup.set_photon_energy_kev(12.4); setup.set_data_file_count(5); - setup.set_summation(1); REQUIRE_NOTHROW(state_machine.Start(setup)); logger.Info("Started measurement"); @@ -574,7 +456,6 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_3Writers", "[JFJochReceiver]") { setup.set_images_per_trigger(nimages); setup.set_photon_energy_kev(12.4); setup.set_data_file_count(5); - setup.set_summation(1); REQUIRE_NOTHROW(state_machine.Start(setup)); logger.Info("Started measurement"); @@ -669,7 +550,6 @@ TEST_CASE("JFJochIntegrationTest_Cancel", "[JFJochReceiver]") { setup.set_file_prefix("integration_test"); setup.set_images_per_trigger(2 * nimages); setup.set_photon_energy_kev(12.4); - setup.set_summation(1); setup.set_data_file_count(1); REQUIRE_NOTHROW(state_machine.Start(setup)); @@ -695,87 +575,6 @@ TEST_CASE("JFJochIntegrationTest_Cancel", "[JFJochReceiver]") { writer_server->Shutdown(); } -TEST_CASE("JFJochIntegrationTest_Cancel_Summation100", "[JFJochReceiver]") { - Logger logger("JFJochIntegrationTest_Cancel_Summation100"); - - ZMQContext zmq_context; - - RegisterHDF5Filter(); - - int64_t nimages = 5; - int64_t ndatastream = 2; - int64_t nmodules = 4; - - JFJochServices services(logger); - JFJochStateMachine state_machine(services, logger); - state_machine.AddDetectorSetup(DetectorGeometry(ndatastream * nmodules, 2, 8, 36)); - - state_machine.NotThreadSafe_Experiment().DataStreams(ndatastream).Summation(200); - state_machine.NotThreadSafe_Experiment().PedestalG0Frames(0).PedestalG1Frames(0).PedestalG2Frames(0); - services.Writer("unix:writer_test", "inproc://#1").Receiver("unix:fpga_receiver_test"); - - logger.Verbose(true); - - std::vector image(RAW_MODULE_SIZE); - - std::vector> aq_devices; - - for (int i = 0; i < ndatastream; i++) { - auto *test = new MockAcquisitionDevice(i, 1024); - test->EnableLogging(&logger); - for (int m = 0; m < state_machine.NotThreadSafe_Experiment().GetModulesNum(i); m++) { - for (int frame = 1; frame <= 2*100+5; frame++) - test->AddModule(frame, m, image.data()); - } - aq_devices.emplace_back(test); - } - - std::vector tmp_devices; - for (const auto &i: aq_devices) - tmp_devices.emplace_back(i.get()); - - ZMQImagePusher pusher(zmq_context, {"inproc://#1"}); - JFJochReceiverService fpga_receiver(tmp_devices, logger, pusher); - JFJochWriterService writer(zmq_context, logger); - - auto fpga_receiver_server = gRPCServer("unix:fpga_receiver_test", fpga_receiver); - auto writer_server = gRPCServer("unix:writer_test", writer); - - REQUIRE_NOTHROW(state_machine.Initialize()); - logger.Info("Initialized"); - - JFJochProtoBuf::DatasetSettings setup; - setup.set_ntrigger(1); - setup.set_detector_distance_mm(100); - setup.set_file_prefix("integration_test_sum100"); - setup.set_images_per_trigger(2 * nimages); - setup.set_photon_energy_kev(12.4); - setup.set_summation(100); - setup.set_data_file_count(1); - - REQUIRE_NOTHROW(state_machine.Start(setup)); - logger.Info("Started measurement"); - - logger.Info("Cancelling"); - REQUIRE_NOTHROW(state_machine.Cancel()); - REQUIRE_NOTHROW(state_machine.Stop()); - logger.Info("Stopped measurement"); - - auto tmp = state_machine.GetMeasurementStatistics(); - REQUIRE(tmp.has_value()); - auto statistics = tmp.value(); - - CHECK(statistics.collection_efficiency() == 0.205f); - CHECK(statistics.images_collected() == 3); - CHECK(statistics.has_images_written()); - CHECK(statistics.images_written() == 3); - CHECK(statistics.max_image_number_sent() == 2); - CHECK(statistics.cancelled()); - - fpga_receiver_server->Shutdown(); - writer_server->Shutdown(); -} - TEST_CASE("JFJochIntegrationTest_ZMQ_with_preview", "[JFJochReceiver]") { Logger logger("JFJochIntegrationTest_ZMQ_with_preview"); @@ -839,7 +638,6 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_with_preview", "[JFJochReceiver]") { setup.set_images_per_trigger(5); setup.set_photon_energy_kev(12.4); setup.set_beam_x_pxl(123.0); - setup.set_summation(1); setup.set_data_file_count(1); REQUIRE_NOTHROW(state_machine.Start(setup)); @@ -960,7 +758,6 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_with_preview_no_writer", "[JFJochReceiver]" setup.set_photon_energy_kev(12.4); setup.set_beam_x_pxl(123.0); setup.set_beam_y_pxl(878.0); - setup.set_summation(1); setup.set_data_file_count(1); REQUIRE_NOTHROW(state_machine.Start(setup)); @@ -1086,7 +883,6 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot", "[JFJochReceiver]") { JFJochProtoBuf::DatasetSettings setup; setup.set_ntrigger(1); setup.set_detector_distance_mm(75); - setup.set_summation(1); setup.set_file_prefix("spot_finding_test"); setup.set_images_per_trigger(nimages); setup.set_photon_energy_kev(12.4); @@ -1204,8 +1000,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index", "[JFJochReceiver] JFJochProtoBuf::DatasetSettings setup; setup.set_ntrigger(1); setup.set_detector_distance_mm(75); - setup.set_summation(1); - setup.set_file_prefix("spot_finding_test"); + setup.set_file_prefix("spot_finding_test"); setup.set_images_per_trigger(nimages); setup.set_photon_energy_kev(12.4); setup.set_beam_x_pxl(1090); @@ -1326,7 +1121,6 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_rad_int", "[JFJochReceiver]") { JFJochProtoBuf::DatasetSettings setup; setup.set_ntrigger(1); setup.set_detector_distance_mm(75); - setup.set_summation(1); setup.set_file_prefix("spot_finding_test"); setup.set_images_per_trigger(nimages); setup.set_photon_energy_kev(12.4); diff --git a/tests/RawToConvertedGeometryTest.cpp b/tests/RawToConvertedGeometryTest.cpp index 2572c198..60642308 100644 --- a/tests/RawToConvertedGeometryTest.cpp +++ b/tests/RawToConvertedGeometryTest.cpp @@ -151,8 +151,7 @@ TEST_CASE("RawToConvertedGeometry_Transform_AdjustMultipixels","[RawToConvertedG DiffractionExperiment x(DetectorGeometry(20, 2, 0, 0, false)); x.DataStreams(4); - x.Mode(DetectorMode::Conversion); - x.Summation(2); // Ensure the image is 32-bit + x.Mode(DetectorMode::Conversion).FPGAOutputMode(JFJochProtoBuf::INT32); REQUIRE(x.GetPixelDepth() == 4); REQUIRE(x.GetModulesNum(0) == 5); diff --git a/tests/ZMQPreviewPublisherTest.cpp b/tests/ZMQPreviewPublisherTest.cpp index 6986a70d..e29472e6 100644 --- a/tests/ZMQPreviewPublisherTest.cpp +++ b/tests/ZMQPreviewPublisherTest.cpp @@ -69,7 +69,7 @@ TEST_CASE("ZMQPreviewPublisher_FrameNumbers","[ZMQ]") { socket.SubscribeAll(); DiffractionExperiment experiment(DetectorGeometry(1, 1, 0, 0, false)); - experiment.PreviewPeriod(std::chrono::milliseconds(10)).ImageTimeUs(std::chrono::milliseconds(1)); + experiment.PreviewPeriod(std::chrono::milliseconds(10)); REQUIRE(experiment.GetPreviewStride() == 10); JFCalibration calibration(experiment); diff --git a/tests/ZSTDCompressorTest.cpp b/tests/ZSTDCompressorTest.cpp index 3fa76ae7..e665e68e 100644 --- a/tests/ZSTDCompressorTest.cpp +++ b/tests/ZSTDCompressorTest.cpp @@ -227,7 +227,7 @@ TEST_CASE("JFjochZstdCompressor_Frame_ones","[ZSTD]") { TEST_CASE("JFJochCompressor_JFJochDecompressor_ZSTD","[ZSTD]") { DiffractionExperiment x(DetectorGeometry(8, 2, 8, 36)); - x.Compression(JFJochProtoBuf::BSHUF_ZSTD).Summation(34); + x.Compression(JFJochProtoBuf::BSHUF_ZSTD).FPGAOutputMode(JFJochProtoBuf::INT32); std::vector image(x.GetPixelsNum()); @@ -249,7 +249,7 @@ TEST_CASE("JFJochCompressor_JFJochDecompressor_ZSTD","[ZSTD]") { TEST_CASE("JFJochCompressor_JFJochDecompressor_LZ4","[ZSTD]") { DiffractionExperiment x(DetectorGeometry(8, 2, 8, 36)); - x.Compression(JFJochProtoBuf::BSHUF_LZ4).Summation(45); + x.Compression(JFJochProtoBuf::BSHUF_LZ4).FPGAOutputMode(JFJochProtoBuf::INT32); std::vector image(x.GetPixelsNum()); @@ -271,7 +271,7 @@ TEST_CASE("JFJochCompressor_JFJochDecompressor_LZ4","[ZSTD]") { TEST_CASE("JFJochDecompressor_None","[ZSTD]") { DiffractionExperiment x(DetectorGeometry(8, 2, 8, 36)); - x.Compression(JFJochProtoBuf::NO_COMPRESSION).Summation(45); + x.Compression(JFJochProtoBuf::NO_COMPRESSION).FPGAOutputMode(JFJochProtoBuf::INT32); std::vector image(x.GetPixelsNum()); for (auto &i: image)