diff --git a/broker/JFJochBrokerParser.cpp b/broker/JFJochBrokerParser.cpp index 821ae5b2..d28d12f5 100644 --- a/broker/JFJochBrokerParser.cpp +++ b/broker/JFJochBrokerParser.cpp @@ -192,14 +192,14 @@ std::unique_ptr ParseZMQImagePusher(const org::openapitools::server } std::unique_ptr ParseTCPImagePusher(const org::openapitools::server::model::Jfjoch_settings &j) { - if (!j.zeromqIsSet()) - throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Socket settings must be provided"); + if (!j.tcpIsSet()) + throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "TCP/IP Socket settings must be provided"); std::optional send_buffer_size; - if (j.getZeromq().sendBufferSizeIsSet()) - send_buffer_size = j.getZeromq().getSendBufferSize(); + if (j.getTcp().sendBufferSizeIsSet()) + send_buffer_size = j.getTcp().getSendBufferSize(); - auto tmp = std::make_unique(j.getZeromq().getImageSocket(), send_buffer_size); + auto tmp = std::make_unique(j.getTcp().getAddr(), j.getTcp().getNwriters(), send_buffer_size); return std::move(tmp); } diff --git a/broker/JFJochStateMachine.cpp b/broker/JFJochStateMachine.cpp index dbc3e2f3..7092a98f 100644 --- a/broker/JFJochStateMachine.cpp +++ b/broker/JFJochStateMachine.cpp @@ -485,6 +485,7 @@ std::optional JFJochStateMachine::GetMeasurementStatistic tmp.saturated_pixels = rcv_status->saturated_pixels; tmp.roi_beam_sum = rcv_status->roi_beam_sum; tmp.roi_beam_npixel = rcv_status->roi_beam_npixel; + tmp.images_written = rcv_status->images_written; } return tmp; } diff --git a/broker/JFJochStateMachine.h b/broker/JFJochStateMachine.h index 3296769f..83e601df 100644 --- a/broker/JFJochStateMachine.h +++ b/broker/JFJochStateMachine.h @@ -46,6 +46,8 @@ struct MeasurementStatistics { int64_t images_collected; int64_t images_sent; int64_t images_skipped; + std::optional images_written; + int64_t max_image_number_sent; std::optional collection_efficiency; std::optional compression_ratio; diff --git a/broker/gen/model/Jfjoch_settings.cpp b/broker/gen/model/Jfjoch_settings.cpp index b607d3ff..ce70d3f0 100644 --- a/broker/gen/model/Jfjoch_settings.cpp +++ b/broker/gen/model/Jfjoch_settings.cpp @@ -23,6 +23,7 @@ Jfjoch_settings::Jfjoch_settings() { m_PcieIsSet = false; m_ZeromqIsSet = false; + m_TcpIsSet = false; m_InstrumentIsSet = false; m_File_writerIsSet = false; m_IndexingIsSet = false; @@ -86,7 +87,7 @@ bool Jfjoch_settings::validate(std::stringstream& msg, const std::string& pathPr } } - + /* Detector */ { const std::vector& value = m_Detector; @@ -156,6 +157,9 @@ bool Jfjoch_settings::operator==(const Jfjoch_settings& rhs) const ((!zeromqIsSet() && !rhs.zeromqIsSet()) || (zeromqIsSet() && rhs.zeromqIsSet() && getZeromq() == rhs.getZeromq())) && + ((!tcpIsSet() && !rhs.tcpIsSet()) || (tcpIsSet() && rhs.tcpIsSet() && getTcp() == rhs.getTcp())) && + + ((!instrumentIsSet() && !rhs.instrumentIsSet()) || (instrumentIsSet() && rhs.instrumentIsSet() && getInstrument() == rhs.getInstrument())) && @@ -224,6 +228,8 @@ void to_json(nlohmann::json& j, const Jfjoch_settings& o) j["pcie"] = o.m_Pcie; if(o.zeromqIsSet()) j["zeromq"] = o.m_Zeromq; + if(o.tcpIsSet()) + j["tcp"] = o.m_Tcp; if(o.instrumentIsSet()) j["instrument"] = o.m_Instrument; if(o.fileWriterIsSet()) @@ -272,6 +278,11 @@ void from_json(const nlohmann::json& j, Jfjoch_settings& o) j.at("zeromq").get_to(o.m_Zeromq); o.m_ZeromqIsSet = true; } + if(j.find("tcp") != j.end()) + { + j.at("tcp").get_to(o.m_Tcp); + o.m_TcpIsSet = true; + } if(j.find("instrument") != j.end()) { j.at("instrument").get_to(o.m_Instrument); @@ -387,6 +398,23 @@ void Jfjoch_settings::unsetZeromq() { m_ZeromqIsSet = false; } +org::openapitools::server::model::Tcp_settings Jfjoch_settings::getTcp() const +{ + return m_Tcp; +} +void Jfjoch_settings::setTcp(org::openapitools::server::model::Tcp_settings const& value) +{ + m_Tcp = value; + m_TcpIsSet = true; +} +bool Jfjoch_settings::tcpIsSet() const +{ + return m_TcpIsSet; +} +void Jfjoch_settings::unsetTcp() +{ + m_TcpIsSet = false; +} org::openapitools::server::model::Instrument_metadata Jfjoch_settings::getInstrument() const { return m_Instrument; diff --git a/broker/gen/model/Jfjoch_settings.h b/broker/gen/model/Jfjoch_settings.h index 40cb5311..d434be79 100644 --- a/broker/gen/model/Jfjoch_settings.h +++ b/broker/gen/model/Jfjoch_settings.h @@ -19,6 +19,7 @@ #define Jfjoch_settings_H_ +#include "Tcp_settings.h" #include "Spot_finding_settings.h" #include "Zeromq_preview_settings.h" #include "Dark_mask_settings.h" @@ -91,6 +92,13 @@ public: /// /// /// + org::openapitools::server::model::Tcp_settings getTcp() const; + void setTcp(org::openapitools::server::model::Tcp_settings const& value); + bool tcpIsSet() const; + void unsetTcp(); + /// + /// + /// org::openapitools::server::model::Instrument_metadata getInstrument() const; void setInstrument(org::openapitools::server::model::Instrument_metadata const& value); bool instrumentIsSet() const; @@ -216,6 +224,8 @@ protected: bool m_PcieIsSet; org::openapitools::server::model::Zeromq_settings m_Zeromq; bool m_ZeromqIsSet; + org::openapitools::server::model::Tcp_settings m_Tcp; + bool m_TcpIsSet; org::openapitools::server::model::Instrument_metadata m_Instrument; bool m_InstrumentIsSet; org::openapitools::server::model::File_writer_settings m_File_writer; diff --git a/broker/gen/model/Measurement_statistics.cpp b/broker/gen/model/Measurement_statistics.cpp index 4b6642d3..93a0bdb3 100644 --- a/broker/gen/model/Measurement_statistics.cpp +++ b/broker/gen/model/Measurement_statistics.cpp @@ -33,6 +33,8 @@ Measurement_statistics::Measurement_statistics() m_Images_collectedIsSet = false; m_Images_sent = 0L; m_Images_sentIsSet = false; + m_Images_written = 0L; + m_Images_writtenIsSet = false; m_Images_discarded_lossy_compression = 0L; m_Images_discarded_lossy_compressionIsSet = false; m_Max_image_number_sent = 0L; @@ -87,7 +89,7 @@ bool Measurement_statistics::validate(std::stringstream& msg, const std::string& bool success = true; const std::string _pathPrefix = pathPrefix.empty() ? "Measurement_statistics" : pathPrefix; - + if (collectionEfficiencyIsSet()) { const float& value = m_Collection_efficiency; @@ -148,6 +150,9 @@ bool Measurement_statistics::operator==(const Measurement_statistics& rhs) const ((!imagesSentIsSet() && !rhs.imagesSentIsSet()) || (imagesSentIsSet() && rhs.imagesSentIsSet() && getImagesSent() == rhs.getImagesSent())) && + ((!imagesWrittenIsSet() && !rhs.imagesWrittenIsSet()) || (imagesWrittenIsSet() && rhs.imagesWrittenIsSet() && getImagesWritten() == rhs.getImagesWritten())) && + + ((!imagesDiscardedLossyCompressionIsSet() && !rhs.imagesDiscardedLossyCompressionIsSet()) || (imagesDiscardedLossyCompressionIsSet() && rhs.imagesDiscardedLossyCompressionIsSet() && getImagesDiscardedLossyCompression() == rhs.getImagesDiscardedLossyCompression())) && @@ -218,6 +223,8 @@ void to_json(nlohmann::json& j, const Measurement_statistics& o) j["images_collected"] = o.m_Images_collected; if(o.imagesSentIsSet()) j["images_sent"] = o.m_Images_sent; + if(o.imagesWrittenIsSet()) + j["images_written"] = o.m_Images_written; if(o.imagesDiscardedLossyCompressionIsSet()) j["images_discarded_lossy_compression"] = o.m_Images_discarded_lossy_compression; if(o.maxImageNumberSentIsSet()) @@ -285,6 +292,11 @@ void from_json(const nlohmann::json& j, Measurement_statistics& o) j.at("images_sent").get_to(o.m_Images_sent); o.m_Images_sentIsSet = true; } + if(j.find("images_written") != j.end()) + { + j.at("images_written").get_to(o.m_Images_written); + o.m_Images_writtenIsSet = true; + } if(j.find("images_discarded_lossy_compression") != j.end()) { j.at("images_discarded_lossy_compression").get_to(o.m_Images_discarded_lossy_compression); @@ -470,6 +482,23 @@ void Measurement_statistics::unsetImages_sent() { m_Images_sentIsSet = false; } +int64_t Measurement_statistics::getImagesWritten() const +{ + return m_Images_written; +} +void Measurement_statistics::setImagesWritten(int64_t const value) +{ + m_Images_written = value; + m_Images_writtenIsSet = true; +} +bool Measurement_statistics::imagesWrittenIsSet() const +{ + return m_Images_writtenIsSet; +} +void Measurement_statistics::unsetImages_written() +{ + m_Images_writtenIsSet = false; +} int64_t Measurement_statistics::getImagesDiscardedLossyCompression() const { return m_Images_discarded_lossy_compression; diff --git a/broker/gen/model/Measurement_statistics.h b/broker/gen/model/Measurement_statistics.h index be813bf5..861b2985 100644 --- a/broker/gen/model/Measurement_statistics.h +++ b/broker/gen/model/Measurement_statistics.h @@ -101,6 +101,13 @@ public: bool imagesSentIsSet() const; void unsetImages_sent(); /// + /// Images successfully written to disk. The value is live updated for TCP/IP socket and direct HDF5 writer, while for ZeroMQ it is only updated at the end of experiment. + /// + int64_t getImagesWritten() const; + void setImagesWritten(int64_t const value); + bool imagesWrittenIsSet() const; + void unsetImages_written(); + /// /// Images discarded by the lossy compression filter /// int64_t getImagesDiscardedLossyCompression() const; @@ -228,6 +235,8 @@ protected: bool m_Images_collectedIsSet; int64_t m_Images_sent; bool m_Images_sentIsSet; + int64_t m_Images_written; + bool m_Images_writtenIsSet; int64_t m_Images_discarded_lossy_compression; bool m_Images_discarded_lossy_compressionIsSet; int64_t m_Max_image_number_sent; diff --git a/broker/gen/model/Tcp_settings.cpp b/broker/gen/model/Tcp_settings.cpp new file mode 100644 index 00000000..1569af61 --- /dev/null +++ b/broker/gen/model/Tcp_settings.cpp @@ -0,0 +1,168 @@ +/** +* Jungfraujoch +* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms. +* +* The version of the OpenAPI document: 1.0.0-rc.128 +* Contact: filip.leonarski@psi.ch +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ + + +#include "Tcp_settings.h" +#include "Helpers.h" + +#include + +namespace org::openapitools::server::model +{ + +Tcp_settings::Tcp_settings() +{ + m_Send_buffer_size = 0L; + m_Send_buffer_sizeIsSet = false; + m_Addr = ""; + m_Nwriters = 1L; + m_NwritersIsSet = false; + +} + +void Tcp_settings::validate() const +{ + std::stringstream msg; + if (!validate(msg)) + { + throw org::openapitools::server::helpers::ValidationException(msg.str()); + } +} + +bool Tcp_settings::validate(std::stringstream& msg) const +{ + return validate(msg, ""); +} + +bool Tcp_settings::validate(std::stringstream& msg, const std::string& pathPrefix) const +{ + bool success = true; + const std::string _pathPrefix = pathPrefix.empty() ? "Tcp_settings" : pathPrefix; + + + if (nwritersIsSet()) + { + const int64_t& value = m_Nwriters; + const std::string currentValuePath = _pathPrefix + ".nwriters"; + + + if (value < 1ll) + { + success = false; + msg << currentValuePath << ": must be greater than or equal to 1;"; + } + if (value > 100ll) + { + success = false; + msg << currentValuePath << ": must be less than or equal to 100;"; + } + + } + + return success; +} + +bool Tcp_settings::operator==(const Tcp_settings& rhs) const +{ + return + + + + ((!sendBufferSizeIsSet() && !rhs.sendBufferSizeIsSet()) || (sendBufferSizeIsSet() && rhs.sendBufferSizeIsSet() && getSendBufferSize() == rhs.getSendBufferSize())) && + + (getAddr() == rhs.getAddr()) + && + + + ((!nwritersIsSet() && !rhs.nwritersIsSet()) || (nwritersIsSet() && rhs.nwritersIsSet() && getNwriters() == rhs.getNwriters())) + + ; +} + +bool Tcp_settings::operator!=(const Tcp_settings& rhs) const +{ + return !(*this == rhs); +} + +void to_json(nlohmann::json& j, const Tcp_settings& o) +{ + j = nlohmann::json::object(); + if(o.sendBufferSizeIsSet()) + j["send_buffer_size"] = o.m_Send_buffer_size; + j["addr"] = o.m_Addr; + if(o.nwritersIsSet()) + j["nwriters"] = o.m_Nwriters; + +} + +void from_json(const nlohmann::json& j, Tcp_settings& o) +{ + if(j.find("send_buffer_size") != j.end()) + { + j.at("send_buffer_size").get_to(o.m_Send_buffer_size); + o.m_Send_buffer_sizeIsSet = true; + } + j.at("addr").get_to(o.m_Addr); + if(j.find("nwriters") != j.end()) + { + j.at("nwriters").get_to(o.m_Nwriters); + o.m_NwritersIsSet = true; + } + +} + +int64_t Tcp_settings::getSendBufferSize() const +{ + return m_Send_buffer_size; +} +void Tcp_settings::setSendBufferSize(int64_t const value) +{ + m_Send_buffer_size = value; + m_Send_buffer_sizeIsSet = true; +} +bool Tcp_settings::sendBufferSizeIsSet() const +{ + return m_Send_buffer_sizeIsSet; +} +void Tcp_settings::unsetSend_buffer_size() +{ + m_Send_buffer_sizeIsSet = false; +} +std::string Tcp_settings::getAddr() const +{ + return m_Addr; +} +void Tcp_settings::setAddr(std::string const& value) +{ + m_Addr = value; +} +int64_t Tcp_settings::getNwriters() const +{ + return m_Nwriters; +} +void Tcp_settings::setNwriters(int64_t const value) +{ + m_Nwriters = value; + m_NwritersIsSet = true; +} +bool Tcp_settings::nwritersIsSet() const +{ + return m_NwritersIsSet; +} +void Tcp_settings::unsetNwriters() +{ + m_NwritersIsSet = false; +} + + +} // namespace org::openapitools::server::model + diff --git a/broker/gen/model/Tcp_settings.h b/broker/gen/model/Tcp_settings.h new file mode 100644 index 00000000..86f44fe4 --- /dev/null +++ b/broker/gen/model/Tcp_settings.h @@ -0,0 +1,95 @@ +/** +* Jungfraujoch +* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms. +* +* The version of the OpenAPI document: 1.0.0-rc.128 +* Contact: filip.leonarski@psi.ch +* +* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). +* https://openapi-generator.tech +* Do not edit the class manually. +*/ +/* + * Tcp_settings.h + * + * TCP image stream configuration for Jungfraujoch software. This structure is used to provide default settings using configuration JSON file and is not used in HTTP. + */ + +#ifndef Tcp_settings_H_ +#define Tcp_settings_H_ + + +#include +#include + +namespace org::openapitools::server::model +{ + +/// +/// TCP image stream configuration for Jungfraujoch software. This structure is used to provide default settings using configuration JSON file and is not used in HTTP. +/// +class Tcp_settings +{ +public: + Tcp_settings(); + virtual ~Tcp_settings() = default; + + + /// + /// Validate the current data in the model. Throws a ValidationException on failure. + /// + void validate() const; + + /// + /// Validate the current data in the model. Returns false on error and writes an error + /// message into the given stringstream. + /// + bool validate(std::stringstream& msg) const; + + /// + /// Helper overload for validate. Used when one model stores another model and calls it's validate. + /// Not meant to be called outside that case. + /// + bool validate(std::stringstream& msg, const std::string& pathPrefix) const; + + bool operator==(const Tcp_settings& rhs) const; + bool operator!=(const Tcp_settings& rhs) const; + + ///////////////////////////////////////////// + /// Tcp_settings members + + /// + /// Send buffer size for TCP/IP socket + /// + int64_t getSendBufferSize() const; + void setSendBufferSize(int64_t const value); + bool sendBufferSizeIsSet() const; + void unsetSend_buffer_size(); + /// + /// tcp://<IP address>:<port> 0.0.0.0 instead of IP address is accepted and means listening on all network interfaces + /// + std::string getAddr() const; + void setAddr(std::string const& value); + /// + /// Number of TCP/IP writers to be used for streaming images + /// + int64_t getNwriters() const; + void setNwriters(int64_t const value); + bool nwritersIsSet() const; + void unsetNwriters(); + + friend void to_json(nlohmann::json& j, const Tcp_settings& o); + friend void from_json(const nlohmann::json& j, Tcp_settings& o); +protected: + int64_t m_Send_buffer_size; + bool m_Send_buffer_sizeIsSet; + std::string m_Addr; + + int64_t m_Nwriters; + bool m_NwritersIsSet; + +}; + +} // namespace org::openapitools::server::model + +#endif /* Tcp_settings_H_ */ diff --git a/broker/jfjoch_api.yaml b/broker/jfjoch_api.yaml index 925e168c..4c75deeb 100644 --- a/broker/jfjoch_api.yaml +++ b/broker/jfjoch_api.yaml @@ -1183,6 +1183,12 @@ components: description: | Images sent to the writer. The value does not include images discarded by lossy compression filter and images not forwarded due to full ZeroMQ queue. + images_written: + type: integer + format: int64 + description: | + Images successfully written to disk. + The value is live updated for TCP/IP socket and direct HDF5 writer, while for ZeroMQ it is only updated at the end of experiment. images_discarded_lossy_compression: type: integer format: int64 @@ -2091,6 +2097,31 @@ components: Address follows ZeroMQ convention for sockets - in practice ipc:// and tpc://: sockets are OK. 0.0.0.0 instead of IP address should be avoided, as this socket address is forwarded to the writer process via START ZerOMQ message and in case of multiple ineterfaces the address might be ambigous. Using * (star) instead of port number is allowed and it means a random free port number. + tcp_settings: + type: object + description: | + TCP image stream configuration for Jungfraujoch software. + This structure is used to provide default settings using configuration JSON file and is not used in HTTP. + required: + - addr + properties: + send_buffer_size: + type: integer + format: int64 + description: Send buffer size for TCP/IP socket + addr: + type: string + example: "tcp://1.2.3.4:5000" + description: | + tcp://: + 0.0.0.0 instead of IP address is accepted and means listening on all network interfaces + nwriters: + type: integer + format: int64 + minimum: 1 + maximum: 100 + default: 1 + description: Number of TCP/IP writers to be used for streaming images pcie_devices: type: array minLength: 1 @@ -2121,6 +2152,8 @@ components: $ref: '#/components/schemas/pcie_devices' zeromq: $ref: '#/components/schemas/zeromq_settings' + tcp: + $ref: '#/components/schemas/tcp_settings' instrument: $ref: '#/components/schemas/instrument_metadata' file_writer: diff --git a/broker/redoc-static.html b/broker/redoc-static.html index 3b90814d..e151af10 100644 --- a/broker/redoc-static.html +++ b/broker/redoc-static.html @@ -790,11 +790,11 @@ This can only be done when detector is Idle, Error or
http://localhost:5232/config/roi

Request samples

Content type
application/json
{
  • "box": {
    },
  • "circle": {
    },
  • "azim": {
    }
}

Response samples

Content type
application/json
{
  • "msg": "Detector in wrong state",
  • "reason": "WrongDAQState"
}

Get general statistics

query Parameters
compression
boolean
Default: false

Enable DEFLATE compression of output data.

Responses

Response samples

Content type
application/json
{
  • "detector": {
    },
  • "detector_list": {
    },
  • "detector_settings": {
    },
  • "image_format_settings": {
    },
  • "instrument_metadata": {
    },
  • "file_writer_settings": {
    },
  • "data_processing_settings": {
    },
  • "measurement": {
    },
  • "broker": {
    },
  • "fpga": [
    ],
  • "calibration": [
    ],
  • "zeromq_preview": {
    },
  • "zeromq_metadata": {
    },
  • "dark_mask": {
    },
  • "pixel_mask": {
    },
  • "roi": {
    },
  • "az_int": {
    },
  • "buffer": {
    },
  • "indexing": {
    }
}

Get data collection statistics

Results of the last data collection

+
http://localhost:5232/statistics

Response samples

Content type
application/json
{
  • "detector": {
    },
  • "detector_list": {
    },
  • "detector_settings": {
    },
  • "image_format_settings": {
    },
  • "instrument_metadata": {
    },
  • "file_writer_settings": {
    },
  • "data_processing_settings": {
    },
  • "measurement": {
    },
  • "broker": {
    },
  • "fpga": [
    ],
  • "calibration": [
    ],
  • "zeromq_preview": {
    },
  • "zeromq_metadata": {
    },
  • "dark_mask": {
    },
  • "pixel_mask": {
    },
  • "roi": {
    },
  • "az_int": {
    },
  • "buffer": {
    },
  • "indexing": {
    }
}

Get data collection statistics

Results of the last data collection

Responses

Response samples

Content type
application/json
{
  • "file_prefix": "string",
  • "run_number": 0,
  • "experiment_group": "string",
  • "images_expected": 0,
  • "images_collected": 0,
  • "images_sent": 0,
  • "images_discarded_lossy_compression": 0,
  • "max_image_number_sent": 0,
  • "collection_efficiency": 1,
  • "compression_ratio": 5.3,
  • "cancelled": true,
  • "max_receiver_delay": 0,
  • "indexing_rate": 0.1,
  • "detector_width": 0,
  • "detector_height": 0,
  • "detector_pixel_depth": 2,
  • "bkg_estimate": 0.1,
  • "unit_cell": "string",
  • "error_pixels": 0.1,
  • "saturated_pixels": 0.1,
  • "roi_beam_pixels": 0.1,
  • "roi_beam_sum": 0.1
}

Get calibration statistics

Statistics are provided for each module/storage cell separately

+
http://localhost:5232/statistics/data_collection

Response samples

Content type
application/json
{
  • "file_prefix": "string",
  • "run_number": 0,
  • "experiment_group": "string",
  • "images_expected": 0,
  • "images_collected": 0,
  • "images_sent": 0,
  • "images_written": 0,
  • "images_discarded_lossy_compression": 0,
  • "max_image_number_sent": 0,
  • "collection_efficiency": 1,
  • "compression_ratio": 5.3,
  • "cancelled": true,
  • "max_receiver_delay": 0,
  • "indexing_rate": 0.1,
  • "detector_width": 0,
  • "detector_height": 0,
  • "detector_pixel_depth": 2,
  • "bkg_estimate": 0.1,
  • "unit_cell": "string",
  • "error_pixels": 0.1,
  • "saturated_pixels": 0.1,
  • "roi_beam_pixels": 0.1,
  • "roi_beam_sum": 0.1
}

Get calibration statistics

Statistics are provided for each module/storage cell separately

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get mask of the detector (binary)

Detector must be Initialized. @@ -910,7 +910,7 @@ then image might be replaced in the buffer between calling /images and /image.cb