diff --git a/.gitignore b/.gitignore index f9dbd80d..e52eaf2c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ cmake-build-debug/ cmake-build-release/ build*/ +python-client/ +openapi-generator-cli.jar diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 20a1709c..c77ab206 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -54,9 +54,7 @@ build:x86:python_client: tags: - python script: - - cd python-client - - python3 setup.py sdist bdist_wheel - - mv dist/* .. + - bash gen_python_client.sh artifacts: paths: - jfjoch_client-*whl diff --git a/gen_python_client.sh b/gen_python_client.sh new file mode 100644 index 00000000..dfd10b89 --- /dev/null +++ b/gen_python_client.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +VERSION=$(cancel_post: %s\n" % e) - -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost:5232* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**cancel_post**](docs/DefaultApi.md#cancel_post) | **POST** /cancel | Cancel running data collection -*DefaultApi* | [**config_azim_int_get**](docs/DefaultApi.md#config_azim_int_get) | **GET** /config/azim_int | Get radial integration configuration -*DefaultApi* | [**config_azim_int_put**](docs/DefaultApi.md#config_azim_int_put) | **PUT** /config/azim_int | Configure radial integration -*DefaultApi* | [**config_detector_get**](docs/DefaultApi.md#config_detector_get) | **GET** /config/detector | Get detector configuration -*DefaultApi* | [**config_detector_put**](docs/DefaultApi.md#config_detector_put) | **PUT** /config/detector | Change detector configuration -*DefaultApi* | [**config_image_format_conversion_post**](docs/DefaultApi.md#config_image_format_conversion_post) | **POST** /config/image_format/conversion | Configure format for data collection with full conversion -*DefaultApi* | [**config_image_format_get**](docs/DefaultApi.md#config_image_format_get) | **GET** /config/image_format | Get image output format -*DefaultApi* | [**config_image_format_put**](docs/DefaultApi.md#config_image_format_put) | **PUT** /config/image_format | Change image output format -*DefaultApi* | [**config_image_format_raw_post**](docs/DefaultApi.md#config_image_format_raw_post) | **POST** /config/image_format/raw | Configure format for raw data collection -*DefaultApi* | [**config_instrument_get**](docs/DefaultApi.md#config_instrument_get) | **GET** /config/instrument | Get instrument metadata -*DefaultApi* | [**config_instrument_put**](docs/DefaultApi.md#config_instrument_put) | **PUT** /config/instrument | Change instrument metadata -*DefaultApi* | [**config_internal_generator_image_put**](docs/DefaultApi.md#config_internal_generator_image_put) | **PUT** /config/internal_generator_image | Load binary image for internal FPGA generator -*DefaultApi* | [**config_internal_generator_image_tiff_put**](docs/DefaultApi.md#config_internal_generator_image_tiff_put) | **PUT** /config/internal_generator_image.tiff | Load TIFF image for internal FPGA generator -*DefaultApi* | [**config_mask_tiff_get**](docs/DefaultApi.md#config_mask_tiff_get) | **GET** /config/mask.tiff | Get mask of the detector -*DefaultApi* | [**config_select_detector_get**](docs/DefaultApi.md#config_select_detector_get) | **GET** /config/select_detector | List available detectors -*DefaultApi* | [**config_select_detector_put**](docs/DefaultApi.md#config_select_detector_put) | **PUT** /config/select_detector | Select detector -*DefaultApi* | [**config_spot_finding_get**](docs/DefaultApi.md#config_spot_finding_get) | **GET** /config/spot_finding | Get data processing configuration -*DefaultApi* | [**config_spot_finding_put**](docs/DefaultApi.md#config_spot_finding_put) | **PUT** /config/spot_finding | Configure spot finding -*DefaultApi* | [**config_user_mask_tiff_get**](docs/DefaultApi.md#config_user_mask_tiff_get) | **GET** /config/user_mask.tiff | Get user mask of the detector -*DefaultApi* | [**config_user_mask_tiff_put**](docs/DefaultApi.md#config_user_mask_tiff_put) | **PUT** /config/user_mask.tiff | Upload user mask of the detector -*DefaultApi* | [**config_zeromq_preview_get**](docs/DefaultApi.md#config_zeromq_preview_get) | **GET** /config/zeromq_preview | Get ZeroMQ preview settings -*DefaultApi* | [**config_zeromq_preview_put**](docs/DefaultApi.md#config_zeromq_preview_put) | **PUT** /config/zeromq_preview | Set ZeroMQ preview settings -*DefaultApi* | [**deactivate_post**](docs/DefaultApi.md#deactivate_post) | **POST** /deactivate | Prepare detector to turn off -*DefaultApi* | [**detector_status_get**](docs/DefaultApi.md#detector_status_get) | **GET** /detector/status | Get detector status -*DefaultApi* | [**fpga_status_get**](docs/DefaultApi.md#fpga_status_get) | **GET** /fpga_status | Get status of FPGA devices -*DefaultApi* | [**initialize_post**](docs/DefaultApi.md#initialize_post) | **POST** /initialize | Initialize detector and data acquisition -*DefaultApi* | [**pedestal_post**](docs/DefaultApi.md#pedestal_post) | **POST** /pedestal | Collect dark current for the detector -*DefaultApi* | [**plot_azim_int_get**](docs/DefaultApi.md#plot_azim_int_get) | **GET** /plot/azim_int | Generate radial integration profile -*DefaultApi* | [**plot_bkg_estimate_get**](docs/DefaultApi.md#plot_bkg_estimate_get) | **GET** /plot/bkg_estimate | Generate background estimate plot -*DefaultApi* | [**plot_error_pixel_get**](docs/DefaultApi.md#plot_error_pixel_get) | **GET** /plot/error_pixel | Generate error pixels plot -*DefaultApi* | [**plot_image_collection_efficiency_get**](docs/DefaultApi.md#plot_image_collection_efficiency_get) | **GET** /plot/image_collection_efficiency | Generate image collection efficiency plot -*DefaultApi* | [**plot_indexing_rate_get**](docs/DefaultApi.md#plot_indexing_rate_get) | **GET** /plot/indexing_rate | Generate indexing rate plot -*DefaultApi* | [**plot_receiver_delay_get**](docs/DefaultApi.md#plot_receiver_delay_get) | **GET** /plot/receiver_delay | Generate receiver delay plot -*DefaultApi* | [**plot_receiver_free_send_buffers_get**](docs/DefaultApi.md#plot_receiver_free_send_buffers_get) | **GET** /plot/receiver_free_send_buffers | Generate receiver free send buffer plot -*DefaultApi* | [**plot_roi_max_count_get**](docs/DefaultApi.md#plot_roi_max_count_get) | **GET** /plot/roi_max_count | Generate plot of ROI max count -*DefaultApi* | [**plot_roi_sum_get**](docs/DefaultApi.md#plot_roi_sum_get) | **GET** /plot/roi_sum | Generate ROI sum plot -*DefaultApi* | [**plot_roi_valid_pixels_get**](docs/DefaultApi.md#plot_roi_valid_pixels_get) | **GET** /plot/roi_valid_pixels | Generate plot of ROI valid pixels -*DefaultApi* | [**plot_spot_count_get**](docs/DefaultApi.md#plot_spot_count_get) | **GET** /plot/spot_count | Generate spot count plot -*DefaultApi* | [**plot_strong_pixel_get**](docs/DefaultApi.md#plot_strong_pixel_get) | **GET** /plot/strong_pixel | Generate strong pixels plot -*DefaultApi* | [**preview_calibration_tiff_get**](docs/DefaultApi.md#preview_calibration_tiff_get) | **GET** /preview/calibration.tiff | Get last preview image in TIFF format for calibration with PyFAI/Dioptas -*DefaultApi* | [**preview_image_jpeg_get**](docs/DefaultApi.md#preview_image_jpeg_get) | **GET** /preview/image.jpeg | Get last preview image in JPEG format using default settings -*DefaultApi* | [**preview_image_jpeg_post**](docs/DefaultApi.md#preview_image_jpeg_post) | **POST** /preview/image.jpeg | Get last preview image in JPEG format using custom settings -*DefaultApi* | [**preview_image_tiff_get**](docs/DefaultApi.md#preview_image_tiff_get) | **GET** /preview/image.tiff | Get last preview image in TIFF format -*DefaultApi* | [**preview_pedestal_tiff_get**](docs/DefaultApi.md#preview_pedestal_tiff_get) | **GET** /preview/pedestal.tiff | Get pedestal G0 in TIFF format -*DefaultApi* | [**roi_box_get**](docs/DefaultApi.md#roi_box_get) | **GET** /roi/box | Get box ROIs -*DefaultApi* | [**roi_box_put**](docs/DefaultApi.md#roi_box_put) | **PUT** /roi/box | Upload box ROIs -*DefaultApi* | [**roi_circle_get**](docs/DefaultApi.md#roi_circle_get) | **GET** /roi/circle | Get circular ROI -*DefaultApi* | [**roi_circle_put**](docs/DefaultApi.md#roi_circle_put) | **PUT** /roi/circle | Upload circular ROI -*DefaultApi* | [**start_post**](docs/DefaultApi.md#start_post) | **POST** /start | Start detector -*DefaultApi* | [**statistics_calibration_get**](docs/DefaultApi.md#statistics_calibration_get) | **GET** /statistics/calibration | Get calibration statistics -*DefaultApi* | [**statistics_data_collection_get**](docs/DefaultApi.md#statistics_data_collection_get) | **GET** /statistics/data_collection | Get data collection statistics -*DefaultApi* | [**statistics_get**](docs/DefaultApi.md#statistics_get) | **GET** /statistics | Get general statistics -*DefaultApi* | [**status_get**](docs/DefaultApi.md#status_get) | **GET** /status | Get Jungfraujoch status -*DefaultApi* | [**trigger_post**](docs/DefaultApi.md#trigger_post) | **POST** /trigger | Send soft trigger to the detector -*DefaultApi* | [**version_get**](docs/DefaultApi.md#version_get) | **GET** /version | -*DefaultApi* | [**wait_till_done_post**](docs/DefaultApi.md#wait_till_done_post) | **POST** /wait_till_done | Wait for acquisition done -*DefaultApi* | [**xfel_event_code_get**](docs/DefaultApi.md#xfel_event_code_get) | **GET** /xfel/event_code | Return XFEL event codes for the current data acquisition -*DefaultApi* | [**xfel_pulse_id_get**](docs/DefaultApi.md#xfel_pulse_id_get) | **GET** /xfel/pulse_id | Return XFEL pulse IDs for the current data acquisition - - -## Documentation For Models - - - [AzimIntSettings](docs/AzimIntSettings.md) - - [BrokerStatus](docs/BrokerStatus.md) - - [CalibrationStatisticsInner](docs/CalibrationStatisticsInner.md) - - [DatasetSettings](docs/DatasetSettings.md) - - [DatasetSettingsUnitCell](docs/DatasetSettingsUnitCell.md) - - [Detector](docs/Detector.md) - - [DetectorList](docs/DetectorList.md) - - [DetectorListDetectorsInner](docs/DetectorListDetectorsInner.md) - - [DetectorModule](docs/DetectorModule.md) - - [DetectorModuleDirection](docs/DetectorModuleDirection.md) - - [DetectorPowerState](docs/DetectorPowerState.md) - - [DetectorSelection](docs/DetectorSelection.md) - - [DetectorSettings](docs/DetectorSettings.md) - - [DetectorState](docs/DetectorState.md) - - [DetectorStatus](docs/DetectorStatus.md) - - [DetectorTiming](docs/DetectorTiming.md) - - [DetectorType](docs/DetectorType.md) - - [ErrorMessage](docs/ErrorMessage.md) - - [FpgaStatusInner](docs/FpgaStatusInner.md) - - [ImageFormatSettings](docs/ImageFormatSettings.md) - - [ImagePusherType](docs/ImagePusherType.md) - - [InstrumentMetadata](docs/InstrumentMetadata.md) - - [JfjochSettings](docs/JfjochSettings.md) - - [JfjochStatistics](docs/JfjochStatistics.md) - - [MeasurementStatistics](docs/MeasurementStatistics.md) - - [PcieDevicesInner](docs/PcieDevicesInner.md) - - [Plot](docs/Plot.md) - - [Plots](docs/Plots.md) - - [PreviewSettings](docs/PreviewSettings.md) - - [RoiBox](docs/RoiBox.md) - - [RoiBoxList](docs/RoiBoxList.md) - - [RoiCircle](docs/RoiCircle.md) - - [RoiCircleList](docs/RoiCircleList.md) - - [RotationAxis](docs/RotationAxis.md) - - [SpotFindingSettings](docs/SpotFindingSettings.md) - - [StandardDetectorGeometry](docs/StandardDetectorGeometry.md) - - [ZeromqPreviewSettings](docs/ZeromqPreviewSettings.md) - - [ZeromqSettings](docs/ZeromqSettings.md) - - - -## Documentation For Authorization - -Endpoints do not require authorization. - - -## Author - -filip.leonarski@psi.ch - - diff --git a/python-client/docs/AzimIntSettings.md b/python-client/docs/AzimIntSettings.md deleted file mode 100644 index 14c1ce7a..00000000 --- a/python-client/docs/AzimIntSettings.md +++ /dev/null @@ -1,33 +0,0 @@ -# AzimIntSettings - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**polarization_factor** | **float** | If polarization factor is provided, than polarization correction is enabled. | [optional] -**solid_angle_corr** | **bool** | Apply solid angle correction for radial integration | [default to True] -**high_q_recip_a** | **float** | | -**low_q_recip_a** | **float** | | -**q_spacing** | **float** | | - -## Example - -```python -from jfjoch_client.models.azim_int_settings import AzimIntSettings - -# TODO update the JSON string below -json = "{}" -# create an instance of AzimIntSettings from a JSON string -azim_int_settings_instance = AzimIntSettings.from_json(json) -# print the JSON string representation of the object -print(AzimIntSettings.to_json()) - -# convert the object into a dict -azim_int_settings_dict = azim_int_settings_instance.to_dict() -# create an instance of AzimIntSettings from a dict -azim_int_settings_from_dict = AzimIntSettings.from_dict(azim_int_settings_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/BrokerStatus.md b/python-client/docs/BrokerStatus.md deleted file mode 100644 index 06c8b490..00000000 --- a/python-client/docs/BrokerStatus.md +++ /dev/null @@ -1,30 +0,0 @@ -# BrokerStatus - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | **str** | | -**progress** | **float** | Progress of data collection (only available if receiving is running) | [optional] - -## Example - -```python -from jfjoch_client.models.broker_status import BrokerStatus - -# TODO update the JSON string below -json = "{}" -# create an instance of BrokerStatus from a JSON string -broker_status_instance = BrokerStatus.from_json(json) -# print the JSON string representation of the object -print(BrokerStatus.to_json()) - -# convert the object into a dict -broker_status_dict = broker_status_instance.to_dict() -# create an instance of BrokerStatus from a dict -broker_status_from_dict = BrokerStatus.from_dict(broker_status_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/CalibrationStatisticsInner.md b/python-client/docs/CalibrationStatisticsInner.md deleted file mode 100644 index e6c03dd0..00000000 --- a/python-client/docs/CalibrationStatisticsInner.md +++ /dev/null @@ -1,37 +0,0 @@ -# CalibrationStatisticsInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**module_number** | **int** | | -**storage_cell_number** | **int** | | -**pedestal_g0_mean** | **float** | | -**pedestal_g1_mean** | **float** | | -**pedestal_g2_mean** | **float** | | -**gain_g0_mean** | **float** | | -**gain_g1_mean** | **float** | | -**gain_g2_mean** | **float** | | -**masked_pixels** | **int** | | - -## Example - -```python -from jfjoch_client.models.calibration_statistics_inner import CalibrationStatisticsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of CalibrationStatisticsInner from a JSON string -calibration_statistics_inner_instance = CalibrationStatisticsInner.from_json(json) -# print the JSON string representation of the object -print(CalibrationStatisticsInner.to_json()) - -# convert the object into a dict -calibration_statistics_inner_dict = calibration_statistics_inner_instance.to_dict() -# create an instance of CalibrationStatisticsInner from a dict -calibration_statistics_inner_from_dict = CalibrationStatisticsInner.from_dict(calibration_statistics_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/DatasetSettings.md b/python-client/docs/DatasetSettings.md deleted file mode 100644 index d8b3f43a..00000000 --- a/python-client/docs/DatasetSettings.md +++ /dev/null @@ -1,54 +0,0 @@ -# DatasetSettings - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**images_per_trigger** | **int** | 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 | [optional] [default to 1] -**ntrigger** | **int** | Number of TTL trigger that the detector is expected to receive during data collection | [optional] [default to 1] -**image_time_us** | **int** | 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. | [optional] -**beam_x_pxl** | **float** | /entry/detector/beam_center_x in NXmx Beam center in X direction [pixels] | -**beam_y_pxl** | **float** | /entry/detector/beam_center_y in NXmx Beam center in X direction [pixels] | -**detector_distance_mm** | **float** | /entry/detector/distance in NXmx Detector distance [mm] | -**incident_energy_ke_v** | **float** | Used to calculate /entry/beam/incident_wavelength in NXmx Incident particle (photon, electron) energy in keV | -**file_prefix** | **str** | Prefix for filenames. If left empty, no file will be saved. | [optional] [default to ''] -**images_per_file** | **int** | Number of files in a single HDF5 data file (0 = write all images to a single data file). | [optional] [default to 1000] -**space_group_number** | **int** | | [optional] [default to 0] -**sample_name** | **str** | /entry/sample/name in NXmx Sample name | [optional] [default to ''] -**compression** | **str** | | [optional] [default to 'bslz4'] -**total_flux** | **float** | /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] | [optional] -**transmission** | **float** | /entry/instrument/attenuator/attenuator_transmission Transmission of attenuator (filter) [no units] | [optional] -**goniometer** | [**RotationAxis**](RotationAxis.md) | | [optional] -**header_appendix** | **object** | Header appendix, added as user_data/user to start message (can be any valid JSON) | [optional] -**image_appendix** | **object** | Image appendix, added as user_data to image message (can be any valid JSON) | [optional] -**data_reduction_factor_serialmx** | **float** | 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. | [optional] [default to 1.0] -**pixel_value_low_threshold** | **int** | 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. | [optional] -**run_number** | **int** | 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. | [optional] -**run_name** | **str** | 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. | [optional] -**experiment_group** | **str** | Name of group owning the data (e.g. p-group or proposal number). Transferred over CBOR stream, though not saved in HDF5 file. | [optional] -**poisson_compression** | **int** | 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. | [optional] -**write_nxmx_hdf5_master** | **bool** | Write NXmx formatted HDF5 master file. Recommended to use for macromolecular crystallography experiments and to turn off for other experiments. | [optional] [default to True] -**save_calibration** | **bool** | 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. | [optional] -**unit_cell** | [**DatasetSettingsUnitCell**](DatasetSettingsUnitCell.md) | | [optional] - -## Example - -```python -from jfjoch_client.models.dataset_settings import DatasetSettings - -# TODO update the JSON string below -json = "{}" -# create an instance of DatasetSettings from a JSON string -dataset_settings_instance = DatasetSettings.from_json(json) -# print the JSON string representation of the object -print(DatasetSettings.to_json()) - -# convert the object into a dict -dataset_settings_dict = dataset_settings_instance.to_dict() -# create an instance of DatasetSettings from a dict -dataset_settings_from_dict = DatasetSettings.from_dict(dataset_settings_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/DatasetSettingsUnitCell.md b/python-client/docs/DatasetSettingsUnitCell.md deleted file mode 100644 index 964f3540..00000000 --- a/python-client/docs/DatasetSettingsUnitCell.md +++ /dev/null @@ -1,35 +0,0 @@ -# DatasetSettingsUnitCell - -Units of angstrom and degree - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**a** | **float** | | -**b** | **float** | | -**c** | **float** | | -**alpha** | **float** | | -**beta** | **float** | | -**gamma** | **float** | | - -## Example - -```python -from jfjoch_client.models.dataset_settings_unit_cell import DatasetSettingsUnitCell - -# TODO update the JSON string below -json = "{}" -# create an instance of DatasetSettingsUnitCell from a JSON string -dataset_settings_unit_cell_instance = DatasetSettingsUnitCell.from_json(json) -# print the JSON string representation of the object -print(DatasetSettingsUnitCell.to_json()) - -# convert the object into a dict -dataset_settings_unit_cell_dict = dataset_settings_unit_cell_instance.to_dict() -# create an instance of DatasetSettingsUnitCell from a dict -dataset_settings_unit_cell_from_dict = DatasetSettingsUnitCell.from_dict(dataset_settings_unit_cell_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/DefaultApi.md b/python-client/docs/DefaultApi.md deleted file mode 100644 index 1ab23fca..00000000 --- a/python-client/docs/DefaultApi.md +++ /dev/null @@ -1,3891 +0,0 @@ -# jfjoch_client.DefaultApi - -All URIs are relative to *http://localhost:5232* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**cancel_post**](DefaultApi.md#cancel_post) | **POST** /cancel | Cancel running data collection -[**config_azim_int_get**](DefaultApi.md#config_azim_int_get) | **GET** /config/azim_int | Get radial integration configuration -[**config_azim_int_put**](DefaultApi.md#config_azim_int_put) | **PUT** /config/azim_int | Configure radial integration -[**config_detector_get**](DefaultApi.md#config_detector_get) | **GET** /config/detector | Get detector configuration -[**config_detector_put**](DefaultApi.md#config_detector_put) | **PUT** /config/detector | Change detector configuration -[**config_image_format_conversion_post**](DefaultApi.md#config_image_format_conversion_post) | **POST** /config/image_format/conversion | Configure format for data collection with full conversion -[**config_image_format_get**](DefaultApi.md#config_image_format_get) | **GET** /config/image_format | Get image output format -[**config_image_format_put**](DefaultApi.md#config_image_format_put) | **PUT** /config/image_format | Change image output format -[**config_image_format_raw_post**](DefaultApi.md#config_image_format_raw_post) | **POST** /config/image_format/raw | Configure format for raw data collection -[**config_instrument_get**](DefaultApi.md#config_instrument_get) | **GET** /config/instrument | Get instrument metadata -[**config_instrument_put**](DefaultApi.md#config_instrument_put) | **PUT** /config/instrument | Change instrument metadata -[**config_internal_generator_image_put**](DefaultApi.md#config_internal_generator_image_put) | **PUT** /config/internal_generator_image | Load binary image for internal FPGA generator -[**config_internal_generator_image_tiff_put**](DefaultApi.md#config_internal_generator_image_tiff_put) | **PUT** /config/internal_generator_image.tiff | Load TIFF image for internal FPGA generator -[**config_mask_tiff_get**](DefaultApi.md#config_mask_tiff_get) | **GET** /config/mask.tiff | Get mask of the detector -[**config_select_detector_get**](DefaultApi.md#config_select_detector_get) | **GET** /config/select_detector | List available detectors -[**config_select_detector_put**](DefaultApi.md#config_select_detector_put) | **PUT** /config/select_detector | Select detector -[**config_spot_finding_get**](DefaultApi.md#config_spot_finding_get) | **GET** /config/spot_finding | Get data processing configuration -[**config_spot_finding_put**](DefaultApi.md#config_spot_finding_put) | **PUT** /config/spot_finding | Configure spot finding -[**config_user_mask_tiff_get**](DefaultApi.md#config_user_mask_tiff_get) | **GET** /config/user_mask.tiff | Get user mask of the detector -[**config_user_mask_tiff_put**](DefaultApi.md#config_user_mask_tiff_put) | **PUT** /config/user_mask.tiff | Upload user mask of the detector -[**config_zeromq_preview_get**](DefaultApi.md#config_zeromq_preview_get) | **GET** /config/zeromq_preview | Get ZeroMQ preview settings -[**config_zeromq_preview_put**](DefaultApi.md#config_zeromq_preview_put) | **PUT** /config/zeromq_preview | Set ZeroMQ preview settings -[**deactivate_post**](DefaultApi.md#deactivate_post) | **POST** /deactivate | Prepare detector to turn off -[**detector_status_get**](DefaultApi.md#detector_status_get) | **GET** /detector/status | Get detector status -[**fpga_status_get**](DefaultApi.md#fpga_status_get) | **GET** /fpga_status | Get status of FPGA devices -[**initialize_post**](DefaultApi.md#initialize_post) | **POST** /initialize | Initialize detector and data acquisition -[**pedestal_post**](DefaultApi.md#pedestal_post) | **POST** /pedestal | Collect dark current for the detector -[**plot_azim_int_get**](DefaultApi.md#plot_azim_int_get) | **GET** /plot/azim_int | Generate radial integration profile -[**plot_bkg_estimate_get**](DefaultApi.md#plot_bkg_estimate_get) | **GET** /plot/bkg_estimate | Generate background estimate plot -[**plot_error_pixel_get**](DefaultApi.md#plot_error_pixel_get) | **GET** /plot/error_pixel | Generate error pixels plot -[**plot_image_collection_efficiency_get**](DefaultApi.md#plot_image_collection_efficiency_get) | **GET** /plot/image_collection_efficiency | Generate image collection efficiency plot -[**plot_indexing_rate_get**](DefaultApi.md#plot_indexing_rate_get) | **GET** /plot/indexing_rate | Generate indexing rate plot -[**plot_receiver_delay_get**](DefaultApi.md#plot_receiver_delay_get) | **GET** /plot/receiver_delay | Generate receiver delay plot -[**plot_receiver_free_send_buffers_get**](DefaultApi.md#plot_receiver_free_send_buffers_get) | **GET** /plot/receiver_free_send_buffers | Generate receiver free send buffer plot -[**plot_roi_max_count_get**](DefaultApi.md#plot_roi_max_count_get) | **GET** /plot/roi_max_count | Generate plot of ROI max count -[**plot_roi_sum_get**](DefaultApi.md#plot_roi_sum_get) | **GET** /plot/roi_sum | Generate ROI sum plot -[**plot_roi_valid_pixels_get**](DefaultApi.md#plot_roi_valid_pixels_get) | **GET** /plot/roi_valid_pixels | Generate plot of ROI valid pixels -[**plot_spot_count_get**](DefaultApi.md#plot_spot_count_get) | **GET** /plot/spot_count | Generate spot count plot -[**plot_strong_pixel_get**](DefaultApi.md#plot_strong_pixel_get) | **GET** /plot/strong_pixel | Generate strong pixels plot -[**preview_calibration_tiff_get**](DefaultApi.md#preview_calibration_tiff_get) | **GET** /preview/calibration.tiff | Get last preview image in TIFF format for calibration with PyFAI/Dioptas -[**preview_image_jpeg_get**](DefaultApi.md#preview_image_jpeg_get) | **GET** /preview/image.jpeg | Get last preview image in JPEG format using default settings -[**preview_image_jpeg_post**](DefaultApi.md#preview_image_jpeg_post) | **POST** /preview/image.jpeg | Get last preview image in JPEG format using custom settings -[**preview_image_tiff_get**](DefaultApi.md#preview_image_tiff_get) | **GET** /preview/image.tiff | Get last preview image in TIFF format -[**preview_pedestal_tiff_get**](DefaultApi.md#preview_pedestal_tiff_get) | **GET** /preview/pedestal.tiff | Get pedestal G0 in TIFF format -[**roi_box_get**](DefaultApi.md#roi_box_get) | **GET** /roi/box | Get box ROIs -[**roi_box_put**](DefaultApi.md#roi_box_put) | **PUT** /roi/box | Upload box ROIs -[**roi_circle_get**](DefaultApi.md#roi_circle_get) | **GET** /roi/circle | Get circular ROI -[**roi_circle_put**](DefaultApi.md#roi_circle_put) | **PUT** /roi/circle | Upload circular ROI -[**start_post**](DefaultApi.md#start_post) | **POST** /start | Start detector -[**statistics_calibration_get**](DefaultApi.md#statistics_calibration_get) | **GET** /statistics/calibration | Get calibration statistics -[**statistics_data_collection_get**](DefaultApi.md#statistics_data_collection_get) | **GET** /statistics/data_collection | Get data collection statistics -[**statistics_get**](DefaultApi.md#statistics_get) | **GET** /statistics | Get general statistics -[**status_get**](DefaultApi.md#status_get) | **GET** /status | Get Jungfraujoch status -[**trigger_post**](DefaultApi.md#trigger_post) | **POST** /trigger | Send soft trigger to the detector -[**version_get**](DefaultApi.md#version_get) | **GET** /version | -[**wait_till_done_post**](DefaultApi.md#wait_till_done_post) | **POST** /wait_till_done | Wait for acquisition done -[**xfel_event_code_get**](DefaultApi.md#xfel_event_code_get) | **GET** /xfel/event_code | Return XFEL event codes for the current data acquisition -[**xfel_pulse_id_get**](DefaultApi.md#xfel_pulse_id_get) | **GET** /xfel/pulse_id | Return XFEL pulse IDs for the current data acquisition - - -# **cancel_post** -> cancel_post() - -Cancel running data collection - -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. - -### Example - - -```python -import jfjoch_client -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Cancel running data collection - api_instance.cancel_post() - except Exception as e: - print("Exception when calling DefaultApi->cancel_post: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Cancel request sent to FPGAs (or ignored, as data collection is not running) | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **config_azim_int_get** -> AzimIntSettings config_azim_int_get() - -Get radial integration configuration - -Can be done anytime - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.azim_int_settings import AzimIntSettings -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Get radial integration configuration - api_response = api_instance.config_azim_int_get() - print("The response of DefaultApi->config_azim_int_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->config_azim_int_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**AzimIntSettings**](AzimIntSettings.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **config_azim_int_put** -> config_azim_int_put(azim_int_settings=azim_int_settings) - -Configure radial integration - -Can be done when detector is Inactive or Idle - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.azim_int_settings import AzimIntSettings -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - azim_int_settings = jfjoch_client.AzimIntSettings() # AzimIntSettings | (optional) - - try: - # Configure radial integration - api_instance.config_azim_int_put(azim_int_settings=azim_int_settings) - except Exception as e: - print("Exception when calling DefaultApi->config_azim_int_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **azim_int_settings** | [**AzimIntSettings**](AzimIntSettings.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: text/plain, application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | -**400** | Input parsing or validation error | - | -**500** | Error within Jungfraujoch code - see output message. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **config_detector_get** -> DetectorSettings config_detector_get() - -Get detector configuration - -Can be done anytime - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.detector_settings import DetectorSettings -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Get detector configuration - api_response = api_instance.config_detector_get() - print("The response of DefaultApi->config_detector_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->config_detector_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**DetectorSettings**](DetectorSettings.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **config_detector_put** -> config_detector_put(detector_settings=detector_settings) - -Change detector configuration - -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. - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.detector_settings import DetectorSettings -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - detector_settings = jfjoch_client.DetectorSettings() # DetectorSettings | (optional) - - try: - # Change detector configuration - api_instance.config_detector_put(detector_settings=detector_settings) - except Exception as e: - print("Exception when calling DefaultApi->config_detector_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **detector_settings** | [**DetectorSettings**](DetectorSettings.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: text/plain, application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | -**400** | Input parsing or validation error | - | -**500** | Error within Jungfraujoch code - see output message. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **config_image_format_conversion_post** -> config_image_format_conversion_post() - -Configure format for data collection with full conversion - -This can only be done when detector is `Idle`, `Error` or `Inactive` states. - -### Example - - -```python -import jfjoch_client -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Configure format for data collection with full conversion - api_instance.config_image_format_conversion_post() - except Exception as e: - print("Exception when calling DefaultApi->config_image_format_conversion_post: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | -**500** | Error within Jungfraujoch code - see output message. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **config_image_format_get** -> ImageFormatSettings config_image_format_get() - -Get image output format - -Can be done anytime - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.image_format_settings import ImageFormatSettings -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Get image output format - api_response = api_instance.config_image_format_get() - print("The response of DefaultApi->config_image_format_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->config_image_format_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**ImageFormatSettings**](ImageFormatSettings.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **config_image_format_put** -> config_image_format_put(image_format_settings=image_format_settings) - -Change image output format - -This can only be done when detector is `Idle`, `Error` or `Inactive` states. - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.image_format_settings import ImageFormatSettings -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - image_format_settings = jfjoch_client.ImageFormatSettings() # ImageFormatSettings | (optional) - - try: - # Change image output format - api_instance.config_image_format_put(image_format_settings=image_format_settings) - except Exception as e: - print("Exception when calling DefaultApi->config_image_format_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **image_format_settings** | [**ImageFormatSettings**](ImageFormatSettings.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: text/plain, application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | -**400** | Input parsing or validation error | - | -**500** | Error within Jungfraujoch code - see output message. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **config_image_format_raw_post** -> config_image_format_raw_post() - -Configure format for raw data collection - -This can only be done when detector is `Idle`, `Error` or `Inactive` states. - -### Example - - -```python -import jfjoch_client -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Configure format for raw data collection - api_instance.config_image_format_raw_post() - except Exception as e: - print("Exception when calling DefaultApi->config_image_format_raw_post: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | -**500** | Error within Jungfraujoch code - see output message. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **config_instrument_get** -> InstrumentMetadata config_instrument_get() - -Get instrument metadata - -Can be done anytime - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.instrument_metadata import InstrumentMetadata -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Get instrument metadata - api_response = api_instance.config_instrument_get() - print("The response of DefaultApi->config_instrument_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->config_instrument_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**InstrumentMetadata**](InstrumentMetadata.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **config_instrument_put** -> config_instrument_put(instrument_metadata=instrument_metadata) - -Change instrument metadata - -This can only be done when detector is `Idle`, `Error` or `Inactive` states. - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.instrument_metadata import InstrumentMetadata -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - instrument_metadata = jfjoch_client.InstrumentMetadata() # InstrumentMetadata | (optional) - - try: - # Change instrument metadata - api_instance.config_instrument_put(instrument_metadata=instrument_metadata) - except Exception as e: - print("Exception when calling DefaultApi->config_instrument_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **instrument_metadata** | [**InstrumentMetadata**](InstrumentMetadata.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: text/plain, application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | -**400** | Input parsing or validation error | - | -**500** | Error within Jungfraujoch code - see output message. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **config_internal_generator_image_put** -> config_internal_generator_image_put(id=id, body=body) - -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). - -### Example - - -```python -import jfjoch_client -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - id = 56 # int | Image id to upload (optional) - body = None # bytearray | (optional) - - try: - # Load binary image for internal FPGA generator - api_instance.config_internal_generator_image_put(id=id, body=body) - except Exception as e: - print("Exception when calling DefaultApi->config_internal_generator_image_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **int**| Image id to upload | [optional] - **body** | **bytearray**| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/octet-stream - - **Accept**: text/plain - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | -**400** | Input parsing or validation error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **config_internal_generator_image_tiff_put** -> config_internal_generator_image_tiff_put(id=id, body=body) - -Load TIFF image for internal FPGA generator - -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). - -### Example - - -```python -import jfjoch_client -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - id = 56 # int | Image ID to upload (optional) - body = None # bytearray | (optional) - - try: - # Load TIFF image for internal FPGA generator - api_instance.config_internal_generator_image_tiff_put(id=id, body=body) - except Exception as e: - print("Exception when calling DefaultApi->config_internal_generator_image_tiff_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **id** | **int**| Image ID to upload | [optional] - **body** | **bytearray**| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: image/tiff - - **Accept**: text/plain - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | -**400** | Input parsing or validation error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **config_mask_tiff_get** -> bytearray config_mask_tiff_get() - -Get mask of the detector - -Get full pixel mask of the detector See NXmx standard for meaning of pixel values - -### Example - - -```python -import jfjoch_client -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Get mask of the detector - api_response = api_instance.config_mask_tiff_get() - print("The response of DefaultApi->config_mask_tiff_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->config_mask_tiff_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**bytearray** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: image/tiff - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Pixel mask in TIFF format (4 byte; unsigned) | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **config_select_detector_get** -> DetectorList config_select_detector_get() - -List available detectors - -Configured detectors that can be selected by used - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.detector_list import DetectorList -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # List available detectors - api_response = api_instance.config_select_detector_get() - print("The response of DefaultApi->config_select_detector_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->config_select_detector_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**DetectorList**](DetectorList.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **config_select_detector_put** -> config_select_detector_put(detector_selection=detector_selection) - -Select detector - -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. - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.detector_selection import DetectorSelection -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - detector_selection = jfjoch_client.DetectorSelection() # DetectorSelection | (optional) - - try: - # Select detector - api_instance.config_select_detector_put(detector_selection=detector_selection) - except Exception as e: - print("Exception when calling DefaultApi->config_select_detector_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **detector_selection** | [**DetectorSelection**](DetectorSelection.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: text/plain, application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | -**400** | Input parsing or validation error | - | -**500** | Error within Jungfraujoch code - see output message. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **config_spot_finding_get** -> SpotFindingSettings config_spot_finding_get() - -Get data processing configuration - -Can be done anytime - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.spot_finding_settings import SpotFindingSettings -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Get data processing configuration - api_response = api_instance.config_spot_finding_get() - print("The response of DefaultApi->config_spot_finding_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->config_spot_finding_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**SpotFindingSettings**](SpotFindingSettings.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **config_spot_finding_put** -> config_spot_finding_put(spot_finding_settings=spot_finding_settings) - -Configure spot finding - -Can be done anytime, also while data collection is running - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.spot_finding_settings import SpotFindingSettings -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - spot_finding_settings = jfjoch_client.SpotFindingSettings() # SpotFindingSettings | (optional) - - try: - # Configure spot finding - api_instance.config_spot_finding_put(spot_finding_settings=spot_finding_settings) - except Exception as e: - print("Exception when calling DefaultApi->config_spot_finding_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **spot_finding_settings** | [**SpotFindingSettings**](SpotFindingSettings.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: text/plain - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | -**400** | Input parsing or validation error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **config_user_mask_tiff_get** -> bytearray config_user_mask_tiff_get() - -Get user mask of the detector - -Get user pixel mask of the detector in the actual detector coordinates: 0 - good pixel, 1 - masked - -### Example - - -```python -import jfjoch_client -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Get user mask of the detector - api_response = api_instance.config_user_mask_tiff_get() - print("The response of DefaultApi->config_user_mask_tiff_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->config_user_mask_tiff_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**bytearray** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: image/tiff - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | User mask in TIFF format (4 byte; unsigned) | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **config_user_mask_tiff_put** -> bytearray config_user_mask_tiff_put(body=body) - -Upload user mask of the detector - -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. - -### Example - - -```python -import jfjoch_client -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - body = None # bytearray | (optional) - - try: - # Upload user mask of the detector - api_response = api_instance.config_user_mask_tiff_put(body=body) - print("The response of DefaultApi->config_user_mask_tiff_put:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->config_user_mask_tiff_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **bytearray**| | [optional] - -### Return type - -**bytearray** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/octet-stream - - **Accept**: image/tiff, application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | All good | - | -**500** | Error within Jungfraujoch code - see output message. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **config_zeromq_preview_get** -> ZeromqPreviewSettings config_zeromq_preview_get() - -Get ZeroMQ preview settings - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.zeromq_preview_settings import ZeromqPreviewSettings -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Get ZeroMQ preview settings - api_response = api_instance.config_zeromq_preview_get() - print("The response of DefaultApi->config_zeromq_preview_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->config_zeromq_preview_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**ZeromqPreviewSettings**](ZeromqPreviewSettings.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **config_zeromq_preview_put** -> config_zeromq_preview_put(zeromq_preview_settings=zeromq_preview_settings) - -Set ZeroMQ preview settings - -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. - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.zeromq_preview_settings import ZeromqPreviewSettings -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - zeromq_preview_settings = jfjoch_client.ZeromqPreviewSettings() # ZeromqPreviewSettings | (optional) - - try: - # Set ZeroMQ preview settings - api_instance.config_zeromq_preview_put(zeromq_preview_settings=zeromq_preview_settings) - except Exception as e: - print("Exception when calling DefaultApi->config_zeromq_preview_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **zeromq_preview_settings** | [**ZeromqPreviewSettings**](ZeromqPreviewSettings.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: text/plain, application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | -**400** | Input parsing or validation error | - | -**500** | Error within Jungfraujoch code - see output message. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **deactivate_post** -> deactivate_post() - -Prepare detector to turn off - -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. - -### Example - - -```python -import jfjoch_client -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Prepare detector to turn off - api_instance.deactivate_post() - except Exception as e: - print("Exception when calling DefaultApi->deactivate_post: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Detector ready to turn off | - | -**500** | Error within Jungfraujoch code - see output message. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **detector_status_get** -> DetectorStatus detector_status_get() - -Get detector status - -Status of the JUNGFRAU detector - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.detector_status import DetectorStatus -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Get detector status - api_response = api_instance.detector_status_get() - print("The response of DefaultApi->detector_status_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->detector_status_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**DetectorStatus**](DetectorStatus.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, text/plain - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | -**404** | Running in \"simulator\" mode - no detector present | - | -**500** | Error encountered when trying to read status | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **fpga_status_get** -> List[FpgaStatusInner] fpga_status_get() - -Get status of FPGA devices - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.fpga_status_inner import FpgaStatusInner -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Get status of FPGA devices - api_response = api_instance.fpga_status_get() - print("The response of DefaultApi->fpga_status_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->fpga_status_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**List[FpgaStatusInner]**](FpgaStatusInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **initialize_post** -> initialize_post() - -Initialize detector and data acquisition - -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. - -### Example - - -```python -import jfjoch_client -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Initialize detector and data acquisition - api_instance.initialize_post() - except Exception as e: - print("Exception when calling DefaultApi->initialize_post: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Initialization started | - | -**500** | Error within Jungfraujoch code - see output message. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **pedestal_post** -> pedestal_post() - -Collect dark current for the detector - -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. - -### Example - - -```python -import jfjoch_client -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Collect dark current for the detector - api_instance.pedestal_post() - except Exception as e: - print("Exception when calling DefaultApi->pedestal_post: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | -**500** | Error within Jungfraujoch code - see output message. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **plot_azim_int_get** -> Plots plot_azim_int_get(compression=compression) - -Generate radial integration profile - -Generate average radial integration profile - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.plots import Plots -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - compression = True # bool | Enable DEFLATE compression of output data. (optional) (default to True) - - try: - # Generate radial integration profile - api_response = api_instance.plot_azim_int_get(compression=compression) - print("The response of DefaultApi->plot_azim_int_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->plot_azim_int_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **compression** | **bool**| Enable DEFLATE compression of output data. | [optional] [default to True] - -### Return type - -[**Plots**](Plots.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **plot_bkg_estimate_get** -> Plots plot_bkg_estimate_get(binning=binning, compression=compression) - -Generate background estimate plot - -Mean intensity for d = 3 - 5 A per image; binning is configurable - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.plots import Plots -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - binning = 56 # int | Binning of frames for the plot (0 = default binning) (optional) - compression = True # bool | Enable DEFLATE compression of output data. (optional) (default to True) - - try: - # Generate background estimate plot - api_response = api_instance.plot_bkg_estimate_get(binning=binning, compression=compression) - print("The response of DefaultApi->plot_bkg_estimate_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->plot_bkg_estimate_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **binning** | **int**| Binning of frames for the plot (0 = default binning) | [optional] - **compression** | **bool**| Enable DEFLATE compression of output data. | [optional] [default to True] - -### Return type - -[**Plots**](Plots.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, text/plain - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK. Response will be by default compressed with deflate algorithm, if using curl, use --compressed option. | - | -**400** | Input parsing or validation error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **plot_error_pixel_get** -> Plots plot_error_pixel_get(binning=binning, compression=compression) - -Generate error pixels plot - -Count of error (mean) and saturated (mean/max) pixels per image; binning is configurable - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.plots import Plots -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - binning = 56 # int | Binning of frames for the plot (0 = default binning) (optional) - compression = True # bool | Enable DEFLATE compression of output data. (optional) (default to True) - - try: - # Generate error pixels plot - api_response = api_instance.plot_error_pixel_get(binning=binning, compression=compression) - print("The response of DefaultApi->plot_error_pixel_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->plot_error_pixel_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **binning** | **int**| Binning of frames for the plot (0 = default binning) | [optional] - **compression** | **bool**| Enable DEFLATE compression of output data. | [optional] [default to True] - -### Return type - -[**Plots**](Plots.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, text/plain - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Response will be by default compressed with deflate algorithm, if using curl, use --compressed option. | - | -**400** | Input parsing or validation error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **plot_image_collection_efficiency_get** -> Plots plot_image_collection_efficiency_get(binning=binning, compression=compression) - -Generate image collection efficiency plot - -Ratio of collected and expected packets per image; binning is configurable - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.plots import Plots -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - binning = 56 # int | Binning of frames for the plot (0 = default binning) (optional) - compression = True # bool | Enable DEFLATE compression of output data. (optional) (default to True) - - try: - # Generate image collection efficiency plot - api_response = api_instance.plot_image_collection_efficiency_get(binning=binning, compression=compression) - print("The response of DefaultApi->plot_image_collection_efficiency_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->plot_image_collection_efficiency_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **binning** | **int**| Binning of frames for the plot (0 = default binning) | [optional] - **compression** | **bool**| Enable DEFLATE compression of output data. | [optional] [default to True] - -### Return type - -[**Plots**](Plots.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, text/plain - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | -**400** | Input parsing or validation error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **plot_indexing_rate_get** -> Plots plot_indexing_rate_get(binning=binning, compression=compression) - -Generate indexing rate plot - -Image indexing rate; binning is configurable - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.plots import Plots -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - binning = 56 # int | Binning of frames for the plot (0 = default binning) (optional) - compression = True # bool | Enable DEFLATE compression of output data. (optional) (default to True) - - try: - # Generate indexing rate plot - api_response = api_instance.plot_indexing_rate_get(binning=binning, compression=compression) - print("The response of DefaultApi->plot_indexing_rate_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->plot_indexing_rate_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **binning** | **int**| Binning of frames for the plot (0 = default binning) | [optional] - **compression** | **bool**| Enable DEFLATE compression of output data. | [optional] [default to True] - -### Return type - -[**Plots**](Plots.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, text/plain - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Response will be by default compressed with deflate algorithm, if using curl, use --compressed option. | - | -**400** | Input parsing or validation error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **plot_receiver_delay_get** -> Plots plot_receiver_delay_get(binning=binning, compression=compression) - -Generate receiver delay plot - -Amount of frames the receiver is behind the FPGA for each image - used for internal debugging; binning is configurable - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.plots import Plots -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - binning = 56 # int | Binning of frames for the plot (0 = default binning) (optional) - compression = True # bool | Enable DEFLATE compression of output data. (optional) (default to True) - - try: - # Generate receiver delay plot - api_response = api_instance.plot_receiver_delay_get(binning=binning, compression=compression) - print("The response of DefaultApi->plot_receiver_delay_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->plot_receiver_delay_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **binning** | **int**| Binning of frames for the plot (0 = default binning) | [optional] - **compression** | **bool**| Enable DEFLATE compression of output data. | [optional] [default to True] - -### Return type - -[**Plots**](Plots.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, text/plain - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | -**400** | Input parsing or validation error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **plot_receiver_free_send_buffers_get** -> Plots plot_receiver_free_send_buffers_get(binning=binning, compression=compression) - -Generate receiver free send buffer plot - -Amount of send buffers available during frame processing - used for internal debugging; binning is configurable - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.plots import Plots -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - binning = 56 # int | Binning of frames for the plot (0 = default binning) (optional) - compression = True # bool | Enable DEFLATE compression of output data. (optional) (default to True) - - try: - # Generate receiver free send buffer plot - api_response = api_instance.plot_receiver_free_send_buffers_get(binning=binning, compression=compression) - print("The response of DefaultApi->plot_receiver_free_send_buffers_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->plot_receiver_free_send_buffers_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **binning** | **int**| Binning of frames for the plot (0 = default binning) | [optional] - **compression** | **bool**| Enable DEFLATE compression of output data. | [optional] [default to True] - -### Return type - -[**Plots**](Plots.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, text/plain - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | -**400** | Input parsing or validation error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **plot_roi_max_count_get** -> Plots plot_roi_max_count_get(binning=binning, compression=compression) - -Generate plot of ROI max count - -Max count of ROI per image; binning is configurable - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.plots import Plots -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - binning = 56 # int | Binning of frames for the plot (0 = default binning) (optional) - compression = True # bool | Enable DEFLATE compression of output data. (optional) (default to True) - - try: - # Generate plot of ROI max count - api_response = api_instance.plot_roi_max_count_get(binning=binning, compression=compression) - print("The response of DefaultApi->plot_roi_max_count_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->plot_roi_max_count_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **binning** | **int**| Binning of frames for the plot (0 = default binning) | [optional] - **compression** | **bool**| Enable DEFLATE compression of output data. | [optional] [default to True] - -### Return type - -[**Plots**](Plots.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, text/plain - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Response will be by default compressed with deflate algorithm, if using curl, use --compressed option. | - | -**400** | Input parsing or validation error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **plot_roi_sum_get** -> Plots plot_roi_sum_get(binning=binning, compression=compression) - -Generate ROI sum plot - -Sum of ROI rectangle per image; binning is configurable - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.plots import Plots -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - binning = 56 # int | Binning of frames for the plot (0 = default binning) (optional) - compression = True # bool | Enable DEFLATE compression of output data. (optional) (default to True) - - try: - # Generate ROI sum plot - api_response = api_instance.plot_roi_sum_get(binning=binning, compression=compression) - print("The response of DefaultApi->plot_roi_sum_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->plot_roi_sum_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **binning** | **int**| Binning of frames for the plot (0 = default binning) | [optional] - **compression** | **bool**| Enable DEFLATE compression of output data. | [optional] [default to True] - -### Return type - -[**Plots**](Plots.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, text/plain - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Response will be by default compressed with deflate algorithm, if using curl, use --compressed option. | - | -**400** | Input parsing or validation error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **plot_roi_valid_pixels_get** -> Plots plot_roi_valid_pixels_get(binning=binning, compression=compression) - -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 - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.plots import Plots -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - binning = 56 # int | Binning of frames for the plot (0 = default binning) (optional) - compression = True # bool | Enable DEFLATE compression of output data. (optional) (default to True) - - try: - # Generate plot of ROI valid pixels - api_response = api_instance.plot_roi_valid_pixels_get(binning=binning, compression=compression) - print("The response of DefaultApi->plot_roi_valid_pixels_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->plot_roi_valid_pixels_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **binning** | **int**| Binning of frames for the plot (0 = default binning) | [optional] - **compression** | **bool**| Enable DEFLATE compression of output data. | [optional] [default to True] - -### Return type - -[**Plots**](Plots.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, text/plain - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Response will be by default compressed with deflate algorithm, if using curl, use --compressed option. | - | -**400** | Input parsing or validation error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **plot_spot_count_get** -> Plots plot_spot_count_get(binning=binning, compression=compression) - -Generate spot count plot - -Number of spots per image; binning is configurable - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.plots import Plots -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - binning = 56 # int | Binning of frames for the plot (0 = default binning) (optional) - compression = True # bool | Enable DEFLATE compression of output data. (optional) (default to True) - - try: - # Generate spot count plot - api_response = api_instance.plot_spot_count_get(binning=binning, compression=compression) - print("The response of DefaultApi->plot_spot_count_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->plot_spot_count_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **binning** | **int**| Binning of frames for the plot (0 = default binning) | [optional] - **compression** | **bool**| Enable DEFLATE compression of output data. | [optional] [default to True] - -### Return type - -[**Plots**](Plots.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, text/plain - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Response will be by default compressed with deflate algorithm, if using curl, use --compressed option. | - | -**400** | Input parsing or validation error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **plot_strong_pixel_get** -> Plots plot_strong_pixel_get(binning=binning, compression=compression) - -Generate strong pixels plot - -Count of strong pixels per image (from spot finding); binning is configurable - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.plots import Plots -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - binning = 56 # int | Binning of frames for the plot (0 = default binning) (optional) - compression = True # bool | Enable DEFLATE compression of output data. (optional) (default to True) - - try: - # Generate strong pixels plot - api_response = api_instance.plot_strong_pixel_get(binning=binning, compression=compression) - print("The response of DefaultApi->plot_strong_pixel_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->plot_strong_pixel_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **binning** | **int**| Binning of frames for the plot (0 = default binning) | [optional] - **compression** | **bool**| Enable DEFLATE compression of output data. | [optional] [default to True] - -### Return type - -[**Plots**](Plots.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, text/plain - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Response will be by default compressed with deflate algorithm, if using curl, use --compressed option. | - | -**400** | Input parsing or validation error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **preview_calibration_tiff_get** -> bytearray preview_calibration_tiff_get() - -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 - -### Example - - -```python -import jfjoch_client -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Get last preview image in TIFF format for calibration with PyFAI/Dioptas - api_response = api_instance.preview_calibration_tiff_get() - print("The response of DefaultApi->preview_calibration_tiff_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->preview_calibration_tiff_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**bytearray** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: image/tiff - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Preview image | - | -**404** | No preview image recorded so far | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **preview_image_jpeg_get** -> bytearray preview_image_jpeg_get() - -Get last preview image in JPEG format using default settings - -### Example - - -```python -import jfjoch_client -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Get last preview image in JPEG format using default settings - api_response = api_instance.preview_image_jpeg_get() - print("The response of DefaultApi->preview_image_jpeg_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->preview_image_jpeg_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**bytearray** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: image/jpeg - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Preview image | - | -**404** | No preview image recorded so far | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **preview_image_jpeg_post** -> bytearray preview_image_jpeg_post(preview_settings=preview_settings) - -Get last preview image in JPEG format using custom settings - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.preview_settings import PreviewSettings -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - preview_settings = jfjoch_client.PreviewSettings() # PreviewSettings | (optional) - - try: - # Get last preview image in JPEG format using custom settings - api_response = api_instance.preview_image_jpeg_post(preview_settings=preview_settings) - print("The response of DefaultApi->preview_image_jpeg_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->preview_image_jpeg_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **preview_settings** | [**PreviewSettings**](PreviewSettings.md)| | [optional] - -### Return type - -**bytearray** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: image/jpeg, text/plain, application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Preview image | - | -**404** | No preview image recorded so far | - | -**400** | Input parsing or validation error | - | -**500** | Error within Jungfraujoch code - see output message. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **preview_image_tiff_get** -> bytearray preview_image_tiff_get() - -Get last preview image in TIFF format - -### Example - - -```python -import jfjoch_client -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Get last preview image in TIFF format - api_response = api_instance.preview_image_tiff_get() - print("The response of DefaultApi->preview_image_tiff_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->preview_image_tiff_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**bytearray** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: image/tiff - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Preview image | - | -**404** | No preview image recorded so far | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **preview_pedestal_tiff_get** -> bytearray preview_pedestal_tiff_get(gain_level, sc=sc) - -Get pedestal G0 in TIFF format - -### Example - - -```python -import jfjoch_client -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - gain_level = 56 # int | Gain level (0, 1, 2) - sc = 56 # int | Storage cell number (optional) - - try: - # Get pedestal G0 in TIFF format - api_response = api_instance.preview_pedestal_tiff_get(gain_level, sc=sc) - print("The response of DefaultApi->preview_pedestal_tiff_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->preview_pedestal_tiff_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **gain_level** | **int**| Gain level (0, 1, 2) | - **sc** | **int**| Storage cell number | [optional] - -### Return type - -**bytearray** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: image/tiff - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Calibration image | - | -**404** | No calibration recorded so far | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **roi_box_get** -> RoiBoxList roi_box_get() - -Get box ROIs - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.roi_box_list import RoiBoxList -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Get box ROIs - api_response = api_instance.roi_box_get() - print("The response of DefaultApi->roi_box_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->roi_box_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**RoiBoxList**](RoiBoxList.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **roi_box_put** -> roi_box_put(roi_box_list=roi_box_list) - -Upload box ROIs - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.roi_box_list import RoiBoxList -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - roi_box_list = jfjoch_client.RoiBoxList() # RoiBoxList | (optional) - - try: - # Upload box ROIs - api_instance.roi_box_put(roi_box_list=roi_box_list) - except Exception as e: - print("Exception when calling DefaultApi->roi_box_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **roi_box_list** | [**RoiBoxList**](RoiBoxList.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: text/plain, application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | -**400** | Input parsing or validation error | - | -**500** | Error within Jungfraujoch code - see output message. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **roi_circle_get** -> RoiCircleList roi_circle_get() - -Get circular ROI - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.roi_circle_list import RoiCircleList -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Get circular ROI - api_response = api_instance.roi_circle_get() - print("The response of DefaultApi->roi_circle_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->roi_circle_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**RoiCircleList**](RoiCircleList.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **roi_circle_put** -> roi_circle_put(roi_circle_list=roi_circle_list) - -Upload circular ROI - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.roi_circle_list import RoiCircleList -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - roi_circle_list = jfjoch_client.RoiCircleList() # RoiCircleList | (optional) - - try: - # Upload circular ROI - api_instance.roi_circle_put(roi_circle_list=roi_circle_list) - except Exception as e: - print("Exception when calling DefaultApi->roi_circle_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **roi_circle_list** | [**RoiCircleList**](RoiCircleList.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: text/plain, application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | -**400** | Input parsing or validation error | - | -**500** | Error within Jungfraujoch code - see output message. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **start_post** -> start_post(dataset_settings=dataset_settings) - -Start detector - -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. - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.dataset_settings import DatasetSettings -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - dataset_settings = jfjoch_client.DatasetSettings() # DatasetSettings | (optional) - - try: - # Start detector - api_instance.start_post(dataset_settings=dataset_settings) - except Exception as e: - print("Exception when calling DefaultApi->start_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **dataset_settings** | [**DatasetSettings**](DatasetSettings.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: text/plain, application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | -**400** | Input parsing or validation error | - | -**500** | Error within Jungfraujoch code - see output message. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **statistics_calibration_get** -> List[CalibrationStatisticsInner] statistics_calibration_get() - -Get calibration statistics - -Statistics are provided for each module/storage cell separately - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.calibration_statistics_inner import CalibrationStatisticsInner -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Get calibration statistics - api_response = api_instance.statistics_calibration_get() - print("The response of DefaultApi->statistics_calibration_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->statistics_calibration_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**List[CalibrationStatisticsInner]**](CalibrationStatisticsInner.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **statistics_data_collection_get** -> MeasurementStatistics statistics_data_collection_get() - -Get data collection statistics - -Results of the last data collection - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.measurement_statistics import MeasurementStatistics -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Get data collection statistics - api_response = api_instance.statistics_data_collection_get() - print("The response of DefaultApi->statistics_data_collection_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->statistics_data_collection_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**MeasurementStatistics**](MeasurementStatistics.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | -**404** | No data collection performed so far | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **statistics_get** -> JfjochStatistics statistics_get(compression=compression) - -Get general statistics - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.jfjoch_statistics import JfjochStatistics -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - compression = True # bool | Enable DEFLATE compression of output data. (optional) (default to True) - - try: - # Get general statistics - api_response = api_instance.statistics_get(compression=compression) - print("The response of DefaultApi->statistics_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->statistics_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **compression** | **bool**| Enable DEFLATE compression of output data. | [optional] [default to True] - -### Return type - -[**JfjochStatistics**](JfjochStatistics.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **status_get** -> BrokerStatus status_get() - -Get Jungfraujoch status - -Status of the data acquisition - -### Example - - -```python -import jfjoch_client -from jfjoch_client.models.broker_status import BrokerStatus -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Get Jungfraujoch status - api_response = api_instance.status_get() - print("The response of DefaultApi->status_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->status_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**BrokerStatus**](BrokerStatus.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Everything OK | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **trigger_post** -> trigger_post() - -Send soft trigger to the detector - -Generate soft trigger - -### Example - - -```python -import jfjoch_client -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Send soft trigger to the detector - api_instance.trigger_post() - except Exception as e: - print("Exception when calling DefaultApi->trigger_post: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Trigger sent | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **version_get** -> str version_get() - - - -### Example - - -```python -import jfjoch_client -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - api_response = api_instance.version_get() - print("The response of DefaultApi->version_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->version_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**str** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: text/plain - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Release number of Jungfraujoch | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **wait_till_done_post** -> wait_till_done_post(timeout=timeout) - -Wait for acquisition done - -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. - -### Example - - -```python -import jfjoch_client -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - timeout = 60 # int | Timeout in seconds (0 == immediate response) (optional) (default to 60) - - try: - # Wait for acquisition done - api_instance.wait_till_done_post(timeout=timeout) - except Exception as e: - print("Exception when calling DefaultApi->wait_till_done_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **timeout** | **int**| Timeout in seconds (0 == immediate response) | [optional] [default to 60] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Detector in `Idle` state, another data collection can start immediately | - | -**400** | Timeout parameter out of bounds | - | -**500** | Error within Jungfraujoch code - see output message. | - | -**502** | Detector is inactive mode | - | -**504** | Timeout reached, need to restart operation | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **xfel_event_code_get** -> List[int] xfel_event_code_get() - -Return XFEL event codes for the current data acquisition - -Return array of XFEL event codes - -### Example - - -```python -import jfjoch_client -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Return XFEL event codes for the current data acquisition - api_response = api_instance.xfel_event_code_get() - print("The response of DefaultApi->xfel_event_code_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->xfel_event_code_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**List[int]** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Event codes collected | - | -**404** | Not in XFEL mode or no acquisition recorded | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **xfel_pulse_id_get** -> List[int] xfel_pulse_id_get() - -Return XFEL pulse IDs for the current data acquisition - -Return array of XFEL pulse IDs - (-1) if image not recorded - -### Example - - -```python -import jfjoch_client -from jfjoch_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost:5232 -# See configuration.py for a list of all supported configuration parameters. -configuration = jfjoch_client.Configuration( - host = "http://localhost:5232" -) - - -# Enter a context with an instance of the API client -with jfjoch_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = jfjoch_client.DefaultApi(api_client) - - try: - # Return XFEL pulse IDs for the current data acquisition - api_response = api_instance.xfel_pulse_id_get() - print("The response of DefaultApi->xfel_pulse_id_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->xfel_pulse_id_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**List[int]** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Pulse ID collected | - | -**404** | Not in XFEL mode or no acquisition recorded | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/python-client/docs/Detector.md b/python-client/docs/Detector.md deleted file mode 100644 index b3a01f9c..00000000 --- a/python-client/docs/Detector.md +++ /dev/null @@ -1,43 +0,0 @@ -# Detector - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **str** | | -**serial_number** | **str** | | -**type** | [**DetectorType**](DetectorType.md) | | [optional] -**high_voltage_v** | **int** | | [optional] [default to 0] -**udp_interface_count** | **int** | | [optional] [default to 1] -**module_sync** | **bool** | Use module 0 as master for timing. Only applies to JUNGFRAU detector (this cannot be turned off for EIGER). | [optional] [default to True] -**sensor_thickness_um** | **float** | | [optional] [default to 320] -**calibration_file** | **List[str]** | Gain file (JUNGFRAU) or trimbit file (EIGER). One entry per module. Either empty or number of module entries. | [optional] -**hostname** | **List[str]** | Hostname for detector module. One entry per module One entry per module. Either empty or number of module entries. | [optional] -**sensor_material** | **str** | | [optional] [default to 'Si'] -**tx_delay** | **List[int]** | | [optional] -**base_data_ipv4_address** | **str** | | [optional] -**standard_geometry** | [**StandardDetectorGeometry**](StandardDetectorGeometry.md) | | [optional] -**custom_geometry** | [**List[DetectorModule]**](DetectorModule.md) | | [optional] -**mirror_y** | **bool** | Mirror detector in Y direction to account for MX convention of (0,0) point in top left corner | [optional] [default to True] - -## Example - -```python -from jfjoch_client.models.detector import Detector - -# TODO update the JSON string below -json = "{}" -# create an instance of Detector from a JSON string -detector_instance = Detector.from_json(json) -# print the JSON string representation of the object -print(Detector.to_json()) - -# convert the object into a dict -detector_dict = detector_instance.to_dict() -# create an instance of Detector from a dict -detector_from_dict = Detector.from_dict(detector_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/DetectorList.md b/python-client/docs/DetectorList.md deleted file mode 100644 index fde91edd..00000000 --- a/python-client/docs/DetectorList.md +++ /dev/null @@ -1,30 +0,0 @@ -# DetectorList - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**detectors** | [**List[DetectorListDetectorsInner]**](DetectorListDetectorsInner.md) | | -**current_id** | **int** | | - -## Example - -```python -from jfjoch_client.models.detector_list import DetectorList - -# TODO update the JSON string below -json = "{}" -# create an instance of DetectorList from a JSON string -detector_list_instance = DetectorList.from_json(json) -# print the JSON string representation of the object -print(DetectorList.to_json()) - -# convert the object into a dict -detector_list_dict = detector_list_instance.to_dict() -# create an instance of DetectorList from a dict -detector_list_from_dict = DetectorList.from_dict(detector_list_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/DetectorListDetectorsInner.md b/python-client/docs/DetectorListDetectorsInner.md deleted file mode 100644 index 99845c5b..00000000 --- a/python-client/docs/DetectorListDetectorsInner.md +++ /dev/null @@ -1,36 +0,0 @@ -# DetectorListDetectorsInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | -**description** | **str** | | -**serial_number** | **str** | | -**base_ipv4_addr** | **str** | | -**udp_interface_count** | **int** | Number of UDP interfaces per detector module | -**nmodules** | **int** | | -**width** | **int** | | -**height** | **int** | | - -## Example - -```python -from jfjoch_client.models.detector_list_detectors_inner import DetectorListDetectorsInner - -# TODO update the JSON string below -json = "{}" -# create an instance of DetectorListDetectorsInner from a JSON string -detector_list_detectors_inner_instance = DetectorListDetectorsInner.from_json(json) -# print the JSON string representation of the object -print(DetectorListDetectorsInner.to_json()) - -# convert the object into a dict -detector_list_detectors_inner_dict = detector_list_detectors_inner_instance.to_dict() -# create an instance of DetectorListDetectorsInner from a dict -detector_list_detectors_inner_from_dict = DetectorListDetectorsInner.from_dict(detector_list_detectors_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/DetectorModule.md b/python-client/docs/DetectorModule.md deleted file mode 100644 index d5b6f2d7..00000000 --- a/python-client/docs/DetectorModule.md +++ /dev/null @@ -1,32 +0,0 @@ -# DetectorModule - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**x0** | **float** | | -**y0** | **float** | | -**fast_axis** | [**DetectorModuleDirection**](DetectorModuleDirection.md) | | -**slow_axis** | [**DetectorModuleDirection**](DetectorModuleDirection.md) | | - -## Example - -```python -from jfjoch_client.models.detector_module import DetectorModule - -# TODO update the JSON string below -json = "{}" -# create an instance of DetectorModule from a JSON string -detector_module_instance = DetectorModule.from_json(json) -# print the JSON string representation of the object -print(DetectorModule.to_json()) - -# convert the object into a dict -detector_module_dict = detector_module_instance.to_dict() -# create an instance of DetectorModule from a dict -detector_module_from_dict = DetectorModule.from_dict(detector_module_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/DetectorModuleDirection.md b/python-client/docs/DetectorModuleDirection.md deleted file mode 100644 index bbdac0cd..00000000 --- a/python-client/docs/DetectorModuleDirection.md +++ /dev/null @@ -1,16 +0,0 @@ -# DetectorModuleDirection - - -## Enum - -* `XP` (value: `'Xp'`) - -* `XN` (value: `'Xn'`) - -* `YP` (value: `'Yp'`) - -* `YN` (value: `'Yn'`) - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/DetectorPowerState.md b/python-client/docs/DetectorPowerState.md deleted file mode 100644 index 21627663..00000000 --- a/python-client/docs/DetectorPowerState.md +++ /dev/null @@ -1,15 +0,0 @@ -# DetectorPowerState - -Power on of ASICs - -## Enum - -* `POWERON` (value: `'PowerOn'`) - -* `POWEROFF` (value: `'PowerOff'`) - -* `PARTIAL` (value: `'Partial'`) - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/DetectorSelection.md b/python-client/docs/DetectorSelection.md deleted file mode 100644 index 993fc33c..00000000 --- a/python-client/docs/DetectorSelection.md +++ /dev/null @@ -1,29 +0,0 @@ -# DetectorSelection - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **int** | | - -## Example - -```python -from jfjoch_client.models.detector_selection import DetectorSelection - -# TODO update the JSON string below -json = "{}" -# create an instance of DetectorSelection from a JSON string -detector_selection_instance = DetectorSelection.from_json(json) -# print the JSON string representation of the object -print(DetectorSelection.to_json()) - -# convert the object into a dict -detector_selection_dict = detector_selection_instance.to_dict() -# create an instance of DetectorSelection from a dict -detector_selection_from_dict = DetectorSelection.from_dict(detector_selection_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/DetectorSettings.md b/python-client/docs/DetectorSettings.md deleted file mode 100644 index dc3ab226..00000000 --- a/python-client/docs/DetectorSettings.md +++ /dev/null @@ -1,44 +0,0 @@ -# DetectorSettings - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**frame_time_us** | **int** | Interval between consecutive frames. | -**count_time_us** | **int** | Integration time of the detector. If not provided count time will be set to maximum value for a given frame time. | [optional] -**internal_frame_generator** | **bool** | Use internal frame generator in FPGA instead of getting data from a real detector | [optional] [default to False] -**internal_frame_generator_images** | **int** | | [optional] [default to 1] -**detector_trigger_delay_ns** | **int** | Delay between TTL trigger and acquisition start [ns] | [optional] [default to 0] -**timing** | [**DetectorTiming**](DetectorTiming.md) | | [optional] [default to DetectorTiming.TRIGGER] -**eiger_threshold_ke_v** | **float** | | [optional] -**jungfrau_pedestal_g0_frames** | **int** | | [optional] [default to 2000] -**jungfrau_pedestal_g1_frames** | **int** | | [optional] [default to 300] -**jungfrau_pedestal_g2_frames** | **int** | | [optional] [default to 300] -**jungfrau_pedestal_g0_rms_limit** | **int** | Pixels with pedestal G0 RMS above the threshold are marked as masked pixels | [optional] [default to 100] -**jungfrau_pedestal_min_image_count** | **int** | Minimum number of collected images for pedestal to consider it viable | [optional] [default to 128] -**jungfrau_storage_cell_count** | **int** | | [optional] [default to 1] -**jungfrau_storage_cell_delay_ns** | **int** | Delay between two storage cells [ns] | [optional] [default to 5000] -**jungfrau_fixed_gain_g1** | **bool** | Fix gain to G1 (can be useful for storage cells) | [optional] [default to False] -**jungfrau_use_gain_hg0** | **bool** | Use high G0 (for low energy applications) | [optional] [default to False] - -## Example - -```python -from jfjoch_client.models.detector_settings import DetectorSettings - -# TODO update the JSON string below -json = "{}" -# create an instance of DetectorSettings from a JSON string -detector_settings_instance = DetectorSettings.from_json(json) -# print the JSON string representation of the object -print(DetectorSettings.to_json()) - -# convert the object into a dict -detector_settings_dict = detector_settings_instance.to_dict() -# create an instance of DetectorSettings from a dict -detector_settings_from_dict = DetectorSettings.from_dict(detector_settings_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/DetectorState.md b/python-client/docs/DetectorState.md deleted file mode 100644 index cb7ab7a0..00000000 --- a/python-client/docs/DetectorState.md +++ /dev/null @@ -1,19 +0,0 @@ -# DetectorState - -Current state of the detector - -## Enum - -* `IDLE` (value: `'Idle'`) - -* `WAITING` (value: `'Waiting'`) - -* `BUSY` (value: `'Busy'`) - -* `ERROR` (value: `'Error'`) - -* `NOT_CONNECTED` (value: `'Not connected'`) - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/DetectorStatus.md b/python-client/docs/DetectorStatus.md deleted file mode 100644 index a2b08e6d..00000000 --- a/python-client/docs/DetectorStatus.md +++ /dev/null @@ -1,34 +0,0 @@ -# DetectorStatus - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**state** | [**DetectorState**](DetectorState.md) | | -**powerchip** | [**DetectorPowerState**](DetectorPowerState.md) | | -**server_version** | **str** | Detector server (on read-out boards) version | -**number_of_triggers_left** | **int** | Remaining triggers to the detector (max of all modules) | -**fpga_temp_deg_c** | **List[int]** | Temperature of detector FPGAs | -**high_voltage_v** | **List[int]** | High voltage for detector modules | - -## Example - -```python -from jfjoch_client.models.detector_status import DetectorStatus - -# TODO update the JSON string below -json = "{}" -# create an instance of DetectorStatus from a JSON string -detector_status_instance = DetectorStatus.from_json(json) -# print the JSON string representation of the object -print(DetectorStatus.to_json()) - -# convert the object into a dict -detector_status_dict = detector_status_instance.to_dict() -# create an instance of DetectorStatus from a dict -detector_status_from_dict = DetectorStatus.from_dict(detector_status_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/DetectorTiming.md b/python-client/docs/DetectorTiming.md deleted file mode 100644 index 65eedbfd..00000000 --- a/python-client/docs/DetectorTiming.md +++ /dev/null @@ -1,16 +0,0 @@ -# DetectorTiming - - -## Enum - -* `AUTO` (value: `'auto'`) - -* `TRIGGER` (value: `'trigger'`) - -* `BURST` (value: `'burst'`) - -* `GATED` (value: `'gated'`) - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/DetectorType.md b/python-client/docs/DetectorType.md deleted file mode 100644 index 983328d2..00000000 --- a/python-client/docs/DetectorType.md +++ /dev/null @@ -1,12 +0,0 @@ -# DetectorType - - -## Enum - -* `EIGER` (value: `'EIGER'`) - -* `JUNGFRAU` (value: `'JUNGFRAU'`) - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/ErrorMessage.md b/python-client/docs/ErrorMessage.md deleted file mode 100644 index 89b25cc7..00000000 --- a/python-client/docs/ErrorMessage.md +++ /dev/null @@ -1,30 +0,0 @@ -# ErrorMessage - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**msg** | **str** | Human readable message | -**reason** | **str** | Enumerate field for automated analysis | - -## Example - -```python -from jfjoch_client.models.error_message import ErrorMessage - -# TODO update the JSON string below -json = "{}" -# create an instance of ErrorMessage from a JSON string -error_message_instance = ErrorMessage.from_json(json) -# print the JSON string representation of the object -print(ErrorMessage.to_json()) - -# convert the object into a dict -error_message_dict = error_message_instance.to_dict() -# create an instance of ErrorMessage from a dict -error_message_from_dict = ErrorMessage.from_dict(error_message_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/FpgaStatusInner.md b/python-client/docs/FpgaStatusInner.md deleted file mode 100644 index 624e2862..00000000 --- a/python-client/docs/FpgaStatusInner.md +++ /dev/null @@ -1,39 +0,0 @@ -# FpgaStatusInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pci_dev_id** | **str** | | -**serial_number** | **str** | | -**base_mac_addr** | **str** | | -**eth_link_count** | **int** | | -**eth_link_status** | **int** | | -**power_usage_w** | **float** | | -**fpga_temp_c** | **float** | | -**hbm_temp_c** | **float** | | -**packets_udp** | **int** | | -**packets_sls** | **int** | | -**idle** | **bool** | | - -## Example - -```python -from jfjoch_client.models.fpga_status_inner import FpgaStatusInner - -# TODO update the JSON string below -json = "{}" -# create an instance of FpgaStatusInner from a JSON string -fpga_status_inner_instance = FpgaStatusInner.from_json(json) -# print the JSON string representation of the object -print(FpgaStatusInner.to_json()) - -# convert the object into a dict -fpga_status_inner_dict = fpga_status_inner_instance.to_dict() -# create an instance of FpgaStatusInner from a dict -fpga_status_inner_from_dict = FpgaStatusInner.from_dict(fpga_status_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/ImageFormatSettings.md b/python-client/docs/ImageFormatSettings.md deleted file mode 100644 index 983e363a..00000000 --- a/python-client/docs/ImageFormatSettings.md +++ /dev/null @@ -1,36 +0,0 @@ -# ImageFormatSettings - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**summation** | **bool** | 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** | **bool** | Place module read-out into their location on composed detector and extend multipixels | -**jungfrau_conversion** | **bool** | Convert pixel value in ADU to photon counts/energy Only affects JUNGFRAU detector | -**jungfrau_conversion_factor_ke_v** | **float** | Used to convert energy deposited into pixel to counts If not provided incident_energy_keV is used | [optional] -**bit_depth_image** | **int** | Bit depth of resulting image (it doesn't affect the original detector value) If not provided value is adjusted automatically | [optional] -**signed_output** | **bool** | Controls if pixels have signed output If not provided value is adjusted automatically | [optional] -**mask_module_edges** | **bool** | Mask 1 pixel on the module boundary | [default to True] -**mask_chip_edges** | **bool** | Mask multipixels on chip boundary | [default to True] - -## Example - -```python -from jfjoch_client.models.image_format_settings import ImageFormatSettings - -# TODO update the JSON string below -json = "{}" -# create an instance of ImageFormatSettings from a JSON string -image_format_settings_instance = ImageFormatSettings.from_json(json) -# print the JSON string representation of the object -print(ImageFormatSettings.to_json()) - -# convert the object into a dict -image_format_settings_dict = image_format_settings_instance.to_dict() -# create an instance of ImageFormatSettings from a dict -image_format_settings_from_dict = ImageFormatSettings.from_dict(image_format_settings_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/ImagePusherType.md b/python-client/docs/ImagePusherType.md deleted file mode 100644 index 3706b1a8..00000000 --- a/python-client/docs/ImagePusherType.md +++ /dev/null @@ -1,16 +0,0 @@ -# ImagePusherType - - -## Enum - -* `ZEROMQ` (value: `'ZeroMQ'`) - -* `HDF5` (value: `'HDF5'`) - -* `CBOR` (value: `'CBOR'`) - -* `NONE` (value: `'None'`) - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/InstrumentMetadata.md b/python-client/docs/InstrumentMetadata.md deleted file mode 100644 index 2e90adc8..00000000 --- a/python-client/docs/InstrumentMetadata.md +++ /dev/null @@ -1,33 +0,0 @@ -# InstrumentMetadata - -Metadata for a measurement instrument - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**source_name** | **str** | | -**source_type** | **str** | 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 | [optional] [default to ''] -**instrument_name** | **str** | | -**pulsed_source** | **bool** | Settings specific to XFEL (e.g., every image has to come from TTL trigger, save pulse ID and event code) | [optional] [default to False] - -## Example - -```python -from jfjoch_client.models.instrument_metadata import InstrumentMetadata - -# TODO update the JSON string below -json = "{}" -# create an instance of InstrumentMetadata from a JSON string -instrument_metadata_instance = InstrumentMetadata.from_json(json) -# print the JSON string representation of the object -print(InstrumentMetadata.to_json()) - -# convert the object into a dict -instrument_metadata_dict = instrument_metadata_instance.to_dict() -# create an instance of InstrumentMetadata from a dict -instrument_metadata_from_dict = InstrumentMetadata.from_dict(instrument_metadata_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/JfjochSettings.md b/python-client/docs/JfjochSettings.md deleted file mode 100644 index 1e6a8f47..00000000 --- a/python-client/docs/JfjochSettings.md +++ /dev/null @@ -1,42 +0,0 @@ -# JfjochSettings - -Default settings for Jungfraujoch software. This structure is used to provide default settings using configuration JSON file and is not used in HTTP. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**pcie** | [**List[PcieDevicesInner]**](PcieDevicesInner.md) | | [optional] -**zeromq** | [**ZeromqSettings**](ZeromqSettings.md) | | [optional] -**instrument** | [**InstrumentMetadata**](InstrumentMetadata.md) | | [optional] -**detector** | [**List[Detector]**](Detector.md) | | -**detector_settings** | [**DetectorSettings**](DetectorSettings.md) | | [optional] -**azim_int** | [**AzimIntSettings**](AzimIntSettings.md) | | [optional] -**image_format** | [**ImageFormatSettings**](ImageFormatSettings.md) | | [optional] -**image_buffer_mi_b** | **int** | Size of internal buffer in MiB for images before they are sent to a stream | [optional] [default to 2048] -**receiver_threads** | **int** | Number of threads used by the receiver | [optional] [default to 64] -**numa_policy** | **str** | NUMA policy to bind CPUs | [optional] -**frontend_directory** | **str** | Location of built JavaScript web frontend | -**image_pusher** | [**ImagePusherType**](ImagePusherType.md) | | [default to ImagePusherType.NONE] -**zeromq_preview** | [**ZeromqPreviewSettings**](ZeromqPreviewSettings.md) | | [optional] - -## Example - -```python -from jfjoch_client.models.jfjoch_settings import JfjochSettings - -# TODO update the JSON string below -json = "{}" -# create an instance of JfjochSettings from a JSON string -jfjoch_settings_instance = JfjochSettings.from_json(json) -# print the JSON string representation of the object -print(JfjochSettings.to_json()) - -# convert the object into a dict -jfjoch_settings_dict = jfjoch_settings_instance.to_dict() -# create an instance of JfjochSettings from a dict -jfjoch_settings_from_dict = JfjochSettings.from_dict(jfjoch_settings_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/JfjochStatistics.md b/python-client/docs/JfjochStatistics.md deleted file mode 100644 index c7ec3736..00000000 --- a/python-client/docs/JfjochStatistics.md +++ /dev/null @@ -1,40 +0,0 @@ -# JfjochStatistics - -Pool statistics for Jungfraujoch to reduce transfers between frontend and jfjoch_broker - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**detector** | [**DetectorStatus**](DetectorStatus.md) | | [optional] -**detector_list** | [**DetectorList**](DetectorList.md) | | [optional] -**detector_settings** | [**DetectorSettings**](DetectorSettings.md) | | [optional] -**image_format_settings** | [**ImageFormatSettings**](ImageFormatSettings.md) | | [optional] -**instrument_metadata** | [**InstrumentMetadata**](InstrumentMetadata.md) | | [optional] -**data_processing_settings** | [**SpotFindingSettings**](SpotFindingSettings.md) | | [optional] -**measurement** | [**MeasurementStatistics**](MeasurementStatistics.md) | | [optional] -**broker** | [**BrokerStatus**](BrokerStatus.md) | | [optional] -**fpga** | [**List[FpgaStatusInner]**](FpgaStatusInner.md) | | [optional] -**calibration** | [**List[CalibrationStatisticsInner]**](CalibrationStatisticsInner.md) | | [optional] -**zeromq_preview** | [**ZeromqPreviewSettings**](ZeromqPreviewSettings.md) | | [optional] - -## Example - -```python -from jfjoch_client.models.jfjoch_statistics import JfjochStatistics - -# TODO update the JSON string below -json = "{}" -# create an instance of JfjochStatistics from a JSON string -jfjoch_statistics_instance = JfjochStatistics.from_json(json) -# print the JSON string representation of the object -print(JfjochStatistics.to_json()) - -# convert the object into a dict -jfjoch_statistics_dict = jfjoch_statistics_instance.to_dict() -# create an instance of JfjochStatistics from a dict -jfjoch_statistics_from_dict = JfjochStatistics.from_dict(jfjoch_statistics_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/MeasurementStatistics.md b/python-client/docs/MeasurementStatistics.md deleted file mode 100644 index e3d02c71..00000000 --- a/python-client/docs/MeasurementStatistics.md +++ /dev/null @@ -1,46 +0,0 @@ -# MeasurementStatistics - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**file_prefix** | **str** | | [optional] -**run_number** | **int** | Number of data collection run. This can be either automatically incremented or provided externally for each data collection. | [optional] -**experiment_group** | **str** | Name of group owning the data (e.g. p-group or proposal number). | [optional] -**images_expected** | **int** | | [optional] -**images_collected** | **int** | Images collected by the receiver. This number will be lower than images expected if there were issues with data collection performance. | [optional] -**images_sent** | **int** | 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. | [optional] -**images_discarded_lossy_compression** | **int** | Images discarded by the lossy compression filter | [optional] -**max_image_number_sent** | **int** | | [optional] -**collection_efficiency** | **float** | | [optional] -**compression_ratio** | **float** | | [optional] -**cancelled** | **bool** | | [optional] -**max_receiver_delay** | **int** | | [optional] -**indexing_rate** | **float** | | [optional] -**detector_width** | **int** | | [optional] -**detector_height** | **int** | | [optional] -**detector_pixel_depth** | **int** | | [optional] -**bkg_estimate** | **float** | | [optional] -**unit_cell** | **str** | | [optional] - -## Example - -```python -from jfjoch_client.models.measurement_statistics import MeasurementStatistics - -# TODO update the JSON string below -json = "{}" -# create an instance of MeasurementStatistics from a JSON string -measurement_statistics_instance = MeasurementStatistics.from_json(json) -# print the JSON string representation of the object -print(MeasurementStatistics.to_json()) - -# convert the object into a dict -measurement_statistics_dict = measurement_statistics_instance.to_dict() -# create an instance of MeasurementStatistics from a dict -measurement_statistics_from_dict = MeasurementStatistics.from_dict(measurement_statistics_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/PcieDevicesInner.md b/python-client/docs/PcieDevicesInner.md deleted file mode 100644 index 26bf9cc1..00000000 --- a/python-client/docs/PcieDevicesInner.md +++ /dev/null @@ -1,30 +0,0 @@ -# PcieDevicesInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**blk** | **str** | Block device name | [optional] -**ipv4** | **str** | IPv4 address of the block device | [optional] - -## Example - -```python -from jfjoch_client.models.pcie_devices_inner import PcieDevicesInner - -# TODO update the JSON string below -json = "{}" -# create an instance of PcieDevicesInner from a JSON string -pcie_devices_inner_instance = PcieDevicesInner.from_json(json) -# print the JSON string representation of the object -print(PcieDevicesInner.to_json()) - -# convert the object into a dict -pcie_devices_inner_dict = pcie_devices_inner_instance.to_dict() -# create an instance of PcieDevicesInner from a dict -pcie_devices_inner_from_dict = PcieDevicesInner.from_dict(pcie_devices_inner_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/Plot.md b/python-client/docs/Plot.md deleted file mode 100644 index 14d2f5c3..00000000 --- a/python-client/docs/Plot.md +++ /dev/null @@ -1,32 +0,0 @@ -# Plot - -x and y coordinates for plotting, it is OK to assume that both arrays have the same size; layout is optimized for Plotly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**title** | **str** | | [default to ''] -**x** | **List[float]** | | -**y** | **List[float]** | | - -## Example - -```python -from jfjoch_client.models.plot import Plot - -# TODO update the JSON string below -json = "{}" -# create an instance of Plot from a JSON string -plot_instance = Plot.from_json(json) -# print the JSON string representation of the object -print(Plot.to_json()) - -# convert the object into a dict -plot_dict = plot_instance.to_dict() -# create an instance of Plot from a dict -plot_from_dict = Plot.from_dict(plot_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/Plots.md b/python-client/docs/Plots.md deleted file mode 100644 index d758146a..00000000 --- a/python-client/docs/Plots.md +++ /dev/null @@ -1,30 +0,0 @@ -# Plots - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**title** | **str** | | [optional] -**plot** | [**List[Plot]**](Plot.md) | | - -## Example - -```python -from jfjoch_client.models.plots import Plots - -# TODO update the JSON string below -json = "{}" -# create an instance of Plots from a JSON string -plots_instance = Plots.from_json(json) -# print the JSON string representation of the object -print(Plots.to_json()) - -# convert the object into a dict -plots_dict = plots_instance.to_dict() -# create an instance of Plots from a dict -plots_from_dict = Plots.from_dict(plots_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/PreviewSettings.md b/python-client/docs/PreviewSettings.md deleted file mode 100644 index 0ffb0f04..00000000 --- a/python-client/docs/PreviewSettings.md +++ /dev/null @@ -1,36 +0,0 @@ -# PreviewSettings - -Settings for JPEG rendering of preview images - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**saturation** | **int** | Saturation value to set contrast in the preview image | -**show_spots** | **bool** | Show spot finding results on the image | [optional] [default to True] -**show_roi** | **bool** | Show ROI areas on the image | [optional] [default to False] -**jpeg_quality** | **int** | Quality of JPEG image (100 - highest; 0 - lowest) | [optional] [default to 100] -**show_indexed** | **bool** | Preview indexed images only | [optional] [default to False] -**show_user_mask** | **bool** | Show user mask | [optional] [default to False] -**resolution_ring** | **float** | | [optional] [default to 0.1] - -## Example - -```python -from jfjoch_client.models.preview_settings import PreviewSettings - -# TODO update the JSON string below -json = "{}" -# create an instance of PreviewSettings from a JSON string -preview_settings_instance = PreviewSettings.from_json(json) -# print the JSON string representation of the object -print(PreviewSettings.to_json()) - -# convert the object into a dict -preview_settings_dict = preview_settings_instance.to_dict() -# create an instance of PreviewSettings from a dict -preview_settings_from_dict = PreviewSettings.from_dict(preview_settings_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/RoiBox.md b/python-client/docs/RoiBox.md deleted file mode 100644 index f485d133..00000000 --- a/python-client/docs/RoiBox.md +++ /dev/null @@ -1,34 +0,0 @@ -# RoiBox - -Box ROI - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Name for the ROI; used in the plots | -**min_x_pxl** | **int** | Lower bound (inclusive) in X coordinate for the box | -**max_x_pxl** | **int** | Upper bound (inclusive) in X coordinate for the box | -**min_y_pxl** | **int** | Lower bound (inclusive) in Y coordinate for the box | -**max_y_pxl** | **int** | Upper bound (inclusive) in Y coordinate for the box | - -## Example - -```python -from jfjoch_client.models.roi_box import RoiBox - -# TODO update the JSON string below -json = "{}" -# create an instance of RoiBox from a JSON string -roi_box_instance = RoiBox.from_json(json) -# print the JSON string representation of the object -print(RoiBox.to_json()) - -# convert the object into a dict -roi_box_dict = roi_box_instance.to_dict() -# create an instance of RoiBox from a dict -roi_box_from_dict = RoiBox.from_dict(roi_box_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/RoiBoxList.md b/python-client/docs/RoiBoxList.md deleted file mode 100644 index 7cd200d0..00000000 --- a/python-client/docs/RoiBoxList.md +++ /dev/null @@ -1,30 +0,0 @@ -# RoiBoxList - -List of box ROIs - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**rois** | [**List[RoiBox]**](RoiBox.md) | | [optional] - -## Example - -```python -from jfjoch_client.models.roi_box_list import RoiBoxList - -# TODO update the JSON string below -json = "{}" -# create an instance of RoiBoxList from a JSON string -roi_box_list_instance = RoiBoxList.from_json(json) -# print the JSON string representation of the object -print(RoiBoxList.to_json()) - -# convert the object into a dict -roi_box_list_dict = roi_box_list_instance.to_dict() -# create an instance of RoiBoxList from a dict -roi_box_list_from_dict = RoiBoxList.from_dict(roi_box_list_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/RoiCircle.md b/python-client/docs/RoiCircle.md deleted file mode 100644 index b2dabb67..00000000 --- a/python-client/docs/RoiCircle.md +++ /dev/null @@ -1,33 +0,0 @@ -# RoiCircle - -Circular ROI - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Name for the ROI; used in the plots | -**center_x_pxl** | **float** | X coordinate of center of the circle [pixels] | -**center_y_pxl** | **float** | Y coordinate of center of the circle [pixels] | -**radius_pxl** | **float** | Radius of the circle [pixels] | - -## Example - -```python -from jfjoch_client.models.roi_circle import RoiCircle - -# TODO update the JSON string below -json = "{}" -# create an instance of RoiCircle from a JSON string -roi_circle_instance = RoiCircle.from_json(json) -# print the JSON string representation of the object -print(RoiCircle.to_json()) - -# convert the object into a dict -roi_circle_dict = roi_circle_instance.to_dict() -# create an instance of RoiCircle from a dict -roi_circle_from_dict = RoiCircle.from_dict(roi_circle_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/RoiCircleList.md b/python-client/docs/RoiCircleList.md deleted file mode 100644 index 5873af15..00000000 --- a/python-client/docs/RoiCircleList.md +++ /dev/null @@ -1,30 +0,0 @@ -# RoiCircleList - -List of circular ROIs - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**rois** | [**List[RoiCircle]**](RoiCircle.md) | | - -## Example - -```python -from jfjoch_client.models.roi_circle_list import RoiCircleList - -# TODO update the JSON string below -json = "{}" -# create an instance of RoiCircleList from a JSON string -roi_circle_list_instance = RoiCircleList.from_json(json) -# print the JSON string representation of the object -print(RoiCircleList.to_json()) - -# convert the object into a dict -roi_circle_list_dict = roi_circle_list_instance.to_dict() -# create an instance of RoiCircleList from a dict -roi_circle_list_from_dict = RoiCircleList.from_dict(roi_circle_list_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/RotationAxis.md b/python-client/docs/RotationAxis.md deleted file mode 100644 index be652df2..00000000 --- a/python-client/docs/RotationAxis.md +++ /dev/null @@ -1,33 +0,0 @@ -# RotationAxis - -Definition of a crystal rotation axis - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | Name of rotation axis (e.g., omega, phi) | [optional] [default to 'omega'] -**step** | **float** | Angle step in degrees | -**start** | **float** | Start angle in degrees | [optional] [default to 0] -**vector** | **List[float]** | Rotation axis | - -## Example - -```python -from jfjoch_client.models.rotation_axis import RotationAxis - -# TODO update the JSON string below -json = "{}" -# create an instance of RotationAxis from a JSON string -rotation_axis_instance = RotationAxis.from_json(json) -# print the JSON string representation of the object -print(RotationAxis.to_json()) - -# convert the object into a dict -rotation_axis_dict = rotation_axis_instance.to_dict() -# create an instance of RotationAxis from a dict -rotation_axis_from_dict = RotationAxis.from_dict(rotation_axis_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/SpotFindingSettings.md b/python-client/docs/SpotFindingSettings.md deleted file mode 100644 index 24e94ba5..00000000 --- a/python-client/docs/SpotFindingSettings.md +++ /dev/null @@ -1,39 +0,0 @@ -# SpotFindingSettings - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enable** | **bool** | 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. | [default to True] -**indexing** | **bool** | Enable indexing. This is temporary setting, i.e. can be changed anytime during data collection. | [default to True] -**filter_powder_rings** | **bool** | Filter spots which form powder rings (e.g., ice rings) | [optional] [default to False] -**min_spot_count_powder_ring** | **int** | Minimum number of spots to consider a thin resolution shell (0.01 A^-1) a powder ring and filter out. | [optional] -**signal_to_noise_threshold** | **float** | | -**photon_count_threshold** | **int** | | -**min_pix_per_spot** | **int** | | -**max_pix_per_spot** | **int** | | -**high_resolution_limit** | **float** | | -**low_resolution_limit** | **float** | | -**indexing_tolerance** | **float** | Acceptance tolerance for spots after the indexing run - the larger the number, the more spots will be accepted | - -## Example - -```python -from jfjoch_client.models.spot_finding_settings import SpotFindingSettings - -# TODO update the JSON string below -json = "{}" -# create an instance of SpotFindingSettings from a JSON string -spot_finding_settings_instance = SpotFindingSettings.from_json(json) -# print the JSON string representation of the object -print(SpotFindingSettings.to_json()) - -# convert the object into a dict -spot_finding_settings_dict = spot_finding_settings_instance.to_dict() -# create an instance of SpotFindingSettings from a dict -spot_finding_settings_from_dict = SpotFindingSettings.from_dict(spot_finding_settings_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/StandardDetectorGeometry.md b/python-client/docs/StandardDetectorGeometry.md deleted file mode 100644 index cf66170f..00000000 --- a/python-client/docs/StandardDetectorGeometry.md +++ /dev/null @@ -1,33 +0,0 @@ -# StandardDetectorGeometry - -Regular rectangular geometry, first module is in the bottom left corner of the detector - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**nmodules** | **int** | Number of modules in the detector | -**gap_x** | **int** | Gap size in X direction [pixels] | [optional] [default to 8] -**gap_y** | **int** | Gap size in Y direction [pixels] | [optional] [default to 36] -**modules_in_row** | **int** | Number of modules in one row | [optional] [default to 1] - -## Example - -```python -from jfjoch_client.models.standard_detector_geometry import StandardDetectorGeometry - -# TODO update the JSON string below -json = "{}" -# create an instance of StandardDetectorGeometry from a JSON string -standard_detector_geometry_instance = StandardDetectorGeometry.from_json(json) -# print the JSON string representation of the object -print(StandardDetectorGeometry.to_json()) - -# convert the object into a dict -standard_detector_geometry_dict = standard_detector_geometry_instance.to_dict() -# create an instance of StandardDetectorGeometry from a dict -standard_detector_geometry_from_dict = StandardDetectorGeometry.from_dict(standard_detector_geometry_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/ZeromqPreviewSettings.md b/python-client/docs/ZeromqPreviewSettings.md deleted file mode 100644 index e064362a..00000000 --- a/python-client/docs/ZeromqPreviewSettings.md +++ /dev/null @@ -1,31 +0,0 @@ -# ZeromqPreviewSettings - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enabled** | **bool** | ZeroMQ preview socket is enabled. | [default to True] -**period_ms** | **int** | 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. | [default to 1000] -**socket_address** | **str** | 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 tpc://<IP address>:<port> sockets are OK. 0.0.0.0 instead of IP address is accepted and means listening on all network interfaces. | [optional] - -## Example - -```python -from jfjoch_client.models.zeromq_preview_settings import ZeromqPreviewSettings - -# TODO update the JSON string below -json = "{}" -# create an instance of ZeromqPreviewSettings from a JSON string -zeromq_preview_settings_instance = ZeromqPreviewSettings.from_json(json) -# print the JSON string representation of the object -print(ZeromqPreviewSettings.to_json()) - -# convert the object into a dict -zeromq_preview_settings_dict = zeromq_preview_settings_instance.to_dict() -# create an instance of ZeromqPreviewSettings from a dict -zeromq_preview_settings_from_dict = ZeromqPreviewSettings.from_dict(zeromq_preview_settings_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/docs/ZeromqSettings.md b/python-client/docs/ZeromqSettings.md deleted file mode 100644 index ededb477..00000000 --- a/python-client/docs/ZeromqSettings.md +++ /dev/null @@ -1,33 +0,0 @@ -# ZeromqSettings - -ZeroMQ configuration for Jungfraujoch software. This structure is used to provide default settings using configuration JSON file and is not used in HTTP. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**send_watermark** | **int** | Watermark for ZeroMQ send queue (number of outstanding messages queued on Jungfraujoch server per queue) | [optional] [default to 100] -**send_buffer_size** | **int** | Send buffer size for ZeroMQ socket | [optional] -**image_socket** | **List[str]** | 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. | [optional] -**writer_notification_socket** | **str** | 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. | [optional] - -## Example - -```python -from jfjoch_client.models.zeromq_settings import ZeromqSettings - -# TODO update the JSON string below -json = "{}" -# create an instance of ZeromqSettings from a JSON string -zeromq_settings_instance = ZeromqSettings.from_json(json) -# print the JSON string representation of the object -print(ZeromqSettings.to_json()) - -# convert the object into a dict -zeromq_settings_dict = zeromq_settings_instance.to_dict() -# create an instance of ZeromqSettings from a dict -zeromq_settings_from_dict = ZeromqSettings.from_dict(zeromq_settings_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/python-client/jfjoch_client/__init__.py b/python-client/jfjoch_client/__init__.py deleted file mode 100644 index 60b6e79d..00000000 --- a/python-client/jfjoch_client/__init__.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -__version__ = "1.0.0-rc.23" - -# import apis into sdk package -from jfjoch_client.api.default_api import DefaultApi - -# import ApiClient -from jfjoch_client.api_response import ApiResponse -from jfjoch_client.api_client import ApiClient -from jfjoch_client.configuration import Configuration -from jfjoch_client.exceptions import OpenApiException -from jfjoch_client.exceptions import ApiTypeError -from jfjoch_client.exceptions import ApiValueError -from jfjoch_client.exceptions import ApiKeyError -from jfjoch_client.exceptions import ApiAttributeError -from jfjoch_client.exceptions import ApiException - -# import models into sdk package -from jfjoch_client.models.azim_int_settings import AzimIntSettings -from jfjoch_client.models.broker_status import BrokerStatus -from jfjoch_client.models.calibration_statistics_inner import CalibrationStatisticsInner -from jfjoch_client.models.dataset_settings import DatasetSettings -from jfjoch_client.models.dataset_settings_unit_cell import DatasetSettingsUnitCell -from jfjoch_client.models.detector import Detector -from jfjoch_client.models.detector_list import DetectorList -from jfjoch_client.models.detector_list_detectors_inner import DetectorListDetectorsInner -from jfjoch_client.models.detector_module import DetectorModule -from jfjoch_client.models.detector_module_direction import DetectorModuleDirection -from jfjoch_client.models.detector_power_state import DetectorPowerState -from jfjoch_client.models.detector_selection import DetectorSelection -from jfjoch_client.models.detector_settings import DetectorSettings -from jfjoch_client.models.detector_state import DetectorState -from jfjoch_client.models.detector_status import DetectorStatus -from jfjoch_client.models.detector_timing import DetectorTiming -from jfjoch_client.models.detector_type import DetectorType -from jfjoch_client.models.error_message import ErrorMessage -from jfjoch_client.models.fpga_status_inner import FpgaStatusInner -from jfjoch_client.models.image_format_settings import ImageFormatSettings -from jfjoch_client.models.image_pusher_type import ImagePusherType -from jfjoch_client.models.instrument_metadata import InstrumentMetadata -from jfjoch_client.models.jfjoch_settings import JfjochSettings -from jfjoch_client.models.jfjoch_statistics import JfjochStatistics -from jfjoch_client.models.measurement_statistics import MeasurementStatistics -from jfjoch_client.models.pcie_devices_inner import PcieDevicesInner -from jfjoch_client.models.plot import Plot -from jfjoch_client.models.plots import Plots -from jfjoch_client.models.preview_settings import PreviewSettings -from jfjoch_client.models.roi_box import RoiBox -from jfjoch_client.models.roi_box_list import RoiBoxList -from jfjoch_client.models.roi_circle import RoiCircle -from jfjoch_client.models.roi_circle_list import RoiCircleList -from jfjoch_client.models.rotation_axis import RotationAxis -from jfjoch_client.models.spot_finding_settings import SpotFindingSettings -from jfjoch_client.models.standard_detector_geometry import StandardDetectorGeometry -from jfjoch_client.models.zeromq_preview_settings import ZeromqPreviewSettings -from jfjoch_client.models.zeromq_settings import ZeromqSettings diff --git a/python-client/jfjoch_client/api/__init__.py b/python-client/jfjoch_client/api/__init__.py deleted file mode 100644 index d0dd3bef..00000000 --- a/python-client/jfjoch_client/api/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# flake8: noqa - -# import apis into api package -from jfjoch_client.api.default_api import DefaultApi - diff --git a/python-client/jfjoch_client/api/default_api.py b/python-client/jfjoch_client/api/default_api.py deleted file mode 100644 index 81f7204c..00000000 --- a/python-client/jfjoch_client/api/default_api.py +++ /dev/null @@ -1,15188 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr -from typing import List, Optional, Union -from typing_extensions import Annotated -from jfjoch_client.models.azim_int_settings import AzimIntSettings -from jfjoch_client.models.broker_status import BrokerStatus -from jfjoch_client.models.calibration_statistics_inner import CalibrationStatisticsInner -from jfjoch_client.models.dataset_settings import DatasetSettings -from jfjoch_client.models.detector_list import DetectorList -from jfjoch_client.models.detector_selection import DetectorSelection -from jfjoch_client.models.detector_settings import DetectorSettings -from jfjoch_client.models.detector_status import DetectorStatus -from jfjoch_client.models.fpga_status_inner import FpgaStatusInner -from jfjoch_client.models.image_format_settings import ImageFormatSettings -from jfjoch_client.models.instrument_metadata import InstrumentMetadata -from jfjoch_client.models.jfjoch_statistics import JfjochStatistics -from jfjoch_client.models.measurement_statistics import MeasurementStatistics -from jfjoch_client.models.plots import Plots -from jfjoch_client.models.preview_settings import PreviewSettings -from jfjoch_client.models.roi_box_list import RoiBoxList -from jfjoch_client.models.roi_circle_list import RoiCircleList -from jfjoch_client.models.spot_finding_settings import SpotFindingSettings -from jfjoch_client.models.zeromq_preview_settings import ZeromqPreviewSettings - -from jfjoch_client.api_client import ApiClient, RequestSerialized -from jfjoch_client.api_response import ApiResponse -from jfjoch_client.rest import RESTResponseType - - -class DefaultApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def cancel_post( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Cancel running data collection - - 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. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._cancel_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def cancel_post_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Cancel running data collection - - 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. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._cancel_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def cancel_post_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Cancel running data collection - - 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. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._cancel_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _cancel_post_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/cancel', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def config_azim_int_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AzimIntSettings: - """Get radial integration configuration - - Can be done anytime - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_azim_int_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "AzimIntSettings", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def config_azim_int_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AzimIntSettings]: - """Get radial integration configuration - - Can be done anytime - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_azim_int_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "AzimIntSettings", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def config_azim_int_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get radial integration configuration - - Can be done anytime - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_azim_int_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "AzimIntSettings", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _config_azim_int_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/config/azim_int', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def config_azim_int_put( - self, - azim_int_settings: Optional[AzimIntSettings] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Configure radial integration - - Can be done when detector is Inactive or Idle - - :param azim_int_settings: - :type azim_int_settings: AzimIntSettings - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_azim_int_put_serialize( - azim_int_settings=azim_int_settings, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def config_azim_int_put_with_http_info( - self, - azim_int_settings: Optional[AzimIntSettings] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Configure radial integration - - Can be done when detector is Inactive or Idle - - :param azim_int_settings: - :type azim_int_settings: AzimIntSettings - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_azim_int_put_serialize( - azim_int_settings=azim_int_settings, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def config_azim_int_put_without_preload_content( - self, - azim_int_settings: Optional[AzimIntSettings] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Configure radial integration - - Can be done when detector is Inactive or Idle - - :param azim_int_settings: - :type azim_int_settings: AzimIntSettings - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_azim_int_put_serialize( - azim_int_settings=azim_int_settings, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _config_azim_int_put_serialize( - self, - azim_int_settings, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if azim_int_settings is not None: - _body_params = azim_int_settings - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'text/plain', - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/config/azim_int', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def config_detector_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DetectorSettings: - """Get detector configuration - - Can be done anytime - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_detector_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DetectorSettings", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def config_detector_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DetectorSettings]: - """Get detector configuration - - Can be done anytime - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_detector_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DetectorSettings", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def config_detector_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get detector configuration - - Can be done anytime - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_detector_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DetectorSettings", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _config_detector_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/config/detector', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def config_detector_put( - self, - detector_settings: Optional[DetectorSettings] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Change detector configuration - - 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. - - :param detector_settings: - :type detector_settings: DetectorSettings - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_detector_put_serialize( - detector_settings=detector_settings, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def config_detector_put_with_http_info( - self, - detector_settings: Optional[DetectorSettings] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Change detector configuration - - 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. - - :param detector_settings: - :type detector_settings: DetectorSettings - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_detector_put_serialize( - detector_settings=detector_settings, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def config_detector_put_without_preload_content( - self, - detector_settings: Optional[DetectorSettings] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Change detector configuration - - 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. - - :param detector_settings: - :type detector_settings: DetectorSettings - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_detector_put_serialize( - detector_settings=detector_settings, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _config_detector_put_serialize( - self, - detector_settings, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if detector_settings is not None: - _body_params = detector_settings - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'text/plain', - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/config/detector', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def config_image_format_conversion_post( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Configure format for data collection with full conversion - - This can only be done when detector is `Idle`, `Error` or `Inactive` states. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_image_format_conversion_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def config_image_format_conversion_post_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Configure format for data collection with full conversion - - This can only be done when detector is `Idle`, `Error` or `Inactive` states. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_image_format_conversion_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def config_image_format_conversion_post_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Configure format for data collection with full conversion - - This can only be done when detector is `Idle`, `Error` or `Inactive` states. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_image_format_conversion_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _config_image_format_conversion_post_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/config/image_format/conversion', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def config_image_format_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ImageFormatSettings: - """Get image output format - - Can be done anytime - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_image_format_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ImageFormatSettings", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def config_image_format_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ImageFormatSettings]: - """Get image output format - - Can be done anytime - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_image_format_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ImageFormatSettings", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def config_image_format_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get image output format - - Can be done anytime - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_image_format_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ImageFormatSettings", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _config_image_format_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/config/image_format', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def config_image_format_put( - self, - image_format_settings: Optional[ImageFormatSettings] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Change image output format - - This can only be done when detector is `Idle`, `Error` or `Inactive` states. - - :param image_format_settings: - :type image_format_settings: ImageFormatSettings - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_image_format_put_serialize( - image_format_settings=image_format_settings, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def config_image_format_put_with_http_info( - self, - image_format_settings: Optional[ImageFormatSettings] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Change image output format - - This can only be done when detector is `Idle`, `Error` or `Inactive` states. - - :param image_format_settings: - :type image_format_settings: ImageFormatSettings - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_image_format_put_serialize( - image_format_settings=image_format_settings, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def config_image_format_put_without_preload_content( - self, - image_format_settings: Optional[ImageFormatSettings] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Change image output format - - This can only be done when detector is `Idle`, `Error` or `Inactive` states. - - :param image_format_settings: - :type image_format_settings: ImageFormatSettings - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_image_format_put_serialize( - image_format_settings=image_format_settings, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _config_image_format_put_serialize( - self, - image_format_settings, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if image_format_settings is not None: - _body_params = image_format_settings - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'text/plain', - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/config/image_format', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def config_image_format_raw_post( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Configure format for raw data collection - - This can only be done when detector is `Idle`, `Error` or `Inactive` states. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_image_format_raw_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def config_image_format_raw_post_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Configure format for raw data collection - - This can only be done when detector is `Idle`, `Error` or `Inactive` states. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_image_format_raw_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def config_image_format_raw_post_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Configure format for raw data collection - - This can only be done when detector is `Idle`, `Error` or `Inactive` states. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_image_format_raw_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _config_image_format_raw_post_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/config/image_format/raw', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def config_instrument_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> InstrumentMetadata: - """Get instrument metadata - - Can be done anytime - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_instrument_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "InstrumentMetadata", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def config_instrument_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[InstrumentMetadata]: - """Get instrument metadata - - Can be done anytime - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_instrument_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "InstrumentMetadata", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def config_instrument_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get instrument metadata - - Can be done anytime - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_instrument_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "InstrumentMetadata", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _config_instrument_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/config/instrument', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def config_instrument_put( - self, - instrument_metadata: Optional[InstrumentMetadata] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Change instrument metadata - - This can only be done when detector is `Idle`, `Error` or `Inactive` states. - - :param instrument_metadata: - :type instrument_metadata: InstrumentMetadata - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_instrument_put_serialize( - instrument_metadata=instrument_metadata, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def config_instrument_put_with_http_info( - self, - instrument_metadata: Optional[InstrumentMetadata] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Change instrument metadata - - This can only be done when detector is `Idle`, `Error` or `Inactive` states. - - :param instrument_metadata: - :type instrument_metadata: InstrumentMetadata - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_instrument_put_serialize( - instrument_metadata=instrument_metadata, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def config_instrument_put_without_preload_content( - self, - instrument_metadata: Optional[InstrumentMetadata] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Change instrument metadata - - This can only be done when detector is `Idle`, `Error` or `Inactive` states. - - :param instrument_metadata: - :type instrument_metadata: InstrumentMetadata - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_instrument_put_serialize( - instrument_metadata=instrument_metadata, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _config_instrument_put_serialize( - self, - instrument_metadata, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if instrument_metadata is not None: - _body_params = instrument_metadata - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'text/plain', - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/config/instrument', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def config_internal_generator_image_put( - self, - id: Annotated[Optional[Annotated[int, Field(le=127, strict=True, ge=0)]], Field(description="Image id to upload")] = None, - body: Optional[Union[StrictBytes, StrictStr]] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """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). - - :param id: Image id to upload - :type id: int - :param body: - :type body: bytearray - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_internal_generator_image_put_serialize( - id=id, - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def config_internal_generator_image_put_with_http_info( - self, - id: Annotated[Optional[Annotated[int, Field(le=127, strict=True, ge=0)]], Field(description="Image id to upload")] = None, - body: Optional[Union[StrictBytes, StrictStr]] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """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). - - :param id: Image id to upload - :type id: int - :param body: - :type body: bytearray - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_internal_generator_image_put_serialize( - id=id, - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def config_internal_generator_image_put_without_preload_content( - self, - id: Annotated[Optional[Annotated[int, Field(le=127, strict=True, ge=0)]], Field(description="Image id to upload")] = None, - body: Optional[Union[StrictBytes, StrictStr]] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """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). - - :param id: Image id to upload - :type id: int - :param body: - :type body: bytearray - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_internal_generator_image_put_serialize( - id=id, - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _config_internal_generator_image_put_serialize( - self, - id, - body, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if id is not None: - - _query_params.append(('id', id)) - - # process the header parameters - # process the form parameters - # process the body parameter - if body is not None: - # convert to byte array if the input is a file name (str) - if isinstance(body, str): - with open(body, "rb") as _fp: - _body_params = _fp.read() - else: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'text/plain' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/octet-stream' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/config/internal_generator_image', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def config_internal_generator_image_tiff_put( - self, - id: Annotated[Optional[Annotated[int, Field(le=127, strict=True, ge=0)]], Field(description="Image ID to upload")] = None, - body: Optional[Union[StrictBytes, StrictStr]] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Load TIFF image for internal FPGA generator - - 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). - - :param id: Image ID to upload - :type id: int - :param body: - :type body: bytearray - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_internal_generator_image_tiff_put_serialize( - id=id, - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def config_internal_generator_image_tiff_put_with_http_info( - self, - id: Annotated[Optional[Annotated[int, Field(le=127, strict=True, ge=0)]], Field(description="Image ID to upload")] = None, - body: Optional[Union[StrictBytes, StrictStr]] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Load TIFF image for internal FPGA generator - - 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). - - :param id: Image ID to upload - :type id: int - :param body: - :type body: bytearray - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_internal_generator_image_tiff_put_serialize( - id=id, - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def config_internal_generator_image_tiff_put_without_preload_content( - self, - id: Annotated[Optional[Annotated[int, Field(le=127, strict=True, ge=0)]], Field(description="Image ID to upload")] = None, - body: Optional[Union[StrictBytes, StrictStr]] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Load TIFF image for internal FPGA generator - - 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). - - :param id: Image ID to upload - :type id: int - :param body: - :type body: bytearray - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_internal_generator_image_tiff_put_serialize( - id=id, - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _config_internal_generator_image_tiff_put_serialize( - self, - id, - body, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if id is not None: - - _query_params.append(('id', id)) - - # process the header parameters - # process the form parameters - # process the body parameter - if body is not None: - # convert to byte array if the input is a file name (str) - if isinstance(body, str): - with open(body, "rb") as _fp: - _body_params = _fp.read() - else: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'text/plain' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'image/tiff' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/config/internal_generator_image.tiff', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def config_mask_tiff_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> bytearray: - """Get mask of the detector - - Get full pixel mask of the detector See NXmx standard for meaning of pixel values - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_mask_tiff_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def config_mask_tiff_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[bytearray]: - """Get mask of the detector - - Get full pixel mask of the detector See NXmx standard for meaning of pixel values - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_mask_tiff_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def config_mask_tiff_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get mask of the detector - - Get full pixel mask of the detector See NXmx standard for meaning of pixel values - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_mask_tiff_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _config_mask_tiff_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'image/tiff' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/config/mask.tiff', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def config_select_detector_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DetectorList: - """List available detectors - - Configured detectors that can be selected by used - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_select_detector_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DetectorList", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def config_select_detector_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DetectorList]: - """List available detectors - - Configured detectors that can be selected by used - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_select_detector_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DetectorList", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def config_select_detector_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List available detectors - - Configured detectors that can be selected by used - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_select_detector_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DetectorList", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _config_select_detector_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/config/select_detector', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def config_select_detector_put( - self, - detector_selection: Optional[DetectorSelection] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Select detector - - 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. - - :param detector_selection: - :type detector_selection: DetectorSelection - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_select_detector_put_serialize( - detector_selection=detector_selection, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def config_select_detector_put_with_http_info( - self, - detector_selection: Optional[DetectorSelection] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Select detector - - 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. - - :param detector_selection: - :type detector_selection: DetectorSelection - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_select_detector_put_serialize( - detector_selection=detector_selection, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def config_select_detector_put_without_preload_content( - self, - detector_selection: Optional[DetectorSelection] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Select detector - - 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. - - :param detector_selection: - :type detector_selection: DetectorSelection - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_select_detector_put_serialize( - detector_selection=detector_selection, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _config_select_detector_put_serialize( - self, - detector_selection, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if detector_selection is not None: - _body_params = detector_selection - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'text/plain', - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/config/select_detector', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def config_spot_finding_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SpotFindingSettings: - """Get data processing configuration - - Can be done anytime - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_spot_finding_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SpotFindingSettings", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def config_spot_finding_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SpotFindingSettings]: - """Get data processing configuration - - Can be done anytime - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_spot_finding_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SpotFindingSettings", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def config_spot_finding_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get data processing configuration - - Can be done anytime - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_spot_finding_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SpotFindingSettings", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _config_spot_finding_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/config/spot_finding', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def config_spot_finding_put( - self, - spot_finding_settings: Optional[SpotFindingSettings] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Configure spot finding - - Can be done anytime, also while data collection is running - - :param spot_finding_settings: - :type spot_finding_settings: SpotFindingSettings - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_spot_finding_put_serialize( - spot_finding_settings=spot_finding_settings, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def config_spot_finding_put_with_http_info( - self, - spot_finding_settings: Optional[SpotFindingSettings] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Configure spot finding - - Can be done anytime, also while data collection is running - - :param spot_finding_settings: - :type spot_finding_settings: SpotFindingSettings - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_spot_finding_put_serialize( - spot_finding_settings=spot_finding_settings, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def config_spot_finding_put_without_preload_content( - self, - spot_finding_settings: Optional[SpotFindingSettings] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Configure spot finding - - Can be done anytime, also while data collection is running - - :param spot_finding_settings: - :type spot_finding_settings: SpotFindingSettings - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_spot_finding_put_serialize( - spot_finding_settings=spot_finding_settings, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _config_spot_finding_put_serialize( - self, - spot_finding_settings, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if spot_finding_settings is not None: - _body_params = spot_finding_settings - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'text/plain' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/config/spot_finding', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def config_user_mask_tiff_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> bytearray: - """Get user mask of the detector - - Get user pixel mask of the detector in the actual detector coordinates: 0 - good pixel, 1 - masked - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_user_mask_tiff_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def config_user_mask_tiff_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[bytearray]: - """Get user mask of the detector - - Get user pixel mask of the detector in the actual detector coordinates: 0 - good pixel, 1 - masked - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_user_mask_tiff_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def config_user_mask_tiff_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get user mask of the detector - - Get user pixel mask of the detector in the actual detector coordinates: 0 - good pixel, 1 - masked - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_user_mask_tiff_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _config_user_mask_tiff_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'image/tiff' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/config/user_mask.tiff', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def config_user_mask_tiff_put( - self, - body: Optional[Union[StrictBytes, StrictStr]] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> bytearray: - """Upload user mask of the detector - - 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. - - :param body: - :type body: bytearray - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_user_mask_tiff_put_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def config_user_mask_tiff_put_with_http_info( - self, - body: Optional[Union[StrictBytes, StrictStr]] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[bytearray]: - """Upload user mask of the detector - - 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. - - :param body: - :type body: bytearray - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_user_mask_tiff_put_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def config_user_mask_tiff_put_without_preload_content( - self, - body: Optional[Union[StrictBytes, StrictStr]] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Upload user mask of the detector - - 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. - - :param body: - :type body: bytearray - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_user_mask_tiff_put_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _config_user_mask_tiff_put_serialize( - self, - body, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if body is not None: - # convert to byte array if the input is a file name (str) - if isinstance(body, str): - with open(body, "rb") as _fp: - _body_params = _fp.read() - else: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'image/tiff', - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/octet-stream' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/config/user_mask.tiff', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def config_zeromq_preview_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ZeromqPreviewSettings: - """Get ZeroMQ preview settings - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_zeromq_preview_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ZeromqPreviewSettings", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def config_zeromq_preview_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ZeromqPreviewSettings]: - """Get ZeroMQ preview settings - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_zeromq_preview_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ZeromqPreviewSettings", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def config_zeromq_preview_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get ZeroMQ preview settings - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_zeromq_preview_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ZeromqPreviewSettings", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _config_zeromq_preview_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/config/zeromq_preview', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def config_zeromq_preview_put( - self, - zeromq_preview_settings: Optional[ZeromqPreviewSettings] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Set ZeroMQ preview settings - - 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. - - :param zeromq_preview_settings: - :type zeromq_preview_settings: ZeromqPreviewSettings - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_zeromq_preview_put_serialize( - zeromq_preview_settings=zeromq_preview_settings, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def config_zeromq_preview_put_with_http_info( - self, - zeromq_preview_settings: Optional[ZeromqPreviewSettings] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Set ZeroMQ preview settings - - 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. - - :param zeromq_preview_settings: - :type zeromq_preview_settings: ZeromqPreviewSettings - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_zeromq_preview_put_serialize( - zeromq_preview_settings=zeromq_preview_settings, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def config_zeromq_preview_put_without_preload_content( - self, - zeromq_preview_settings: Optional[ZeromqPreviewSettings] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Set ZeroMQ preview settings - - 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. - - :param zeromq_preview_settings: - :type zeromq_preview_settings: ZeromqPreviewSettings - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._config_zeromq_preview_put_serialize( - zeromq_preview_settings=zeromq_preview_settings, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _config_zeromq_preview_put_serialize( - self, - zeromq_preview_settings, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if zeromq_preview_settings is not None: - _body_params = zeromq_preview_settings - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'text/plain', - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/config/zeromq_preview', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def deactivate_post( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Prepare detector to turn off - - 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. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._deactivate_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def deactivate_post_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Prepare detector to turn off - - 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. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._deactivate_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def deactivate_post_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Prepare detector to turn off - - 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. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._deactivate_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _deactivate_post_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/deactivate', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def detector_status_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DetectorStatus: - """Get detector status - - Status of the JUNGFRAU detector - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._detector_status_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DetectorStatus", - '404': None, - '500': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def detector_status_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DetectorStatus]: - """Get detector status - - Status of the JUNGFRAU detector - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._detector_status_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DetectorStatus", - '404': None, - '500': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def detector_status_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get detector status - - Status of the JUNGFRAU detector - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._detector_status_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DetectorStatus", - '404': None, - '500': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _detector_status_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'text/plain' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/detector/status', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def fpga_status_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[FpgaStatusInner]: - """Get status of FPGA devices - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._fpga_status_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[FpgaStatusInner]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def fpga_status_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[FpgaStatusInner]]: - """Get status of FPGA devices - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._fpga_status_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[FpgaStatusInner]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def fpga_status_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get status of FPGA devices - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._fpga_status_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[FpgaStatusInner]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _fpga_status_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/fpga_status', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def initialize_post( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Initialize detector and data acquisition - - 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. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._initialize_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def initialize_post_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Initialize detector and data acquisition - - 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. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._initialize_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def initialize_post_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Initialize detector and data acquisition - - 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. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._initialize_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _initialize_post_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/initialize', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def pedestal_post( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Collect dark current for the detector - - 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. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._pedestal_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def pedestal_post_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Collect dark current for the detector - - 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. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._pedestal_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def pedestal_post_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Collect dark current for the detector - - 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. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._pedestal_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _pedestal_post_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/pedestal', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def plot_azim_int_get( - self, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Plots: - """Generate radial integration profile - - Generate average radial integration profile - - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_azim_int_get_serialize( - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def plot_azim_int_get_with_http_info( - self, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Plots]: - """Generate radial integration profile - - Generate average radial integration profile - - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_azim_int_get_serialize( - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def plot_azim_int_get_without_preload_content( - self, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Generate radial integration profile - - Generate average radial integration profile - - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_azim_int_get_serialize( - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _plot_azim_int_get_serialize( - self, - compression, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if compression is not None: - - _query_params.append(('compression', compression)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/plot/azim_int', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def plot_bkg_estimate_get( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Plots: - """Generate background estimate plot - - Mean intensity for d = 3 - 5 A per image; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_bkg_estimate_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def plot_bkg_estimate_get_with_http_info( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Plots]: - """Generate background estimate plot - - Mean intensity for d = 3 - 5 A per image; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_bkg_estimate_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def plot_bkg_estimate_get_without_preload_content( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Generate background estimate plot - - Mean intensity for d = 3 - 5 A per image; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_bkg_estimate_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _plot_bkg_estimate_get_serialize( - self, - binning, - compression, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if binning is not None: - - _query_params.append(('binning', binning)) - - if compression is not None: - - _query_params.append(('compression', compression)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'text/plain' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/plot/bkg_estimate', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def plot_error_pixel_get( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Plots: - """Generate error pixels plot - - Count of error (mean) and saturated (mean/max) pixels per image; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_error_pixel_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def plot_error_pixel_get_with_http_info( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Plots]: - """Generate error pixels plot - - Count of error (mean) and saturated (mean/max) pixels per image; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_error_pixel_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def plot_error_pixel_get_without_preload_content( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Generate error pixels plot - - Count of error (mean) and saturated (mean/max) pixels per image; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_error_pixel_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _plot_error_pixel_get_serialize( - self, - binning, - compression, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if binning is not None: - - _query_params.append(('binning', binning)) - - if compression is not None: - - _query_params.append(('compression', compression)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'text/plain' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/plot/error_pixel', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def plot_image_collection_efficiency_get( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Plots: - """Generate image collection efficiency plot - - Ratio of collected and expected packets per image; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_image_collection_efficiency_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def plot_image_collection_efficiency_get_with_http_info( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Plots]: - """Generate image collection efficiency plot - - Ratio of collected and expected packets per image; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_image_collection_efficiency_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def plot_image_collection_efficiency_get_without_preload_content( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Generate image collection efficiency plot - - Ratio of collected and expected packets per image; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_image_collection_efficiency_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _plot_image_collection_efficiency_get_serialize( - self, - binning, - compression, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if binning is not None: - - _query_params.append(('binning', binning)) - - if compression is not None: - - _query_params.append(('compression', compression)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'text/plain' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/plot/image_collection_efficiency', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def plot_indexing_rate_get( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Plots: - """Generate indexing rate plot - - Image indexing rate; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_indexing_rate_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def plot_indexing_rate_get_with_http_info( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Plots]: - """Generate indexing rate plot - - Image indexing rate; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_indexing_rate_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def plot_indexing_rate_get_without_preload_content( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Generate indexing rate plot - - Image indexing rate; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_indexing_rate_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _plot_indexing_rate_get_serialize( - self, - binning, - compression, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if binning is not None: - - _query_params.append(('binning', binning)) - - if compression is not None: - - _query_params.append(('compression', compression)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'text/plain' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/plot/indexing_rate', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def plot_receiver_delay_get( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Plots: - """Generate receiver delay plot - - Amount of frames the receiver is behind the FPGA for each image - used for internal debugging; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_receiver_delay_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def plot_receiver_delay_get_with_http_info( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Plots]: - """Generate receiver delay plot - - Amount of frames the receiver is behind the FPGA for each image - used for internal debugging; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_receiver_delay_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def plot_receiver_delay_get_without_preload_content( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Generate receiver delay plot - - Amount of frames the receiver is behind the FPGA for each image - used for internal debugging; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_receiver_delay_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _plot_receiver_delay_get_serialize( - self, - binning, - compression, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if binning is not None: - - _query_params.append(('binning', binning)) - - if compression is not None: - - _query_params.append(('compression', compression)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'text/plain' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/plot/receiver_delay', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def plot_receiver_free_send_buffers_get( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Plots: - """Generate receiver free send buffer plot - - Amount of send buffers available during frame processing - used for internal debugging; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_receiver_free_send_buffers_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def plot_receiver_free_send_buffers_get_with_http_info( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Plots]: - """Generate receiver free send buffer plot - - Amount of send buffers available during frame processing - used for internal debugging; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_receiver_free_send_buffers_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def plot_receiver_free_send_buffers_get_without_preload_content( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Generate receiver free send buffer plot - - Amount of send buffers available during frame processing - used for internal debugging; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_receiver_free_send_buffers_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _plot_receiver_free_send_buffers_get_serialize( - self, - binning, - compression, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if binning is not None: - - _query_params.append(('binning', binning)) - - if compression is not None: - - _query_params.append(('compression', compression)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'text/plain' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/plot/receiver_free_send_buffers', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def plot_roi_max_count_get( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Plots: - """Generate plot of ROI max count - - Max count of ROI per image; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_roi_max_count_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def plot_roi_max_count_get_with_http_info( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Plots]: - """Generate plot of ROI max count - - Max count of ROI per image; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_roi_max_count_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def plot_roi_max_count_get_without_preload_content( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Generate plot of ROI max count - - Max count of ROI per image; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_roi_max_count_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _plot_roi_max_count_get_serialize( - self, - binning, - compression, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if binning is not None: - - _query_params.append(('binning', binning)) - - if compression is not None: - - _query_params.append(('compression', compression)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'text/plain' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/plot/roi_max_count', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def plot_roi_sum_get( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Plots: - """Generate ROI sum plot - - Sum of ROI rectangle per image; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_roi_sum_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def plot_roi_sum_get_with_http_info( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Plots]: - """Generate ROI sum plot - - Sum of ROI rectangle per image; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_roi_sum_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def plot_roi_sum_get_without_preload_content( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Generate ROI sum plot - - Sum of ROI rectangle per image; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_roi_sum_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _plot_roi_sum_get_serialize( - self, - binning, - compression, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if binning is not None: - - _query_params.append(('binning', binning)) - - if compression is not None: - - _query_params.append(('compression', compression)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'text/plain' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/plot/roi_sum', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def plot_roi_valid_pixels_get( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Plots: - """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 - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_roi_valid_pixels_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def plot_roi_valid_pixels_get_with_http_info( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Plots]: - """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 - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_roi_valid_pixels_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def plot_roi_valid_pixels_get_without_preload_content( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """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 - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_roi_valid_pixels_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _plot_roi_valid_pixels_get_serialize( - self, - binning, - compression, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if binning is not None: - - _query_params.append(('binning', binning)) - - if compression is not None: - - _query_params.append(('compression', compression)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'text/plain' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/plot/roi_valid_pixels', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def plot_spot_count_get( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Plots: - """Generate spot count plot - - Number of spots per image; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_spot_count_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def plot_spot_count_get_with_http_info( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Plots]: - """Generate spot count plot - - Number of spots per image; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_spot_count_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def plot_spot_count_get_without_preload_content( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Generate spot count plot - - Number of spots per image; binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_spot_count_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _plot_spot_count_get_serialize( - self, - binning, - compression, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if binning is not None: - - _query_params.append(('binning', binning)) - - if compression is not None: - - _query_params.append(('compression', compression)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'text/plain' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/plot/spot_count', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def plot_strong_pixel_get( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Plots: - """Generate strong pixels plot - - Count of strong pixels per image (from spot finding); binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_strong_pixel_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def plot_strong_pixel_get_with_http_info( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Plots]: - """Generate strong pixels plot - - Count of strong pixels per image (from spot finding); binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_strong_pixel_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def plot_strong_pixel_get_without_preload_content( - self, - binning: Annotated[Optional[StrictInt], Field(description="Binning of frames for the plot (0 = default binning)")] = None, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Generate strong pixels plot - - Count of strong pixels per image (from spot finding); binning is configurable - - :param binning: Binning of frames for the plot (0 = default binning) - :type binning: int - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._plot_strong_pixel_get_serialize( - binning=binning, - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Plots", - '400': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _plot_strong_pixel_get_serialize( - self, - binning, - compression, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if binning is not None: - - _query_params.append(('binning', binning)) - - if compression is not None: - - _query_params.append(('compression', compression)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'text/plain' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/plot/strong_pixel', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def preview_calibration_tiff_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> bytearray: - """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 - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._preview_calibration_tiff_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def preview_calibration_tiff_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[bytearray]: - """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 - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._preview_calibration_tiff_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def preview_calibration_tiff_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """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 - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._preview_calibration_tiff_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _preview_calibration_tiff_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'image/tiff' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/preview/calibration.tiff', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def preview_image_jpeg_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> bytearray: - """Get last preview image in JPEG format using default settings - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._preview_image_jpeg_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def preview_image_jpeg_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[bytearray]: - """Get last preview image in JPEG format using default settings - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._preview_image_jpeg_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def preview_image_jpeg_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get last preview image in JPEG format using default settings - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._preview_image_jpeg_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _preview_image_jpeg_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'image/jpeg' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/preview/image.jpeg', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def preview_image_jpeg_post( - self, - preview_settings: Optional[PreviewSettings] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> bytearray: - """Get last preview image in JPEG format using custom settings - - - :param preview_settings: - :type preview_settings: PreviewSettings - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._preview_image_jpeg_post_serialize( - preview_settings=preview_settings, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - '404': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def preview_image_jpeg_post_with_http_info( - self, - preview_settings: Optional[PreviewSettings] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[bytearray]: - """Get last preview image in JPEG format using custom settings - - - :param preview_settings: - :type preview_settings: PreviewSettings - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._preview_image_jpeg_post_serialize( - preview_settings=preview_settings, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - '404': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def preview_image_jpeg_post_without_preload_content( - self, - preview_settings: Optional[PreviewSettings] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get last preview image in JPEG format using custom settings - - - :param preview_settings: - :type preview_settings: PreviewSettings - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._preview_image_jpeg_post_serialize( - preview_settings=preview_settings, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - '404': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _preview_image_jpeg_post_serialize( - self, - preview_settings, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if preview_settings is not None: - _body_params = preview_settings - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'image/jpeg', - 'text/plain', - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/preview/image.jpeg', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def preview_image_tiff_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> bytearray: - """Get last preview image in TIFF format - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._preview_image_tiff_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def preview_image_tiff_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[bytearray]: - """Get last preview image in TIFF format - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._preview_image_tiff_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def preview_image_tiff_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get last preview image in TIFF format - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._preview_image_tiff_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _preview_image_tiff_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'image/tiff' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/preview/image.tiff', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def preview_pedestal_tiff_get( - self, - gain_level: Annotated[StrictInt, Field(description="Gain level (0, 1, 2)")], - sc: Annotated[Optional[StrictInt], Field(description="Storage cell number")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> bytearray: - """Get pedestal G0 in TIFF format - - - :param gain_level: Gain level (0, 1, 2) (required) - :type gain_level: int - :param sc: Storage cell number - :type sc: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._preview_pedestal_tiff_get_serialize( - gain_level=gain_level, - sc=sc, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def preview_pedestal_tiff_get_with_http_info( - self, - gain_level: Annotated[StrictInt, Field(description="Gain level (0, 1, 2)")], - sc: Annotated[Optional[StrictInt], Field(description="Storage cell number")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[bytearray]: - """Get pedestal G0 in TIFF format - - - :param gain_level: Gain level (0, 1, 2) (required) - :type gain_level: int - :param sc: Storage cell number - :type sc: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._preview_pedestal_tiff_get_serialize( - gain_level=gain_level, - sc=sc, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def preview_pedestal_tiff_get_without_preload_content( - self, - gain_level: Annotated[StrictInt, Field(description="Gain level (0, 1, 2)")], - sc: Annotated[Optional[StrictInt], Field(description="Storage cell number")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get pedestal G0 in TIFF format - - - :param gain_level: Gain level (0, 1, 2) (required) - :type gain_level: int - :param sc: Storage cell number - :type sc: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._preview_pedestal_tiff_get_serialize( - gain_level=gain_level, - sc=sc, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray", - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _preview_pedestal_tiff_get_serialize( - self, - gain_level, - sc, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if gain_level is not None: - - _query_params.append(('gain_level', gain_level)) - - if sc is not None: - - _query_params.append(('sc', sc)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'image/tiff' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/preview/pedestal.tiff', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def roi_box_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RoiBoxList: - """Get box ROIs - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._roi_box_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RoiBoxList", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def roi_box_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[RoiBoxList]: - """Get box ROIs - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._roi_box_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RoiBoxList", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def roi_box_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get box ROIs - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._roi_box_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RoiBoxList", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _roi_box_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/roi/box', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def roi_box_put( - self, - roi_box_list: Optional[RoiBoxList] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Upload box ROIs - - - :param roi_box_list: - :type roi_box_list: RoiBoxList - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._roi_box_put_serialize( - roi_box_list=roi_box_list, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def roi_box_put_with_http_info( - self, - roi_box_list: Optional[RoiBoxList] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Upload box ROIs - - - :param roi_box_list: - :type roi_box_list: RoiBoxList - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._roi_box_put_serialize( - roi_box_list=roi_box_list, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def roi_box_put_without_preload_content( - self, - roi_box_list: Optional[RoiBoxList] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Upload box ROIs - - - :param roi_box_list: - :type roi_box_list: RoiBoxList - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._roi_box_put_serialize( - roi_box_list=roi_box_list, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _roi_box_put_serialize( - self, - roi_box_list, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if roi_box_list is not None: - _body_params = roi_box_list - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'text/plain', - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/roi/box', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def roi_circle_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RoiCircleList: - """Get circular ROI - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._roi_circle_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RoiCircleList", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def roi_circle_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[RoiCircleList]: - """Get circular ROI - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._roi_circle_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RoiCircleList", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def roi_circle_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get circular ROI - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._roi_circle_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RoiCircleList", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _roi_circle_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/roi/circle', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def roi_circle_put( - self, - roi_circle_list: Optional[RoiCircleList] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Upload circular ROI - - - :param roi_circle_list: - :type roi_circle_list: RoiCircleList - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._roi_circle_put_serialize( - roi_circle_list=roi_circle_list, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def roi_circle_put_with_http_info( - self, - roi_circle_list: Optional[RoiCircleList] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Upload circular ROI - - - :param roi_circle_list: - :type roi_circle_list: RoiCircleList - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._roi_circle_put_serialize( - roi_circle_list=roi_circle_list, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def roi_circle_put_without_preload_content( - self, - roi_circle_list: Optional[RoiCircleList] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Upload circular ROI - - - :param roi_circle_list: - :type roi_circle_list: RoiCircleList - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._roi_circle_put_serialize( - roi_circle_list=roi_circle_list, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _roi_circle_put_serialize( - self, - roi_circle_list, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if roi_circle_list is not None: - _body_params = roi_circle_list - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'text/plain', - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/roi/circle', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def start_post( - self, - dataset_settings: Optional[DatasetSettings] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Start detector - - 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. - - :param dataset_settings: - :type dataset_settings: DatasetSettings - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._start_post_serialize( - dataset_settings=dataset_settings, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def start_post_with_http_info( - self, - dataset_settings: Optional[DatasetSettings] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Start detector - - 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. - - :param dataset_settings: - :type dataset_settings: DatasetSettings - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._start_post_serialize( - dataset_settings=dataset_settings, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def start_post_without_preload_content( - self, - dataset_settings: Optional[DatasetSettings] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Start detector - - 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. - - :param dataset_settings: - :type dataset_settings: DatasetSettings - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._start_post_serialize( - dataset_settings=dataset_settings, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "str", - '500': "ErrorMessage", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _start_post_serialize( - self, - dataset_settings, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if dataset_settings is not None: - _body_params = dataset_settings - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'text/plain', - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/start', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def statistics_calibration_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[CalibrationStatisticsInner]: - """Get calibration statistics - - Statistics are provided for each module/storage cell separately - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._statistics_calibration_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[CalibrationStatisticsInner]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def statistics_calibration_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[CalibrationStatisticsInner]]: - """Get calibration statistics - - Statistics are provided for each module/storage cell separately - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._statistics_calibration_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[CalibrationStatisticsInner]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def statistics_calibration_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get calibration statistics - - Statistics are provided for each module/storage cell separately - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._statistics_calibration_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[CalibrationStatisticsInner]", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _statistics_calibration_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/statistics/calibration', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def statistics_data_collection_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MeasurementStatistics: - """Get data collection statistics - - Results of the last data collection - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._statistics_data_collection_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "MeasurementStatistics", - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def statistics_data_collection_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MeasurementStatistics]: - """Get data collection statistics - - Results of the last data collection - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._statistics_data_collection_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "MeasurementStatistics", - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def statistics_data_collection_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get data collection statistics - - Results of the last data collection - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._statistics_data_collection_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "MeasurementStatistics", - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _statistics_data_collection_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/statistics/data_collection', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def statistics_get( - self, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> JfjochStatistics: - """Get general statistics - - - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._statistics_get_serialize( - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "JfjochStatistics", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def statistics_get_with_http_info( - self, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[JfjochStatistics]: - """Get general statistics - - - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._statistics_get_serialize( - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "JfjochStatistics", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def statistics_get_without_preload_content( - self, - compression: Annotated[Optional[StrictBool], Field(description="Enable DEFLATE compression of output data.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get general statistics - - - :param compression: Enable DEFLATE compression of output data. - :type compression: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._statistics_get_serialize( - compression=compression, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "JfjochStatistics", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _statistics_get_serialize( - self, - compression, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if compression is not None: - - _query_params.append(('compression', compression)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/statistics', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def status_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BrokerStatus: - """Get Jungfraujoch status - - Status of the data acquisition - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._status_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BrokerStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def status_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BrokerStatus]: - """Get Jungfraujoch status - - Status of the data acquisition - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._status_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BrokerStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def status_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get Jungfraujoch status - - Status of the data acquisition - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._status_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BrokerStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _status_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/status', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def trigger_post( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Send soft trigger to the detector - - Generate soft trigger - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._trigger_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def trigger_post_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Send soft trigger to the detector - - Generate soft trigger - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._trigger_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def trigger_post_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Send soft trigger to the detector - - Generate soft trigger - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._trigger_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _trigger_post_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/trigger', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def version_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> str: - """version_get - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._version_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def version_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[str]: - """version_get - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._version_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def version_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """version_get - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._version_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _version_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'text/plain' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/version', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def wait_till_done_post( - self, - timeout: Annotated[Optional[Annotated[int, Field(le=3600, strict=True, ge=0)]], Field(description="Timeout in seconds (0 == immediate response)")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Wait for acquisition done - - 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. - - :param timeout: Timeout in seconds (0 == immediate response) - :type timeout: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._wait_till_done_post_serialize( - timeout=timeout, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '500': "ErrorMessage", - '502': None, - '504': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def wait_till_done_post_with_http_info( - self, - timeout: Annotated[Optional[Annotated[int, Field(le=3600, strict=True, ge=0)]], Field(description="Timeout in seconds (0 == immediate response)")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Wait for acquisition done - - 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. - - :param timeout: Timeout in seconds (0 == immediate response) - :type timeout: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._wait_till_done_post_serialize( - timeout=timeout, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '500': "ErrorMessage", - '502': None, - '504': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def wait_till_done_post_without_preload_content( - self, - timeout: Annotated[Optional[Annotated[int, Field(le=3600, strict=True, ge=0)]], Field(description="Timeout in seconds (0 == immediate response)")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Wait for acquisition done - - 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. - - :param timeout: Timeout in seconds (0 == immediate response) - :type timeout: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._wait_till_done_post_serialize( - timeout=timeout, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': None, - '500': "ErrorMessage", - '502': None, - '504': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _wait_till_done_post_serialize( - self, - timeout, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if timeout is not None: - - _query_params.append(('timeout', timeout)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/wait_till_done', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def xfel_event_code_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[int]: - """Return XFEL event codes for the current data acquisition - - Return array of XFEL event codes - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._xfel_event_code_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[int]", - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def xfel_event_code_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[int]]: - """Return XFEL event codes for the current data acquisition - - Return array of XFEL event codes - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._xfel_event_code_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[int]", - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def xfel_event_code_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Return XFEL event codes for the current data acquisition - - Return array of XFEL event codes - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._xfel_event_code_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[int]", - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _xfel_event_code_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/xfel/event_code', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def xfel_pulse_id_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[int]: - """Return XFEL pulse IDs for the current data acquisition - - Return array of XFEL pulse IDs - (-1) if image not recorded - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._xfel_pulse_id_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[int]", - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def xfel_pulse_id_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[int]]: - """Return XFEL pulse IDs for the current data acquisition - - Return array of XFEL pulse IDs - (-1) if image not recorded - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._xfel_pulse_id_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[int]", - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def xfel_pulse_id_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Return XFEL pulse IDs for the current data acquisition - - Return array of XFEL pulse IDs - (-1) if image not recorded - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._xfel_pulse_id_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[int]", - '404': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _xfel_pulse_id_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/xfel/pulse_id', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/python-client/jfjoch_client/api_client.py b/python-client/jfjoch_client/api_client.py deleted file mode 100644 index 721073b8..00000000 --- a/python-client/jfjoch_client/api_client.py +++ /dev/null @@ -1,789 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import datetime -from dateutil.parser import parse -from enum import Enum -import decimal -import json -import mimetypes -import os -import re -import tempfile - -from urllib.parse import quote -from typing import Tuple, Optional, List, Dict, Union -from pydantic import SecretStr - -from jfjoch_client.configuration import Configuration -from jfjoch_client.api_response import ApiResponse, T as ApiResponseT -import jfjoch_client.models -from jfjoch_client import rest -from jfjoch_client.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - -RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'decimal': decimal.Decimal, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.0.0-rc.23/python' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> RequestSerialized: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - if files: - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None or self.configuration.ignore_operation_servers: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - raise e - - return response_data - - def response_deserialize( - self, - response_data: rest.RESTResponse, - response_types_map: Optional[Dict[str, ApiResponseT]]=None - ) -> ApiResponse[ApiResponseT]: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - msg = "RESTResponse.read() must be called before passing it to response_deserialize()" - assert response_data.data is not None, msg - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - # deserialize response data - response_text = None - return_data = None - try: - if response_type == "bytearray": - return_data = response_data.data - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - elif response_type is not None: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type, content_type) - finally: - if not 200 <= response_data.status <= 299: - raise ApiException.from_response( - http_resp=response_data, - body=response_text, - data=return_data, - ) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is SecretStr, return obj.get_secret_value() - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is decimal.Decimal return string representation. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, Enum): - return obj.value - elif isinstance(obj, SecretStr): - return obj.get_secret_value() - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - elif isinstance(obj, decimal.Decimal): - return str(obj) - - elif isinstance(obj, dict): - obj_dict = obj - else: - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): - obj_dict = obj.to_dict() - else: - obj_dict = obj.__dict__ - - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } - - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - :param content_type: content type of response. - - :return: deserialized object. - """ - - # fetch data from response object - if content_type is None: - try: - data = json.loads(response_text) - except ValueError: - data = response_text - elif content_type.startswith("application/json"): - if response_text == "": - data = "" - else: - data = json.loads(response_text) - elif content_type.startswith("text/plain"): - data = response_text - else: - raise ApiException( - status=0, - reason="Unsupported content type: {0}".format(content_type) - ) - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - m = re.match(r'List\[(.*)]', klass) - assert m is not None, "Malformed List type definition" - sub_kls = m.group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - m = re.match(r'Dict\[([^,]*), (.*)]', klass) - assert m is not None, "Malformed Dict type definition" - sub_kls = m.group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(jfjoch_client.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass == object: - return self.__deserialize_object(data) - elif klass == datetime.date: - return self.__deserialize_date(data) - elif klass == datetime.datetime: - return self.__deserialize_datetime(data) - elif klass == decimal.Decimal: - return decimal.Decimal(data) - elif issubclass(klass, Enum): - return self.__deserialize_enum(data, klass) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params: List[Tuple[str, str]] = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params: List[Tuple[str, str]] = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, str(value)) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(map(str, item)) for item in new_params]) - - def files_parameters(self, files: Dict[str, Union[str, bytes]]): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - for k, v in files.items(): - if isinstance(v, str): - with open(v, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - elif isinstance(v, bytes): - filename = k - filedata = v - else: - raise ValueError("Unsupported file value") - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.getheader("Content-Disposition") - if content_disposition: - m = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ) - assert m is not None, "Unexpected 'content-disposition' header value" - filename = m.group(1) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_enum(self, data, klass): - """Deserializes primitive type to enum. - - :param data: primitive type. - :param klass: class literal. - :return: enum value. - """ - try: - return klass(data) - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as `{1}`" - .format(data, klass) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/python-client/jfjoch_client/api_response.py b/python-client/jfjoch_client/api_response.py deleted file mode 100644 index 9bc7c11f..00000000 --- a/python-client/jfjoch_client/api_response.py +++ /dev/null @@ -1,21 +0,0 @@ -"""API response object.""" - -from __future__ import annotations -from typing import Optional, Generic, Mapping, TypeVar -from pydantic import Field, StrictInt, StrictBytes, BaseModel - -T = TypeVar("T") - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = { - "arbitrary_types_allowed": True - } diff --git a/python-client/jfjoch_client/configuration.py b/python-client/jfjoch_client/configuration.py deleted file mode 100644 index 4eafd9d5..00000000 --- a/python-client/jfjoch_client/configuration.py +++ /dev/null @@ -1,451 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import logging -from logging import FileHandler -import multiprocessing -import sys -from typing import Optional -import urllib3 - -import http.client as httplib - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param ignore_operation_servers - Boolean to ignore operation servers for the API client. - Config will use `host` as the base url regardless of the operation servers. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - :param retries: Number of retries for API requests. - - """ - - _default = None - - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ignore_operation_servers=False, - ssl_ca_cert=None, - retries=None, - *, - debug: Optional[bool] = None - ) -> None: - """Constructor - """ - self._base_path = "http://localhost:5232" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.ignore_operation_servers = ignore_operation_servers - """Ignore operation servers - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("jfjoch_client") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler: Optional[FileHandler] = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - if debug is not None: - self.debug = debug - else: - self.__debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved - per pool. urllib3 uses 1 connection as default value, but this is - not the best value when you are making a lot of possibly parallel - requests to the same host, which is often the case here. - cpu_count * 5 is used as default value to increase performance. - """ - - self.proxy: Optional[str] = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = retries - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - self.socket_options = None - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - """datetime format - """ - - self.date_format = "%Y-%m-%d" - """date format - """ - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls): - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls): - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = Configuration() - return cls._default - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.0.0-rc.23\n"\ - "SDK Package Version: 1.0.0-rc.23".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "http://localhost:5232", - 'description': "Test Jungfraujoch system", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/python-client/jfjoch_client/exceptions.py b/python-client/jfjoch_client/exceptions.py deleted file mode 100644 index a375ffb5..00000000 --- a/python-client/jfjoch_client/exceptions.py +++ /dev/null @@ -1,200 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -from typing import Any, Optional -from typing_extensions import Self - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__( - self, - status=None, - reason=None, - http_resp=None, - *, - body: Optional[str] = None, - data: Optional[Any] = None, - ) -> None: - self.status = status - self.reason = reason - self.body = body - self.data = data - self.headers = None - - if http_resp: - if self.status is None: - self.status = http_resp.status - if self.reason is None: - self.reason = http_resp.reason - if self.body is None: - try: - self.body = http_resp.data.decode('utf-8') - except Exception: - pass - self.headers = http_resp.getheaders() - - @classmethod - def from_response( - cls, - *, - http_resp, - body: Optional[str], - data: Optional[Any], - ) -> Self: - if http_resp.status == 400: - raise BadRequestException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 401: - raise UnauthorizedException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 403: - raise ForbiddenException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 404: - raise NotFoundException(http_resp=http_resp, body=body, data=data) - - if 500 <= http_resp.status <= 599: - raise ServiceException(http_resp=http_resp, body=body, data=data) - raise ApiException(http_resp=http_resp, body=body, data=data) - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.data or self.body: - error_message += "HTTP response body: {0}\n".format(self.data or self.body) - - return error_message - - -class BadRequestException(ApiException): - pass - - -class NotFoundException(ApiException): - pass - - -class UnauthorizedException(ApiException): - pass - - -class ForbiddenException(ApiException): - pass - - -class ServiceException(ApiException): - pass - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/python-client/jfjoch_client/models/__init__.py b/python-client/jfjoch_client/models/__init__.py deleted file mode 100644 index 3fbc3f4f..00000000 --- a/python-client/jfjoch_client/models/__init__.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -# import models into model package -from jfjoch_client.models.azim_int_settings import AzimIntSettings -from jfjoch_client.models.broker_status import BrokerStatus -from jfjoch_client.models.calibration_statistics_inner import CalibrationStatisticsInner -from jfjoch_client.models.dataset_settings import DatasetSettings -from jfjoch_client.models.dataset_settings_unit_cell import DatasetSettingsUnitCell -from jfjoch_client.models.detector import Detector -from jfjoch_client.models.detector_list import DetectorList -from jfjoch_client.models.detector_list_detectors_inner import DetectorListDetectorsInner -from jfjoch_client.models.detector_module import DetectorModule -from jfjoch_client.models.detector_module_direction import DetectorModuleDirection -from jfjoch_client.models.detector_power_state import DetectorPowerState -from jfjoch_client.models.detector_selection import DetectorSelection -from jfjoch_client.models.detector_settings import DetectorSettings -from jfjoch_client.models.detector_state import DetectorState -from jfjoch_client.models.detector_status import DetectorStatus -from jfjoch_client.models.detector_timing import DetectorTiming -from jfjoch_client.models.detector_type import DetectorType -from jfjoch_client.models.error_message import ErrorMessage -from jfjoch_client.models.fpga_status_inner import FpgaStatusInner -from jfjoch_client.models.image_format_settings import ImageFormatSettings -from jfjoch_client.models.image_pusher_type import ImagePusherType -from jfjoch_client.models.instrument_metadata import InstrumentMetadata -from jfjoch_client.models.jfjoch_settings import JfjochSettings -from jfjoch_client.models.jfjoch_statistics import JfjochStatistics -from jfjoch_client.models.measurement_statistics import MeasurementStatistics -from jfjoch_client.models.pcie_devices_inner import PcieDevicesInner -from jfjoch_client.models.plot import Plot -from jfjoch_client.models.plots import Plots -from jfjoch_client.models.preview_settings import PreviewSettings -from jfjoch_client.models.roi_box import RoiBox -from jfjoch_client.models.roi_box_list import RoiBoxList -from jfjoch_client.models.roi_circle import RoiCircle -from jfjoch_client.models.roi_circle_list import RoiCircleList -from jfjoch_client.models.rotation_axis import RotationAxis -from jfjoch_client.models.spot_finding_settings import SpotFindingSettings -from jfjoch_client.models.standard_detector_geometry import StandardDetectorGeometry -from jfjoch_client.models.zeromq_preview_settings import ZeromqPreviewSettings -from jfjoch_client.models.zeromq_settings import ZeromqSettings diff --git a/python-client/jfjoch_client/models/azim_int_settings.py b/python-client/jfjoch_client/models/azim_int_settings.py deleted file mode 100644 index 3c6caf9f..00000000 --- a/python-client/jfjoch_client/models/azim_int_settings.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class AzimIntSettings(BaseModel): - """ - AzimIntSettings - """ # noqa: E501 - polarization_factor: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=-1.0)], Annotated[int, Field(le=1, strict=True, ge=-1)]]] = Field(default=None, description="If polarization factor is provided, than polarization correction is enabled.") - solid_angle_corr: StrictBool = Field(description="Apply solid angle correction for radial integration") - high_q_recip_a: Union[StrictFloat, StrictInt] = Field(alias="high_q_recipA") - low_q_recip_a: Union[StrictFloat, StrictInt] = Field(alias="low_q_recipA") - q_spacing: Union[StrictFloat, StrictInt] - __properties: ClassVar[List[str]] = ["polarization_factor", "solid_angle_corr", "high_q_recipA", "low_q_recipA", "q_spacing"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AzimIntSettings from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AzimIntSettings from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "polarization_factor": obj.get("polarization_factor"), - "solid_angle_corr": obj.get("solid_angle_corr") if obj.get("solid_angle_corr") is not None else True, - "high_q_recipA": obj.get("high_q_recipA"), - "low_q_recipA": obj.get("low_q_recipA"), - "q_spacing": obj.get("q_spacing") - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/broker_status.py b/python-client/jfjoch_client/models/broker_status.py deleted file mode 100644 index 36d0ba93..00000000 --- a/python-client/jfjoch_client/models/broker_status.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class BrokerStatus(BaseModel): - """ - BrokerStatus - """ # noqa: E501 - state: StrictStr - progress: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=None, description="Progress of data collection (only available if receiving is running)") - __properties: ClassVar[List[str]] = ["state", "progress"] - - @field_validator('state') - def state_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['Inactive', 'Idle', 'Busy', 'Measuring', 'Pedestal', 'Error']): - raise ValueError("must be one of enum values ('Inactive', 'Idle', 'Busy', 'Measuring', 'Pedestal', 'Error')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of BrokerStatus from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of BrokerStatus from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "state": obj.get("state"), - "progress": obj.get("progress") - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/calibration_statistics_inner.py b/python-client/jfjoch_client/models/calibration_statistics_inner.py deleted file mode 100644 index f5afe12c..00000000 --- a/python-client/jfjoch_client/models/calibration_statistics_inner.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt -from typing import Any, ClassVar, Dict, List, Union -from typing import Optional, Set -from typing_extensions import Self - -class CalibrationStatisticsInner(BaseModel): - """ - CalibrationStatisticsInner - """ # noqa: E501 - module_number: StrictInt - storage_cell_number: StrictInt - pedestal_g0_mean: Union[StrictFloat, StrictInt] - pedestal_g1_mean: Union[StrictFloat, StrictInt] - pedestal_g2_mean: Union[StrictFloat, StrictInt] - gain_g0_mean: Union[StrictFloat, StrictInt] - gain_g1_mean: Union[StrictFloat, StrictInt] - gain_g2_mean: Union[StrictFloat, StrictInt] - masked_pixels: StrictInt - __properties: ClassVar[List[str]] = ["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"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CalibrationStatisticsInner from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CalibrationStatisticsInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "module_number": obj.get("module_number"), - "storage_cell_number": obj.get("storage_cell_number"), - "pedestal_g0_mean": obj.get("pedestal_g0_mean"), - "pedestal_g1_mean": obj.get("pedestal_g1_mean"), - "pedestal_g2_mean": obj.get("pedestal_g2_mean"), - "gain_g0_mean": obj.get("gain_g0_mean"), - "gain_g1_mean": obj.get("gain_g1_mean"), - "gain_g2_mean": obj.get("gain_g2_mean"), - "masked_pixels": obj.get("masked_pixels") - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/dataset_settings.py b/python-client/jfjoch_client/models/dataset_settings.py deleted file mode 100644 index d40745da..00000000 --- a/python-client/jfjoch_client/models/dataset_settings.py +++ /dev/null @@ -1,167 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing_extensions import Annotated -from jfjoch_client.models.dataset_settings_unit_cell import DatasetSettingsUnitCell -from jfjoch_client.models.rotation_axis import RotationAxis -from typing import Optional, Set -from typing_extensions import Self - -class DatasetSettings(BaseModel): - """ - DatasetSettings - """ # noqa: E501 - images_per_trigger: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(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: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=1, description="Number of TTL trigger that the detector is expected to receive during data collection ") - image_time_us: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, 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: Union[StrictFloat, StrictInt] = Field(description="/entry/detector/beam_center_x in NXmx Beam center in X direction [pixels] ") - beam_y_pxl: Union[StrictFloat, StrictInt] = Field(description="/entry/detector/beam_center_y in NXmx Beam center in X direction [pixels] ") - detector_distance_mm: Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]] = Field(description="/entry/detector/distance in NXmx Detector distance [mm]") - incident_energy_ke_v: Union[Annotated[float, Field(le=500.0, strict=True, ge=0.001)], Annotated[int, Field(le=500, strict=True, ge=1)]] = Field(description="Used to calculate /entry/beam/incident_wavelength in NXmx Incident particle (photon, electron) energy in keV ", alias="incident_energy_keV") - file_prefix: Optional[StrictStr] = Field(default='', description="Prefix for filenames. If left empty, no file will be saved.") - images_per_file: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=1000, description="Number of files in a single HDF5 data file (0 = write all images to a single data file).") - space_group_number: Optional[Annotated[int, Field(le=194, strict=True, ge=0)]] = 0 - sample_name: Optional[StrictStr] = Field(default='', description="/entry/sample/name in NXmx Sample name ") - compression: Optional[StrictStr] = 'bslz4' - total_flux: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, 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: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=None, description="/entry/instrument/attenuator/attenuator_transmission Transmission of attenuator (filter) [no units] ") - goniometer: Optional[RotationAxis] = None - header_appendix: Optional[Any] = Field(default=None, description="Header appendix, added as user_data/user to start message (can be any valid JSON)") - image_appendix: Optional[Any] = Field(default=None, description="Image appendix, added as user_data to image message (can be any valid JSON)") - data_reduction_factor_serialmx: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=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: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, 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: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, 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: Optional[StrictStr] = Field(default=None, 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: Optional[StrictStr] = Field(default=None, 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: Optional[Annotated[int, Field(le=16, strict=True, ge=0)]] = Field(default=None, 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: Optional[StrictBool] = Field(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: Optional[StrictBool] = Field(default=None, 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: Optional[DatasetSettingsUnitCell] = None - __properties: ClassVar[List[str]] = ["images_per_trigger", "ntrigger", "image_time_us", "beam_x_pxl", "beam_y_pxl", "detector_distance_mm", "incident_energy_keV", "file_prefix", "images_per_file", "space_group_number", "sample_name", "compression", "total_flux", "transmission", "goniometer", "header_appendix", "image_appendix", "data_reduction_factor_serialmx", "pixel_value_low_threshold", "run_number", "run_name", "experiment_group", "poisson_compression", "write_nxmx_hdf5_master", "save_calibration", "unit_cell"] - - @field_validator('compression') - def compression_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['bslz4', 'bszstd', 'bszstd_rle', 'none']): - raise ValueError("must be one of enum values ('bslz4', 'bszstd', 'bszstd_rle', 'none')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DatasetSettings from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of goniometer - if self.goniometer: - _dict['goniometer'] = self.goniometer.to_dict() - # override the default output from pydantic by calling `to_dict()` of unit_cell - if self.unit_cell: - _dict['unit_cell'] = self.unit_cell.to_dict() - # set to None if header_appendix (nullable) is None - # and model_fields_set contains the field - if self.header_appendix is None and "header_appendix" in self.model_fields_set: - _dict['header_appendix'] = None - - # set to None if image_appendix (nullable) is None - # and model_fields_set contains the field - if self.image_appendix is None and "image_appendix" in self.model_fields_set: - _dict['image_appendix'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DatasetSettings from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "images_per_trigger": obj.get("images_per_trigger") if obj.get("images_per_trigger") is not None else 1, - "ntrigger": obj.get("ntrigger") if obj.get("ntrigger") is not None else 1, - "image_time_us": obj.get("image_time_us"), - "beam_x_pxl": obj.get("beam_x_pxl"), - "beam_y_pxl": obj.get("beam_y_pxl"), - "detector_distance_mm": obj.get("detector_distance_mm"), - "incident_energy_keV": obj.get("incident_energy_keV"), - "file_prefix": obj.get("file_prefix") if obj.get("file_prefix") is not None else '', - "images_per_file": obj.get("images_per_file") if obj.get("images_per_file") is not None else 1000, - "space_group_number": obj.get("space_group_number") if obj.get("space_group_number") is not None else 0, - "sample_name": obj.get("sample_name") if obj.get("sample_name") is not None else '', - "compression": obj.get("compression") if obj.get("compression") is not None else 'bslz4', - "total_flux": obj.get("total_flux"), - "transmission": obj.get("transmission"), - "goniometer": RotationAxis.from_dict(obj["goniometer"]) if obj.get("goniometer") is not None else None, - "header_appendix": obj.get("header_appendix"), - "image_appendix": obj.get("image_appendix"), - "data_reduction_factor_serialmx": obj.get("data_reduction_factor_serialmx") if obj.get("data_reduction_factor_serialmx") is not None else 1.0, - "pixel_value_low_threshold": obj.get("pixel_value_low_threshold"), - "run_number": obj.get("run_number"), - "run_name": obj.get("run_name"), - "experiment_group": obj.get("experiment_group"), - "poisson_compression": obj.get("poisson_compression"), - "write_nxmx_hdf5_master": obj.get("write_nxmx_hdf5_master") if obj.get("write_nxmx_hdf5_master") is not None else True, - "save_calibration": obj.get("save_calibration"), - "unit_cell": DatasetSettingsUnitCell.from_dict(obj["unit_cell"]) if obj.get("unit_cell") is not None else None - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/dataset_settings_unit_cell.py b/python-client/jfjoch_client/models/dataset_settings_unit_cell.py deleted file mode 100644 index 5187a959..00000000 --- a/python-client/jfjoch_client/models/dataset_settings_unit_cell.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Union -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class DatasetSettingsUnitCell(BaseModel): - """ - Units of angstrom and degree - """ # noqa: E501 - a: Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]] - b: Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]] - c: Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]] - alpha: Union[Annotated[float, Field(le=360, strict=True, ge=0)], Annotated[int, Field(le=360, strict=True, ge=0)]] - beta: Union[Annotated[float, Field(le=360, strict=True, ge=0)], Annotated[int, Field(le=360, strict=True, ge=0)]] - gamma: Union[Annotated[float, Field(le=360, strict=True, ge=0)], Annotated[int, Field(le=360, strict=True, ge=0)]] - __properties: ClassVar[List[str]] = ["a", "b", "c", "alpha", "beta", "gamma"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DatasetSettingsUnitCell from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DatasetSettingsUnitCell from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "a": obj.get("a"), - "b": obj.get("b"), - "c": obj.get("c"), - "alpha": obj.get("alpha"), - "beta": obj.get("beta"), - "gamma": obj.get("gamma") - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/detector.py b/python-client/jfjoch_client/models/detector.py deleted file mode 100644 index 42aabde8..00000000 --- a/python-client/jfjoch_client/models/detector.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing_extensions import Annotated -from jfjoch_client.models.detector_module import DetectorModule -from jfjoch_client.models.detector_type import DetectorType -from jfjoch_client.models.standard_detector_geometry import StandardDetectorGeometry -from typing import Optional, Set -from typing_extensions import Self - -class Detector(BaseModel): - """ - Detector - """ # noqa: E501 - description: Annotated[str, Field(min_length=1, strict=True)] - serial_number: Annotated[str, Field(min_length=1, strict=True)] - type: Optional[DetectorType] = None - high_voltage_v: Optional[Annotated[int, Field(le=200, strict=True, ge=0)]] = Field(default=0, alias="high_voltage_V") - udp_interface_count: Optional[Annotated[int, Field(le=2, strict=True, ge=1)]] = 1 - module_sync: Optional[StrictBool] = Field(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: Optional[Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]]] = 320 - calibration_file: Optional[List[StrictStr]] = Field(default=None, description="Gain file (JUNGFRAU) or trimbit file (EIGER). One entry per module. Either empty or number of module entries. ") - hostname: Optional[List[StrictStr]] = Field(default=None, description="Hostname for detector module. One entry per module One entry per module. Either empty or number of module entries. ") - sensor_material: Optional[StrictStr] = 'Si' - tx_delay: Optional[List[StrictInt]] = None - base_data_ipv4_address: Optional[StrictStr] = None - standard_geometry: Optional[StandardDetectorGeometry] = None - custom_geometry: Optional[List[DetectorModule]] = None - mirror_y: Optional[StrictBool] = Field(default=True, description="Mirror detector in Y direction to account for MX convention of (0,0) point in top left corner") - __properties: ClassVar[List[str]] = ["description", "serial_number", "type", "high_voltage_V", "udp_interface_count", "module_sync", "sensor_thickness_um", "calibration_file", "hostname", "sensor_material", "tx_delay", "base_data_ipv4_address", "standard_geometry", "custom_geometry", "mirror_y"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Detector from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of standard_geometry - if self.standard_geometry: - _dict['standard_geometry'] = self.standard_geometry.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in custom_geometry (list) - _items = [] - if self.custom_geometry: - for _item_custom_geometry in self.custom_geometry: - if _item_custom_geometry: - _items.append(_item_custom_geometry.to_dict()) - _dict['custom_geometry'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Detector from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "description": obj.get("description"), - "serial_number": obj.get("serial_number"), - "type": obj.get("type"), - "high_voltage_V": obj.get("high_voltage_V") if obj.get("high_voltage_V") is not None else 0, - "udp_interface_count": obj.get("udp_interface_count") if obj.get("udp_interface_count") is not None else 1, - "module_sync": obj.get("module_sync") if obj.get("module_sync") is not None else True, - "sensor_thickness_um": obj.get("sensor_thickness_um") if obj.get("sensor_thickness_um") is not None else 320, - "calibration_file": obj.get("calibration_file"), - "hostname": obj.get("hostname"), - "sensor_material": obj.get("sensor_material") if obj.get("sensor_material") is not None else 'Si', - "tx_delay": obj.get("tx_delay"), - "base_data_ipv4_address": obj.get("base_data_ipv4_address"), - "standard_geometry": StandardDetectorGeometry.from_dict(obj["standard_geometry"]) if obj.get("standard_geometry") is not None else None, - "custom_geometry": [DetectorModule.from_dict(_item) for _item in obj["custom_geometry"]] if obj.get("custom_geometry") is not None else None, - "mirror_y": obj.get("mirror_y") if obj.get("mirror_y") is not None else True - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/detector_list.py b/python-client/jfjoch_client/models/detector_list.py deleted file mode 100644 index 8fa70049..00000000 --- a/python-client/jfjoch_client/models/detector_list.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt -from typing import Any, ClassVar, Dict, List -from jfjoch_client.models.detector_list_detectors_inner import DetectorListDetectorsInner -from typing import Optional, Set -from typing_extensions import Self - -class DetectorList(BaseModel): - """ - DetectorList - """ # noqa: E501 - detectors: List[DetectorListDetectorsInner] - current_id: StrictInt - __properties: ClassVar[List[str]] = ["detectors", "current_id"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DetectorList from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in detectors (list) - _items = [] - if self.detectors: - for _item_detectors in self.detectors: - if _item_detectors: - _items.append(_item_detectors.to_dict()) - _dict['detectors'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DetectorList from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "detectors": [DetectorListDetectorsInner.from_dict(_item) for _item in obj["detectors"]] if obj.get("detectors") is not None else None, - "current_id": obj.get("current_id") - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/detector_list_detectors_inner.py b/python-client/jfjoch_client/models/detector_list_detectors_inner.py deleted file mode 100644 index d97a2f6d..00000000 --- a/python-client/jfjoch_client/models/detector_list_detectors_inner.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class DetectorListDetectorsInner(BaseModel): - """ - DetectorListDetectorsInner - """ # noqa: E501 - id: Annotated[int, Field(strict=True, ge=0)] - description: StrictStr - serial_number: StrictStr - base_ipv4_addr: StrictStr - udp_interface_count: StrictInt = Field(description="Number of UDP interfaces per detector module") - nmodules: StrictInt - width: StrictInt - height: StrictInt - __properties: ClassVar[List[str]] = ["id", "description", "serial_number", "base_ipv4_addr", "udp_interface_count", "nmodules", "width", "height"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DetectorListDetectorsInner from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DetectorListDetectorsInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "description": obj.get("description"), - "serial_number": obj.get("serial_number"), - "base_ipv4_addr": obj.get("base_ipv4_addr"), - "udp_interface_count": obj.get("udp_interface_count"), - "nmodules": obj.get("nmodules"), - "width": obj.get("width"), - "height": obj.get("height") - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/detector_module.py b/python-client/jfjoch_client/models/detector_module.py deleted file mode 100644 index 38a6b163..00000000 --- a/python-client/jfjoch_client/models/detector_module.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt -from typing import Any, ClassVar, Dict, List, Union -from jfjoch_client.models.detector_module_direction import DetectorModuleDirection -from typing import Optional, Set -from typing_extensions import Self - -class DetectorModule(BaseModel): - """ - DetectorModule - """ # noqa: E501 - x0: Union[StrictFloat, StrictInt] - y0: Union[StrictFloat, StrictInt] - fast_axis: DetectorModuleDirection - slow_axis: DetectorModuleDirection - __properties: ClassVar[List[str]] = ["x0", "y0", "fast_axis", "slow_axis"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DetectorModule from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DetectorModule from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "x0": obj.get("x0"), - "y0": obj.get("y0"), - "fast_axis": obj.get("fast_axis"), - "slow_axis": obj.get("slow_axis") - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/detector_module_direction.py b/python-client/jfjoch_client/models/detector_module_direction.py deleted file mode 100644 index 9db96e75..00000000 --- a/python-client/jfjoch_client/models/detector_module_direction.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self - - -class DetectorModuleDirection(str, Enum): - """ - DetectorModuleDirection - """ - - """ - allowed enum values - """ - XP = 'Xp' - XN = 'Xn' - YP = 'Yp' - YN = 'Yn' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DetectorModuleDirection from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/python-client/jfjoch_client/models/detector_power_state.py b/python-client/jfjoch_client/models/detector_power_state.py deleted file mode 100644 index f6186673..00000000 --- a/python-client/jfjoch_client/models/detector_power_state.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self - - -class DetectorPowerState(str, Enum): - """ - Power on of ASICs - """ - - """ - allowed enum values - """ - POWERON = 'PowerOn' - POWEROFF = 'PowerOff' - PARTIAL = 'Partial' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DetectorPowerState from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/python-client/jfjoch_client/models/detector_selection.py b/python-client/jfjoch_client/models/detector_selection.py deleted file mode 100644 index e8368eb3..00000000 --- a/python-client/jfjoch_client/models/detector_selection.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class DetectorSelection(BaseModel): - """ - DetectorSelection - """ # noqa: E501 - id: StrictInt - __properties: ClassVar[List[str]] = ["id"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DetectorSelection from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DetectorSelection from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id") - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/detector_settings.py b/python-client/jfjoch_client/models/detector_settings.py deleted file mode 100644 index 83d743f8..00000000 --- a/python-client/jfjoch_client/models/detector_settings.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing_extensions import Annotated -from jfjoch_client.models.detector_timing import DetectorTiming -from typing import Optional, Set -from typing_extensions import Self - -class DetectorSettings(BaseModel): - """ - DetectorSettings - """ # noqa: E501 - frame_time_us: Annotated[int, Field(strict=True, ge=450)] = Field(description="Interval between consecutive frames.") - count_time_us: Optional[StrictInt] = Field(default=None, description="Integration time of the detector. If not provided count time will be set to maximum value for a given frame time.") - internal_frame_generator: Optional[StrictBool] = Field(default=False, description="Use internal frame generator in FPGA instead of getting data from a real detector") - internal_frame_generator_images: Optional[Annotated[int, Field(le=128, strict=True, ge=1)]] = 1 - detector_trigger_delay_ns: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=0, description="Delay between TTL trigger and acquisition start [ns]") - timing: Optional[DetectorTiming] = DetectorTiming.TRIGGER - eiger_threshold_ke_v: Optional[Union[Annotated[float, Field(le=100.0, strict=True, ge=1.0)], Annotated[int, Field(le=100, strict=True, ge=1)]]] = Field(default=None, alias="eiger_threshold_keV") - jungfrau_pedestal_g0_frames: Optional[Annotated[int, Field(strict=True, ge=0)]] = 2000 - jungfrau_pedestal_g1_frames: Optional[Annotated[int, Field(strict=True, ge=0)]] = 300 - jungfrau_pedestal_g2_frames: Optional[Annotated[int, Field(strict=True, ge=0)]] = 300 - jungfrau_pedestal_g0_rms_limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=100, description="Pixels with pedestal G0 RMS above the threshold are marked as masked pixels") - jungfrau_pedestal_min_image_count: Optional[Annotated[int, Field(strict=True, ge=32)]] = Field(default=128, description="Minimum number of collected images for pedestal to consider it viable") - jungfrau_storage_cell_count: Optional[Annotated[int, Field(le=16, strict=True, ge=1)]] = 1 - jungfrau_storage_cell_delay_ns: Optional[Annotated[int, Field(strict=True, ge=2100)]] = Field(default=5000, description="Delay between two storage cells [ns]") - jungfrau_fixed_gain_g1: Optional[StrictBool] = Field(default=False, description="Fix gain to G1 (can be useful for storage cells)") - jungfrau_use_gain_hg0: Optional[StrictBool] = Field(default=False, description="Use high G0 (for low energy applications)") - __properties: ClassVar[List[str]] = ["frame_time_us", "count_time_us", "internal_frame_generator", "internal_frame_generator_images", "detector_trigger_delay_ns", "timing", "eiger_threshold_keV", "jungfrau_pedestal_g0_frames", "jungfrau_pedestal_g1_frames", "jungfrau_pedestal_g2_frames", "jungfrau_pedestal_g0_rms_limit", "jungfrau_pedestal_min_image_count", "jungfrau_storage_cell_count", "jungfrau_storage_cell_delay_ns", "jungfrau_fixed_gain_g1", "jungfrau_use_gain_hg0"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DetectorSettings from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DetectorSettings from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "frame_time_us": obj.get("frame_time_us"), - "count_time_us": obj.get("count_time_us"), - "internal_frame_generator": obj.get("internal_frame_generator") if obj.get("internal_frame_generator") is not None else False, - "internal_frame_generator_images": obj.get("internal_frame_generator_images") if obj.get("internal_frame_generator_images") is not None else 1, - "detector_trigger_delay_ns": obj.get("detector_trigger_delay_ns") if obj.get("detector_trigger_delay_ns") is not None else 0, - "timing": obj.get("timing") if obj.get("timing") is not None else DetectorTiming.TRIGGER, - "eiger_threshold_keV": obj.get("eiger_threshold_keV"), - "jungfrau_pedestal_g0_frames": obj.get("jungfrau_pedestal_g0_frames") if obj.get("jungfrau_pedestal_g0_frames") is not None else 2000, - "jungfrau_pedestal_g1_frames": obj.get("jungfrau_pedestal_g1_frames") if obj.get("jungfrau_pedestal_g1_frames") is not None else 300, - "jungfrau_pedestal_g2_frames": obj.get("jungfrau_pedestal_g2_frames") if obj.get("jungfrau_pedestal_g2_frames") is not None else 300, - "jungfrau_pedestal_g0_rms_limit": obj.get("jungfrau_pedestal_g0_rms_limit") if obj.get("jungfrau_pedestal_g0_rms_limit") is not None else 100, - "jungfrau_pedestal_min_image_count": obj.get("jungfrau_pedestal_min_image_count") if obj.get("jungfrau_pedestal_min_image_count") is not None else 128, - "jungfrau_storage_cell_count": obj.get("jungfrau_storage_cell_count") if obj.get("jungfrau_storage_cell_count") is not None else 1, - "jungfrau_storage_cell_delay_ns": obj.get("jungfrau_storage_cell_delay_ns") if obj.get("jungfrau_storage_cell_delay_ns") is not None else 5000, - "jungfrau_fixed_gain_g1": obj.get("jungfrau_fixed_gain_g1") if obj.get("jungfrau_fixed_gain_g1") is not None else False, - "jungfrau_use_gain_hg0": obj.get("jungfrau_use_gain_hg0") if obj.get("jungfrau_use_gain_hg0") is not None else False - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/detector_state.py b/python-client/jfjoch_client/models/detector_state.py deleted file mode 100644 index 76cbaaaf..00000000 --- a/python-client/jfjoch_client/models/detector_state.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self - - -class DetectorState(str, Enum): - """ - Current state of the detector - """ - - """ - allowed enum values - """ - IDLE = 'Idle' - WAITING = 'Waiting' - BUSY = 'Busy' - ERROR = 'Error' - NOT_CONNECTED = 'Not connected' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DetectorState from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/python-client/jfjoch_client/models/detector_status.py b/python-client/jfjoch_client/models/detector_status.py deleted file mode 100644 index 2e567e81..00000000 --- a/python-client/jfjoch_client/models/detector_status.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List -from jfjoch_client.models.detector_power_state import DetectorPowerState -from jfjoch_client.models.detector_state import DetectorState -from typing import Optional, Set -from typing_extensions import Self - -class DetectorStatus(BaseModel): - """ - DetectorStatus - """ # noqa: E501 - state: DetectorState - powerchip: DetectorPowerState - server_version: StrictStr = Field(description="Detector server (on read-out boards) version") - number_of_triggers_left: StrictInt = Field(description="Remaining triggers to the detector (max of all modules)") - fpga_temp_deg_c: List[StrictInt] = Field(description="Temperature of detector FPGAs", alias="fpga_temp_degC") - high_voltage_v: List[StrictInt] = Field(description="High voltage for detector modules", alias="high_voltage_V") - __properties: ClassVar[List[str]] = ["state", "powerchip", "server_version", "number_of_triggers_left", "fpga_temp_degC", "high_voltage_V"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DetectorStatus from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DetectorStatus from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "state": obj.get("state"), - "powerchip": obj.get("powerchip"), - "server_version": obj.get("server_version"), - "number_of_triggers_left": obj.get("number_of_triggers_left"), - "fpga_temp_degC": obj.get("fpga_temp_degC"), - "high_voltage_V": obj.get("high_voltage_V") - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/detector_timing.py b/python-client/jfjoch_client/models/detector_timing.py deleted file mode 100644 index 2d6d7a9e..00000000 --- a/python-client/jfjoch_client/models/detector_timing.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self - - -class DetectorTiming(str, Enum): - """ - DetectorTiming - """ - - """ - allowed enum values - """ - AUTO = 'auto' - TRIGGER = 'trigger' - BURST = 'burst' - GATED = 'gated' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DetectorTiming from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/python-client/jfjoch_client/models/detector_type.py b/python-client/jfjoch_client/models/detector_type.py deleted file mode 100644 index 4f9efaf6..00000000 --- a/python-client/jfjoch_client/models/detector_type.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self - - -class DetectorType(str, Enum): - """ - DetectorType - """ - - """ - allowed enum values - """ - EIGER = 'EIGER' - JUNGFRAU = 'JUNGFRAU' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DetectorType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/python-client/jfjoch_client/models/error_message.py b/python-client/jfjoch_client/models/error_message.py deleted file mode 100644 index eb780c2e..00000000 --- a/python-client/jfjoch_client/models/error_message.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class ErrorMessage(BaseModel): - """ - ErrorMessage - """ # noqa: E501 - msg: StrictStr = Field(description="Human readable message") - reason: StrictStr = Field(description="Enumerate field for automated analysis") - __properties: ClassVar[List[str]] = ["msg", "reason"] - - @field_validator('reason') - def reason_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['WrongDAQState', 'Other']): - raise ValueError("must be one of enum values ('WrongDAQState', 'Other')") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ErrorMessage from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ErrorMessage from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "msg": obj.get("msg"), - "reason": obj.get("reason") - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/fpga_status_inner.py b/python-client/jfjoch_client/models/fpga_status_inner.py deleted file mode 100644 index 6f91301d..00000000 --- a/python-client/jfjoch_client/models/fpga_status_inner.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Union -from typing import Optional, Set -from typing_extensions import Self - -class FpgaStatusInner(BaseModel): - """ - FpgaStatusInner - """ # noqa: E501 - pci_dev_id: StrictStr - serial_number: StrictStr - base_mac_addr: StrictStr - eth_link_count: StrictInt - eth_link_status: StrictInt - power_usage_w: Union[StrictFloat, StrictInt] = Field(alias="power_usage_W") - fpga_temp_c: Union[StrictFloat, StrictInt] = Field(alias="fpga_temp_C") - hbm_temp_c: Union[StrictFloat, StrictInt] = Field(alias="hbm_temp_C") - packets_udp: StrictInt - packets_sls: StrictInt - idle: StrictBool - __properties: ClassVar[List[str]] = ["pci_dev_id", "serial_number", "base_mac_addr", "eth_link_count", "eth_link_status", "power_usage_W", "fpga_temp_C", "hbm_temp_C", "packets_udp", "packets_sls", "idle"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FpgaStatusInner from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FpgaStatusInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "pci_dev_id": obj.get("pci_dev_id"), - "serial_number": obj.get("serial_number"), - "base_mac_addr": obj.get("base_mac_addr"), - "eth_link_count": obj.get("eth_link_count"), - "eth_link_status": obj.get("eth_link_status"), - "power_usage_W": obj.get("power_usage_W"), - "fpga_temp_C": obj.get("fpga_temp_C"), - "hbm_temp_C": obj.get("hbm_temp_C"), - "packets_udp": obj.get("packets_udp"), - "packets_sls": obj.get("packets_sls"), - "idle": obj.get("idle") - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/image_format_settings.py b/python-client/jfjoch_client/models/image_format_settings.py deleted file mode 100644 index 959bfd0f..00000000 --- a/python-client/jfjoch_client/models/image_format_settings.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, field_validator -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class ImageFormatSettings(BaseModel): - """ - ImageFormatSettings - """ # noqa: E501 - summation: StrictBool = Field(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: StrictBool = Field(description="Place module read-out into their location on composed detector and extend multipixels ") - jungfrau_conversion: StrictBool = Field(description="Convert pixel value in ADU to photon counts/energy Only affects JUNGFRAU detector ") - jungfrau_conversion_factor_ke_v: Optional[Union[Annotated[float, Field(le=500.0, strict=True, ge=0.001)], Annotated[int, Field(le=500, strict=True, ge=1)]]] = Field(default=None, description="Used to convert energy deposited into pixel to counts If not provided incident_energy_keV is used ", alias="jungfrau_conversion_factor_keV") - bit_depth_image: Optional[StrictInt] = Field(default=None, description="Bit depth of resulting image (it doesn't affect the original detector value) If not provided value is adjusted automatically ") - signed_output: Optional[StrictBool] = Field(default=None, description="Controls if pixels have signed output If not provided value is adjusted automatically ") - mask_module_edges: StrictBool = Field(description="Mask 1 pixel on the module boundary ") - mask_chip_edges: StrictBool = Field(description="Mask multipixels on chip boundary ") - __properties: ClassVar[List[str]] = ["summation", "geometry_transform", "jungfrau_conversion", "jungfrau_conversion_factor_keV", "bit_depth_image", "signed_output", "mask_module_edges", "mask_chip_edges"] - - @field_validator('bit_depth_image') - def bit_depth_image_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set([16, 32]): - raise ValueError("must be one of enum values (16, 32)") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ImageFormatSettings from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ImageFormatSettings from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "summation": obj.get("summation"), - "geometry_transform": obj.get("geometry_transform"), - "jungfrau_conversion": obj.get("jungfrau_conversion"), - "jungfrau_conversion_factor_keV": obj.get("jungfrau_conversion_factor_keV"), - "bit_depth_image": obj.get("bit_depth_image"), - "signed_output": obj.get("signed_output"), - "mask_module_edges": obj.get("mask_module_edges") if obj.get("mask_module_edges") is not None else True, - "mask_chip_edges": obj.get("mask_chip_edges") if obj.get("mask_chip_edges") is not None else True - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/image_pusher_type.py b/python-client/jfjoch_client/models/image_pusher_type.py deleted file mode 100644 index 4be6454f..00000000 --- a/python-client/jfjoch_client/models/image_pusher_type.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self - - -class ImagePusherType(str, Enum): - """ - ImagePusherType - """ - - """ - allowed enum values - """ - ZEROMQ = 'ZeroMQ' - HDF5 = 'HDF5' - CBOR = 'CBOR' - NONE = 'None' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ImagePusherType from a JSON string""" - return cls(json.loads(json_str)) - - diff --git a/python-client/jfjoch_client/models/instrument_metadata.py b/python-client/jfjoch_client/models/instrument_metadata.py deleted file mode 100644 index 67f0625d..00000000 --- a/python-client/jfjoch_client/models/instrument_metadata.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class InstrumentMetadata(BaseModel): - """ - Metadata for a measurement instrument - """ # noqa: E501 - source_name: StrictStr - source_type: Optional[StrictStr] = Field(default='', 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 ") - instrument_name: StrictStr - pulsed_source: Optional[StrictBool] = Field(default=False, description="Settings specific to XFEL (e.g., every image has to come from TTL trigger, save pulse ID and event code)") - __properties: ClassVar[List[str]] = ["source_name", "source_type", "instrument_name", "pulsed_source"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of InstrumentMetadata from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of InstrumentMetadata from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "source_name": obj.get("source_name"), - "source_type": obj.get("source_type") if obj.get("source_type") is not None else '', - "instrument_name": obj.get("instrument_name"), - "pulsed_source": obj.get("pulsed_source") if obj.get("pulsed_source") is not None else False - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/jfjoch_settings.py b/python-client/jfjoch_client/models/jfjoch_settings.py deleted file mode 100644 index 4f498cfb..00000000 --- a/python-client/jfjoch_client/models/jfjoch_settings.py +++ /dev/null @@ -1,154 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from jfjoch_client.models.azim_int_settings import AzimIntSettings -from jfjoch_client.models.detector import Detector -from jfjoch_client.models.detector_settings import DetectorSettings -from jfjoch_client.models.image_format_settings import ImageFormatSettings -from jfjoch_client.models.image_pusher_type import ImagePusherType -from jfjoch_client.models.instrument_metadata import InstrumentMetadata -from jfjoch_client.models.pcie_devices_inner import PcieDevicesInner -from jfjoch_client.models.zeromq_preview_settings import ZeromqPreviewSettings -from jfjoch_client.models.zeromq_settings import ZeromqSettings -from typing import Optional, Set -from typing_extensions import Self - -class JfjochSettings(BaseModel): - """ - Default settings for Jungfraujoch software. This structure is used to provide default settings using configuration JSON file and is not used in HTTP. - """ # noqa: E501 - pcie: Optional[List[PcieDevicesInner]] = None - zeromq: Optional[ZeromqSettings] = None - instrument: Optional[InstrumentMetadata] = None - detector: List[Detector] - detector_settings: Optional[DetectorSettings] = None - azim_int: Optional[AzimIntSettings] = None - image_format: Optional[ImageFormatSettings] = None - image_buffer_mi_b: Optional[Annotated[int, Field(strict=True, ge=128)]] = Field(default=2048, description="Size of internal buffer in MiB for images before they are sent to a stream", alias="image_buffer_MiB") - receiver_threads: Optional[Annotated[int, Field(le=512, strict=True, ge=1)]] = Field(default=64, description="Number of threads used by the receiver") - numa_policy: Optional[StrictStr] = Field(default=None, description="NUMA policy to bind CPUs") - frontend_directory: StrictStr = Field(description="Location of built JavaScript web frontend") - image_pusher: ImagePusherType - zeromq_preview: Optional[ZeromqPreviewSettings] = None - __properties: ClassVar[List[str]] = ["pcie", "zeromq", "instrument", "detector", "detector_settings", "azim_int", "image_format", "image_buffer_MiB", "receiver_threads", "numa_policy", "frontend_directory", "image_pusher", "zeromq_preview"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of JfjochSettings from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in pcie (list) - _items = [] - if self.pcie: - for _item_pcie in self.pcie: - if _item_pcie: - _items.append(_item_pcie.to_dict()) - _dict['pcie'] = _items - # override the default output from pydantic by calling `to_dict()` of zeromq - if self.zeromq: - _dict['zeromq'] = self.zeromq.to_dict() - # override the default output from pydantic by calling `to_dict()` of instrument - if self.instrument: - _dict['instrument'] = self.instrument.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in detector (list) - _items = [] - if self.detector: - for _item_detector in self.detector: - if _item_detector: - _items.append(_item_detector.to_dict()) - _dict['detector'] = _items - # override the default output from pydantic by calling `to_dict()` of detector_settings - if self.detector_settings: - _dict['detector_settings'] = self.detector_settings.to_dict() - # override the default output from pydantic by calling `to_dict()` of azim_int - if self.azim_int: - _dict['azim_int'] = self.azim_int.to_dict() - # override the default output from pydantic by calling `to_dict()` of image_format - if self.image_format: - _dict['image_format'] = self.image_format.to_dict() - # override the default output from pydantic by calling `to_dict()` of zeromq_preview - if self.zeromq_preview: - _dict['zeromq_preview'] = self.zeromq_preview.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of JfjochSettings from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "pcie": [PcieDevicesInner.from_dict(_item) for _item in obj["pcie"]] if obj.get("pcie") is not None else None, - "zeromq": ZeromqSettings.from_dict(obj["zeromq"]) if obj.get("zeromq") is not None else None, - "instrument": InstrumentMetadata.from_dict(obj["instrument"]) if obj.get("instrument") is not None else None, - "detector": [Detector.from_dict(_item) for _item in obj["detector"]] if obj.get("detector") is not None else None, - "detector_settings": DetectorSettings.from_dict(obj["detector_settings"]) if obj.get("detector_settings") is not None else None, - "azim_int": AzimIntSettings.from_dict(obj["azim_int"]) if obj.get("azim_int") is not None else None, - "image_format": ImageFormatSettings.from_dict(obj["image_format"]) if obj.get("image_format") is not None else None, - "image_buffer_MiB": obj.get("image_buffer_MiB") if obj.get("image_buffer_MiB") is not None else 2048, - "receiver_threads": obj.get("receiver_threads") if obj.get("receiver_threads") is not None else 64, - "numa_policy": obj.get("numa_policy"), - "frontend_directory": obj.get("frontend_directory"), - "image_pusher": obj.get("image_pusher") if obj.get("image_pusher") is not None else ImagePusherType.NONE, - "zeromq_preview": ZeromqPreviewSettings.from_dict(obj["zeromq_preview"]) if obj.get("zeromq_preview") is not None else None - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/jfjoch_statistics.py b/python-client/jfjoch_client/models/jfjoch_statistics.py deleted file mode 100644 index bf8ce311..00000000 --- a/python-client/jfjoch_client/models/jfjoch_statistics.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from jfjoch_client.models.broker_status import BrokerStatus -from jfjoch_client.models.calibration_statistics_inner import CalibrationStatisticsInner -from jfjoch_client.models.detector_list import DetectorList -from jfjoch_client.models.detector_settings import DetectorSettings -from jfjoch_client.models.detector_status import DetectorStatus -from jfjoch_client.models.fpga_status_inner import FpgaStatusInner -from jfjoch_client.models.image_format_settings import ImageFormatSettings -from jfjoch_client.models.instrument_metadata import InstrumentMetadata -from jfjoch_client.models.measurement_statistics import MeasurementStatistics -from jfjoch_client.models.spot_finding_settings import SpotFindingSettings -from jfjoch_client.models.zeromq_preview_settings import ZeromqPreviewSettings -from typing import Optional, Set -from typing_extensions import Self - -class JfjochStatistics(BaseModel): - """ - Pool statistics for Jungfraujoch to reduce transfers between frontend and jfjoch_broker - """ # noqa: E501 - detector: Optional[DetectorStatus] = None - detector_list: Optional[DetectorList] = None - detector_settings: Optional[DetectorSettings] = None - image_format_settings: Optional[ImageFormatSettings] = None - instrument_metadata: Optional[InstrumentMetadata] = None - data_processing_settings: Optional[SpotFindingSettings] = None - measurement: Optional[MeasurementStatistics] = None - broker: Optional[BrokerStatus] = None - fpga: Optional[List[FpgaStatusInner]] = None - calibration: Optional[List[CalibrationStatisticsInner]] = None - zeromq_preview: Optional[ZeromqPreviewSettings] = None - __properties: ClassVar[List[str]] = ["detector", "detector_list", "detector_settings", "image_format_settings", "instrument_metadata", "data_processing_settings", "measurement", "broker", "fpga", "calibration", "zeromq_preview"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of JfjochStatistics from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of detector - if self.detector: - _dict['detector'] = self.detector.to_dict() - # override the default output from pydantic by calling `to_dict()` of detector_list - if self.detector_list: - _dict['detector_list'] = self.detector_list.to_dict() - # override the default output from pydantic by calling `to_dict()` of detector_settings - if self.detector_settings: - _dict['detector_settings'] = self.detector_settings.to_dict() - # override the default output from pydantic by calling `to_dict()` of image_format_settings - if self.image_format_settings: - _dict['image_format_settings'] = self.image_format_settings.to_dict() - # override the default output from pydantic by calling `to_dict()` of instrument_metadata - if self.instrument_metadata: - _dict['instrument_metadata'] = self.instrument_metadata.to_dict() - # override the default output from pydantic by calling `to_dict()` of data_processing_settings - if self.data_processing_settings: - _dict['data_processing_settings'] = self.data_processing_settings.to_dict() - # override the default output from pydantic by calling `to_dict()` of measurement - if self.measurement: - _dict['measurement'] = self.measurement.to_dict() - # override the default output from pydantic by calling `to_dict()` of broker - if self.broker: - _dict['broker'] = self.broker.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in fpga (list) - _items = [] - if self.fpga: - for _item_fpga in self.fpga: - if _item_fpga: - _items.append(_item_fpga.to_dict()) - _dict['fpga'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in calibration (list) - _items = [] - if self.calibration: - for _item_calibration in self.calibration: - if _item_calibration: - _items.append(_item_calibration.to_dict()) - _dict['calibration'] = _items - # override the default output from pydantic by calling `to_dict()` of zeromq_preview - if self.zeromq_preview: - _dict['zeromq_preview'] = self.zeromq_preview.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of JfjochStatistics from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "detector": DetectorStatus.from_dict(obj["detector"]) if obj.get("detector") is not None else None, - "detector_list": DetectorList.from_dict(obj["detector_list"]) if obj.get("detector_list") is not None else None, - "detector_settings": DetectorSettings.from_dict(obj["detector_settings"]) if obj.get("detector_settings") is not None else None, - "image_format_settings": ImageFormatSettings.from_dict(obj["image_format_settings"]) if obj.get("image_format_settings") is not None else None, - "instrument_metadata": InstrumentMetadata.from_dict(obj["instrument_metadata"]) if obj.get("instrument_metadata") is not None else None, - "data_processing_settings": SpotFindingSettings.from_dict(obj["data_processing_settings"]) if obj.get("data_processing_settings") is not None else None, - "measurement": MeasurementStatistics.from_dict(obj["measurement"]) if obj.get("measurement") is not None else None, - "broker": BrokerStatus.from_dict(obj["broker"]) if obj.get("broker") is not None else None, - "fpga": [FpgaStatusInner.from_dict(_item) for _item in obj["fpga"]] if obj.get("fpga") is not None else None, - "calibration": [CalibrationStatisticsInner.from_dict(_item) for _item in obj["calibration"]] if obj.get("calibration") is not None else None, - "zeromq_preview": ZeromqPreviewSettings.from_dict(obj["zeromq_preview"]) if obj.get("zeromq_preview") is not None else None - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/measurement_statistics.py b/python-client/jfjoch_client/models/measurement_statistics.py deleted file mode 100644 index 3d55ecb9..00000000 --- a/python-client/jfjoch_client/models/measurement_statistics.py +++ /dev/null @@ -1,133 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class MeasurementStatistics(BaseModel): - """ - MeasurementStatistics - """ # noqa: E501 - file_prefix: Optional[StrictStr] = None - run_number: Optional[StrictInt] = Field(default=None, description="Number of data collection run. This can be either automatically incremented or provided externally for each data collection. ") - experiment_group: Optional[StrictStr] = Field(default=None, description="Name of group owning the data (e.g. p-group or proposal number). ") - images_expected: Optional[StrictInt] = None - images_collected: Optional[StrictInt] = Field(default=None, description="Images collected by the receiver. This number will be lower than images expected if there were issues with data collection performance. ") - images_sent: Optional[StrictInt] = Field(default=None, 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: Optional[StrictInt] = Field(default=None, description="Images discarded by the lossy compression filter") - max_image_number_sent: Optional[StrictInt] = None - collection_efficiency: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = None - compression_ratio: Optional[Union[Annotated[float, Field(strict=True, ge=0.0)], Annotated[int, Field(strict=True, ge=0)]]] = None - cancelled: Optional[StrictBool] = None - max_receiver_delay: Optional[StrictInt] = None - indexing_rate: Optional[Union[StrictFloat, StrictInt]] = None - detector_width: Optional[StrictInt] = None - detector_height: Optional[StrictInt] = None - detector_pixel_depth: Optional[StrictInt] = None - bkg_estimate: Optional[Union[StrictFloat, StrictInt]] = None - unit_cell: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["file_prefix", "run_number", "experiment_group", "images_expected", "images_collected", "images_sent", "images_discarded_lossy_compression", "max_image_number_sent", "collection_efficiency", "compression_ratio", "cancelled", "max_receiver_delay", "indexing_rate", "detector_width", "detector_height", "detector_pixel_depth", "bkg_estimate", "unit_cell"] - - @field_validator('detector_pixel_depth') - def detector_pixel_depth_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set([2, 4]): - raise ValueError("must be one of enum values (2, 4)") - return value - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of MeasurementStatistics from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of MeasurementStatistics from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "file_prefix": obj.get("file_prefix"), - "run_number": obj.get("run_number"), - "experiment_group": obj.get("experiment_group"), - "images_expected": obj.get("images_expected"), - "images_collected": obj.get("images_collected"), - "images_sent": obj.get("images_sent"), - "images_discarded_lossy_compression": obj.get("images_discarded_lossy_compression"), - "max_image_number_sent": obj.get("max_image_number_sent"), - "collection_efficiency": obj.get("collection_efficiency"), - "compression_ratio": obj.get("compression_ratio"), - "cancelled": obj.get("cancelled"), - "max_receiver_delay": obj.get("max_receiver_delay"), - "indexing_rate": obj.get("indexing_rate"), - "detector_width": obj.get("detector_width"), - "detector_height": obj.get("detector_height"), - "detector_pixel_depth": obj.get("detector_pixel_depth"), - "bkg_estimate": obj.get("bkg_estimate"), - "unit_cell": obj.get("unit_cell") - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/pcie_devices_inner.py b/python-client/jfjoch_client/models/pcie_devices_inner.py deleted file mode 100644 index 49163cfa..00000000 --- a/python-client/jfjoch_client/models/pcie_devices_inner.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class PcieDevicesInner(BaseModel): - """ - PcieDevicesInner - """ # noqa: E501 - blk: Optional[StrictStr] = Field(default=None, description="Block device name") - ipv4: Optional[StrictStr] = Field(default=None, description="IPv4 address of the block device") - __properties: ClassVar[List[str]] = ["blk", "ipv4"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PcieDevicesInner from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PcieDevicesInner from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "blk": obj.get("blk"), - "ipv4": obj.get("ipv4") - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/plot.py b/python-client/jfjoch_client/models/plot.py deleted file mode 100644 index 7d20c765..00000000 --- a/python-client/jfjoch_client/models/plot.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Union -from typing import Optional, Set -from typing_extensions import Self - -class Plot(BaseModel): - """ - x and y coordinates for plotting, it is OK to assume that both arrays have the same size; layout is optimized for Plotly - """ # noqa: E501 - title: StrictStr - x: List[Union[StrictFloat, StrictInt]] - y: List[Union[StrictFloat, StrictInt]] - __properties: ClassVar[List[str]] = ["title", "x", "y"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Plot from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Plot from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "title": obj.get("title") if obj.get("title") is not None else '', - "x": obj.get("x"), - "y": obj.get("y") - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/plots.py b/python-client/jfjoch_client/models/plots.py deleted file mode 100644 index 4c867e06..00000000 --- a/python-client/jfjoch_client/models/plots.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from jfjoch_client.models.plot import Plot -from typing import Optional, Set -from typing_extensions import Self - -class Plots(BaseModel): - """ - Plots - """ # noqa: E501 - title: Optional[StrictStr] = None - plot: List[Plot] - __properties: ClassVar[List[str]] = ["title", "plot"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Plots from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in plot (list) - _items = [] - if self.plot: - for _item_plot in self.plot: - if _item_plot: - _items.append(_item_plot.to_dict()) - _dict['plot'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Plots from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "title": obj.get("title"), - "plot": [Plot.from_dict(_item) for _item in obj["plot"]] if obj.get("plot") is not None else None - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/preview_settings.py b/python-client/jfjoch_client/models/preview_settings.py deleted file mode 100644 index ec40bad6..00000000 --- a/python-client/jfjoch_client/models/preview_settings.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class PreviewSettings(BaseModel): - """ - Settings for JPEG rendering of preview images - """ # noqa: E501 - saturation: Annotated[int, Field(le=65535, strict=True, ge=0)] = Field(description="Saturation value to set contrast in the preview image") - show_spots: Optional[StrictBool] = Field(default=True, description="Show spot finding results on the image") - show_roi: Optional[StrictBool] = Field(default=False, description="Show ROI areas on the image") - jpeg_quality: Optional[Annotated[int, Field(le=100, strict=True, ge=0)]] = Field(default=100, description="Quality of JPEG image (100 - highest; 0 - lowest)") - show_indexed: Optional[StrictBool] = Field(default=False, description="Preview indexed images only") - show_user_mask: Optional[StrictBool] = Field(default=False, description="Show user mask") - resolution_ring: Optional[Union[Annotated[float, Field(le=100.0, strict=True, ge=0.1)], Annotated[int, Field(le=100, strict=True, ge=1)]]] = 0.1 - __properties: ClassVar[List[str]] = ["saturation", "show_spots", "show_roi", "jpeg_quality", "show_indexed", "show_user_mask", "resolution_ring"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PreviewSettings from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PreviewSettings from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "saturation": obj.get("saturation"), - "show_spots": obj.get("show_spots") if obj.get("show_spots") is not None else True, - "show_roi": obj.get("show_roi") if obj.get("show_roi") is not None else False, - "jpeg_quality": obj.get("jpeg_quality") if obj.get("jpeg_quality") is not None else 100, - "show_indexed": obj.get("show_indexed") if obj.get("show_indexed") is not None else False, - "show_user_mask": obj.get("show_user_mask") if obj.get("show_user_mask") is not None else False, - "resolution_ring": obj.get("resolution_ring") if obj.get("resolution_ring") is not None else 0.1 - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/roi_box.py b/python-client/jfjoch_client/models/roi_box.py deleted file mode 100644 index 25115fc5..00000000 --- a/python-client/jfjoch_client/models/roi_box.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class RoiBox(BaseModel): - """ - Box ROI - """ # noqa: E501 - name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Name for the ROI; used in the plots") - min_x_pxl: Annotated[int, Field(strict=True, ge=0)] = Field(description="Lower bound (inclusive) in X coordinate for the box") - max_x_pxl: Annotated[int, Field(strict=True, ge=0)] = Field(description="Upper bound (inclusive) in X coordinate for the box") - min_y_pxl: Annotated[int, Field(strict=True, ge=0)] = Field(description="Lower bound (inclusive) in Y coordinate for the box") - max_y_pxl: Annotated[int, Field(strict=True, ge=0)] = Field(description="Upper bound (inclusive) in Y coordinate for the box") - __properties: ClassVar[List[str]] = ["name", "min_x_pxl", "max_x_pxl", "min_y_pxl", "max_y_pxl"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RoiBox from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RoiBox from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "min_x_pxl": obj.get("min_x_pxl"), - "max_x_pxl": obj.get("max_x_pxl"), - "min_y_pxl": obj.get("min_y_pxl"), - "max_y_pxl": obj.get("max_y_pxl") - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/roi_box_list.py b/python-client/jfjoch_client/models/roi_box_list.py deleted file mode 100644 index 330ca8af..00000000 --- a/python-client/jfjoch_client/models/roi_box_list.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from jfjoch_client.models.roi_box import RoiBox -from typing import Optional, Set -from typing_extensions import Self - -class RoiBoxList(BaseModel): - """ - List of box ROIs - """ # noqa: E501 - rois: Optional[Annotated[List[RoiBox], Field(max_length=32)]] = None - __properties: ClassVar[List[str]] = ["rois"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RoiBoxList from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in rois (list) - _items = [] - if self.rois: - for _item_rois in self.rois: - if _item_rois: - _items.append(_item_rois.to_dict()) - _dict['rois'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RoiBoxList from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "rois": [RoiBox.from_dict(_item) for _item in obj["rois"]] if obj.get("rois") is not None else None - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/roi_circle.py b/python-client/jfjoch_client/models/roi_circle.py deleted file mode 100644 index e5f0e750..00000000 --- a/python-client/jfjoch_client/models/roi_circle.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt -from typing import Any, ClassVar, Dict, List, Union -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class RoiCircle(BaseModel): - """ - Circular ROI - """ # noqa: E501 - name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Name for the ROI; used in the plots") - center_x_pxl: Union[StrictFloat, StrictInt] = Field(description="X coordinate of center of the circle [pixels]") - center_y_pxl: Union[StrictFloat, StrictInt] = Field(description="Y coordinate of center of the circle [pixels]") - radius_pxl: Union[Annotated[float, Field(strict=True, gt=0.0)], Annotated[int, Field(strict=True, gt=0)]] = Field(description="Radius of the circle [pixels]") - __properties: ClassVar[List[str]] = ["name", "center_x_pxl", "center_y_pxl", "radius_pxl"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RoiCircle from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RoiCircle from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "center_x_pxl": obj.get("center_x_pxl"), - "center_y_pxl": obj.get("center_y_pxl"), - "radius_pxl": obj.get("radius_pxl") - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/roi_circle_list.py b/python-client/jfjoch_client/models/roi_circle_list.py deleted file mode 100644 index b679e7fb..00000000 --- a/python-client/jfjoch_client/models/roi_circle_list.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated -from jfjoch_client.models.roi_circle import RoiCircle -from typing import Optional, Set -from typing_extensions import Self - -class RoiCircleList(BaseModel): - """ - List of circular ROIs - """ # noqa: E501 - rois: Annotated[List[RoiCircle], Field(max_length=32)] - __properties: ClassVar[List[str]] = ["rois"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RoiCircleList from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in rois (list) - _items = [] - if self.rois: - for _item_rois in self.rois: - if _item_rois: - _items.append(_item_rois.to_dict()) - _dict['rois'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RoiCircleList from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "rois": [RoiCircle.from_dict(_item) for _item in obj["rois"]] if obj.get("rois") is not None else None - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/rotation_axis.py b/python-client/jfjoch_client/models/rotation_axis.py deleted file mode 100644 index 3f71b4d5..00000000 --- a/python-client/jfjoch_client/models/rotation_axis.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class RotationAxis(BaseModel): - """ - Definition of a crystal rotation axis - """ # noqa: E501 - name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default='omega', description="Name of rotation axis (e.g., omega, phi)") - step: Union[StrictFloat, StrictInt] = Field(description="Angle step in degrees") - start: Optional[Union[StrictFloat, StrictInt]] = Field(default=0, description="Start angle in degrees") - vector: Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=3, max_length=3)] = Field(description="Rotation axis") - __properties: ClassVar[List[str]] = ["name", "step", "start", "vector"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RotationAxis from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RotationAxis from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name") if obj.get("name") is not None else 'omega', - "step": obj.get("step"), - "start": obj.get("start") if obj.get("start") is not None else 0, - "vector": obj.get("vector") - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/spot_finding_settings.py b/python-client/jfjoch_client/models/spot_finding_settings.py deleted file mode 100644 index bdef0503..00000000 --- a/python-client/jfjoch_client/models/spot_finding_settings.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class SpotFindingSettings(BaseModel): - """ - SpotFindingSettings - """ # noqa: E501 - enable: StrictBool = Field(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: StrictBool = Field(description="Enable indexing. This is temporary setting, i.e. can be changed anytime during data collection. ") - filter_powder_rings: Optional[StrictBool] = Field(default=False, description="Filter spots which form powder rings (e.g., ice rings)") - min_spot_count_powder_ring: Optional[Annotated[int, Field(strict=True, ge=5)]] = Field(default=None, 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: Union[Annotated[float, Field(strict=True, ge=0)], Annotated[int, Field(strict=True, ge=0)]] - photon_count_threshold: Annotated[int, Field(strict=True, ge=0)] - min_pix_per_spot: Annotated[int, Field(strict=True, ge=1)] - max_pix_per_spot: Annotated[int, Field(strict=True, ge=1)] - high_resolution_limit: Union[StrictFloat, StrictInt] - low_resolution_limit: Union[StrictFloat, StrictInt] - indexing_tolerance: Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Acceptance tolerance for spots after the indexing run - the larger the number, the more spots will be accepted") - __properties: ClassVar[List[str]] = ["enable", "indexing", "filter_powder_rings", "min_spot_count_powder_ring", "signal_to_noise_threshold", "photon_count_threshold", "min_pix_per_spot", "max_pix_per_spot", "high_resolution_limit", "low_resolution_limit", "indexing_tolerance"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SpotFindingSettings from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SpotFindingSettings from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "enable": obj.get("enable") if obj.get("enable") is not None else True, - "indexing": obj.get("indexing") if obj.get("indexing") is not None else True, - "filter_powder_rings": obj.get("filter_powder_rings") if obj.get("filter_powder_rings") is not None else False, - "min_spot_count_powder_ring": obj.get("min_spot_count_powder_ring"), - "signal_to_noise_threshold": obj.get("signal_to_noise_threshold"), - "photon_count_threshold": obj.get("photon_count_threshold"), - "min_pix_per_spot": obj.get("min_pix_per_spot"), - "max_pix_per_spot": obj.get("max_pix_per_spot"), - "high_resolution_limit": obj.get("high_resolution_limit"), - "low_resolution_limit": obj.get("low_resolution_limit"), - "indexing_tolerance": obj.get("indexing_tolerance") - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/standard_detector_geometry.py b/python-client/jfjoch_client/models/standard_detector_geometry.py deleted file mode 100644 index 72a4d149..00000000 --- a/python-client/jfjoch_client/models/standard_detector_geometry.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class StandardDetectorGeometry(BaseModel): - """ - Regular rectangular geometry, first module is in the bottom left corner of the detector - """ # noqa: E501 - nmodules: Annotated[int, Field(strict=True, ge=1)] = Field(description="Number of modules in the detector") - gap_x: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=8, description="Gap size in X direction [pixels]") - gap_y: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=36, description="Gap size in Y direction [pixels]") - modules_in_row: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=1, description="Number of modules in one row") - __properties: ClassVar[List[str]] = ["nmodules", "gap_x", "gap_y", "modules_in_row"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of StandardDetectorGeometry from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of StandardDetectorGeometry from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "nmodules": obj.get("nmodules"), - "gap_x": obj.get("gap_x") if obj.get("gap_x") is not None else 8, - "gap_y": obj.get("gap_y") if obj.get("gap_y") is not None else 36, - "modules_in_row": obj.get("modules_in_row") if obj.get("modules_in_row") is not None else 1 - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/zeromq_preview_settings.py b/python-client/jfjoch_client/models/zeromq_preview_settings.py deleted file mode 100644 index 4b0cf08a..00000000 --- a/python-client/jfjoch_client/models/zeromq_preview_settings.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ZeromqPreviewSettings(BaseModel): - """ - ZeromqPreviewSettings - """ # noqa: E501 - enabled: StrictBool = Field(description="ZeroMQ preview socket is enabled.") - period_ms: StrictInt = Field(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: Optional[StrictStr] = Field(default=None, 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:// and tpc://: sockets are OK. 0.0.0.0 instead of IP address is accepted and means listening on all network interfaces. ") - __properties: ClassVar[List[str]] = ["enabled", "period_ms", "socket_address"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ZeromqPreviewSettings from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ZeromqPreviewSettings from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, - "period_ms": obj.get("period_ms") if obj.get("period_ms") is not None else 1000, - "socket_address": obj.get("socket_address") - }) - return _obj - - diff --git a/python-client/jfjoch_client/models/zeromq_settings.py b/python-client/jfjoch_client/models/zeromq_settings.py deleted file mode 100644 index 7d596504..00000000 --- a/python-client/jfjoch_client/models/zeromq_settings.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class ZeromqSettings(BaseModel): - """ - ZeroMQ configuration for Jungfraujoch software. This structure is used to provide default settings using configuration JSON file and is not used in HTTP. - """ # noqa: E501 - send_watermark: Optional[Annotated[int, Field(le=16384, strict=True, ge=2)]] = Field(default=100, description="Watermark for ZeroMQ send queue (number of outstanding messages queued on Jungfraujoch server per queue)") - send_buffer_size: Optional[StrictInt] = Field(default=None, description="Send buffer size for ZeroMQ socket") - image_socket: Optional[List[StrictStr]] = Field(default=None, 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:// and tpc://: sockets are OK. 0.0.0.0 instead of IP address is accepted and means listening on all network interfaces. ") - writer_notification_socket: Optional[StrictStr] = Field(default=None, 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:// and tpc://: sockets are OK. 0.0.0.0 instead of IP address should be avoided, as this socket address is forwarded to the writer process via START ZerOMQ message and in case of multiple ineterfaces the address might be ambigous. Using * (star) instead of port number is allowed and it means a random free port number. ") - __properties: ClassVar[List[str]] = ["send_watermark", "send_buffer_size", "image_socket", "writer_notification_socket"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ZeromqSettings from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ZeromqSettings from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "send_watermark": obj.get("send_watermark") if obj.get("send_watermark") is not None else 100, - "send_buffer_size": obj.get("send_buffer_size"), - "image_socket": obj.get("image_socket"), - "writer_notification_socket": obj.get("writer_notification_socket") - }) - return _obj - - diff --git a/python-client/jfjoch_client/py.typed b/python-client/jfjoch_client/py.typed deleted file mode 100644 index e69de29b..00000000 diff --git a/python-client/jfjoch_client/rest.py b/python-client/jfjoch_client/rest.py deleted file mode 100644 index ace10f4c..00000000 --- a/python-client/jfjoch_client/rest.py +++ /dev/null @@ -1,258 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl - -import urllib3 - -from jfjoch_client.exceptions import ApiException, ApiValueError - -SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} -RESTResponseType = urllib3.HTTPResponse - - -def is_socks_proxy_url(url): - if url is None: - return False - split_section = url.split("://") - if len(split_section) < 2: - return False - else: - return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES - - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - pool_args = { - "cert_reqs": cert_reqs, - "ca_certs": configuration.ssl_ca_cert, - "cert_file": configuration.cert_file, - "key_file": configuration.key_file, - } - if configuration.assert_hostname is not None: - pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - pool_args['socket_options'] = configuration.socket_options - - if configuration.connection_pool_maxsize is not None: - pool_args['maxsize'] = configuration.connection_pool_maxsize - - # https pool manager - self.pool_manager: urllib3.PoolManager - - if configuration.proxy: - if is_socks_proxy_url(configuration.proxy): - from urllib3.contrib.socks import SOCKSProxyManager - pool_args["proxy_url"] = configuration.proxy - pool_args["headers"] = configuration.proxy_headers - self.pool_manager = SOCKSProxyManager(**pool_args) - else: - pool_args["proxy_url"] = configuration.proxy - pool_args["proxy_headers"] = configuration.proxy_headers - self.pool_manager = urllib3.ProxyManager(**pool_args) - else: - self.pool_manager = urllib3.PoolManager(**pool_args) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - # Ensures that dict objects are serialized - post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than JSON when `body` argument is - # provided in serialized form. - elif isinstance(body, str) or isinstance(body, bytes): - r = self.pool_manager.request( - method, - url, - body=body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): - request_body = "true" if body else "false" - r = self.pool_manager.request( - method, - url, - body=request_body, - preload_content=False, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) diff --git a/python-client/pyproject.toml b/python-client/pyproject.toml deleted file mode 100644 index 94140a65..00000000 --- a/python-client/pyproject.toml +++ /dev/null @@ -1,71 +0,0 @@ -[tool.poetry] -name = "jfjoch_client" -version = "1.0.0-rc.23" -description = "Jungfraujoch" -authors = ["Filip Leonarski (Paul Scherrer Institute) "] -license = "NoLicense" -readme = "README.md" -repository = "https://github.com/jungfraujoch/jungfraujoch" -keywords = ["OpenAPI", "OpenAPI-Generator", "Jungfraujoch"] -include = ["jfjoch_client/py.typed"] - -[tool.poetry.dependencies] -python = "^3.7" - -urllib3 = ">= 1.25.3" -python-dateutil = ">=2.8.2" -pydantic = ">=2" -typing-extensions = ">=4.7.1" - -[tool.poetry.dev-dependencies] -pytest = ">=7.2.1" -tox = ">=3.9.0" -flake8 = ">=4.0.0" -types-python-dateutil = ">=2.8.19.14" -mypy = "1.4.1" - - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" - -[tool.mypy] -files = [ - "jfjoch_client", - #"test", # auto-generated tests - "tests", # hand-written tests -] -# TODO: enable "strict" once all these individual checks are passing -# strict = true - -# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options -warn_unused_configs = true -warn_redundant_casts = true -warn_unused_ignores = true - -## Getting these passing should be easy -strict_equality = true -strict_concatenate = true - -## Strongly recommend enabling this one as soon as you can -check_untyped_defs = true - -## These shouldn't be too much additional work, but may be tricky to -## get passing if you use a lot of untyped libraries -disallow_subclassing_any = true -disallow_untyped_decorators = true -disallow_any_generics = true - -### These next few are various gradations of forcing use of type annotations -#disallow_untyped_calls = true -#disallow_incomplete_defs = true -#disallow_untyped_defs = true -# -### This one isn't too hard to get passing, but return on investment is lower -#no_implicit_reexport = true -# -### This one can be tricky to get passing if you use a lot of untyped libraries -#warn_return_any = true diff --git a/python-client/requirements.txt b/python-client/requirements.txt deleted file mode 100644 index cc85509e..00000000 --- a/python-client/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -python_dateutil >= 2.5.3 -setuptools >= 21.0.0 -urllib3 >= 1.25.3, < 2.1.0 -pydantic >= 2 -typing-extensions >= 4.7.1 diff --git a/python-client/setup.cfg b/python-client/setup.cfg deleted file mode 100644 index 11433ee8..00000000 --- a/python-client/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -max-line-length=99 diff --git a/python-client/setup.py b/python-client/setup.py deleted file mode 100644 index 27d45e63..00000000 --- a/python-client/setup.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - Jungfraujoch - - API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. - - The version of the OpenAPI document: 1.0.0-rc.23 - Contact: filip.leonarski@psi.ch - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "jfjoch-client" -VERSION = "1.0.0-rc.23" -PYTHON_REQUIRES = ">=3.7" -REQUIRES = [ - "urllib3 >= 1.25.3, < 2.1.0", - "python-dateutil", - "pydantic >= 2", - "typing-extensions >= 4.7.1", -] - -setup( - name=NAME, - version=VERSION, - description="Jungfraujoch", - author="Filip Leonarski (Paul Scherrer Institute)", - author_email="filip.leonarski@psi.ch", - url="", - keywords=["OpenAPI", "OpenAPI-Generator", "Jungfraujoch"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_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. - """, # noqa: E501 - package_data={"jfjoch_client": ["py.typed"]}, -)