diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a55ce29..d246098d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,7 +134,12 @@ IF (NOT JFJOCH_WRITER_ONLY) INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/fpga/pcie_driver/ DESTINATION /usr/src/jfjoch-1.0.0 COMPONENT driver-dkms - FILES_MATCHING PATTERN "*.c" PATTERN "*.h" PATTERN "Makefile" PATTERN "dkms.conf") + FILES_MATCHING PATTERN "dkms.conf") + + INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/fpga/pcie_driver/ + DESTINATION /usr/src/jfjoch-1.0.0/src + COMPONENT driver-dkms + FILES_MATCHING PATTERN "*.c" PATTERN "*.h" PATTERN "Makefile") FILE(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/frontend_ui/build/) INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/frontend_ui/build/ DESTINATION share/jfjoch/frontend COMPONENT jfjoch ) diff --git a/VERSION b/VERSION index 346566be..101b40ba 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.0_rc.9 +1.0.0_rc.10 diff --git a/broker/JFJochBrokerHttp.cpp b/broker/JFJochBrokerHttp.cpp index b3e43168..4218f404 100644 --- a/broker/JFJochBrokerHttp.cpp +++ b/broker/JFJochBrokerHttp.cpp @@ -5,6 +5,7 @@ #include "JFJochBrokerHttp.h" #include "gen/model/Error_message.h" #include "../preview/JFJochTIFF.h" +#include "../common/GitInfo.h" // From https://en.cppreference.com/w/cpp/string/byte/tolower inline std::string str_tolower(std::string s) { @@ -339,6 +340,9 @@ inline DatasetSettings Convert(const org::openapitools::server::model::Dataset_s if (input.runNumberIsSet()) ret.RunNumber(input.getRunNumber()); + if (input.runNameIsSet()) + ret.RunName(input.getRunName()); + ret.ExperimentGroup(input.getExperimentGroup()); if (!input.fpgaOutputIsSet()) @@ -828,3 +832,7 @@ void JFJochBrokerHttp::config_user_mask_tiff_put(const Pistache::Rest::Request & state_machine.SetUserPixelMask(request.body()); response.send(Pistache::Http::Code::Ok); } + +void JFJochBrokerHttp::version_get(Pistache::Http::ResponseWriter &response) { + response.send(Pistache::Http::Code::Ok, jfjoch_version(), MIME(Text, Plain)); +} diff --git a/broker/JFJochBrokerHttp.h b/broker/JFJochBrokerHttp.h index 397b918d..ef9fd11b 100644 --- a/broker/JFJochBrokerHttp.h +++ b/broker/JFJochBrokerHttp.h @@ -143,6 +143,9 @@ class JFJochBrokerHttp : public org::openapitools::server::api::DefaultApi { to_json(j, output); response.send(Pistache::Http::Code::Ok, j.dump(), MIME(Application, Json)); } + + void version_get(Pistache::Http::ResponseWriter &response) override; + public: JFJochBrokerHttp(const DiffractionExperiment& experiment, std::shared_ptr &rtr); void AddDetectorSetup(const DetectorSetup &setup); diff --git a/broker/gen/api/DefaultApi.cpp b/broker/gen/api/DefaultApi.cpp index 00240d17..d7548c01 100644 --- a/broker/gen/api/DefaultApi.cpp +++ b/broker/gen/api/DefaultApi.cpp @@ -79,6 +79,7 @@ void DefaultApi::setupRoutes() { Routes::Get(*router, base + "/statistics/data_collection", Routes::bind(&DefaultApi::statistics_data_collection_get_handler, this)); Routes::Get(*router, base + "/status", Routes::bind(&DefaultApi::status_get_handler, this)); Routes::Post(*router, base + "/trigger", Routes::bind(&DefaultApi::trigger_post_handler, this)); + Routes::Get(*router, base + "/version", Routes::bind(&DefaultApi::version_get_handler, this)); Routes::Post(*router, base + "/wait_till_done", Routes::bind(&DefaultApi::wait_till_done_post_handler, this)); Routes::Get(*router, base + "/xfel/event_code", Routes::bind(&DefaultApi::xfel_event_code_get_handler, this)); Routes::Get(*router, base + "/xfel/pulse_id", Routes::bind(&DefaultApi::xfel_pulse_id_get_handler, this)); @@ -1253,6 +1254,26 @@ void DefaultApi::trigger_post_handler(const Pistache::Rest::Request &, Pistache: response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); } +} +void DefaultApi::version_get_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { + try { + + + try { + this->version_get(response); + } catch (Pistache::Http::HttpError &e) { + response.send(static_cast(e.code()), e.what()); + return; + } catch (std::exception &e) { + const std::pair errorInfo = this->handleOperationException(e); + response.send(errorInfo.first, errorInfo.second); + return; + } + + } catch (std::exception &e) { + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + } + } void DefaultApi::wait_till_done_post_handler(const Pistache::Rest::Request &, Pistache::Http::ResponseWriter response) { try { diff --git a/broker/gen/api/DefaultApi.h b/broker/gen/api/DefaultApi.h index 3e3c474b..94ec0de4 100644 --- a/broker/gen/api/DefaultApi.h +++ b/broker/gen/api/DefaultApi.h @@ -103,6 +103,7 @@ private: void statistics_data_collection_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); void status_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); void trigger_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); + void version_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); void wait_till_done_post_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); void xfel_event_code_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); void xfel_pulse_id_get_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response); @@ -468,6 +469,13 @@ private: /// virtual void trigger_post(Pistache::Http::ResponseWriter &response) = 0; /// + /// + /// + /// + /// + /// + virtual void version_get(Pistache::Http::ResponseWriter &response) = 0; + /// /// Wait for acquisition done /// /// diff --git a/broker/gen/model/Dataset_settings.cpp b/broker/gen/model/Dataset_settings.cpp index fcfa8562..76738582 100644 --- a/broker/gen/model/Dataset_settings.cpp +++ b/broker/gen/model/Dataset_settings.cpp @@ -47,9 +47,7 @@ Dataset_settings::Dataset_settings() m_Transmission = 0.0f; m_TransmissionIsSet = false; m_GoniometerIsSet = false; - m_Header_appendix = ""; m_Header_appendixIsSet = false; - m_Image_appendix = ""; m_Image_appendixIsSet = false; m_Energy_multiplier = 1.0f; m_Energy_multiplierIsSet = false; @@ -57,6 +55,8 @@ Dataset_settings::Dataset_settings() m_Data_reduction_factor_serialmxIsSet = false; m_Run_number = 0L; m_Run_numberIsSet = false; + m_Run_name = ""; + m_Run_nameIsSet = false; m_Experiment_group = ""; m_Experiment_groupIsSet = false; m_Unit_cellIsSet = false; @@ -261,7 +261,7 @@ bool Dataset_settings::validate(std::stringstream& msg, const std::string& pathP } } - + return success; } @@ -334,6 +334,9 @@ bool Dataset_settings::operator==(const Dataset_settings& rhs) const ((!runNumberIsSet() && !rhs.runNumberIsSet()) || (runNumberIsSet() && rhs.runNumberIsSet() && getRunNumber() == rhs.getRunNumber())) && + ((!runNameIsSet() && !rhs.runNameIsSet()) || (runNameIsSet() && rhs.runNameIsSet() && getRunName() == rhs.getRunName())) && + + ((!experimentGroupIsSet() && !rhs.experimentGroupIsSet()) || (experimentGroupIsSet() && rhs.experimentGroupIsSet() && getExperimentGroup() == rhs.getExperimentGroup())) && @@ -387,6 +390,8 @@ void to_json(nlohmann::json& j, const Dataset_settings& o) j["data_reduction_factor_serialmx"] = o.m_Data_reduction_factor_serialmx; if(o.runNumberIsSet()) j["run_number"] = o.m_Run_number; + if(o.runNameIsSet()) + j["run_name"] = o.m_Run_name; if(o.experimentGroupIsSet()) j["experiment_group"] = o.m_Experiment_group; if(o.unitCellIsSet()) @@ -481,6 +486,11 @@ void from_json(const nlohmann::json& j, Dataset_settings& o) j.at("run_number").get_to(o.m_Run_number); o.m_Run_numberIsSet = true; } + if(j.find("run_name") != j.end()) + { + j.at("run_name").get_to(o.m_Run_name); + o.m_Run_nameIsSet = true; + } if(j.find("experiment_group") != j.end()) { j.at("experiment_group").get_to(o.m_Experiment_group); @@ -721,11 +731,11 @@ void Dataset_settings::unsetGoniometer() { m_GoniometerIsSet = false; } -std::string Dataset_settings::getHeaderAppendix() const +nlohmann::json Dataset_settings::getHeaderAppendix() const { return m_Header_appendix; } -void Dataset_settings::setHeaderAppendix(std::string const& value) +void Dataset_settings::setHeaderAppendix(nlohmann::json const& value) { m_Header_appendix = value; m_Header_appendixIsSet = true; @@ -738,11 +748,11 @@ void Dataset_settings::unsetHeader_appendix() { m_Header_appendixIsSet = false; } -std::string Dataset_settings::getImageAppendix() const +nlohmann::json Dataset_settings::getImageAppendix() const { return m_Image_appendix; } -void Dataset_settings::setImageAppendix(std::string const& value) +void Dataset_settings::setImageAppendix(nlohmann::json const& value) { m_Image_appendix = value; m_Image_appendixIsSet = true; @@ -806,6 +816,23 @@ void Dataset_settings::unsetRun_number() { m_Run_numberIsSet = false; } +std::string Dataset_settings::getRunName() const +{ + return m_Run_name; +} +void Dataset_settings::setRunName(std::string const& value) +{ + m_Run_name = value; + m_Run_nameIsSet = true; +} +bool Dataset_settings::runNameIsSet() const +{ + return m_Run_nameIsSet; +} +void Dataset_settings::unsetRun_name() +{ + m_Run_nameIsSet = false; +} std::string Dataset_settings::getExperimentGroup() const { return m_Experiment_group; diff --git a/broker/gen/model/Dataset_settings.h b/broker/gen/model/Dataset_settings.h index 54979f2f..7dc259ca 100644 --- a/broker/gen/model/Dataset_settings.h +++ b/broker/gen/model/Dataset_settings.h @@ -19,6 +19,7 @@ #define Dataset_settings_H_ +#include #include "Rotation_axis.h" #include #include "Dataset_settings_unit_cell.h" @@ -163,17 +164,17 @@ public: bool goniometerIsSet() const; void unsetGoniometer(); /// - /// Header appendix, added as user_data to start message + /// Header appendix, added as user_data/user to start message (can be any valid JSON) /// - std::string getHeaderAppendix() const; - void setHeaderAppendix(std::string const& value); + nlohmann::json getHeaderAppendix() const; + void setHeaderAppendix(nlohmann::json const& value); bool headerAppendixIsSet() const; void unsetHeader_appendix(); /// - /// Image appendix, added as user_data to image message + /// Image appendix, added as user_data to image message (can be any valid JSON) /// - std::string getImageAppendix() const; - void setImageAppendix(std::string const& value); + nlohmann::json getImageAppendix() const; + void setImageAppendix(nlohmann::json const& value); bool imageAppendixIsSet() const; void unsetImage_appendix(); /// @@ -198,6 +199,13 @@ public: bool runNumberIsSet() const; void unsetRun_number(); /// + /// Unique ID of run. Transferred over CBOR stream as \"unique series ID\", though not saved in HDF5 file. It is highly recommended to keep this name unique for each data collection during experimental series. If not provided, the name will be automatically generated as number + colon + file_prefix. + /// + std::string getRunName() const; + void setRunName(std::string const& value); + bool runNameIsSet() const; + void unsetRun_name(); + /// /// Name of group owning the data (e.g. p-group or proposal number). Transferred over CBOR stream, though not saved in HDF5 file. /// std::string getExperimentGroup() const; @@ -247,9 +255,9 @@ protected: bool m_TransmissionIsSet; org::openapitools::server::model::Rotation_axis m_Goniometer; bool m_GoniometerIsSet; - std::string m_Header_appendix; + nlohmann::json m_Header_appendix; bool m_Header_appendixIsSet; - std::string m_Image_appendix; + nlohmann::json m_Image_appendix; bool m_Image_appendixIsSet; float m_Energy_multiplier; bool m_Energy_multiplierIsSet; @@ -257,6 +265,8 @@ protected: bool m_Data_reduction_factor_serialmxIsSet; int64_t m_Run_number; bool m_Run_numberIsSet; + std::string m_Run_name; + bool m_Run_nameIsSet; std::string m_Experiment_group; bool m_Experiment_groupIsSet; org::openapitools::server::model::Dataset_settings_unit_cell m_Unit_cell; diff --git a/broker/jfjoch_api.yaml b/broker/jfjoch_api.yaml index cf59eddd..46ab122f 100644 --- a/broker/jfjoch_api.yaml +++ b/broker/jfjoch_api.yaml @@ -156,11 +156,9 @@ components: goniometer: $ref: "#/components/schemas/rotation_axis" header_appendix: - type: string - description: Header appendix, added as user_data to start message + description: Header appendix, added as user_data/user to start message (can be any valid JSON) image_appendix: - type: string - description: Image appendix, added as user_data to image message + description: Image appendix, added as user_data to image message (can be any valid JSON) energy_multiplier: type: number format: float @@ -187,6 +185,13 @@ components: Transferred over CBOR stream as "series ID", though not saved in HDF5 file. It is highly recommended to keep this number unique for each data collection during experimental series. If not provided, the number will be automatically incremented. + run_name: + type: string + description: | + Unique ID of run. + Transferred over CBOR stream as "unique series ID", though not saved in HDF5 file. + It is highly recommended to keep this name unique for each data collection during experimental series. + If not provided, the name will be automatically generated as number + colon + file_prefix. experiment_group: type: string description: | @@ -1724,4 +1729,14 @@ paths: type: string format: binary "404": - description: No calibration recorded so far \ No newline at end of file + description: No calibration recorded so far + /version: + get: + responses: + "200": + description: Release number of Jungfraujoch + content: + text/plain: + schema: + type: string + example: 1.0.0 diff --git a/broker/redoc-static.html b/broker/redoc-static.html index 9d84de26..5c641678 100644 --- a/broker/redoc-static.html +++ b/broker/redoc-static.html @@ -12,337 +12,336 @@ margin: 0; } - -

Jungfraujoch (1.0.1)

Download OpenAPI specification:Download

Jungfraujoch Broker Web API

-

Initialize detector and data acquisition

Jungfraujoch (1.0.1)

Download OpenAPI specification:Download

Jungfraujoch Broker Web API

+

Initialize detector and data acquisition

Should be used in two cases:

+" class="sc-iKOmoZ sc-cCzLxZ WVNwY VEBGS">

Should be used in two cases:

  • Detector is in Inactive state
  • Detector is in Error state @@ -382,453 +381,453 @@ During operation of the detector it is recommended to use the POST /pedest If storage cells are used, the execution time might be few minutes.

This is async function - one needs to use POST /wait_till_done to ensure operation is done.

-

Responses

Response samples

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

Collect dark current for the detector

Responses

Response samples

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

Collect dark current for the detector

Updates calibration of the JUNGFRAU detector. Must be in Idle state.

+" class="sc-iKOmoZ sc-cCzLxZ WVNwY VEBGS">

Updates calibration of the JUNGFRAU detector. Must be in Idle state.

X-ray shutter must be closed. Recommended to run once per hour for long integration times (> 100 us).

This is async function - one needs to use POST /wait_till_done to ensure operation is done.

-

Responses

Response samples

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

Start detector

Responses

Response samples

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

Start detector

Start data acquisition. +" class="sc-iKOmoZ sc-cCzLxZ WVNwY VEBGS">

Start data acquisition. Detector must be in Idle state. Doesn't run calibration procedure. This is async function - one needs to use POST /wait_till_done to ensure operation is done.

-
Request Body schema: application/json
images_per_trigger
integer <int64> >= 1
Default: 1
Request Body schema: application/json
images_per_trigger
integer <int64> >= 1
Default: 1

For standard synchrotron data collection - this is number of images collected per one TTL trigger +" class="sc-iKOmoZ sc-cCzLxZ WVNwY jaVotg">

For standard synchrotron data collection - this is number of images collected per one TTL trigger For XFEL (pulsed source) - this number is ignored and set to 1 For storage cell mode - this number is ignored and set to number of storage cells

-
ntrigger
integer <int64> >= 1
Default: 1

Number of TTL trigger that the detector is expected to receive during data collection

-
summation
integer <int64> [ 1 .. 256 ]
Default: 1
ntrigger
integer <int64> >= 1
Default: 1

Number of TTL trigger that the detector is expected to receive during data collection

+
summation
integer <int64> [ 1 .. 256 ]
Default: 1

FPGA frame summation. For summation above two 32-bit pixel format will be used, unless explicitly specified. +" class="sc-iKOmoZ sc-cCzLxZ WVNwY jaVotg">

FPGA frame summation. For summation above two 32-bit pixel format will be used, unless explicitly specified. Frame summation factor applies only to conversion mode (assumed as 1 for raw data). In XFEL mode: summation happens for frames collected with multiple triggers. Ignored for storage cells (assumed as 1).

-
beam_x_pxl
required
number <float>
beam_x_pxl
required
number <float>

/entry/detector/beam_center_x in NXmx +" class="sc-iKOmoZ sc-cCzLxZ WVNwY jaVotg">

/entry/detector/beam_center_x in NXmx Beam center in X direction [pixels]

-
beam_y_pxl
required
number <float>
beam_y_pxl
required
number <float>

/entry/detector/beam_center_y in NXmx +" class="sc-iKOmoZ sc-cCzLxZ WVNwY jaVotg">

/entry/detector/beam_center_y in NXmx Beam center in X direction [pixels]

-
detector_distance_mm
required
number <float> >= 0

/entry/detector/distance in NXmx Detector distance [mm]

-
incident_energy_keV
required
number <float> >= 0
detector_distance_mm
required
number <float> >= 0

/entry/detector/distance in NXmx Detector distance [mm]

+
incident_energy_keV
required
number <float> >= 0

Used to calculate /entry/beam/incident_wavelength in NXmx +" class="sc-iKOmoZ sc-cCzLxZ WVNwY jaVotg">

Used to calculate /entry/beam/incident_wavelength in NXmx Incident particle (photon, electron) energy in keV

-
file_prefix
string
Default: ""

Prefix for filenames. If left empty, no file will be saved.

-
images_per_file
integer <int64> >= 0
Default: 1000

Number of files in a single HDF5 data file (0 = write all images to a single data file).

-
space_group_number
integer <int64> [ 0 .. 194 ]
Default: 0
sample_name
required
string
file_prefix
string
Default: ""

Prefix for filenames. If left empty, no file will be saved.

+
images_per_file
integer <int64> >= 0
Default: 1000

Number of files in a single HDF5 data file (0 = write all images to a single data file).

+
space_group_number
integer <int64> [ 0 .. 194 ]
Default: 0
sample_name
required
string

/entry/sample/name in NXmx +" class="sc-iKOmoZ sc-cCzLxZ WVNwY jaVotg">

/entry/sample/name in NXmx Sample name

-
fpga_output
string
Default: "auto"
Enum: "auto" "int32" "int16" "uint32" "uint16"

FPGA output data type

-
compression
string
Default: "bslz4"
Enum: "bslz4" "bszstd" "bszstd_rle" "none"
total_flux
number <float>
fpga_output
string
Default: "auto"
Enum: "auto" "int32" "int16" "uint32" "uint16"

FPGA output data type

+
compression
string
Default: "bslz4"
Enum: "bslz4" "bszstd" "bszstd_rle" "none"
total_flux
number <float>

/entry/beam/total_flux in NXmx +" class="sc-iKOmoZ sc-cCzLxZ WVNwY jaVotg">

/entry/beam/total_flux in NXmx Flux incident on beam plane in photons per second. In other words this is the flux integrated over area. [photons/s]

-
transmission
number <float> [ 0 .. 1 ]
transmission
number <float> [ 0 .. 1 ]

/entry/instrument/attenuator/attenuator_transmission +" class="sc-iKOmoZ sc-cCzLxZ WVNwY jaVotg">

/entry/instrument/attenuator/attenuator_transmission Transmission of attenuator (filter) [no units]

-
object (rotation_axis)

Definition of a crystal rotation axis

-
header_appendix
string

Header appendix, added as user_data to start message

-
image_appendix
string

Image appendix, added as user_data to image message

-
energy_multiplier
number <float> [ 0.015625 .. 4 ]
Default: 1

For JUNGFRAU conversion it is possible to multiply incident energy by a given factor to get fractional/multiplied particle counts

-
data_reduction_factor_serialmx
number <float> [ 0 .. 1 ]
Default: 1
object (rotation_axis)

Definition of a crystal rotation axis

+
header_appendix
any

Header appendix, added as user_data/user to start message (can be any valid JSON)

+
image_appendix
any

Image appendix, added as user_data to image message (can be any valid JSON)

+
energy_multiplier
number <float> [ 0.015625 .. 4 ]
Default: 1

For JUNGFRAU conversion it is possible to multiply incident energy by a given factor to get fractional/multiplied particle counts

+
data_reduction_factor_serialmx
number <float> [ 0 .. 1 ]
Default: 1

Rate at which non-indexed images are accepted to be forwarded to writer. +" class="sc-iKOmoZ sc-cCzLxZ WVNwY jaVotg">

Rate at which non-indexed images are accepted to be forwarded to writer. Value of 1.0 (default) means that all images are written. Values below zero mean that non-indexed images will be accepted with a given probability.

-
run_number
integer <int64> >= 0
run_number
integer <int64> >= 0

Number of run within an experimental session. +" class="sc-iKOmoZ sc-cCzLxZ WVNwY jaVotg">

Number of run within an experimental session. Transferred over CBOR stream as "series ID", though not saved in HDF5 file. It is highly recommended to keep this number unique for each data collection during experimental series. If not provided, the number will be automatically incremented.

-
experiment_group
string
experiment_group
string

Name of group owning the data (e.g. p-group or proposal number). +" class="sc-iKOmoZ sc-cCzLxZ WVNwY jaVotg">

Name of group owning the data (e.g. p-group or proposal number). Transferred over CBOR stream, though not saved in HDF5 file.

-
object

Units of angstrom and degree

-

Responses

Request samples

Content type
application/json
{
  • "images_per_trigger": 1,
  • "ntrigger": 1,
  • "summation": 1,
  • "beam_x_pxl": 0.1,
  • "beam_y_pxl": 0.1,
  • "detector_distance_mm": 0.1,
  • "incident_energy_keV": 0.1,
  • "file_prefix": "",
  • "images_per_file": 1000,
  • "space_group_number": 0,
  • "sample_name": "string",
  • "fpga_output": "auto",
  • "compression": "bslz4",
  • "total_flux": 0.1,
  • "transmission": 1,
  • "goniometer": {
    },
  • "header_appendix": "string",
  • "image_appendix": "string",
  • "energy_multiplier": 1,
  • "data_reduction_factor_serialmx": 1,
  • "run_number": 0,
  • "experiment_group": "string",
  • "unit_cell": {
    }
}

Response samples

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

Wait for acquisition done

object

Units of angstrom and degree

+

Responses

Request samples

Content type
application/json
{
  • "images_per_trigger": 1,
  • "ntrigger": 1,
  • "summation": 1,
  • "beam_x_pxl": 0.1,
  • "beam_y_pxl": 0.1,
  • "detector_distance_mm": 0.1,
  • "incident_energy_keV": 0.1,
  • "file_prefix": "",
  • "images_per_file": 1000,
  • "space_group_number": 0,
  • "sample_name": "string",
  • "fpga_output": "auto",
  • "compression": "bslz4",
  • "total_flux": 0.1,
  • "transmission": 1,
  • "goniometer": {
    },
  • "header_appendix": null,
  • "image_appendix": null,
  • "energy_multiplier": 1,
  • "data_reduction_factor_serialmx": 1,
  • "run_number": 0,
  • "experiment_group": "string",
  • "unit_cell": {
    }
}

Response samples

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

Wait for acquisition done

Block execution of external script till initialization, data collection or pedestal is finished. +" class="sc-iKOmoZ sc-cCzLxZ WVNwY VEBGS">

Block execution of external script till initialization, data collection or pedestal is finished. Running this command does not affect (cancel) running data collection, it is only to ensure synchronous execution of other software.

To not block web server for a long period of time, the procedure is provided with a timeout of 5 seconds.

-

Responses

Response samples

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

Send soft trigger to the detector

Generate soft trigger

-

Responses

Cancel running data collection

Responses

Response samples

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

Send soft trigger to the detector

Generate soft trigger

+

Responses

Cancel running data collection

Command will inform FPGA network card to stop pedestal or data collection at the current stage. +" class="sc-iKOmoZ sc-cCzLxZ WVNwY VEBGS">

Command will inform FPGA network card to stop pedestal or data collection at the current stage. Any frame that is currently being processed by CPU will be finished and sent to writer. Given the command is making sure to gracefully stop data acquisition and detector, it might take some time to switch back after command finished to Idle state.

If data collection is not running, the command has no effect.

-

Responses

Prepare detector to turn off

Responses

Prepare detector to turn off

Should be in Idle or Error state. +" class="sc-iKOmoZ sc-cCzLxZ WVNwY VEBGS">

Should be in Idle or Error state. Command deactivates data acquisition and turns off detector high voltage and ASIC. Should be used always before turning off power from the detector.

-

Responses

Response samples

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

Change detector configuration

Responses

Response samples

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

Change detector configuration

Detector settings are ones that have effect on calibration, i.e., pedestal has to be collected again after changing these settings. +" class="sc-iKOmoZ sc-cCzLxZ WVNwY VEBGS">

Detector settings are ones that have effect on calibration, i.e., pedestal has to be collected again after changing these settings. This can only be done when detector is Idle, Error or Inactive states. If detector is in Idle state , pedestal procedure will be executed automatically - there must be no X-rays on the detector during the operation. If detector is in Inactive or Error states, new settings will be saved, but no calibration will be executed.

-
Request Body schema: application/json
frame_time_us
required
integer <int64> >= 450

Interval between consecutive frames.

-
count_time_us
integer <int64>

Integration time of the detector. If not provided count time will be set to maximum value for a given frame time.

-
storage_cell_count
integer <int64> [ 1 .. 16 ]
Default: 1
internal_frame_generator
boolean
Default: false

Use internal frame generator in FPGA instead of getting data from a real detector

-
internal_frame_generator_images
integer <int64> [ 1 .. 128 ]
Default: 1
collect_raw_data
boolean
Default: false

Turn off conversion of pixel read-out to photon count

-
pedestal_g0_frames
integer <int64> >= 0
pedestal_g1_frames
integer <int64> >= 0
pedestal_g2_frames
integer <int64> >= 0
storage_cell_delay_us
number <float>

Delay between two storage cells [us]

-
detector_trigger_delay_us
number <float>

Delay between TTL trigger and acquisition start [us]

-
fixed_gain_g1
boolean
Default: false

Fix gain to G1 (can be useful for storage cells)

-
use_gain_hg0
boolean
Default: false

Use high G0 (for low energy applications)

-

Responses

Request samples

Content type
application/json
{
  • "frame_time_us": 450,
  • "count_time_us": 0,
  • "storage_cell_count": 1,
  • "internal_frame_generator": false,
  • "internal_frame_generator_images": 1,
  • "collect_raw_data": false,
  • "pedestal_g0_frames": 0,
  • "pedestal_g1_frames": 0,
  • "pedestal_g2_frames": 0,
  • "storage_cell_delay_us": 0.1,
  • "detector_trigger_delay_us": 0.1,
  • "fixed_gain_g1": false,
  • "use_gain_hg0": false
}

Response samples

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

Get detector configuration

Can be done anytime

-

Responses

Response samples

Content type
application/json
{
  • "frame_time_us": 450,
  • "count_time_us": 0,
  • "storage_cell_count": 1,
  • "internal_frame_generator": false,
  • "internal_frame_generator_images": 1,
  • "collect_raw_data": false,
  • "pedestal_g0_frames": 0,
  • "pedestal_g1_frames": 0,
  • "pedestal_g2_frames": 0,
  • "storage_cell_delay_us": 0.1,
  • "detector_trigger_delay_us": 0.1,
  • "fixed_gain_g1": false,
  • "use_gain_hg0": false
}

Configure spot finding

Can be done anytime, also while data collection is running

-
Request Body schema: application/json
enable
required
boolean
Default: true
Request Body schema: application/json
frame_time_us
required
integer <int64> >= 450

Interval between consecutive frames.

+
count_time_us
integer <int64>

Integration time of the detector. If not provided count time will be set to maximum value for a given frame time.

+
storage_cell_count
integer <int64> [ 1 .. 16 ]
Default: 1
internal_frame_generator
boolean
Default: false

Use internal frame generator in FPGA instead of getting data from a real detector

+
internal_frame_generator_images
integer <int64> [ 1 .. 128 ]
Default: 1
collect_raw_data
boolean
Default: false

Turn off conversion of pixel read-out to photon count

+
pedestal_g0_frames
integer <int64> >= 0
pedestal_g1_frames
integer <int64> >= 0
pedestal_g2_frames
integer <int64> >= 0
storage_cell_delay_us
number <float>

Delay between two storage cells [us]

+
detector_trigger_delay_us
number <float>

Delay between TTL trigger and acquisition start [us]

+
fixed_gain_g1
boolean
Default: false

Fix gain to G1 (can be useful for storage cells)

+
use_gain_hg0
boolean
Default: false

Use high G0 (for low energy applications)

+

Responses

Request samples

Content type
application/json
{
  • "frame_time_us": 450,
  • "count_time_us": 0,
  • "storage_cell_count": 1,
  • "internal_frame_generator": false,
  • "internal_frame_generator_images": 1,
  • "collect_raw_data": false,
  • "pedestal_g0_frames": 0,
  • "pedestal_g1_frames": 0,
  • "pedestal_g2_frames": 0,
  • "storage_cell_delay_us": 0.1,
  • "detector_trigger_delay_us": 0.1,
  • "fixed_gain_g1": false,
  • "use_gain_hg0": false
}

Response samples

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

Get detector configuration

Can be done anytime

+

Responses

Response samples

Content type
application/json
{
  • "frame_time_us": 450,
  • "count_time_us": 0,
  • "storage_cell_count": 1,
  • "internal_frame_generator": false,
  • "internal_frame_generator_images": 1,
  • "collect_raw_data": false,
  • "pedestal_g0_frames": 0,
  • "pedestal_g1_frames": 0,
  • "pedestal_g2_frames": 0,
  • "storage_cell_delay_us": 0.1,
  • "detector_trigger_delay_us": 0.1,
  • "fixed_gain_g1": false,
  • "use_gain_hg0": false
}

Configure spot finding

Can be done anytime, also while data collection is running

+
Request Body schema: application/json
enable
required
boolean
Default: true

Enable spot finding. This is temporary setting, i.e. can be changed anytime during data collection. +" class="sc-iKOmoZ sc-cCzLxZ WVNwY jaVotg">

Enable spot finding. This is temporary setting, i.e. can be changed anytime during data collection. Even if disabled spot finding information will still be send and written, though always with zero spots.

-
indexing
required
boolean
Default: true

Enable indexing. This is temporary setting, i.e. can be changed anytime during data collection.

-
filter_powder_rings
boolean
Default: false

Filter spots which form powder rings (e.g., ice rings)

-
min_spot_count_powder_ring
integer <int64> >= 5

Minimum number of spots to consider a thin resolution shell (0.01 A^-1) a powder ring and filter out.

-
signal_to_noise_threshold
required
number <float> >= 0
photon_count_threshold
required
integer <int64> >= 0
min_pix_per_spot
required
integer <int64> >= 1
max_pix_per_spot
required
integer <int64> >= 1
high_resolution_limit
required
number <float>
low_resolution_limit
required
number <float>
indexing_tolerance
required
number <float> [ 0 .. 1 ]

Acceptance tolerance for spots after the indexing run - the larger the number, the more spots will be accepted

-

Responses

Request samples

Content type
application/json
{
  • "enable": true,
  • "indexing": true,
  • "filter_powder_rings": false,
  • "min_spot_count_powder_ring": 5,
  • "signal_to_noise_threshold": 0.1,
  • "photon_count_threshold": 0,
  • "min_pix_per_spot": 1,
  • "max_pix_per_spot": 1,
  • "high_resolution_limit": 0.1,
  • "low_resolution_limit": 0.1,
  • "indexing_tolerance": 1
}

Get data processing configuration

Can be done anytime

-

Responses

Response samples

Content type
application/json
{
  • "enable": true,
  • "indexing": true,
  • "filter_powder_rings": false,
  • "min_spot_count_powder_ring": 5,
  • "signal_to_noise_threshold": 0.1,
  • "photon_count_threshold": 0,
  • "min_pix_per_spot": 1,
  • "max_pix_per_spot": 1,
  • "high_resolution_limit": 0.1,
  • "low_resolution_limit": 0.1,
  • "indexing_tolerance": 1
}

Configure radial integration

Can be done when detector is Inactive or Idle

-
Request Body schema: application/json
polarization_factor
number <float> [ -1 .. 1 ]

If polarization factor is provided, than polarization correction is enabled.

-
solid_angle_corr
required
boolean
Default: true

Apply solid angle correction for radial integration

-
high_q_recipA
required
number <float>
low_q_recipA
required
number <float>
q_spacing
required
number <float>

Responses

Request samples

Content type
application/json
{
  • "polarization_factor": -1,
  • "solid_angle_corr": true,
  • "high_q_recipA": 0.1,
  • "low_q_recipA": 0.1,
  • "q_spacing": 0.1
}

Response samples

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

Get radial integration configuration

Can be done anytime

-

Responses

Response samples

Content type
application/json
{
  • "polarization_factor": -1,
  • "solid_angle_corr": true,
  • "high_q_recipA": 0.1,
  • "low_q_recipA": 0.1,
  • "q_spacing": 0.1
}

Load binary image for internal FPGA generator

indexing
required
boolean
Default: true

Enable indexing. This is temporary setting, i.e. can be changed anytime during data collection.

+
filter_powder_rings
boolean
Default: false

Filter spots which form powder rings (e.g., ice rings)

+
min_spot_count_powder_ring
integer <int64> >= 5

Minimum number of spots to consider a thin resolution shell (0.01 A^-1) a powder ring and filter out.

+
signal_to_noise_threshold
required
number <float> >= 0
photon_count_threshold
required
integer <int64> >= 0
min_pix_per_spot
required
integer <int64> >= 1
max_pix_per_spot
required
integer <int64> >= 1
high_resolution_limit
required
number <float>
low_resolution_limit
required
number <float>
indexing_tolerance
required
number <float> [ 0 .. 1 ]

Acceptance tolerance for spots after the indexing run - the larger the number, the more spots will be accepted

+

Responses

Request samples

Content type
application/json
{
  • "enable": true,
  • "indexing": true,
  • "filter_powder_rings": false,
  • "min_spot_count_powder_ring": 5,
  • "signal_to_noise_threshold": 0.1,
  • "photon_count_threshold": 0,
  • "min_pix_per_spot": 1,
  • "max_pix_per_spot": 1,
  • "high_resolution_limit": 0.1,
  • "low_resolution_limit": 0.1,
  • "indexing_tolerance": 1
}

Get data processing configuration

Can be done anytime

+

Responses

Response samples

Content type
application/json
{
  • "enable": true,
  • "indexing": true,
  • "filter_powder_rings": false,
  • "min_spot_count_powder_ring": 5,
  • "signal_to_noise_threshold": 0.1,
  • "photon_count_threshold": 0,
  • "min_pix_per_spot": 1,
  • "max_pix_per_spot": 1,
  • "high_resolution_limit": 0.1,
  • "low_resolution_limit": 0.1,
  • "indexing_tolerance": 1
}

Configure radial integration

Can be done when detector is Inactive or Idle

+
Request Body schema: application/json
polarization_factor
number <float> [ -1 .. 1 ]

If polarization factor is provided, than polarization correction is enabled.

+
solid_angle_corr
required
boolean
Default: true

Apply solid angle correction for radial integration

+
high_q_recipA
required
number <float>
low_q_recipA
required
number <float>
q_spacing
required
number <float>

Responses

Request samples

Content type
application/json
{
  • "polarization_factor": -1,
  • "solid_angle_corr": true,
  • "high_q_recipA": 0.1,
  • "low_q_recipA": 0.1,
  • "q_spacing": 0.1
}

Response samples

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

Get radial integration configuration

Can be done anytime

+

Responses

Response samples

Content type
application/json
{
  • "polarization_factor": -1,
  • "solid_angle_corr": true,
  • "high_q_recipA": 0.1,
  • "low_q_recipA": 0.1,
  • "q_spacing": 0.1
}

Load binary image for internal FPGA generator

Load image for internal FPGA generator. This can only happen in Idle state of the detector. +" class="sc-iKOmoZ sc-cCzLxZ WVNwY VEBGS">

Load image for internal FPGA generator. This can only happen in Idle state of the detector. Requires binary blob with 16-bit integer numbers of size of detector in raw/converted coordinates (depending on detector settings).

-
query Parameters
id
integer <int64> [ 0 .. 127 ]

Image id to upload

-
Request Body schema: application/octet-stream
string <binary>

Responses

Load TIFF image for internal FPGA generator

query Parameters
id
integer <int64> [ 0 .. 127 ]

Image id to upload

+
Request Body schema: application/octet-stream
string <binary>

Responses

Load TIFF image for internal FPGA generator

Load image for internal FPGA generator. This can only happen in Idle state of the detector. +" class="sc-iKOmoZ sc-cCzLxZ WVNwY VEBGS">

Load image for internal FPGA generator. This can only happen in Idle state of the detector. Requires TIFF with 16-bit integer numbers of size of detector in raw/converted coordinates (depending on detector settings).

-
query Parameters
id
integer [ 0 .. 127 ]

Image ID to upload

-
Request Body schema: image/tiff
string <binary>

Responses

Select detector

query Parameters
id
integer [ 0 .. 127 ]

Image ID to upload

+
Request Body schema: image/tiff
string <binary>

Responses

Select detector

Jungfraujoch allows to control multiple detectors and/or region-of-interests. +" class="sc-iKOmoZ sc-cCzLxZ WVNwY VEBGS">

Jungfraujoch allows to control multiple detectors and/or region-of-interests. The command allows to choose one detector from the list (ID has to be consistent with one provided by GET response). Changing detector will set detector to Inactive state and will require reinitialization.

-
Request Body schema: application/json
id
required
integer <int64>

Responses

Request samples

Content type
application/json
{
  • "id": 1
}

Response samples

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

List available detectors

Configured detectors that can be selected by used

-

Responses

Response samples

Content type
application/json
{
  • "detectors": [
    ],
  • "current_id": 0
}

Get Jungfraujoch status

Status of the data acquisition

-

Responses

Response samples

Content type
application/json
{
  • "state": "Inactive",
  • "progress": 1,
  • "indexing_rate": 0.1
}

Return XFEL pulse IDs for the current data acquisition

Return array of XFEL pulse IDs - (-1) if image not recorded

-

Responses

Response samples

Content type
application/json
[
  • 0
]

Return XFEL event codes for the current data acquisition

Return array of XFEL event codes

-

Responses

Response samples

Content type
application/json
[
  • 0
]

Get detector status

Status of the JUNGFRAU detector

-

Responses

Response samples

Content type
application/json
{
  • "state": "Idle",
  • "powerchip": "PowerOn",
  • "server_version": "string",
  • "number_of_triggers_left": 0,
  • "fpga_temp_degC": [
    ],
  • "high_voltage_V": [
    ]
}

Get box ROIs

Responses

Response samples

Content type
application/json
{
  • "rois": [
    ]
}

Upload box ROIs

Request Body schema: application/json
Array of objects (roi_box) <= 32 items

Responses

Request samples

Content type
application/json
{
  • "rois": [
    ]
}

Response samples

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

Get circular ROI

Responses

Response samples

Content type
application/json
{
  • "rois": [
    ]
}

Upload circular ROI

Request Body schema: application/json
required
Array of objects (roi_circle) <= 32 items

Responses

Request samples

Content type
application/json
{
  • "rois": [
    ]
}

Response samples

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

Generate background estimate plot

Mean intensity for d = 3 - 5 A per image; binning is configurable

-
query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

-

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate spot count plot

Number of spots per image; binning is configurable

-
query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

-

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate indexing rate plot

Image indexing rate; binning is configurable

-
query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

-

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate error pixels plot

Count of error (mean) and saturated (mean/max) pixels per image; binning is configurable

-
query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

-

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate strong pixels plot

Count of strong pixels per image (from spot finding); binning is configurable

-
query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

-

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate ROI sum plot

Sum of ROI rectangle per image; binning is configurable

-
query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

-

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate plot of ROI max count

Max count of ROI per image; binning is configurable

-
query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

-

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate plot of ROI valid pixels

Number of pixels within a ROI area; pixels with special values (overload, bad pixel) are excluded; multipixels are counted just once; binning is configurable

-
query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

-

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate receiver delay plot

Amount of frames the receiver is behind the FPGA for each image - used for internal debugging; binning is configurable

-
query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

-

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate receiver free send buffer plot

Amount of send buffers available during frame processing - used for internal debugging; binning is configurable

-
query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

-

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate image collection efficiency plot

Ratio of collected and expected packets per image; binning is configurable

-
query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

-

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate indexing rate per file

Indexing rate per each of data files; useful for example for time resolved data

-

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate radial integration profile

Generate average radial integration profile

-

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate radial integration profiles per file

Radial integration plots for both the whole dataset and per file; useful for time-resolved measurements

-

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

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"
}

Get calibration statistics

Statistics are provided for each module/storage cell separately

-

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get last preview image in JPEG format using custom settings

Request Body schema: application/json
saturation
required
integer <int64> [ 0 .. 65535 ]

Saturation value to set contrast in the preview image

-
show_spots
boolean
Default: true

Show spot finding results on the image

-
show_roi
boolean
Default: false

Show ROI areas on the image

-
jpeg_quality
integer <int64> [ 0 .. 100 ]
Default: 100

Quality of JPEG image (100 - highest; 0 - lowest)

-
show_indexed
boolean
Default: false

Preview indexed images only

-
show_user_mask
boolean
Default: false

Show user mask

-
resolution_ring
number <float> [ 0.1 .. 100 ]
Default: 0.1

Responses

Request samples

Content type
application/json
{
  • "saturation": 65535,
  • "show_spots": true,
  • "show_roi": false,
  • "jpeg_quality": 100,
  • "show_indexed": false,
  • "show_user_mask": false,
  • "resolution_ring": 0.1
}

Response samples

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

Get last preview image in JPEG format using default settings

Responses

Get last preview image in TIFF format

Responses

Get last preview image in TIFF format for calibration with PyFAI/Dioptas

Image is reduced to unsigned 16-bit images, all bad pixels are set to 65535 and image is mirrored in vertical direction

-

Responses

Get mask of the detector

Request Body schema: application/json
id
required
integer <int64>

Responses

Request samples

Content type
application/json
{
  • "id": 1
}

Response samples

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

List available detectors

Configured detectors that can be selected by used

+

Responses

Response samples

Content type
application/json
{
  • "detectors": [
    ],
  • "current_id": 0
}

Get Jungfraujoch status

Status of the data acquisition

+

Responses

Response samples

Content type
application/json
{
  • "state": "Inactive",
  • "progress": 1,
  • "indexing_rate": 0.1
}

Return XFEL pulse IDs for the current data acquisition

Return array of XFEL pulse IDs - (-1) if image not recorded

+

Responses

Response samples

Content type
application/json
[
  • 0
]

Return XFEL event codes for the current data acquisition

Return array of XFEL event codes

+

Responses

Response samples

Content type
application/json
[
  • 0
]

Get detector status

Status of the JUNGFRAU detector

+

Responses

Response samples

Content type
application/json
{
  • "state": "Idle",
  • "powerchip": "PowerOn",
  • "server_version": "string",
  • "number_of_triggers_left": 0,
  • "fpga_temp_degC": [
    ],
  • "high_voltage_V": [
    ]
}

Get box ROIs

Responses

Response samples

Content type
application/json
{
  • "rois": [
    ]
}

Upload box ROIs

Request Body schema: application/json
Array of objects (roi_box) <= 32 items

Responses

Request samples

Content type
application/json
{
  • "rois": [
    ]
}

Response samples

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

Get circular ROI

Responses

Response samples

Content type
application/json
{
  • "rois": [
    ]
}

Upload circular ROI

Request Body schema: application/json
required
Array of objects (roi_circle) <= 32 items

Responses

Request samples

Content type
application/json
{
  • "rois": [
    ]
}

Response samples

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

Generate background estimate plot

Mean intensity for d = 3 - 5 A per image; binning is configurable

+
query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

+

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate spot count plot

Number of spots per image; binning is configurable

+
query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

+

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate indexing rate plot

Image indexing rate; binning is configurable

+
query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

+

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate error pixels plot

Count of error (mean) and saturated (mean/max) pixels per image; binning is configurable

+
query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

+

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate strong pixels plot

Count of strong pixels per image (from spot finding); binning is configurable

+
query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

+

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate ROI sum plot

Sum of ROI rectangle per image; binning is configurable

+
query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

+

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate plot of ROI max count

Max count of ROI per image; binning is configurable

+
query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

+

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate plot of ROI valid pixels

Number of pixels within a ROI area; pixels with special values (overload, bad pixel) are excluded; multipixels are counted just once; binning is configurable

+
query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

+

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate receiver delay plot

Amount of frames the receiver is behind the FPGA for each image - used for internal debugging; binning is configurable

+
query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

+

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate receiver free send buffer plot

Amount of send buffers available during frame processing - used for internal debugging; binning is configurable

+
query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

+

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate image collection efficiency plot

Ratio of collected and expected packets per image; binning is configurable

+
query Parameters
binning
integer

Binning of frames for the plot (0 = default binning)

+

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate indexing rate per file

Indexing rate per each of data files; useful for example for time resolved data

+

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate radial integration profile

Generate average radial integration profile

+

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

Generate radial integration profiles per file

Radial integration plots for both the whole dataset and per file; useful for time-resolved measurements

+

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "plot": [
    ]
}

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"
}

Get calibration statistics

Statistics are provided for each module/storage cell separately

+

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get last preview image in JPEG format using custom settings

Request Body schema: application/json
saturation
required
integer <int64> [ 0 .. 65535 ]

Saturation value to set contrast in the preview image

+
show_spots
boolean
Default: true

Show spot finding results on the image

+
show_roi
boolean
Default: false

Show ROI areas on the image

+
jpeg_quality
integer <int64> [ 0 .. 100 ]
Default: 100

Quality of JPEG image (100 - highest; 0 - lowest)

+
show_indexed
boolean
Default: false

Preview indexed images only

+
show_user_mask
boolean
Default: false

Show user mask

+
resolution_ring
number <float> [ 0.1 .. 100 ]
Default: 0.1

Responses

Request samples

Content type
application/json
{
  • "saturation": 65535,
  • "show_spots": true,
  • "show_roi": false,
  • "jpeg_quality": 100,
  • "show_indexed": false,
  • "show_user_mask": false,
  • "resolution_ring": 0.1
}

Response samples

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

Get last preview image in JPEG format using default settings

Responses

Get last preview image in TIFF format

Responses

Get last preview image in TIFF format for calibration with PyFAI/Dioptas

Image is reduced to unsigned 16-bit images, all bad pixels are set to 65535 and image is mirrored in vertical direction

+

Responses

Get mask of the detector

Get full pixel mask of the detector +" class="sc-iKOmoZ sc-cCzLxZ WVNwY VEBGS">

Get full pixel mask of the detector See NXmx standard for meaning of pixel values

-

Responses

Get user mask of the detector

Get user pixel mask of the detector in the actual detector coordinates: 0 - good pixel, 1 - masked

-

Responses

Upload user mask of the detector

Responses

Get user mask of the detector

Get user pixel mask of the detector in the actual detector coordinates: 0 - good pixel, 1 - masked

+

Responses

Upload user mask of the detector

Should be in Idle state. +" class="sc-iKOmoZ sc-cCzLxZ WVNwY VEBGS">

Should be in Idle state. Upload user mask of the detector - this is for example to account for beam stop shadow or misbehaving regions. If detector is conversion mode the mask can be both in raw (1024x512; stacked modules) or converted coordinates. In the latter case - module gaps are ignored and don't need to be assigned value. @@ -844,21 +843,23 @@ Mask is expected as TIFF (4-byte; unsigned). 0 - good pixel, other value - masked User mask is stored in NXmx pixel mask (bit 8), as well as used in spot finding and azimuthal integration. User mask is not automatically applied - i.e. pixels with user mask will have a valid pixel value in the images.

-
Request Body schema: application/octet-stream
string <binary>

Responses

Response samples

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

Get pedestal G0 in TIFF format

query Parameters
gain_level
required
integer

Gain level (0, 1, 2)

-
sc
integer

Storage cell number

-

Responses

+
Request Body schema: application/octet-stream
string <binary>

Responses

Response samples

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

Get pedestal G0 in TIFF format

query Parameters
gain_level
required
integer

Gain level (0, 1, 2)

+
sc
integer

Storage cell number

+

Responses

/version

Responses

-

Jungfraujoch writer (1.0.0)

Download OpenAPI specification:Download

Jungfraujoch Writer Web API

-

Get writer status

Responses

Response samples

Content type
application/json
{
  • "nimages": 0,
  • "performance_MBs": 0,
  • "performance_Hz": 0,
  • "file_prefix": "string",
  • "state": "idle"
}

Cancel running data collection

Jungfraujoch writer (1.0.0)

Download OpenAPI specification:Download

Jungfraujoch Writer Web API

+

Get writer status

Responses

Response samples

Content type
application/json
{
  • "nimages": 0,
  • "performance_MBs": 0.1,
  • "performance_Hz": 0.1,
  • "file_prefix": "string",
  • "state": "idle"
}

Cancel running data collection

It only instructs writer to cancel, but doesn't wait for cancellation actually happening. +" class="sc-iKOmoZ sc-cCzLxZ WVNwY VEBGS">

It only instructs writer to cancel, but doesn't wait for cancellation actually happening. It still requires to call /wait_till_done

-

Responses

+

Responses

/version

Responses