version 1.0.0-rc.18

This commit is contained in:
2024-10-16 19:52:01 +02:00
parent bc8afdcb55
commit 1d7e5f173d
203 changed files with 2202 additions and 537 deletions
+5 -2
View File
@@ -6,8 +6,8 @@ Jungfraujoch uses FPGA boards to acquire data at high data rates.
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 1.0.0-rc.17
- Package version: 1.0.0-rc.17
- API version: 1.0.0-rc.18
- Package version: 1.0.0-rc.18
- Generator version: 7.8.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
@@ -105,6 +105,8 @@ Class | Method | HTTP request | Description
*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
@@ -181,6 +183,7 @@ Class | Method | HTTP request | Description
- [RotationAxis](docs/RotationAxis.md)
- [SpotFindingSettings](docs/SpotFindingSettings.md)
- [StandardDetectorGeometry](docs/StandardDetectorGeometry.md)
- [ZeromqPreviewSettings](docs/ZeromqPreviewSettings.md)
- [ZeromqSettings](docs/ZeromqSettings.md)
+132
View File
@@ -24,6 +24,8 @@ Method | HTTP request | Description
[**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
@@ -1368,6 +1370,136 @@ No authorization required
[[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()
+1
View File
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
**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]
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
**description** | **str** | |
**serial_number** | **str** | |
**base_ipv4_addr** | **str** | |
**udp_interface_count** | **int** | Number of UDP interfaces per detector module | [optional]
**udp_interface_count** | **int** | Number of UDP interfaces per detector module |
**nmodules** | **int** | |
**width** | **int** | |
**height** | **int** | |
+1
View File
@@ -18,6 +18,7 @@ Name | Type | Description | Notes
**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
+1
View File
@@ -16,6 +16,7 @@ Name | Type | Description | Notes
**broker** | [**BrokerStatus**](BrokerStatus.md) | | [optional]
**fpga** | [**List[FpgaStatusInner]**](FpgaStatusInner.md) | | [optional]
**calibration** | [**List[CalibrationStatisticsInner]**](CalibrationStatisticsInner.md) | | [optional]
**zeromq_preview** | [**ZeromqPreviewSettings**](ZeromqPreviewSettings.md) | | [optional]
## Example
@@ -0,0 +1,31 @@
# 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)
-1
View File
@@ -9,7 +9,6 @@ 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]
**preview_socket** | **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]
**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
+3 -2
View File
@@ -7,7 +7,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -15,7 +15,7 @@
""" # noqa: E501
__version__ = "1.0.0-rc.17"
__version__ = "1.0.0-rc.18"
# import apis into sdk package
from jfjoch_client.api.default_api import DefaultApi
@@ -68,4 +68,5 @@ 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
+520 -1
View File
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -38,6 +38,7 @@ 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
@@ -5265,6 +5266,524 @@ class DefaultApi:
@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,
+2 -2
View File
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -91,7 +91,7 @@ class ApiClient:
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'OpenAPI-Generator/1.0.0-rc.17/python'
self.user_agent = 'OpenAPI-Generator/1.0.0-rc.18/python'
self.client_side_validation = configuration.client_side_validation
def __enter__(self):
+3 -3
View File
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -384,8 +384,8 @@ class Configuration:
return "Python SDK Debug Report:\n"\
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 1.0.0-rc.17\n"\
"SDK Package Version: 1.0.0-rc.17".\
"Version of the API: 1.0.0-rc.18\n"\
"SDK Package Version: 1.0.0-rc.18".\
format(env=sys.platform, pyversion=sys.version)
def get_host_settings(self):
+1 -1
View File
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -6,7 +6,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -51,4 +51,5 @@ 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
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -36,6 +36,7 @@ class Detector(BaseModel):
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. ")
@@ -45,7 +46,7 @@ class Detector(BaseModel):
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", "sensor_thickness_um", "calibration_file", "hostname", "sensor_material", "tx_delay", "base_data_ipv4_address", "standard_geometry", "custom_geometry", "mirror_y"]
__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,
@@ -113,6 +114,7 @@ class Detector(BaseModel):
"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"),
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -19,7 +19,7 @@ import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Any, ClassVar, Dict, List
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self
@@ -32,7 +32,7 @@ class DetectorListDetectorsInner(BaseModel):
description: StrictStr
serial_number: StrictStr
base_ipv4_addr: StrictStr
udp_interface_count: Optional[StrictInt] = Field(default=None, description="Number of UDP interfaces per detector module")
udp_interface_count: StrictInt = Field(description="Number of UDP interfaces per detector module")
nmodules: StrictInt
width: StrictInt
height: StrictInt
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -28,6 +28,7 @@ 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
@@ -48,7 +49,8 @@ class JfjochSettings(BaseModel):
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
__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: 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,
@@ -118,6 +120,9 @@ class JfjochSettings(BaseModel):
# 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
@@ -141,7 +146,8 @@ class JfjochSettings(BaseModel):
"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
"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
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -30,6 +30,7 @@ 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
@@ -47,7 +48,8 @@ class JfjochStatistics(BaseModel):
broker: Optional[BrokerStatus] = None
fpga: Optional[List[FpgaStatusInner]] = None
calibration: Optional[List[CalibrationStatisticsInner]] = None
__properties: ClassVar[List[str]] = ["detector", "detector_list", "detector_settings", "image_format_settings", "instrument_metadata", "data_processing_settings", "measurement", "broker", "fpga", "calibration"]
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,
@@ -126,6 +128,9 @@ class JfjochStatistics(BaseModel):
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
@@ -147,7 +152,8 @@ class JfjochStatistics(BaseModel):
"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
"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
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
+1 -1
View File
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
+1 -1
View File
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -0,0 +1,92 @@
# 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.18
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://<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. ")
__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
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -31,9 +31,8 @@ class ZeromqSettings(BaseModel):
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://<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. ")
preview_socket: 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://<socket file> and tpc://<IP address>:<port> sockets are OK. 0.0.0.0 instead of IP address is accepted and means listening on all network interfaces. ")
writer_notification_socket: 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://<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. ")
__properties: ClassVar[List[str]] = ["send_watermark", "send_buffer_size", "image_socket", "preview_socket", "writer_notification_socket"]
__properties: ClassVar[List[str]] = ["send_watermark", "send_buffer_size", "image_socket", "writer_notification_socket"]
model_config = ConfigDict(
populate_by_name=True,
@@ -89,7 +88,6 @@ class ZeromqSettings(BaseModel):
"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"),
"preview_socket": obj.get("preview_socket"),
"writer_notification_socket": obj.get("writer_notification_socket")
})
return _obj
+1 -1
View File
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
+1 -1
View File
@@ -1,6 +1,6 @@
[tool.poetry]
name = "jfjoch_client"
version = "1.0.0-rc.17"
version = "1.0.0-rc.18"
description = "Jungfraujoch"
authors = ["Filip Leonarski (Paul Scherrer Institute) <filip.leonarski@psi.ch>"]
license = "NoLicense"
+2 -2
View File
@@ -5,7 +5,7 @@
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.17
The version of the OpenAPI document: 1.0.0-rc.18
Contact: filip.leonarski@psi.ch
Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -22,7 +22,7 @@ from setuptools import setup, find_packages # noqa: H301
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools
NAME = "jfjoch-client"
VERSION = "1.0.0-rc.17"
VERSION = "1.0.0-rc.18"
PYTHON_REQUIRES = ">=3.7"
REQUIRES = [
"urllib3 >= 1.25.3, < 2.1.0",