Files
Jungfraujoch/broker/jfjoch_api.yaml
2024-12-02 21:17:14 +01:00

2565 lines
84 KiB
YAML

openapi: 3.0.3
info:
title: Jungfraujoch
description: |
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.
version: 1.0.0-rc.27
contact:
name: Filip Leonarski (Paul Scherrer Institute)
email: filip.leonarski@psi.ch
license:
name: GPL-3.0
url: https://www.gnu.org/licenses/gpl-3.0.html
servers:
- url: http://localhost:5232
description: Test Jungfraujoch system
components:
parameters:
binning:
in: query
name: binning
required: false
schema:
type: integer
description: Binning of frames for the plot (0 = default binning)
compression:
in: query
name: compression
required: false
schema:
type: boolean
default: true
description: Enable DEFLATE compression of output data.
schemas:
rotation_axis:
description: Definition of a crystal rotation axis
type: object
required:
- step
- vector
properties:
name:
type: string
default: omega
minLength: 1
description: Name of rotation axis (e.g., omega, phi)
step:
type: number
format: float
example: 0.1
description: Angle step in degrees
start:
type: number
format: float
example: 50
description: Start angle in degrees
default: 0
vector:
type: array
description: Rotation axis
example: [ 1, 0, 0 ]
items:
type: number
format: float
minItems: 3
maxItems: 3
dataset_settings:
type: object
required:
- beam_x_pxl
- beam_y_pxl
- detector_distance_mm
- incident_energy_keV
properties:
images_per_trigger:
type: integer
format: int64
minimum: 1
default: 1
description: |
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:
type: integer
format: int64
default: 1
minimum: 1
description: |
Number of TTL trigger that the detector is expected to receive during data collection
image_time_us:
type: integer
format: int64
minimum: 0
description: |
Image time.
If not provided (or zero value) the frame time is assumed as default.
Image time must be multiple of frame time; max value is 256 * frame_time.
In XFEL mode: summation happens for frames collected with multiple triggers.
Ignored for storage cells and if raw data are saved.
beam_x_pxl:
type: number
format: float
description: |
/entry/detector/beam_center_x in NXmx
Beam center in X direction [pixels]
beam_y_pxl:
type: number
format: float
description: |
/entry/detector/beam_center_y in NXmx
Beam center in X direction [pixels]
detector_distance_mm:
type: number
format: float
minimum: 0
description:
/entry/detector/distance in NXmx
Detector distance [mm]
incident_energy_keV:
type: number
format: float
minimum: 0.001
maximum: 500.0
description: |
Used to calculate /entry/beam/incident_wavelength in NXmx
Incident particle (photon, electron) energy in keV
file_prefix:
type: string
default: ""
description: Prefix for filenames. If left empty, no file will be saved.
images_per_file:
type: integer
format: int64
minimum: 0
default: 1000
description: Number of files in a single HDF5 data file (0 = write all images to a single data file).
space_group_number:
type: integer
format: int64
minimum: 0
default: 0
maximum: 194
description: Number of space group for the crystal. Currently used solely as metadata, not relevant for image processing done in Jungfraujoch.
sample_name:
type: string
default: ""
description: |
/entry/sample/name in NXmx
Sample name
compression:
type: string
enum: [
"bslz4",
"bszstd",
"bszstd_rle",
"none"
]
default: "bslz4"
description: |
Compression type for the images transferred over ZeroMQ and saved to HDF5 file.
total_flux:
type: number
format: float
description: |
/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:
type: number
format: float
minimum: 0.0
maximum: 1.0
description: |
/entry/instrument/attenuator/attenuator_transmission
Transmission of attenuator (filter) [no units]
goniometer:
$ref: "#/components/schemas/rotation_axis"
header_appendix:
description: |
Header appendix, added as user_data/user to start ZeroMQ message (can be any valid JSON)
In general, it is not saved in HDF5 file.
However, if values are placed in "hdf5" object, `jfjoch_writer` will write them in /entry/data of the HDF5 file.
This applies solely to string and number (double floating-point). No arrays/sub-objects is allowed.
For example {"hdf5": {"val1":1, "val2":"xyz"}}, will write /entry/user/val1 and /entry/user/val2.
image_appendix:
description: |
Image appendix, added as user_data to image ZeroMQ message (can be any valid JSON)
Not saved in HDF5 file
data_reduction_factor_serialmx:
type: number
format: float
default: 1.0
minimum: 0.0
maximum: 1.0
description: |
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.
pixel_value_low_threshold:
type: integer
format: int64
minimum: 0
description: |
Set all counts lower than the value to zero.
When the value is set, negative numbers other than error pixel value are always set to zero.
Setting to zero is equivalent to turning the option off.
run_number:
type: integer
format: int64
minimum: 0
description: |
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.
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: |
Name of group owning the data (e.g. p-group or proposal number).
Transferred over CBOR stream, though not saved in HDF5 file.
poisson_compression:
type: integer
format: int64
minimum: 0
maximum: 16
description: |
Enable lossy compression of pixel values that preserves Poisson statistics.
Requires to provide a numerical factor SQ.
Pixel value P will be transformed to round(sqrt(P) * SQ), with rounding to the closest integer.
Compression is turned off if the value is missing or it is set to zero.
write_nxmx_hdf5_master:
type: boolean
default: true
description: |
Write NXmx formatted HDF5 master file. Recommended to use for macromolecular crystallography experiments
and to turn off for other experiments.
save_calibration:
type: boolean
description: |
Forward image calibration (at the moment pedestal and pedestal RMS for JUNGFRAU) using the ZeroMQ stream to writer.
If parameter is not provided calibration will be saved only if more than 4 images are recorded.
unit_cell:
type: object
description: Unit cell parameters. Necessary to run indexing. Units of angstrom and degree
required:
- a
- b
- c
- alpha
- beta
- gamma
properties:
a:
type: number
format: float
example: 37
minimum: 0
b:
type: number
format: float
example: 37
minimum: 0
c:
type: number
format: float
example: 78
minimum: 0
alpha:
type: number
format: float
example: 90
minimum: 0
maximum: 360
beta:
type: number
format: float
example: 90
minimum: 0
maximum: 360
gamma:
type: number
format: float
example: 90
minimum: 0
maximum: 360
pixel_mask_statistics:
type: object
properties:
user_mask:
description: Number of pixels masked using the user mask
type: integer
format: int64
minimum: 0
too_high_pedestal_rms:
description: Number of pixels with G0 pedestal RMS higher than provided threshold
type: integer
format: int64
minimum: 0
wrong_gain:
description: Number of pixels that show wrong gain level during the pedestal procedure
type: integer
format: int64
minimum: 0
image_format_settings:
type: object
required:
- summation
- jungfrau_conversion
- geometry_transform
- mask_chip_edges
- mask_module_edges
- apply_mask
properties:
summation:
type: boolean
description: |
Enable summation of images to a given image_time
If disabled images are saved according to original detector speed, but image count is adjusted
geometry_transform:
type: boolean
description: |
Place module read-out into their location on composed detector and extend multipixels
jungfrau_conversion:
type: boolean
description: |
Convert pixel value in ADU to photon counts/energy
Only affects JUNGFRAU detector
jungfrau_conversion_factor_keV:
type: number
format: float
minimum: 0.001
maximum: 500.0
description: |
Used to convert energy deposited into pixel to counts
If not provided incident_energy_keV is used
bit_depth_image:
type: integer
format: int64
enum: [8, 16, 32]
description: |
Bit depth of resulting image (it doesn't affect the detector read-out value)
If not provided value is adjusted automatically
signed_output:
type: boolean
description: |
Controls if pixels have signed output
If not provided value is adjusted automatically
mask_module_edges:
type: boolean
default: true
description: |
Mask 1 pixel on the module boundary
mask_chip_edges:
type: boolean
default: true
description: |
Mask multipixels on chip boundary
jungfrau_mask_pixels_without_g0:
type: boolean
default: true
description: |
JUNGFRAU: mask pixels that don't operate in G0, but do operate in G1 and G1.
This should be turned off for cases, where detector is operated at room temperature with long exposure time.
apply_mask:
type: boolean
default: false
description: |
Masked pixels are set to special value in the images produced by Jungfraujoch
jungfrau_pedestal_g0_rms_limit:
type: integer
format: int64
default: 100
minimum: 0
description: Pixels with pedestal G0 RMS above the threshold are marked as masked pixels
detector_power_state:
type: string
description: Power on of ASICs
enum: [ "PowerOn", "PowerOff", "Partial" ]
detector_state:
type: string
description: Current state of the detector
enum: [ "Idle", "Waiting", "Busy", "Error", "Not connected"]
detector_status:
type: object
required:
- state
- powerchip
- server_version
- number_of_triggers_left
- fpga_temp_degC
- high_voltage_V
properties:
state:
$ref: '#/components/schemas/detector_state'
powerchip:
$ref: '#/components/schemas/detector_power_state'
server_version:
type: string
description: Detector server (on read-out boards) version
number_of_triggers_left:
type: integer
format: int64
description: Remaining triggers to the detector (max of all modules)
fpga_temp_degC:
type: array
description: Temperature of detector FPGAs
items:
type: integer
format: int64
high_voltage_V:
type: array
description: High voltage for detector modules
items:
type: integer
format: int64
detector_timing:
type: string
enum: [auto, trigger, burst, gated]
default: trigger
detector_settings:
type: object
required:
- frame_time_us
properties:
frame_time_us:
type: integer
description: |
Interval between consecutive frames.
This is internal frame time for the JUNGFRAU detector, image time has to be integer multiply of this number.
For EIGER detector this is default frame time, not used otherwise
format: int64
minimum: 450
count_time_us:
type: integer
description: |
Integration time of the detector.
If not provided count time will be set to maximum value for a given frame time.
format: int64
internal_frame_generator:
type: boolean
default: false
description: Use internal frame generator in FPGA instead of getting data from a real detector
internal_frame_generator_images:
type: integer
format: int64
default: 1
minimum: 1
maximum: 64
description: Number of images stored in the internal frame generator.
detector_trigger_delay_ns:
type: integer
format: int64
minimum: 0
default: 0
description: Delay between TTL trigger and acquisition start [ns]
timing:
$ref: '#/components/schemas/detector_timing'
eiger_threshold_keV:
type: number
format: float
minimum: 1.0
maximum: 100.0
description: |
Threshold for the EIGER detector.
If value is provided, it will be used for all subsequent acquisitions, irrespective of beam energy.
If value is not provided, threshold will be determined on start of acquisition as half of incident energy.
This might lead to increased start time.
eiger_bit_depth:
type: integer
format: int64
enum: [ 8, 16, 32 ]
description: |
Bit depth of EIGER read-out.
If value is not provided bit depth is adjusted automatically based on the image time.
jungfrau_pedestal_g0_frames:
type: integer
format: int64
default: 2000
minimum: 0
jungfrau_pedestal_g1_frames:
type: integer
format: int64
default: 300
minimum: 0
jungfrau_pedestal_g2_frames:
type: integer
format: int64
default: 300
minimum: 0
jungfrau_pedestal_min_image_count:
type: integer
format: int64
default: 128
minimum: 32
description: Minimum number of collected images for pedestal to consider it viable
jungfrau_storage_cell_count:
type: integer
format: int64
default: 1
minimum: 1
maximum: 16
jungfrau_storage_cell_delay_ns:
type: integer
format: int64
minimum: 2100
default: 5000
description: Delay between two storage cells [ns]
jungfrau_fixed_gain_g1:
type: boolean
default: false
description: Fix gain to G1 (can be useful for storage cells)
jungfrau_use_gain_hg0:
type: boolean
default: false
description: Use high G0 (for low energy applications)
spot_finding_settings:
type: object
required:
- enable
- indexing
- signal_to_noise_threshold
- photon_count_threshold
- max_pix_per_spot
- min_pix_per_spot
- high_resolution_limit
- low_resolution_limit
- indexing_tolerance
properties:
enable:
type: boolean
default: true
description: |
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:
type: boolean
default: true
description: |
Enable indexing. This is temporary setting, i.e. can be changed anytime during data collection.
filter_powder_rings:
type: boolean
default: false
description: Filter spots which form powder rings (e.g., ice rings)
min_spot_count_powder_ring:
type: integer
format: int64
minimum: 5
description: Minimum number of spots to consider a thin resolution shell (0.01 A^-1) a powder ring and filter out.
signal_to_noise_threshold:
type: number
format: float
minimum: 0
photon_count_threshold:
type: integer
format: int64
minimum: 0
min_pix_per_spot:
type: integer
format: int64
minimum: 1
max_pix_per_spot:
type: integer
format: int64
minimum: 1
high_resolution_limit:
type: number
format: float
low_resolution_limit:
type: number
format: float
indexing_tolerance:
type: number
format: float
minimum: 0.0
maximum: 1.0
description: Acceptance tolerance for spots after the indexing run - the larger the number, the more spots will be accepted
azim_int_settings:
type: object
required:
- solid_angle_corr
- high_q_recipA
- low_q_recipA
- q_spacing
properties:
polarization_factor:
type: number
description: If polarization factor is provided, than polarization correction is enabled.
format: float
minimum: -1.0
maximum: 1.0
solid_angle_corr:
type: boolean
description: Apply solid angle correction for radial integration
default: true
high_q_recipA:
type: number
format: float
low_q_recipA:
type: number
format: float
q_spacing:
type: number
format: float
detector_list:
type: object
required:
- detectors
- current_id
properties:
detectors:
type: array
items:
type: object
required:
- id
- nmodules
- description
- width
- height
- serial_number
- base_ipv4_addr
- udp_interface_count
properties:
id:
type: integer
format: int64
minimum: 0
description:
type: string
example: "JUNGFRAU 4 Mpixel"
serial_number:
type: string
example: "JF17T16V01"
base_ipv4_addr:
type: string
example: "10.10.10.1"
udp_interface_count:
type: integer
format: int64
example: 2
description: Number of UDP interfaces per detector module
nmodules:
type: integer
format: int64
example: 18
width:
type: integer
format: int64
example: 2068
height:
type: integer
format: int64
example: 2164
current_id:
type: integer
format: int64
example: 0
detector_selection:
type: object
required:
- id
properties:
id:
type: integer
format: int64
example: 1
measurement_statistics:
type: object
properties:
file_prefix:
type: string
run_number:
type: integer
format: int64
description: |
Number of data collection run. This can be either automatically incremented or provided externally for each data collection.
experiment_group:
type: string
description: |
Name of group owning the data (e.g. p-group or proposal number).
images_expected:
type: integer
format: int64
images_collected:
type: integer
format: int64
description: |
Images collected by the receiver. This number will be lower than images expected if there were issues with data collection performance.
images_sent:
type: integer
format: int64
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_discarded_lossy_compression:
type: integer
format: int64
description: Images discarded by the lossy compression filter
max_image_number_sent:
type: integer
format: int64
collection_efficiency:
type: number
format: float
example: 1.0
minimum: 0.0
maximum: 1.0
compression_ratio:
type: number
format: float
example: 5.3
minimum: 0.0
cancelled:
type: boolean
max_receiver_delay:
type: integer
format: int64
indexing_rate:
type: number
format: float
detector_width:
type: integer
format: int64
detector_height:
type: integer
format: int64
detector_pixel_depth:
type: integer
format: int64
enum: [2, 4]
bkg_estimate:
type: number
format: float
unit_cell:
type: string
fpga_status:
type: array
items:
type: object
required:
- pci_dev_id
- serial_number
- base_mac_addr
- eth_link_status
- eth_link_count
- power_usage_W
- fpga_temp_C
- hbm_temp_C
- packets_sls
- packets_udp
- idle
- fw_version
properties:
pci_dev_id:
type: string
serial_number:
type: string
fw_version:
type: string
base_mac_addr:
type: string
eth_link_count:
type: integer
format: int64
eth_link_status:
type: integer
format: int64
power_usage_W:
type: number
format: float
fpga_temp_C:
type: number
format: float
hbm_temp_C:
type: number
format: float
packets_udp:
type: integer
format: int64
packets_sls:
type: integer
format: int64
idle:
type: boolean
broker_status:
type: object
required:
- state
properties:
state:
type: string
enum: ["Inactive", "Idle", "Busy", "Measuring", "Pedestal", "Error"]
progress:
type: number
format: float
description: Progress of data collection (only available if receiving is running)
example: 1.0
minimum: 0.0
maximum: 1.0
plot:
type: object
required:
- x
- y
- title
description: x and y coordinates for plotting, it is OK to assume that both arrays have the same size; layout is optimized for Plotly
properties:
title:
type: string
default: ""
x:
type: array
items:
type: number
format: float
y:
type: array
items:
type: number
format: float
plots:
type: object
required:
- plot
properties:
title:
type: string
plot:
type: array
items:
$ref: '#/components/schemas/plot'
calibration_statistics:
type: array
items:
required:
- module_number
- storage_cell_number
- pedestal_g0_mean
- pedestal_g1_mean
- pedestal_g2_mean
- gain_g0_mean
- gain_g1_mean
- gain_g2_mean
- masked_pixels
type: object
properties:
module_number:
type: integer
format: int64
storage_cell_number:
type: integer
format: int64
pedestal_g0_mean:
type: number
format: float
pedestal_g1_mean:
type: number
format: float
pedestal_g2_mean:
type: number
format: float
gain_g0_mean:
type: number
format: float
gain_g1_mean:
type: number
format: float
gain_g2_mean:
type: number
format: float
masked_pixels:
type: integer
format: int64
jfjoch_statistics:
type: object
description: "Pool statistics for Jungfraujoch to reduce transfers between frontend and jfjoch_broker"
properties:
detector:
$ref: '#/components/schemas/detector_status'
detector_list:
$ref: '#/components/schemas/detector_list'
detector_settings:
$ref: '#/components/schemas/detector_settings'
image_format_settings:
$ref: '#/components/schemas/image_format_settings'
instrument_metadata:
$ref: '#/components/schemas/instrument_metadata'
data_processing_settings:
$ref: '#/components/schemas/spot_finding_settings'
measurement:
$ref: '#/components/schemas/measurement_statistics'
broker:
$ref: '#/components/schemas/broker_status'
fpga:
$ref: '#/components/schemas/fpga_status'
calibration:
$ref: '#/components/schemas/calibration_statistics'
zeromq_preview:
$ref: '#/components/schemas/zeromq_preview_settings'
zeromq_metadata:
$ref: '#/components/schemas/zeromq_metadata_settings'
pixel_mask:
$ref: '#/components/schemas/pixel_mask_statistics'
preview_settings:
type: object
description: "Settings for JPEG rendering of preview images"
required:
- saturation
properties:
saturation:
type: integer
format: int64
minimum: 0
maximum: 65535
description: "Saturation value to set contrast in the preview image"
show_spots:
type: boolean
default: true
description: "Show spot finding results on the image"
show_roi:
type: boolean
default: false
description: "Show ROI areas on the image"
jpeg_quality:
type: integer
description: "Quality of JPEG image (100 - highest; 0 - lowest)"
format: int64
default: 100
minimum: 0
maximum: 100
show_indexed:
type: boolean
description: "Preview indexed images only"
default: false
show_user_mask:
type: boolean
description: "Show user mask"
default: false
resolution_ring:
type: number
format: float
default: 0.1
minimum: 0.1
maximum: 100.0
error_message:
type: object
required:
- msg
- reason
properties:
msg:
type: string
description: "Human readable message"
example: "Detector in wrong state"
reason:
type: string
description: "Enumerate field for automated analysis"
enum: ["WrongDAQState", "Other"]
roi_circle:
type: object
description: "Circular ROI"
required:
- name
- center_x_pxl
- center_y_pxl
- radius_pxl
properties:
name:
type: string
minLength: 1
description: "Name for the ROI; used in the plots"
center_x_pxl:
type: number
format: float
description: "X coordinate of center of the circle [pixels]"
center_y_pxl:
type: number
format: float
description: "Y coordinate of center of the circle [pixels]"
radius_pxl:
type: number
format: float
minimum: 0.0
exclusiveMinimum: true
description: "Radius of the circle [pixels]"
roi_box:
type: object
description: "Box ROI"
required:
- name
- min_x_pxl
- max_x_pxl
- min_y_pxl
- max_y_pxl
properties:
name:
type: string
minLength: 1
description: "Name for the ROI; used in the plots"
min_x_pxl:
type: integer
format: int64
description: "Lower bound (inclusive) in X coordinate for the box"
minimum: 0
max_x_pxl:
type: integer
format: int64
description: "Upper bound (inclusive) in X coordinate for the box"
minimum: 0
min_y_pxl:
type: integer
format: int64
description: "Lower bound (inclusive) in Y coordinate for the box"
minimum: 0
max_y_pxl:
type: integer
format: int64
description: "Upper bound (inclusive) in Y coordinate for the box"
minimum: 0
roi_circle_list:
type: object
description: "List of circular ROIs"
required:
- rois
properties:
rois:
type: array
maxItems: 32
items:
$ref: "#/components/schemas/roi_circle"
roi_box_list:
type: object
description: "List of box ROIs"
properties:
rois:
type: array
maxItems: 32
items:
$ref: "#/components/schemas/roi_box"
instrument_metadata:
type: object
description: "Metadata for a measurement instrument"
required:
- source_name
- instrument_name
properties:
source_name:
type: string
example: Swiss Light Source
source_type:
type: string
description: |
Type of radiation source. NXmx gives a fixed dictionary, though Jungfraujoch is not enforcing compliance.
https://manual.nexusformat.org/classes/base_classes/NXsource.html#nxsource
NXsource allows the following:
Spallation Neutron Source
Pulsed Reactor Neutron Source
Reactor Neutron Source
Synchrotron X-ray Source
Pulsed Muon Source
Rotating Anode X-ray
Fixed Tube X-ray
UV Laser
Free-Electron Laser
Optical Laser
Ion Source
UV Plasma Source
Metal Jet X-ray
example: Synchrotron X-ray Source
default: ""
instrument_name:
type: string
example: CristallinaMX
pulsed_source:
type: boolean
description: |
Settings specific to XFEL (e.g., every image has to come from TTL trigger, save pulse ID and event code)
default: false
electron_source:
type: boolean
description: |
Settings specific to electron source (e.g., wavelength definition)
default: false
detector_module_direction:
type: string
enum: [Xp, Xn, Yp, Yn]
detector_type:
type: string
enum: [EIGER, JUNGFRAU]
image_pusher_type:
type: string
default: None
enum: [ZeroMQ, HDF5, CBOR, None]
standard_detector_geometry:
type: object
description: Regular rectangular geometry, first module is in the bottom left corner of the detector
required:
- nmodules
properties:
nmodules:
type: integer
minimum: 1
description: Number of modules in the detector
gap_x:
type: integer
default: 8
minimum: 0
description: Gap size in X direction [pixels]
gap_y:
type: integer
minimum: 0
default: 36
description: Gap size in Y direction [pixels]
modules_in_row:
type: integer
minimum: 1
default: 1
description: Number of modules in one row
detector_module:
type: object
required:
- x0
- y0
- fast_axis
- slow_axis
properties:
x0:
type: number
y0:
type: number
fast_axis:
$ref: '#/components/schemas/detector_module_direction'
slow_axis:
$ref: '#/components/schemas/detector_module_direction'
detector:
type: object
required:
- description
- serial_number
properties:
description:
type: string
minLength: 1
serial_number:
type: string
minLength: 1
type:
$ref: '#/components/schemas/detector_type'
high_voltage_V:
type: integer
format: int64
minimum: 0
maximum: 200
default: 0
udp_interface_count:
type: integer
format: int64
minimum: 1
maximum: 2
default: 1
module_sync:
type: boolean
default: true
description: Use module 0 as master for timing. Only applies to JUNGFRAU detector (this cannot be turned off for EIGER).
sensor_thickness_um:
type: number
format: float
minimum: 0
default: 320
calibration_file:
type: array
description: |
Gain file (JUNGFRAU) or trimbit file (EIGER).
One entry per module. Either empty or number of module entries.
items:
type: string
hostname:
type: array
description: |
Hostname for detector module. One entry per module
One entry per module. Either empty or number of module entries.
items:
type: string
sensor_material:
type: string
default: Si
tx_delay:
type: array
items:
type: integer
format: int64
base_data_ipv4_address:
type: string
example: 10.10.10.50
standard_geometry:
$ref: '#/components/schemas/standard_detector_geometry'
custom_geometry:
type: array
items:
$ref: '#/components/schemas/detector_module'
mirror_y:
type: boolean
default: true
description: Mirror detector in Y direction to account for MX convention of (0,0) point in top left corner
zeromq_settings:
type: object
description: |
ZeroMQ configuration for Jungfraujoch software.
This structure is used to provide default settings using configuration JSON file and is not used in HTTP.
properties:
send_watermark:
type: integer
format: int64
minimum: 2
maximum: 16384
default: 100
description: Watermark for ZeroMQ send queue (number of outstanding messages queued on Jungfraujoch server per queue)
send_buffer_size:
type: integer
format: int64
description: Send buffer size for ZeroMQ socket
image_socket:
type: array
items:
type: string
example: ["tcp://1.2.3.4:5000", "tcp://1.2.3.4:5001"]
description: |
PUSH ZeroMQ socket for images. In case multiple sockets are provided, images are streamed over multiple sockets.
Images are serialized using CBOR.
Address follows ZeroMQ convention for sockets - in practice ipc://<socket file> and tpc://<IP address>:<port> sockets are OK.
0.0.0.0 instead of IP address is accepted and means listening on all network interfaces.
writer_notification_socket:
type: string
example: "tcp://1.3.4.6:7000"
description: |
PULL ZeroMQ socket for notifications from writer that it finished operation.
This allows Jungfraujoch to operate in a synchronous manner, with end of acquisition being also end of writing.
Address follows ZeroMQ convention for sockets - in practice ipc://<socket file> and tpc://<IP address>:<port> 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.
pcie_devices:
type: array
minLength: 1
items:
type: object
required:
- block_device
properties:
blk:
type: string
example: "/dev/jfjoch0"
description: Block device name
ipv4:
type: string
example: 10.1.1.7
description: IPv4 address of the block device
jfjoch_settings:
type: object
required:
- detector
- frontend_directory
- image_pusher
description: |
Default settings for Jungfraujoch software.
This structure is used to provide default settings using configuration JSON file and is not used in HTTP.
properties:
pcie:
$ref: '#/components/schemas/pcie_devices'
zeromq:
$ref: '#/components/schemas/zeromq_settings'
instrument:
$ref: '#/components/schemas/instrument_metadata'
detector:
type: array
minLength: 1
items:
$ref: '#/components/schemas/detector'
detector_settings:
$ref: '#/components/schemas/detector_settings'
azim_int:
$ref: '#/components/schemas/azim_int_settings'
image_format:
$ref: '#/components/schemas/image_format_settings'
image_buffer_MiB:
type: integer
minimum: 128
default: 2048
description: Size of internal buffer in MiB for images before they are sent to a stream
receiver_threads:
type: integer
minimum: 1
maximum: 512
default: 64
description: Number of threads used by the receiver
numa_policy:
type: string
description: NUMA policy to bind CPUs
frontend_directory:
type: string
description: Location of built JavaScript web frontend
image_pusher:
$ref: '#/components/schemas/image_pusher_type'
zeromq_preview:
$ref: '#/components/schemas/zeromq_preview_settings'
zeromq_metadata:
$ref: '#/components/schemas/zeromq_metadata_settings'
zeromq_metadata_settings:
type: object
required:
- enabled
- period_ms
properties:
enabled:
type: boolean
default: true
description: ZeroMQ metadata socket is enabled.
period_ms:
type: integer
format: int64
minimum: 1
default: 1000
description: |
Period for generating metadata package sent to the ZeroMQ interface in milliseconds.
socket_address:
type: string
description: |
PUB ZeroMQ socket for image metadata information.
Image metadata are serialized using CBOR.
Address follows ZeroMQ convention for sockets - in practice ipc://<socket file> and tcp://<IP address>:<port> sockets are OK.
0.0.0.0 instead of IP address is accepted and means listening on all network interfaces.
zeromq_preview_settings:
type: object
required:
- enabled
- period_ms
properties:
enabled:
type: boolean
default: true
description: ZeroMQ preview socket is enabled.
period_ms:
type: integer
format: int64
default: 1000
description: |
Period for generating preview image sent to the ZeroMQ interface in milliseconds. Default is 1 second.
If set to zero, all images will be sent ZeroMQ (should be used only in case of relatively slow data collection).
This has no effect on HTTP based preview, which updates always at rate of 1 second.
socket_address:
type: string
description: |
PUB ZeroMQ socket for preview images. This socket operates at a reduced frame rate.
Images are serialized using CBOR.
Address follows ZeroMQ convention for sockets - in practice ipc://<socket file> and tcp://<IP address>:<port> sockets are OK.
0.0.0.0 instead of IP address is accepted and means listening on all network interfaces.
paths:
/initialize:
post:
summary: Initialize detector and data acquisition
description: |
Should be used in two cases:
- Detector is in `Inactive` state
- Detector is in `Error` state
X-ray shutter must be closed.
This operation will reconfigure network interface of the detector.
During operation of the detector it is recommended to use the `POST /pedestal` operation instead.
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:
"200":
description: Initialization started
"500":
description: Error within Jungfraujoch code - see output message.
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
/pedestal:
post:
summary: Collect dark current for the detector
description: |
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:
"200":
description: Everything OK
"500":
description: Error within Jungfraujoch code - see output message.
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
/start:
post:
summary: Start detector
description: |
Start data acquisition.
Detector must be in `Idle` state.
Doesn't run calibration procedure.
When the function returns, detector is ready to accept soft/TTL triggers.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/dataset_settings'
responses:
"200":
description: Everything OK
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
"500":
description: Error within Jungfraujoch code - see output message.
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
/wait_till_done:
post:
summary: Wait for acquisition done
parameters:
- in: query
name: timeout
required: false
schema:
type: integer
default: 60
minimum: 0
maximum: 3600
description: Timeout in seconds (0 == immediate response)
description: |
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 indefinite period of time, the procedure is provided with a timeout.
Extending timeout is possible, but requires to ensure safety that client will not close the connection and retry the connection.
responses:
"200":
description: Detector in `Idle` state, another data collection can start immediately
"400":
description: Timeout parameter out of bounds
"500":
description: Error within Jungfraujoch code - see output message.
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
"502":
description: Detector is inactive mode
"504":
description: Timeout reached, need to restart operation
/trigger:
post:
summary: Send soft trigger to the detector
description: Generate soft trigger
responses:
"200":
description: Trigger sent
/cancel:
post:
summary: Cancel running data collection
description: |
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:
"200":
description: Cancel request sent to FPGAs (or ignored, as data collection is not running)
/deactivate:
post:
summary: Prepare detector to turn off
description: |
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:
"200":
description: Detector ready to turn off
"500":
description: Error within Jungfraujoch code - see output message.
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
/config/detector:
put:
summary: Change detector configuration
description: |
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.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/detector_settings'
responses:
"200":
description: Everything OK
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
"500":
description: Error within Jungfraujoch code - see output message.
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
get:
summary: Get detector configuration
description: Can be done anytime
responses:
"200":
description: Everything OK
content:
application/json:
schema:
$ref: '#/components/schemas/detector_settings'
/config/instrument:
put:
summary: Change instrument metadata
description: |
This can only be done when detector is `Idle`, `Error` or `Inactive` states.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/instrument_metadata'
responses:
"200":
description: Everything OK
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
"500":
description: Error within Jungfraujoch code - see output message.
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
get:
summary: Get instrument metadata
description: Can be done anytime
responses:
"200":
description: Everything OK
content:
application/json:
schema:
$ref: '#/components/schemas/instrument_metadata'
/config/image_format:
put:
summary: Change image output format
description: |
This can only be done when detector is `Idle`, `Error` or `Inactive` states.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/image_format_settings'
responses:
"200":
description: Everything OK
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
"500":
description: Error within Jungfraujoch code - see output message.
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
get:
summary: Get image output format
description: Can be done anytime
responses:
"200":
description: Everything OK
content:
application/json:
schema:
$ref: '#/components/schemas/image_format_settings'
/config/image_format/raw:
post:
summary: Configure format for raw data collection
description: |
This can only be done when detector is `Idle`, `Error` or `Inactive` states.
responses:
"200":
description: Everything OK
"500":
description: Error within Jungfraujoch code - see output message.
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
/config/image_format/conversion:
post:
summary: Configure format for data collection with full conversion
description: |
This can only be done when detector is `Idle`, `Error` or `Inactive` states.
responses:
"200":
description: Everything OK
"500":
description: Error within Jungfraujoch code - see output message.
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
/config/spot_finding:
put:
summary: Configure spot finding
description: Can be done anytime, also while data collection is running
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/spot_finding_settings'
responses:
"200":
description: Everything OK
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
get:
summary: Get data processing configuration
description: Can be done anytime
responses:
"200":
description: Everything OK
content:
application/json:
schema:
$ref: '#/components/schemas/spot_finding_settings'
/config/azim_int:
put:
summary: Configure radial integration
description: Can be done when detector is Inactive or Idle
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/azim_int_settings'
responses:
"200":
description: Everything OK
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
"500":
description: Error within Jungfraujoch code - see output message.
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
get:
summary: Get radial integration configuration
description: Can be done anytime
responses:
"200":
description: Everything OK
content:
application/json:
schema:
$ref: '#/components/schemas/azim_int_settings'
/config/internal_generator_image:
put:
summary: Load binary image for internal FPGA generator
description: |
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).
parameters:
- name: id
in: query
description: Image id to upload
required: false
schema:
type: integer
format: int64
minimum: 0
maximum: 127
requestBody:
content:
application/octet-stream:
schema:
type: string
format: binary
responses:
"200":
description: Everything OK
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
/config/internal_generator_image.tiff:
put:
summary: Load TIFF image for internal FPGA generator
description: |
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).
parameters:
- in: query
name: id
description: Image ID to upload
required: false
schema:
type: integer
minimum: 0
maximum: 127
requestBody:
content:
image/tiff:
schema:
type: string
format: binary
responses:
"200":
description: Everything OK
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
/config/select_detector:
put:
summary: Select detector
description: |
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.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/detector_selection'
responses:
"200":
description: Everything OK
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
"500":
description: Error within Jungfraujoch code - see output message.
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
get:
summary: List available detectors
description: Configured detectors that can be selected by used
responses:
"200":
description: Everything OK
content:
application/json:
schema:
$ref: '#/components/schemas/detector_list'
/config/zeromq_preview:
put:
summary: Set ZeroMQ preview settings
description: |
Jungfraujoch can generate preview message stream on ZeroMQ SUB socket.
Here settings of the socket can be adjusted.
While the data structure contains also socket_address, this cannot be changed via HTTP and is ignore in PUT request.
Options set with this PUT request have no effect on HTTP based preview.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/zeromq_preview_settings'
responses:
"200":
description: Everything OK
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
"500":
description: Error within Jungfraujoch code - see output message.
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
get:
summary: Get ZeroMQ preview settings
responses:
"200":
description: Everything OK
content:
application/json:
schema:
$ref: '#/components/schemas/zeromq_preview_settings'
/config/zeromq_metadata:
put:
summary: Set ZeroMQ metadata settings
description: |
Jungfraujoch can generate metadata message stream on ZeroMQ PUB socket. This stream covers all images.
Here settings of the socket can be adjusted.
While the data structure contains also socket_address, this cannot be changed via HTTP and is ignore in PUT request.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/zeromq_metadata_settings'
responses:
"200":
description: Everything OK
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
"500":
description: Error within Jungfraujoch code - see output message.
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
get:
summary: Get ZeroMQ metadata socket settings
responses:
"200":
description: Everything OK
content:
application/json:
schema:
$ref: '#/components/schemas/zeromq_metadata_settings'
/status:
get:
summary: Get Jungfraujoch status
description: Status of the data acquisition
responses:
"200":
description: Everything OK
content:
application/json:
schema:
$ref: '#/components/schemas/broker_status'
/fpga_status:
get:
summary: Get status of FPGA devices
responses:
"200":
description: Everything OK
content:
application/json:
schema:
$ref: '#/components/schemas/fpga_status'
/xfel/pulse_id:
get:
summary: Return XFEL pulse IDs for the current data acquisition
description: Return array of XFEL pulse IDs - (-1) if image not recorded
responses:
"200":
description: "Pulse ID collected"
content:
application/json:
schema:
type: array
items:
type: integer
format: int64
"404":
description: "Not in XFEL mode or no acquisition recorded"
/xfel/event_code:
get:
summary: Return XFEL event codes for the current data acquisition
description: Return array of XFEL event codes
responses:
"200":
description: "Event codes collected"
content:
application/json:
schema:
type: array
items:
type: integer
format: int64
"404":
description: "Not in XFEL mode or no acquisition recorded"
/detector/status:
get:
summary: Get detector status
description: Status of the JUNGFRAU detector
responses:
"200":
description: Everything OK
content:
application/json:
schema:
$ref: '#/components/schemas/detector_status'
"404":
description: Running in "simulator" mode - no detector present
"500":
description: Error encountered when trying to read status
content:
text/plain:
schema:
type: string
description: Exception error
/roi/box:
get:
summary: Get box ROIs
responses:
"200":
description: "OK"
content:
application/json:
schema:
$ref: '#/components/schemas/roi_box_list'
put:
summary: Upload box ROIs
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/roi_box_list"
responses:
"200":
description: Everything OK
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
"500":
description: Error within Jungfraujoch code - see output message.
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
/roi/circle:
get:
summary: Get circular ROI
responses:
"200":
description: "OK"
content:
application/json:
schema:
$ref: '#/components/schemas/roi_circle_list'
put:
summary: Upload circular ROI
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/roi_circle_list"
responses:
"200":
description: Everything OK
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
"500":
description: Error within Jungfraujoch code - see output message.
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
/plot/bkg_estimate:
get:
summary: Generate background estimate plot
description: |
Mean intensity for d = 3 - 5 A per image; binning is configurable
parameters:
- $ref: '#/components/parameters/binning'
- $ref: '#/components/parameters/compression'
responses:
"200":
description: Everything OK. Response will be by default compressed with deflate algorithm, if using curl, use --compressed option.
content:
application/json:
schema:
$ref: '#/components/schemas/plots'
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
/plot/spot_count:
get:
summary: Generate spot count plot
description: Number of spots per image; binning is configurable
parameters:
- $ref: '#/components/parameters/binning'
- $ref: '#/components/parameters/compression'
responses:
"200":
description: Response will be by default compressed with deflate algorithm, if using curl, use --compressed option.
content:
application/json:
schema:
$ref: '#/components/schemas/plots'
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
/plot/indexing_rate:
get:
summary: Generate indexing rate plot
description: Image indexing rate; binning is configurable
parameters:
- $ref: '#/components/parameters/binning'
- $ref: '#/components/parameters/compression'
responses:
"200":
description: Response will be by default compressed with deflate algorithm, if using curl, use --compressed option.
content:
application/json:
schema:
$ref: '#/components/schemas/plots'
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
/plot/indexing_unit_cell:
get:
summary: Generate indexing unit cell length plots
description: Crystal unit cell based on indexing results; binning is configurable
parameters:
- $ref: '#/components/parameters/binning'
- $ref: '#/components/parameters/compression'
responses:
"200":
description: Response will be by default compressed with deflate algorithm, if using curl, use --compressed option.
content:
application/json:
schema:
$ref: '#/components/schemas/plots'
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
/plot/indexing_unit_cell_angle:
get:
summary: Generate indexing unit cell angle plot
description: Crystal unit cell based on indexing results; binning is configurable
parameters:
- $ref: '#/components/parameters/binning'
- $ref: '#/components/parameters/compression'
responses:
"200":
description: Response will be by default compressed with deflate algorithm, if using curl, use --compressed option.
content:
application/json:
schema:
$ref: '#/components/schemas/plots'
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
/plot/error_pixel:
get:
summary: Generate error pixels plot
description: Count of error (mean) and saturated (mean/max) pixels per image; binning is configurable
parameters:
- $ref: '#/components/parameters/binning'
- $ref: '#/components/parameters/compression'
responses:
"200":
description: Response will be by default compressed with deflate algorithm, if using curl, use --compressed option.
content:
application/json:
schema:
$ref: '#/components/schemas/plots'
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
/plot/strong_pixel:
get:
summary: Generate strong pixels plot
description: Count of strong pixels per image (from spot finding); binning is configurable
parameters:
- $ref: '#/components/parameters/binning'
- $ref: '#/components/parameters/compression'
responses:
"200":
description: Response will be by default compressed with deflate algorithm, if using curl, use --compressed option.
content:
application/json:
schema:
$ref: '#/components/schemas/plots'
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
/plot/roi_sum:
get:
summary: Generate ROI sum plot
description: Sum of ROI rectangle per image; binning is configurable
parameters:
- $ref: '#/components/parameters/binning'
- $ref: '#/components/parameters/compression'
responses:
"200":
description: Response will be by default compressed with deflate algorithm, if using curl, use --compressed option.
content:
application/json:
schema:
$ref: '#/components/schemas/plots'
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
/plot/roi_max_count:
get:
summary: Generate plot of ROI max count
description: Max count of ROI per image; binning is configurable
parameters:
- $ref: '#/components/parameters/binning'
- $ref: '#/components/parameters/compression'
responses:
"200":
description: Response will be by default compressed with deflate algorithm, if using curl, use --compressed option.
content:
application/json:
schema:
$ref: '#/components/schemas/plots'
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
/plot/roi_valid_pixels:
get:
summary: Generate plot of ROI valid pixels
description: Number of pixels within a ROI area; pixels with special values (overload, bad pixel) are excluded; multipixels are counted just once; binning is configurable
parameters:
- $ref: '#/components/parameters/binning'
- $ref: '#/components/parameters/compression'
responses:
"200":
description: Response will be by default compressed with deflate algorithm, if using curl, use --compressed option.
content:
application/json:
schema:
$ref: '#/components/schemas/plots'
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
/plot/receiver_delay:
get:
summary: Generate receiver delay plot
description: Amount of frames the receiver is behind the FPGA for each image - used for internal debugging; binning is configurable
parameters:
- $ref: '#/components/parameters/binning'
- $ref: '#/components/parameters/compression'
responses:
"200":
description: Everything OK
content:
application/json:
schema:
$ref: '#/components/schemas/plots'
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
/plot/receiver_free_send_buffers:
get:
summary: Generate receiver free send buffer plot
description: Amount of send buffers available during frame processing - used for internal debugging; binning is configurable
parameters:
- $ref: '#/components/parameters/binning'
- $ref: '#/components/parameters/compression'
responses:
"200":
description: Everything OK
content:
application/json:
schema:
$ref: '#/components/schemas/plots'
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description:
Exception error
/plot/image_collection_efficiency:
get:
summary: Generate image collection efficiency plot
description: Ratio of collected and expected packets per image; binning is configurable
parameters:
- $ref: '#/components/parameters/binning'
- $ref: '#/components/parameters/compression'
responses:
"200":
description: Everything OK
content:
application/json:
schema:
$ref: '#/components/schemas/plots'
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
/plot/azim_int:
get:
summary: Generate radial integration profile
description: Generate average radial integration profile
parameters:
- $ref: '#/components/parameters/compression'
responses:
"200":
description: Everything OK
content:
application/json:
schema:
$ref: '#/components/schemas/plots'
/statistics:
get:
summary: Get general statistics
parameters:
- $ref: '#/components/parameters/compression'
responses:
"200":
description: Everything OK
content:
application/json:
schema:
$ref: '#/components/schemas/jfjoch_statistics'
/statistics/data_collection:
get:
summary: Get data collection statistics
description: Results of the last data collection
responses:
"200":
description: Everything OK
content:
application/json:
schema:
$ref: '#/components/schemas/measurement_statistics'
"404":
description: No data collection performed so far
/statistics/calibration:
get:
summary: Get calibration statistics
description: Statistics are provided for each module/storage cell separately
responses:
"200":
description: Everything OK
content:
application/json:
schema:
$ref: '#/components/schemas/calibration_statistics'
/preview/image.jpeg:
post:
summary: Get last preview image in JPEG format using custom settings
responses:
"200":
description: Preview image
content:
image/jpeg:
schema:
type: string
format: binary
"404":
description: No preview image recorded so far
"400":
description: Input parsing or validation error
content:
text/plain:
schema:
type: string
description: Exception error
"500":
description: Error within Jungfraujoch code - see output message.
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/preview_settings'
get:
summary: Get last preview image in JPEG format using default settings
responses:
"200":
description: Preview image
content:
image/jpeg:
schema:
type: string
format: binary
"404":
description: No preview image recorded so far
/preview/image.tiff:
get:
summary: Get last preview image in TIFF format
responses:
"200":
description: Preview image
content:
image/tiff:
schema:
type: string
format: binary
"404":
description: No preview image recorded so far
/preview/calibration.tiff:
get:
summary: Get last preview image in TIFF format for calibration with PyFAI/Dioptas
description: Image is reduced to unsigned 16-bit images, all bad pixels are set to 65535 and image is mirrored in vertical direction
responses:
"200":
description: Preview image
content:
image/tiff:
schema:
type: string
format: binary
"404":
description: No preview image recorded so far
/config/mask:
get:
summary: Get mask of the detector (binary)
description: |
Get full pixel mask of the detector
See NXmx standard for meaning of pixel values
responses:
"200":
description: Binary array (4 byte; unsigned)
content:
application/octet-stream:
schema:
type: string
format: binary
/config/user_mask:
get:
summary: Get user mask of the detector (binary)
description: "Get user pixel mask of the detector in the actual detector coordinates: 0 - good pixel, 1 - masked"
responses:
"200":
description: User mask in binary format (4 byte; unsigned)
content:
application/octet-stream:
schema:
type: string
format: binary
put:
summary: Upload user mask of the detector (binary)
description: |
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.
Mask is expected as binary array (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.
requestBody:
content:
application/octet-stream:
schema:
type: string
format: binary
responses:
"200":
description: All good
"500":
description: Error within Jungfraujoch code - see output message.
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
/config/mask.tiff:
get:
summary: Get mask of the detector (TIFF)
description: |
Get full pixel mask of the detector
See NXmx standard for meaning of pixel values
responses:
"200":
description: Pixel mask in TIFF format (4 byte; unsigned)
content:
image/tiff:
schema:
type: string
format: binary
/config/user_mask.tiff:
get:
summary: Get user mask of the detector (TIFF)
description: "Get user pixel mask of the detector in the actual detector coordinates: 0 - good pixel, 1 - masked"
responses:
"200":
description: User mask in TIFF format (4 byte; unsigned)
content:
image/tiff:
schema:
type: string
format: binary
put:
summary: Upload user mask of the detector
description: |
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.
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.
requestBody:
content:
image/tiff:
schema:
type: string
format: binary
responses:
"200":
description: All good
"500":
description: Error within Jungfraujoch code - see output message.
content:
application/json:
schema:
$ref: '#/components/schemas/error_message'
/preview/pedestal.tiff:
get:
parameters:
- in: query
name: gain_level
required: true
schema:
type: integer
description: Gain level (0, 1, 2)
- in: query
name: sc
schema:
type: integer
description: Storage cell number
summary: Get pedestal in TIFF format
responses:
"200":
description: Calibration image
content:
image/tiff:
schema:
type: string
format: binary
"404":
description: No calibration recorded so far
/version:
get:
summary: Get Jungfraujoch version of jfjoch_broker
responses:
"200":
description: Release number of Jungfraujoch
content:
text/plain:
schema:
type: string
example: 1.0.0-rc.25