From 25cb4df0bf2f3e144f95c4fdd2166889d703e92b Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Tue, 18 Apr 2023 13:55:43 +0200 Subject: [PATCH] JFJochReceiver: Give one plot at a time --- broker/JFJochBroker.cpp | 6 +- broker/JFJochBroker.h | 4 +- broker/JFJochServices.cpp | 11 +-- broker/JFJochServices.h | 2 +- broker/JFJochStateMachine.cpp | 4 +- broker/JFJochStateMachine.h | 2 +- common/DiffractionExperiment.cpp | 6 +- common/StatusVector.h | 14 +-- grpc/JFJochReceiverClient.cpp | 7 +- grpc/JFJochReceiverClient.h | 2 +- grpc/jfjoch.proto | 17 +++- python/jfjoch_grpc2http.py | 6 +- python/jfjoch_pb2.py | 130 ++++++++++++++-------------- python/jfjoch_pb2_grpc.py | 24 ++--- receiver/JFJochReceiver.cpp | 39 ++++++--- receiver/JFJochReceiver.h | 4 +- receiver/JFJochReceiverService.cpp | 8 +- receiver/JFJochReceiverService.h | 4 +- tests/DiffractionExperimentTest.cpp | 14 +-- tests/JFJochFullIntegrationTest.cpp | 26 ++++-- tests/StatusVectorTest.cpp | 8 ++ 21 files changed, 186 insertions(+), 152 deletions(-) diff --git a/broker/JFJochBroker.cpp b/broker/JFJochBroker.cpp index 2c57004c..203b2ac0 100644 --- a/broker/JFJochBroker.cpp +++ b/broker/JFJochBroker.cpp @@ -49,9 +49,9 @@ grpc::Status JFJochBroker::GetStatus(grpc::ServerContext *context, const JFJochP GRPC_RUN( *response = state_machine.GetStatus() ); } -grpc::Status JFJochBroker::GetPlots(grpc::ServerContext *context, const JFJochProtoBuf::Empty *request, - JFJochProtoBuf::ReceiverDataProcessingPlots *response) { - GRPC_RUN( *response = state_machine.GetPlots() ); +grpc::Status JFJochBroker::GetPlots(grpc::ServerContext *context, const JFJochProtoBuf::PlotRequest *request, + JFJochProtoBuf::Plot *response) { + GRPC_RUN( *response = state_machine.GetPlots(*request) ); } grpc::Status JFJochBroker::GetPreview(grpc::ServerContext *context, const JFJochProtoBuf::Empty *request, diff --git a/broker/JFJochBroker.h b/broker/JFJochBroker.h index a3167054..819b7921 100644 --- a/broker/JFJochBroker.h +++ b/broker/JFJochBroker.h @@ -41,8 +41,8 @@ public: grpc::Status GetStatus(grpc::ServerContext *context, const JFJochProtoBuf::Empty *request, JFJochProtoBuf::BrokerStatus *response) override; - grpc::Status GetPlots(grpc::ServerContext *context, const JFJochProtoBuf::Empty *request, - JFJochProtoBuf::ReceiverDataProcessingPlots *response) override; + grpc::Status GetPlots(grpc::ServerContext *context, const JFJochProtoBuf::PlotRequest *request, + JFJochProtoBuf::Plot *response) override; grpc::Status GetPreview(grpc::ServerContext *context, const JFJochProtoBuf::Empty *request, JFJochProtoBuf::PreviewFrame *response) override; diff --git a/broker/JFJochServices.cpp b/broker/JFJochServices.cpp index 2cae7409..4616d51b 100644 --- a/broker/JFJochServices.cpp +++ b/broker/JFJochServices.cpp @@ -143,16 +143,11 @@ JFJochProtoBuf::ReceiverStatus JFJochServices::GetReceiverStatus() { return receiver.GetStatus(); } -JFJochProtoBuf::ReceiverDataProcessingPlots JFJochServices::GetPlots() { +JFJochProtoBuf::Plot JFJochServices::GetPlots(const JFJochProtoBuf::PlotRequest &request) { try { - return receiver.GetPlots(); + return receiver.GetPlots(request); } catch (...) { - JFJochProtoBuf::ReceiverDataProcessingPlots plots; - *plots.mutable_indexing_rate() = JFJochProtoBuf::Plot(); - *plots.mutable_bkg_estimate() = JFJochProtoBuf::Plot(); - *plots.mutable_spot_count() = JFJochProtoBuf::Plot(); - *plots.mutable_radial_int_profile() = JFJochProtoBuf::Plot(); - return plots; + return JFJochProtoBuf::Plot(); } } diff --git a/broker/JFJochServices.h b/broker/JFJochServices.h index 450626f7..02de07c4 100644 --- a/broker/JFJochServices.h +++ b/broker/JFJochServices.h @@ -31,7 +31,7 @@ public: JFJochProtoBuf::ReceiverStatus GetReceiverStatus(); JFJochProtoBuf::PreviewFrame GetPreviewFrame(); - JFJochProtoBuf::ReceiverDataProcessingPlots GetPlots(); + JFJochProtoBuf::Plot GetPlots(const JFJochProtoBuf::PlotRequest &request); void SetDataProcessingSettings(const JFJochProtoBuf::DataProcessingSettings &settings); JFJochServices& Receiver(const std::string &addr); diff --git a/broker/JFJochStateMachine.cpp b/broker/JFJochStateMachine.cpp index d4efa1bb..12d81c7e 100644 --- a/broker/JFJochStateMachine.cpp +++ b/broker/JFJochStateMachine.cpp @@ -493,8 +493,8 @@ JFJochProtoBuf::BrokerStatus JFJochStateMachine::GetStatus() const { return ret; } -JFJochProtoBuf::ReceiverDataProcessingPlots JFJochStateMachine::GetPlots() const { - return services.GetPlots(); +JFJochProtoBuf::Plot JFJochStateMachine::GetPlots(const JFJochProtoBuf::PlotRequest &request) const { + return services.GetPlots(request); } void JFJochStateMachine::SetDataProcessingSettings(const JFJochProtoBuf::DataProcessingSettings &settings) { diff --git a/broker/JFJochStateMachine.h b/broker/JFJochStateMachine.h index 02114ca8..8fe056a8 100644 --- a/broker/JFJochStateMachine.h +++ b/broker/JFJochStateMachine.h @@ -84,7 +84,7 @@ public: JFJochProtoBuf::JFCalibrationStatistics GetCalibrationStatistics() const; JFJochProtoBuf::BrokerStatus GetStatus() const; - JFJochProtoBuf::ReceiverDataProcessingPlots GetPlots() const; + JFJochProtoBuf::Plot GetPlots(const JFJochProtoBuf::PlotRequest &request) const; JFJochProtoBuf::Image GetNeXusMask() const; JFJochProtoBuf::Image GetPedestalG0() const; diff --git a/common/DiffractionExperiment.cpp b/common/DiffractionExperiment.cpp index e4165620..b1b241ce 100644 --- a/common/DiffractionExperiment.cpp +++ b/common/DiffractionExperiment.cpp @@ -690,12 +690,10 @@ int64_t DiffractionExperiment::GetSpotFindingStride() const { } int64_t DiffractionExperiment::GetSpotFindingBin() const { - if (GetSpotFindingPeriod().count() <= 0) - return 100; - else if (GetSpotFindingPeriod().count() >= 1000*1000) + if (GetImageTime().count() >= 200*1000) return 1; else - return 1000*1000/(GetSpotFindingPeriod().count()); // 1 bin = 1 second + return 200*1000 / GetImageTime().count(); // 1 bin = 1 second } int64_t DiffractionExperiment::GetPreviewStride(std::chrono::microseconds period) const { diff --git a/common/StatusVector.h b/common/StatusVector.h index 4efaa4c2..980c8a40 100644 --- a/common/StatusVector.h +++ b/common/StatusVector.h @@ -11,7 +11,7 @@ #include #include "JFJochException.h" - +#include template class StatusVector { mutable std::mutex m; @@ -20,10 +20,10 @@ template class StatusVector { public: void AddElement(uint32_t id, T val) { std::unique_lock ul(m); - content[id] = val; if (id > max_id) max_id = id; + } [[nodiscard]] float Mean() const { @@ -47,8 +47,12 @@ public: "Bin number must be greater than zero"); std::vector ret; + + size_t elems = (max_id + 1) / bin_size + (((max_id + 1) % bin_size > 0) ? 1 : 0); + ret.resize(elems); + if (!content.empty()) { - for (int bin = 0; bin < max_id / bin_size + ((max_id % bin_size > 0) ? 1 : 0); bin++) { + for (int bin = 0; bin < elems; bin++) { double sum = 0; int64_t count = 0; @@ -61,9 +65,9 @@ public: } } if (count > 0) - ret.push_back(static_cast(sum / static_cast(count))); + ret[bin] = static_cast(sum / static_cast(count)); else - ret.push_back(0.0); + ret[bin] = 0.0; } } return ret; diff --git a/grpc/JFJochReceiverClient.cpp b/grpc/JFJochReceiverClient.cpp index ba38dcad..58f3520c 100644 --- a/grpc/JFJochReceiverClient.cpp +++ b/grpc/JFJochReceiverClient.cpp @@ -131,17 +131,16 @@ JFJochProtoBuf::ReceiverNetworkConfig JFJochReceiverClient::GetNetworkConfig() { return ret; } -JFJochProtoBuf::ReceiverDataProcessingPlots JFJochReceiverClient::GetPlots() { - JFJochProtoBuf::ReceiverDataProcessingPlots ret; +JFJochProtoBuf::Plot JFJochReceiverClient::GetPlots(const JFJochProtoBuf::PlotRequest &request) { + JFJochProtoBuf::Plot ret; if (_stub) { grpc::ClientContext context; JFJochProtoBuf::Empty empty; - auto status = _stub->GetDataProcessingPlots(&context, empty, &ret); + auto status = _stub->GetDataProcessingPlots(&context, request, &ret); if (!status.ok()) throw JFJochException(JFJochExceptionCategory::gRPCError, "JFJochReceiver: " + status.error_message()); } else { // TODO: Write some dummy plots } return ret; - } \ No newline at end of file diff --git a/grpc/JFJochReceiverClient.h b/grpc/JFJochReceiverClient.h index ca3591d0..9f6576ea 100644 --- a/grpc/JFJochReceiverClient.h +++ b/grpc/JFJochReceiverClient.h @@ -22,7 +22,7 @@ public: JFJochProtoBuf::ReceiverStatus GetStatus(); JFJochProtoBuf::PreviewFrame GetPreviewFrame(); JFJochProtoBuf::ReceiverNetworkConfig GetNetworkConfig(); - JFJochProtoBuf::ReceiverDataProcessingPlots GetPlots(); + JFJochProtoBuf::Plot GetPlots(const JFJochProtoBuf::PlotRequest& request); }; diff --git a/grpc/jfjoch.proto b/grpc/jfjoch.proto index 964328ad..d67449e8 100644 --- a/grpc/jfjoch.proto +++ b/grpc/jfjoch.proto @@ -260,6 +260,18 @@ message ReceiverStatus { optional float indexing_rate = 3; } +enum PlotType { + BKG_ESTIMATE = 0; + RAD_INT = 1; + SPOT_COUNT = 2; + INDEXING_RATE = 3; +} + +message PlotRequest { + PlotType type = 1; + uint64 binning = 2; +} + message ReceiverDataProcessingPlots { Plot bkg_estimate = 1; Plot radial_int_profile = 2; @@ -377,7 +389,6 @@ message DataProcessingSettings { optional float low_resolution_limit = 7; float bkg_estimate_low_q = 8; float bkg_estimate_high_q = 9; - optional int64 result_binning = 10; } message PreviewFrame { @@ -481,7 +492,7 @@ service gRPC_JFJochReceiver { rpc Stop (Empty) returns (ReceiverOutput) {} rpc GetStatus (Empty) returns (ReceiverStatus) {} rpc SetDataProcessingSettings(DataProcessingSettings) returns (Empty) {} - rpc GetDataProcessingPlots(Empty) returns (ReceiverDataProcessingPlots) {} + rpc GetDataProcessingPlots(PlotRequest) returns (Plot) {} rpc GetPreviewFrame (Empty) returns (PreviewFrame) {} rpc GetNetworkConfig (Empty) returns (ReceiverNetworkConfig) {} } @@ -517,7 +528,7 @@ service gRPC_JFJochBroker { rpc GetMeasurementStatistics (Empty) returns (MeasurementStatistics) {} rpc GetDataProcessingSettings (Empty) returns (DataProcessingSettings) {} rpc PutDataProcessingSettings (DataProcessingSettings) returns (Empty) {} - rpc GetPlots (Empty) returns (ReceiverDataProcessingPlots) {} + rpc GetPlots (PlotRequest) returns (Plot) {} rpc GetPreview (Empty) returns (PreviewFrame) {} rpc GetPedestalG0 (Empty) returns (Image) {} diff --git a/python/jfjoch_grpc2http.py b/python/jfjoch_grpc2http.py index 48d0cb8b..ce56980d 100644 --- a/python/jfjoch_grpc2http.py +++ b/python/jfjoch_grpc2http.py @@ -174,12 +174,12 @@ async def put_data_processing_settings(data: str = Body(...)): raise HTTPException(status_code=400, detail=e.details()) -@app.get("/data_processing/plots") -async def get_settings(): +@app.post("/data_processing/plots") +async def get_settings(data: str = Body(...)): try: stub = jfjoch_pb2_grpc.gRPC_JFJochBrokerStub(channel) return MessageToDict( - stub.GetPlots(jfjoch_pb2.Empty()), including_default_value_fields=True + stub.GetPlots(Parse(data, jfjoch_pb2.PlotRequest())), including_default_value_fields=True ) except grpc.RpcError as e: raise HTTPException(status_code=400, detail=e.details()) diff --git a/python/jfjoch_pb2.py b/python/jfjoch_pb2.py index 4235a374..17de0769 100644 --- a/python/jfjoch_pb2.py +++ b/python/jfjoch_pb2.py @@ -13,7 +13,7 @@ _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\"\xa5\x04\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\x36\n\x11scattering_vector\x18\x0f \x01(\x0b\x32\x16.JFJochProtoBuf.VectorH\x02\x88\x01\x01\x12\x18\n\x10\x61pply_pixel_mask\x18\x10 \x01(\x08\x12\x12\n\nbinning2x2\x18\x11 \x01(\x08\x42\x08\n\x06timingB\x0c\n\n_unit_cellB\x14\n\x12_scattering_vector\"\xf6\x02\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\x19\n\x11use_storage_cells\x18\x03 \x01(\x08\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\x19\n\x11\x63onversion_on_cpu\x18\t \x01(\x08\x42\x10\n\x0e_count_time_usB\x15\n\x13_pedestal_g0_framesB\x15\n\x13_pedestal_g1_framesB\x15\n\x13_pedestal_g2_frames\"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\"\xc1\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\"\xe1\x05\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\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\x1e\n\x16spot_finding_period_us\x18\x10 \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\x19\n\x11\x63onversion_on_cpu\x18\x1f \x01(\x08\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\"|\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\"\xaa\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\x42\x10\n\x0e_indexing_rate\"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\"\x93\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\x42\x0b\n\t_progressB\x10\n\x0e_indexing_rate\"\xd2\x01\n\x1bReceiverDataProcessingPlots\x12*\n\x0c\x62kg_estimate\x18\x01 \x01(\x0b\x32\x14.JFJochProtoBuf.Plot\x12\x30\n\x12radial_int_profile\x18\x02 \x01(\x0b\x32\x14.JFJochProtoBuf.Plot\x12(\n\nspot_count\x18\x03 \x01(\x0b\x32\x14.JFJochProtoBuf.Plot\x12+\n\rindexing_rate\x18\x04 \x01(\x0b\x32\x14.JFJochProtoBuf.Plot\">\n\x0bWriterInput\x12\x1c\n\x14zmq_receiver_address\x18\x01 \x01(\t\x12\x11\n\tseries_id\x18\x02 \x01(\x03\"P\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\"\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\"\xf9\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\x1a\n\x12storage_cell_delay\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\"\xae\x08\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?\n\x0b\x66ifo_status\x18\x0e \x03(\x0b\x32*.JFJochProtoBuf.FPGAStatus.FifoStatusEntry\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\x1c\n\x14\x64\x61tamover_mm2s_error\x18\x13 \x01(\x08\x12\x1c\n\x14\x64\x61tamover_s2mm_error\x18\x14 \x01(\x08\x12&\n\x1e\x66rame_statistics_alignment_err\x18\x15 \x01(\x08\x12\"\n\x1a\x66rame_statistics_tlast_err\x18\x16 \x01(\x08\x12%\n\x1d\x66rame_statistics_work_req_err\x18\x17 \x01(\x08\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\x1aQ\n\x0f\x46ifoStatusEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12-\n\x05value\x18\x02 \x01(\x0e\x32\x1e.JFJochProtoBuf.FPGAFIFOStatus:\x02\x38\x01\"I\n\x1aIndexerDataProcessingPlots\x12+\n\rindexing_rate\x18\x01 \x01(\x0b\x32\x14.JFJochProtoBuf.Plot\"\x8a\x03\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\x1b\n\x0eresult_binning\x18\n \x01(\x03H\x02\x88\x01\x01\x42\x18\n\x16_high_resolution_limitB\x17\n\x15_low_resolution_limitB\x11\n\x0f_result_binning\"\x8d\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(\x0cJ\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\"\xfc\x03\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\x42\x19\n\x17_writer_performance_MBsB\x11\n\x0f_images_writtenB\x10\n\x0e_indexing_rateB\x1a\n\x18_indexing_performance_ms\"\x8d\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\x42\x0b\n\t_progressB\x10\n\x0e_indexing_rate\"\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*2\n\x0e\x46PGAFIFOStatus\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\x32\xac\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\x12^\n\x16GetDataProcessingPlots\x12\x15.JFJochProtoBuf.Empty\x1a+.JFJochProtoBuf.ReceiverDataProcessingPlots\"\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\xc6\x0c\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\x12P\n\x08GetPlots\x12\x15.JFJochProtoBuf.Empty\x1a+.JFJochProtoBuf.ReceiverDataProcessingPlots\"\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\"\xa5\x04\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\x36\n\x11scattering_vector\x18\x0f \x01(\x0b\x32\x16.JFJochProtoBuf.VectorH\x02\x88\x01\x01\x12\x18\n\x10\x61pply_pixel_mask\x18\x10 \x01(\x08\x12\x12\n\nbinning2x2\x18\x11 \x01(\x08\x42\x08\n\x06timingB\x0c\n\n_unit_cellB\x14\n\x12_scattering_vector\"\xf6\x02\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\x19\n\x11use_storage_cells\x18\x03 \x01(\x08\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\x19\n\x11\x63onversion_on_cpu\x18\t \x01(\x08\x42\x10\n\x0e_count_time_usB\x15\n\x13_pedestal_g0_framesB\x15\n\x13_pedestal_g1_framesB\x15\n\x13_pedestal_g2_frames\"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\"\xc1\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\"\xe1\x05\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\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\x1e\n\x16spot_finding_period_us\x18\x10 \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\x19\n\x11\x63onversion_on_cpu\x18\x1f \x01(\x08\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\"|\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\"\xaa\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\x42\x10\n\x0e_indexing_rate\"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\"\x93\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\x42\x0b\n\t_progressB\x10\n\x0e_indexing_rate\"F\n\x0bPlotRequest\x12&\n\x04type\x18\x01 \x01(\x0e\x32\x18.JFJochProtoBuf.PlotType\x12\x0f\n\x07\x62inning\x18\x02 \x01(\x04\"\xd2\x01\n\x1bReceiverDataProcessingPlots\x12*\n\x0c\x62kg_estimate\x18\x01 \x01(\x0b\x32\x14.JFJochProtoBuf.Plot\x12\x30\n\x12radial_int_profile\x18\x02 \x01(\x0b\x32\x14.JFJochProtoBuf.Plot\x12(\n\nspot_count\x18\x03 \x01(\x0b\x32\x14.JFJochProtoBuf.Plot\x12+\n\rindexing_rate\x18\x04 \x01(\x0b\x32\x14.JFJochProtoBuf.Plot\">\n\x0bWriterInput\x12\x1c\n\x14zmq_receiver_address\x18\x01 \x01(\t\x12\x11\n\tseries_id\x18\x02 \x01(\x03\"P\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\"\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\"\xf9\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\x1a\n\x12storage_cell_delay\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\"\xae\x08\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?\n\x0b\x66ifo_status\x18\x0e \x03(\x0b\x32*.JFJochProtoBuf.FPGAStatus.FifoStatusEntry\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\x1c\n\x14\x64\x61tamover_mm2s_error\x18\x13 \x01(\x08\x12\x1c\n\x14\x64\x61tamover_s2mm_error\x18\x14 \x01(\x08\x12&\n\x1e\x66rame_statistics_alignment_err\x18\x15 \x01(\x08\x12\"\n\x1a\x66rame_statistics_tlast_err\x18\x16 \x01(\x08\x12%\n\x1d\x66rame_statistics_work_req_err\x18\x17 \x01(\x08\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\x1aQ\n\x0f\x46ifoStatusEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12-\n\x05value\x18\x02 \x01(\x0e\x32\x1e.JFJochProtoBuf.FPGAFIFOStatus:\x02\x38\x01\"I\n\x1aIndexerDataProcessingPlots\x12+\n\rindexing_rate\x18\x01 \x01(\x0b\x32\x14.JFJochProtoBuf.Plot\"\xda\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\x42\x18\n\x16_high_resolution_limitB\x17\n\x15_low_resolution_limit\"\x8d\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(\x0cJ\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\"\xfc\x03\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\x42\x19\n\x17_writer_performance_MBsB\x11\n\x0f_images_writtenB\x10\n\x0e_indexing_rateB\x1a\n\x18_indexing_performance_ms\"\x8d\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\x42\x0b\n\t_progressB\x10\n\x0e_indexing_rate\"\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*2\n\x0e\x46PGAFIFOStatus\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*L\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\x32\x9b\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\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\xb5\x0c\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\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()) @@ -22,16 +22,18 @@ if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None _FPGASTATUS_FIFOSTATUSENTRY._options = None _FPGASTATUS_FIFOSTATUSENTRY._serialized_options = b'8\001' - _COMPRESSION._serialized_start=8375 - _COMPRESSION._serialized_end=8459 - _DETECTORTYPE._serialized_start=8461 - _DETECTORTYPE._serialized_end=8500 - _DETECTORMODE._serialized_start=8502 - _DETECTORMODE._serialized_end=8592 - _FPGAFIFOSTATUS._serialized_start=8594 - _FPGAFIFOSTATUS._serialized_end=8644 - _STATE._serialized_start=8646 - _STATE._serialized_end=8740 + _COMPRESSION._serialized_start=8399 + _COMPRESSION._serialized_end=8483 + _DETECTORTYPE._serialized_start=8485 + _DETECTORTYPE._serialized_end=8524 + _DETECTORMODE._serialized_start=8526 + _DETECTORMODE._serialized_end=8616 + _FPGAFIFOSTATUS._serialized_start=8618 + _FPGAFIFOSTATUS._serialized_end=8668 + _STATE._serialized_start=8670 + _STATE._serialized_end=8764 + _PLOTTYPE._serialized_start=8766 + _PLOTTYPE._serialized_end=8842 _EMPTY._serialized_start=32 _EMPTY._serialized_end=39 _UNITCELL._serialized_start=41 @@ -76,56 +78,58 @@ if _descriptor._USE_C_DESCRIPTORS == False: _RECEIVERNETWORKCONFIG._serialized_end=3906 _RECEIVERSTATUS._serialized_start=3909 _RECEIVERSTATUS._serialized_end=4056 - _RECEIVERDATAPROCESSINGPLOTS._serialized_start=4059 - _RECEIVERDATAPROCESSINGPLOTS._serialized_end=4269 - _WRITERINPUT._serialized_start=4271 - _WRITERINPUT._serialized_end=4333 - _WRITEROUTPUT._serialized_start=4335 - _WRITEROUTPUT._serialized_end=4415 - _DETECTORMODULECONFIG._serialized_start=4418 - _DETECTORMODULECONFIG._serialized_end=4676 - _DETECTORCONFIG._serialized_start=4678 - _DETECTORCONFIG._serialized_end=4774 - _DETECTORINPUT._serialized_start=4777 - _DETECTORINPUT._serialized_end=5026 - _DETECTOROUTPUT._serialized_start=5028 - _DETECTOROUTPUT._serialized_end=5044 - _DETECTORSTATUS._serialized_start=5046 - _DETECTORSTATUS._serialized_end=5144 - _FPGASTATUS._serialized_start=5147 - _FPGASTATUS._serialized_end=6217 - _FPGASTATUS_FIFOSTATUSENTRY._serialized_start=6136 - _FPGASTATUS_FIFOSTATUSENTRY._serialized_end=6217 - _INDEXERDATAPROCESSINGPLOTS._serialized_start=6219 - _INDEXERDATAPROCESSINGPLOTS._serialized_end=6292 - _DATAPROCESSINGSETTINGS._serialized_start=6295 - _DATAPROCESSINGSETTINGS._serialized_end=6689 - _PREVIEWFRAME._serialized_start=6692 - _PREVIEWFRAME._serialized_end=6961 - _MODULESTATISTICS._serialized_start=6964 - _MODULESTATISTICS._serialized_end=7201 - _IMAGE._serialized_start=7203 - _IMAGE._serialized_end=7276 - _MASKTOLOAD._serialized_start=7278 - _MASKTOLOAD._serialized_end=7324 - _MEASUREMENTSTATISTICS._serialized_start=7327 - _MEASUREMENTSTATISTICS._serialized_end=7835 - _BROKERSTATUS._serialized_start=7838 - _BROKERSTATUS._serialized_end=7979 - _BROKERFULLSTATUS._serialized_start=7982 - _BROKERFULLSTATUS._serialized_end=8146 - _DETECTORLISTELEMENT._serialized_start=8148 - _DETECTORLISTELEMENT._serialized_end=8220 - _DETECTORLIST._serialized_start=8222 - _DETECTORLIST._serialized_end=8340 - _DETECTORSELECTION._serialized_start=8342 - _DETECTORSELECTION._serialized_end=8373 - _GRPC_JFJOCHRECEIVER._serialized_start=8743 - _GRPC_JFJOCHRECEIVER._serialized_end=9427 - _GRPC_JFJOCHWRITER._serialized_start=9430 - _GRPC_JFJOCHWRITER._serialized_end=9632 - _GRPC_JFJOCHDETECTOR._serialized_start=9635 - _GRPC_JFJOCHDETECTOR._serialized_end=10021 - _GRPC_JFJOCHBROKER._serialized_start=10024 - _GRPC_JFJOCHBROKER._serialized_end=11630 + _PLOTREQUEST._serialized_start=4058 + _PLOTREQUEST._serialized_end=4128 + _RECEIVERDATAPROCESSINGPLOTS._serialized_start=4131 + _RECEIVERDATAPROCESSINGPLOTS._serialized_end=4341 + _WRITERINPUT._serialized_start=4343 + _WRITERINPUT._serialized_end=4405 + _WRITEROUTPUT._serialized_start=4407 + _WRITEROUTPUT._serialized_end=4487 + _DETECTORMODULECONFIG._serialized_start=4490 + _DETECTORMODULECONFIG._serialized_end=4748 + _DETECTORCONFIG._serialized_start=4750 + _DETECTORCONFIG._serialized_end=4846 + _DETECTORINPUT._serialized_start=4849 + _DETECTORINPUT._serialized_end=5098 + _DETECTOROUTPUT._serialized_start=5100 + _DETECTOROUTPUT._serialized_end=5116 + _DETECTORSTATUS._serialized_start=5118 + _DETECTORSTATUS._serialized_end=5216 + _FPGASTATUS._serialized_start=5219 + _FPGASTATUS._serialized_end=6289 + _FPGASTATUS_FIFOSTATUSENTRY._serialized_start=6208 + _FPGASTATUS_FIFOSTATUSENTRY._serialized_end=6289 + _INDEXERDATAPROCESSINGPLOTS._serialized_start=6291 + _INDEXERDATAPROCESSINGPLOTS._serialized_end=6364 + _DATAPROCESSINGSETTINGS._serialized_start=6367 + _DATAPROCESSINGSETTINGS._serialized_end=6713 + _PREVIEWFRAME._serialized_start=6716 + _PREVIEWFRAME._serialized_end=6985 + _MODULESTATISTICS._serialized_start=6988 + _MODULESTATISTICS._serialized_end=7225 + _IMAGE._serialized_start=7227 + _IMAGE._serialized_end=7300 + _MASKTOLOAD._serialized_start=7302 + _MASKTOLOAD._serialized_end=7348 + _MEASUREMENTSTATISTICS._serialized_start=7351 + _MEASUREMENTSTATISTICS._serialized_end=7859 + _BROKERSTATUS._serialized_start=7862 + _BROKERSTATUS._serialized_end=8003 + _BROKERFULLSTATUS._serialized_start=8006 + _BROKERFULLSTATUS._serialized_end=8170 + _DETECTORLISTELEMENT._serialized_start=8172 + _DETECTORLISTELEMENT._serialized_end=8244 + _DETECTORLIST._serialized_start=8246 + _DETECTORLIST._serialized_end=8364 + _DETECTORSELECTION._serialized_start=8366 + _DETECTORSELECTION._serialized_end=8397 + _GRPC_JFJOCHRECEIVER._serialized_start=8845 + _GRPC_JFJOCHRECEIVER._serialized_end=9512 + _GRPC_JFJOCHWRITER._serialized_start=9515 + _GRPC_JFJOCHWRITER._serialized_end=9717 + _GRPC_JFJOCHDETECTOR._serialized_start=9720 + _GRPC_JFJOCHDETECTOR._serialized_end=10106 + _GRPC_JFJOCHBROKER._serialized_start=10109 + _GRPC_JFJOCHBROKER._serialized_end=11698 # @@protoc_insertion_point(module_scope) diff --git a/python/jfjoch_pb2_grpc.py b/python/jfjoch_pb2_grpc.py index b2c46b89..b1490e11 100644 --- a/python/jfjoch_pb2_grpc.py +++ b/python/jfjoch_pb2_grpc.py @@ -46,8 +46,8 @@ class gRPC_JFJochReceiverStub(object): ) self.GetDataProcessingPlots = channel.unary_unary( '/JFJochProtoBuf.gRPC_JFJochReceiver/GetDataProcessingPlots', - request_serializer=jfjoch__pb2.Empty.SerializeToString, - response_deserializer=jfjoch__pb2.ReceiverDataProcessingPlots.FromString, + request_serializer=jfjoch__pb2.PlotRequest.SerializeToString, + response_deserializer=jfjoch__pb2.Plot.FromString, ) self.GetPreviewFrame = channel.unary_unary( '/JFJochProtoBuf.gRPC_JFJochReceiver/GetPreviewFrame', @@ -153,8 +153,8 @@ def add_gRPC_JFJochReceiverServicer_to_server(servicer, server): ), 'GetDataProcessingPlots': grpc.unary_unary_rpc_method_handler( servicer.GetDataProcessingPlots, - request_deserializer=jfjoch__pb2.Empty.FromString, - response_serializer=jfjoch__pb2.ReceiverDataProcessingPlots.SerializeToString, + request_deserializer=jfjoch__pb2.PlotRequest.FromString, + response_serializer=jfjoch__pb2.Plot.SerializeToString, ), 'GetPreviewFrame': grpc.unary_unary_rpc_method_handler( servicer.GetPreviewFrame, @@ -290,8 +290,8 @@ class gRPC_JFJochReceiver(object): timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/JFJochProtoBuf.gRPC_JFJochReceiver/GetDataProcessingPlots', - jfjoch__pb2.Empty.SerializeToString, - jfjoch__pb2.ReceiverDataProcessingPlots.FromString, + jfjoch__pb2.PlotRequest.SerializeToString, + jfjoch__pb2.Plot.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @@ -764,8 +764,8 @@ class gRPC_JFJochBrokerStub(object): ) self.GetPlots = channel.unary_unary( '/JFJochProtoBuf.gRPC_JFJochBroker/GetPlots', - request_serializer=jfjoch__pb2.Empty.SerializeToString, - response_deserializer=jfjoch__pb2.ReceiverDataProcessingPlots.FromString, + request_serializer=jfjoch__pb2.PlotRequest.SerializeToString, + response_deserializer=jfjoch__pb2.Plot.FromString, ) self.GetPreview = channel.unary_unary( '/JFJochProtoBuf.gRPC_JFJochBroker/GetPreview', @@ -1014,8 +1014,8 @@ def add_gRPC_JFJochBrokerServicer_to_server(servicer, server): ), 'GetPlots': grpc.unary_unary_rpc_method_handler( servicer.GetPlots, - request_deserializer=jfjoch__pb2.Empty.FromString, - response_serializer=jfjoch__pb2.ReceiverDataProcessingPlots.SerializeToString, + request_deserializer=jfjoch__pb2.PlotRequest.FromString, + response_serializer=jfjoch__pb2.Plot.SerializeToString, ), 'GetPreview': grpc.unary_unary_rpc_method_handler( servicer.GetPreview, @@ -1312,8 +1312,8 @@ class gRPC_JFJochBroker(object): timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/JFJochProtoBuf.gRPC_JFJochBroker/GetPlots', - jfjoch__pb2.Empty.SerializeToString, - jfjoch__pb2.ReceiverDataProcessingPlots.FromString, + jfjoch__pb2.PlotRequest.SerializeToString, + jfjoch__pb2.Plot.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/receiver/JFJochReceiver.cpp b/receiver/JFJochReceiver.cpp index 8ed847b6..1396204d 100644 --- a/receiver/JFJochReceiver.cpp +++ b/receiver/JFJochReceiver.cpp @@ -601,28 +601,39 @@ void JFJochReceiver::AddRadialIntegrationProfile(const std::vector &resul } } -void JFJochReceiver::GetRadialIntegrationProfile(JFJochProtoBuf::ReceiverDataProcessingPlots &plots) { +void JFJochReceiver::GetRadialIntegrationProfile(JFJochProtoBuf::Plot &plot) { std::unique_lock ul(rad_int_profile_mutex); - auto plot = plots.mutable_radial_int_profile(); + const auto &bin_to_q = rad_int_mapping->GetBinToQ(); if (!rad_int_profile.empty()) { - *plot->mutable_x() = {bin_to_q.begin(), bin_to_q.end()}; - *plot->mutable_y() = {rad_int_profile.begin(), rad_int_profile.end()}; + *plot.mutable_x() = {bin_to_q.begin(), bin_to_q.end()}; + *plot.mutable_y() = {rad_int_profile.begin(), rad_int_profile.end()}; } } - -JFJochProtoBuf::ReceiverDataProcessingPlots JFJochReceiver::GetPlots() { - JFJochProtoBuf::ReceiverDataProcessingPlots ret; - auto local_data_processing_settings = GetDataProcessingSettings(); +JFJochProtoBuf::Plot JFJochReceiver::GetPlots(const JFJochProtoBuf::PlotRequest &request) { + JFJochProtoBuf::Plot ret; auto nbins = experiment.GetSpotFindingBin(); - if (local_data_processing_settings.has_result_binning()) - nbins = local_data_processing_settings.result_binning(); + if (request.binning() > 0) + nbins = request.binning(); - spot_count.GetPlot(*ret.mutable_spot_count(), nbins); - bkg_estimate.GetPlot(*ret.mutable_bkg_estimate(), nbins); - indexing_solution.GetPlot(*ret.mutable_indexing_rate(), nbins); - GetRadialIntegrationProfile(ret); + switch (request.type()) { + case JFJochProtoBuf::RAD_INT: + GetRadialIntegrationProfile(ret); + break; + case JFJochProtoBuf::SPOT_COUNT: + spot_count.GetPlot(ret, nbins); + break; + case JFJochProtoBuf::INDEXING_RATE: + indexing_solution.GetPlot(ret, nbins); + break; + case JFJochProtoBuf::BKG_ESTIMATE: + bkg_estimate.GetPlot(ret, nbins); + break; + default: + // Do nothing + break; + } return ret; } diff --git a/receiver/JFJochReceiver.h b/receiver/JFJochReceiver.h index 98b5673a..e27fe77f 100644 --- a/receiver/JFJochReceiver.h +++ b/receiver/JFJochReceiver.h @@ -100,7 +100,7 @@ class JFJochReceiver { JFJochProtoBuf::DataProcessingSettings GetDataProcessingSettings(); void AddRadialIntegrationProfile(const std::vector &result); - void GetRadialIntegrationProfile(JFJochProtoBuf::ReceiverDataProcessingPlots &plots); + void GetRadialIntegrationProfile(JFJochProtoBuf::Plot &plots); void UpdateMaxImage(int64_t image_number); public: @@ -122,7 +122,7 @@ public: double GetIndexingRate() const; void SetDataProcessingSettings(const JFJochProtoBuf::DataProcessingSettings &data_processing_settings); - JFJochProtoBuf::ReceiverDataProcessingPlots GetPlots(); + JFJochProtoBuf::Plot GetPlots(const JFJochProtoBuf::PlotRequest& request); }; #endif //JUNGFRAUJOCH_JFJOCHRECEIVER_H diff --git a/receiver/JFJochReceiverService.cpp b/receiver/JFJochReceiverService.cpp index 951deb57..e4538039 100644 --- a/receiver/JFJochReceiverService.cpp +++ b/receiver/JFJochReceiverService.cpp @@ -129,12 +129,14 @@ grpc::Status JFJochReceiverService::GetStatus(grpc::ServerContext *context, cons } grpc::Status -JFJochReceiverService::GetDataProcessingPlots(grpc::ServerContext *context, const JFJochProtoBuf::Empty *request, - JFJochProtoBuf::ReceiverDataProcessingPlots *response) { +JFJochReceiverService::GetDataProcessingPlots(grpc::ServerContext *context, const JFJochProtoBuf::PlotRequest *request, + JFJochProtoBuf::Plot *response) { // Need to hold mutex, as receiver might not exist here, if state is idle std::unique_lock ul(state_mutex); + if (request->binning() <= 0) + return {grpc::StatusCode::ABORTED, "Binning must be > 0"}; if (receiver) - *response = receiver->GetPlots(); + *response = receiver->GetPlots(*request); return grpc::Status::OK; } diff --git a/receiver/JFJochReceiverService.h b/receiver/JFJochReceiverService.h index 2db7a090..c8e74e5a 100644 --- a/receiver/JFJochReceiverService.h +++ b/receiver/JFJochReceiverService.h @@ -47,8 +47,8 @@ public: JFJochProtoBuf::PreviewFrame *response) override; grpc::Status GetNetworkConfig(grpc::ServerContext *context, const JFJochProtoBuf::Empty *request, JFJochProtoBuf::ReceiverNetworkConfig *response) override; - grpc::Status GetDataProcessingPlots(grpc::ServerContext *context, const JFJochProtoBuf::Empty *request, - JFJochProtoBuf::ReceiverDataProcessingPlots *response) override; + grpc::Status GetDataProcessingPlots(grpc::ServerContext *context, const JFJochProtoBuf::PlotRequest *request, + JFJochProtoBuf::Plot *response) override; }; diff --git a/tests/DiffractionExperimentTest.cpp b/tests/DiffractionExperimentTest.cpp index eb961bd4..f0c3610b 100644 --- a/tests/DiffractionExperimentTest.cpp +++ b/tests/DiffractionExperimentTest.cpp @@ -440,6 +440,7 @@ TEST_CASE("DiffractionExperiment_SpotFinding", "[DiffractionExperiment]") { DiffractionExperiment x; std::map map, map2; x.ImagesPerTrigger(10000).Summation(1).FrameTime(1ms); + REQUIRE(x.GetSpotFindingBin() == 200); x.SpotFindingPeriod(0ms); REQUIRE(x.GetSpotFindingStride() == 0); REQUIRE(x.GetSpotFindingPeriod().count() == 0); @@ -447,19 +448,6 @@ TEST_CASE("DiffractionExperiment_SpotFinding", "[DiffractionExperiment]") { x.SpotFindingPeriod(1s); REQUIRE(x.GetSpotFindingPeriod() == std::chrono::milliseconds(1000)); REQUIRE(x.GetSpotFindingStride() == 1000); - REQUIRE(x.GetSpotFindingBin() == 1); - - x.SpotFindingPeriod(10s); - REQUIRE(x.GetSpotFindingBin() == 1); - - x.SpotFindingPeriod(10ms); - REQUIRE(x.GetSpotFindingBin() == 100); - - x.SpotFindingPeriod(4ms); - REQUIRE(x.GetSpotFindingBin() == 250); - - x.SpotFindingPeriod(50ms); - REQUIRE(x.GetSpotFindingBin() == 20); REQUIRE_THROWS(x.SpotFindingPeriod(-5ms)); diff --git a/tests/JFJochFullIntegrationTest.cpp b/tests/JFJochFullIntegrationTest.cpp index 00a4fbc6..d603b444 100644 --- a/tests/JFJochFullIntegrationTest.cpp +++ b/tests/JFJochFullIntegrationTest.cpp @@ -814,13 +814,27 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_background_estimation", "[JFJochReceiver]") REQUIRE_NOTHROW(state_machine.Stop()); logger.Info("Stopped measurement"); - JFJochProtoBuf::ReceiverDataProcessingPlots plots; - REQUIRE(fpga_receiver.GetDataProcessingPlots(nullptr, nullptr, &plots).ok()); + JFJochProtoBuf::PlotRequest req; + req.set_type(JFJochProtoBuf::BKG_ESTIMATE); + req.set_binning(10); - REQUIRE(plots.bkg_estimate().x_size() == 1); - REQUIRE(plots.bkg_estimate().y_size() == 1); - REQUIRE(plots.bkg_estimate().x(0) == Approx(4.5)); - REQUIRE(plots.bkg_estimate().y(0) == Approx((5 + 23) / 2.0)); + JFJochProtoBuf::Plot plot; + REQUIRE(fpga_receiver.GetDataProcessingPlots(nullptr, &req, &plot).ok()); + + REQUIRE(plot.x_size() == 1); + REQUIRE(plot.y_size() == 1); + REQUIRE(plot.x(0) == Approx(4.5)); + REQUIRE(plot.y(0) == Approx((5 + 23) / 2.0)); + + req.set_type(JFJochProtoBuf::BKG_ESTIMATE); + req.set_binning(1); + REQUIRE(fpga_receiver.GetDataProcessingPlots(nullptr, &req, &plot).ok()); + + REQUIRE(plot.x_size() == 10); + REQUIRE(plot.y_size() == 10); + + req.set_binning(0); + REQUIRE(!fpga_receiver.GetDataProcessingPlots(nullptr, &req, &plot).ok()); auto tmp = state_machine.GetMeasurementStatistics(); REQUIRE(tmp.has_value()); diff --git a/tests/StatusVectorTest.cpp b/tests/StatusVectorTest.cpp index 3034a488..05afa186 100644 --- a/tests/StatusVectorTest.cpp +++ b/tests/StatusVectorTest.cpp @@ -28,6 +28,14 @@ TEST_CASE("StatusVector_GetStatus","[StatusVector]") { REQUIRE(status_out[3] == 0); REQUIRE(status_out[4] == Approx(45)); REQUIRE(status_out[5] == Approx((44+41)/2.0)); + + status_out = status_vector.GetStatus(1); + REQUIRE(status_out.size() == 2601); + REQUIRE(status_out[5] == 11); + REQUIRE(status_out[1900] == 0); + REQUIRE(status_out[2000] == 45); + REQUIRE(status_out[2543] == 44); + REQUIRE(status_out[2600] == 41); } TEST_CASE("StatusVector_Plot","[StatusVector]") {