From 8e5b07115fffc0814edf0ea68a159e7c6c093ee7 Mon Sep 17 00:00:00 2001 From: leonarski_f Date: Wed, 17 Jun 2026 15:42:50 +0200 Subject: [PATCH 1/6] AzimuthalIntegrationSettings: More generous Q spacing --- broker/gen/model/Azim_int_settings.cpp | 58 +++++++++++++++++++++-- broker/jfjoch_api.yaml | 7 ++- broker/redoc-static.html | 10 ++-- common/AzimuthalIntegrationSettings.cpp | 14 +++--- common/AzimuthalIntegrationSettings.h | 3 ++ frontend/package-lock.json | 4 +- frontend/src/components/AzIntSettings.tsx | 8 ++-- viewer/windows/JFJochAzIntWindow.cpp | 8 ++-- 8 files changed, 87 insertions(+), 25 deletions(-) diff --git a/broker/gen/model/Azim_int_settings.cpp b/broker/gen/model/Azim_int_settings.cpp index 23045e90..4eeac0bf 100644 --- a/broker/gen/model/Azim_int_settings.cpp +++ b/broker/gen/model/Azim_int_settings.cpp @@ -52,7 +52,59 @@ bool Azim_int_settings::validate(std::stringstream& msg, const std::string& path bool success = true; const std::string _pathPrefix = pathPrefix.empty() ? "Azim_int_settings" : pathPrefix; - + + + /* High_q_recipA */ { + const float& value = m_High_q_recipA; + const std::string currentValuePath = _pathPrefix + ".highQRecipA"; + + + if (value < static_cast(0.000020)) + { + success = false; + msg << currentValuePath << ": must be greater than or equal to 0.000020;"; + } + if (value > static_cast(10.0)) + { + success = false; + msg << currentValuePath << ": must be less than or equal to 10.0;"; + } + + } + + + /* Low_q_recipA */ { + const float& value = m_Low_q_recipA; + const std::string currentValuePath = _pathPrefix + ".lowQRecipA"; + + + if (value < static_cast(0.000010)) + { + success = false; + msg << currentValuePath << ": must be greater than or equal to 0.000010;"; + } + if (value > static_cast(10)) + { + success = false; + msg << currentValuePath << ": must be less than or equal to 10;"; + } + + } + + + /* Q_spacing */ { + const float& value = m_Q_spacing; + const std::string currentValuePath = _pathPrefix + ".qSpacing"; + + + if (value < static_cast(0.000010)) + { + success = false; + msg << currentValuePath << ": must be greater than or equal to 0.000010;"; + } + + } + if (azimuthalBinsIsSet()) { const int64_t& value = m_Azimuthal_bins; @@ -64,10 +116,10 @@ bool Azim_int_settings::validate(std::stringstream& msg, const std::string& path success = false; msg << currentValuePath << ": must be greater than or equal to 1;"; } - if (value > 256ll) + if (value > 512ll) { success = false; - msg << currentValuePath << ": must be less than or equal to 256;"; + msg << currentValuePath << ": must be less than or equal to 512;"; } } diff --git a/broker/jfjoch_api.yaml b/broker/jfjoch_api.yaml index 86e39a6b..ff1ab4eb 100644 --- a/broker/jfjoch_api.yaml +++ b/broker/jfjoch_api.yaml @@ -1065,18 +1065,23 @@ components: default: true high_q_recipA: type: number + minimum: 2e-5 + maximum: 10.0 format: float low_q_recipA: type: number format: float + minimum: 1e-5 + maximum: 10 q_spacing: type: number format: float + minimum: 1e-5 azimuthal_bins: type: integer format: int64 minimum: 1 - maximum: 256 + maximum: 512 default: 1 description: Numer of azimuthal (phi) bins; 1 = standard 1D azimuthal integration force_cpu: diff --git a/broker/redoc-static.html b/broker/redoc-static.html index 2c2f80ff..1039e50e 100644 --- a/broker/redoc-static.html +++ b/broker/redoc-static.html @@ -702,7 +702,7 @@ This option should be turned OFF for small molecule datasets or for crystals wit
http://localhost:5232/config/spot_finding

Response samples

Content type
application/json
{
  • "enable": true,
  • "indexing": true,
  • "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,
  • "high_resolution_limit_for_spot_count_low_res": 2,
  • "quick_integration": false,
  • "ice_ring_width_q_recipA": 0.02,
  • "high_res_gap_Q_recipA": 1.5
}

Configure azimuthal integration

Can be done when detector is Inactive or Idle

Request Body schema: application/json
polarization_corr
required
boolean
Default: true

Apply polarization correction for azimuthal integration (polarization factor must be configured in dataset settings)

solid_angle_corr
required
boolean
Default: true

Apply solid angle correction for azimuthal integration

-
high_q_recipA
required
number <float>
low_q_recipA
required
number <float>
q_spacing
required
number <float>
azimuthal_bins
integer <int64> [ 1 .. 256 ]
Default: 1

Numer of azimuthal (phi) bins; 1 = standard 1D azimuthal integration

+
high_q_recipA
required
number <float> [ 0.00002 .. 10 ]
low_q_recipA
required
number <float> [ 0.00001 .. 10 ]
q_spacing
required
number <float> >= 0.00001
azimuthal_bins
integer <int64> [ 1 .. 512 ]
Default: 1

Numer of azimuthal (phi) bins; 1 = standard 1D azimuthal integration

force_cpu
boolean
Default: false

Force CPU processing of azimuthal integration in the FPGA data acquisition workflow. This allows to extend number of azimuthal integration bins, as well as to calculate standard deviation of the azimuthal integration results.

@@ -710,10 +710,10 @@ of the azimuthal integration results.

Request samples

Content type
application/json
{
  • "polarization_corr": true,
  • "solid_angle_corr": true,
  • "high_q_recipA": 0.1,
  • "low_q_recipA": 0.1,
  • "q_spacing": 0.1,
  • "azimuthal_bins": 1,
  • "force_cpu": false
}

Response samples

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

Get azimuthal integration configuration

Can be done anytime

+
http://localhost:5232/config/azim_int

Request samples

Content type
application/json
{
  • "polarization_corr": true,
  • "solid_angle_corr": true,
  • "high_q_recipA": 0.00002,
  • "low_q_recipA": 0.00001,
  • "q_spacing": 0.00001,
  • "azimuthal_bins": 1,
  • "force_cpu": false
}

Response samples

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

Get azimuthal integration configuration

Can be done anytime

Responses

Response samples

Content type
application/json
{
  • "polarization_corr": true,
  • "solid_angle_corr": true,
  • "high_q_recipA": 0.1,
  • "low_q_recipA": 0.1,
  • "q_spacing": 0.1,
  • "azimuthal_bins": 1,
  • "force_cpu": false
}

Load binary image for internal FPGA generator

Load image for internal FPGA generator. This can only happen in Idle state of the detector. +

http://localhost:5232/config/azim_int

Response samples

Content type
application/json
{
  • "polarization_corr": true,
  • "solid_angle_corr": true,
  • "high_q_recipA": 0.00002,
  • "low_q_recipA": 0.00001,
  • "q_spacing": 0.00001,
  • "azimuthal_bins": 1,
  • "force_cpu": false
}

Load binary image for internal FPGA generator

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

@@ -815,7 +815,7 @@ This can only be done when detector is Idle, Error or

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

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": {
    },
  • "image_pusher": {
    }
}

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": {
    },
  • "image_pusher": {
    }
}

Get data collection statistics

Results of the last data collection

Responses