deapi 5.2.2__tar.gz → 5.3b0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {deapi-5.2.2 → deapi-5.3b0}/CHANGES.rst +4 -1
- {deapi-5.2.2 → deapi-5.3b0}/PKG-INFO +1 -1
- {deapi-5.2.2 → deapi-5.3b0}/deapi/client.py +87 -43
- {deapi-5.2.2 → deapi-5.3b0}/deapi/data_types.py +86 -2
- {deapi-5.2.2 → deapi-5.3b0}/deapi/prop_dump.json +1 -1
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/test_fake_server/test_server.py +1 -1
- deapi-5.3b0/deapi/version.py +4 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi.egg-info/PKG-INFO +1 -1
- {deapi-5.2.2 → deapi-5.3b0}/pyproject.toml +1 -1
- deapi-5.2.2/deapi/version.py +0 -3
- {deapi-5.2.2 → deapi-5.3b0}/.github/workflows/build.yaml +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/.github/workflows/documentation.yaml +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/.github/workflows/publish.yaml +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/.github/workflows/test-publish.yaml +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/.pre-commit-config.yaml +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/LICENSE +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/README.md +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/__init__.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/buffer_protocols/__init__.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/buffer_protocols/pb_2_3_0.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/buffer_protocols/pb_3_11_4.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/buffer_protocols/pb_3_19_3.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/buffer_protocols/pb_3_23_3.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/buffer_protocols/pb_3_6_1.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/conf.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/fake_data/__init__.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/fake_data/base_fake_data.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/fake_data/grains.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/index.rst +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/python_3_instruction.txt +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/release_notes.txt +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/service/de_service.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/simulated_server/__init__.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/simulated_server/fake_server.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/simulated_server/initialize_server.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/__init__.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/conftest.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/original_tests/01_fps.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/original_tests/02_hwRoisize.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/original_tests/03_hwBinning.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/original_tests/04_swBinning.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/original_tests/05_swhwBinning.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/original_tests/06_patternPixel.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/original_tests/07_reference.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/original_tests/08_virtmask.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/original_tests/09_scanRoi.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/original_tests/10_imageStatistics.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/original_tests/__init__.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/original_tests/func.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/original_tests/propertyName.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/original_tests/test_legacy.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/speed_tests/__init__.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/speed_tests/test_internal_file_saving.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/speed_tests/test_movie_buffer_transfer.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/test_binning_rois/__init__.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/test_binning_rois/test_rois.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/test_client.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/test_examples.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/test_fake_server/__init__.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/test_file_saving/__init__.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/test_file_saving/test_file_loading_libertem.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/test_file_saving/test_file_loading_rsciio.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/test_file_saving/test_h5ebsd.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/test_file_saving/test_scan_pattern_saving.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/test_insitu/__init__.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/test_insitu/test_start_stop.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/test_utils/__init__.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/tests/test_utils/test_utils.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/utils.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi/wrappers.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi.egg-info/SOURCES.txt +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi.egg-info/dependency_links.txt +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi.egg-info/entry_points.txt +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi.egg-info/requires.txt +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/deapi.egg-info/top_level.txt +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/doc/Makefile +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/doc/_static/de_api_icon.svg +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/doc/_templates/autosummary/base.rst +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/doc/_templates/custom-attribute-template.rst +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/doc/_templates/custom-class-template.rst +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/doc/_templates/custom-function-template.rst +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/doc/_templates/custom-module-template.rst +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/doc/_templates/custrom-method-template.rst +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/doc/changes.rst +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/doc/conf.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/doc/help/dev_guide.rst +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/doc/help/help.rst +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/doc/help/index.rst +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/doc/help/pyDEServer.rst +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/doc/index.rst +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/doc/intro.rst +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/doc/make.bat +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/doc/reference/index.rst +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/examples/README.rst +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/examples/live_imaging/README.rst +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/examples/live_imaging/bright_spot_intensity.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/examples/live_imaging/taking_an_image_every_minute.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/examples/live_imaging/viewing_the_sensor.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/examples/live_imaging/viewing_the_sensor_tem.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/examples/references/README.rst +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/examples/setting_parameters/README.rst +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/examples/setting_parameters/setting_up_stem.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/examples/virtual_imaging/README.rst +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/examples/virtual_imaging/setting_virtual_masks.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/examples/virtual_imaging/vdf_vbf.py +0 -0
- {deapi-5.2.2 → deapi-5.3b0}/setup.cfg +0 -0
|
@@ -5,8 +5,11 @@ Changelog
|
|
|
5
5
|
|
|
6
6
|
This document describes the changes in the DEAPI library.
|
|
7
7
|
|
|
8
|
+
5.3.beta0
|
|
9
|
+
=========
|
|
10
|
+
- Add support for binning in x/ y dimensions when returning a result (#19)
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
5.2.2
|
|
10
13
|
==========
|
|
11
14
|
- Initial release
|
|
12
15
|
- Renamed `Client` functions from CamelCase to snake_case (Legacy functions are still available)
|
|
@@ -193,8 +193,10 @@ class Client:
|
|
|
193
193
|
|
|
194
194
|
version = [int(part) for part in server_version[:4]]
|
|
195
195
|
temp = version[2] + version[1] * 1000 + version[0] * 1000000
|
|
196
|
-
|
|
197
|
-
|
|
196
|
+
if temp >= 2007005:
|
|
197
|
+
## version after 2.7.5
|
|
198
|
+
self.commandVersion = 15
|
|
199
|
+
elif temp >= 2007004:
|
|
198
200
|
## version after 2.7.4
|
|
199
201
|
self.commandVersion = 13
|
|
200
202
|
elif temp >= 2007003:
|
|
@@ -1410,37 +1412,48 @@ class Client:
|
|
|
1410
1412
|
log.debug(" Prepare Time: %.1f ms", lapsed)
|
|
1411
1413
|
step_time = self.GetTime()
|
|
1412
1414
|
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1415
|
+
# Account for different command versions
|
|
1416
|
+
params = [
|
|
1417
|
+
frame_type.value,
|
|
1418
|
+
pixel_format.value,
|
|
1419
|
+
attributes.centerX,
|
|
1420
|
+
attributes.centerY,
|
|
1421
|
+
attributes.zoom,
|
|
1422
|
+
attributes.windowWidth,
|
|
1423
|
+
attributes.windowHeight,
|
|
1424
|
+
attributes.fft,
|
|
1425
|
+
]
|
|
1426
|
+
if commandVersion >= 10:
|
|
1427
|
+
params.extend(
|
|
1424
1428
|
[
|
|
1425
|
-
frame_type.value,
|
|
1426
|
-
pixel_format.value,
|
|
1427
|
-
attributes.centerX,
|
|
1428
|
-
attributes.centerY,
|
|
1429
|
-
attributes.zoom,
|
|
1430
|
-
attributes.windowWidth,
|
|
1431
|
-
attributes.windowHeight,
|
|
1432
|
-
attributes.fft,
|
|
1433
1429
|
attributes.stretchType,
|
|
1434
1430
|
attributes.manualStretchMin,
|
|
1435
1431
|
attributes.manualStretchMax,
|
|
1436
1432
|
attributes.manualStretchGamma,
|
|
1437
|
-
|
|
1438
|
-
attributes.timeoutMsec,
|
|
1439
|
-
histo_min,
|
|
1440
|
-
histo_max,
|
|
1441
|
-
histo_bins,
|
|
1442
|
-
],
|
|
1433
|
+
]
|
|
1443
1434
|
)
|
|
1435
|
+
else:
|
|
1436
|
+
params.append(attributes.linearStretch)
|
|
1437
|
+
params.append(attributes.outlierPercentage)
|
|
1438
|
+
if commandVersion > 2 and commandVersion < 10:
|
|
1439
|
+
params.append(attributes.buffered)
|
|
1440
|
+
if commandVersion > 3:
|
|
1441
|
+
params.append(attributes.timeoutMsec)
|
|
1442
|
+
params.extend([histogram.min, histogram.max, histogram.bins])
|
|
1443
|
+
if commandVersion >= 15:
|
|
1444
|
+
params.extend(
|
|
1445
|
+
[
|
|
1446
|
+
attributes.output_binning_x,
|
|
1447
|
+
attributes.output_binning_y,
|
|
1448
|
+
attributes.output_binning_method,
|
|
1449
|
+
]
|
|
1450
|
+
)
|
|
1451
|
+
|
|
1452
|
+
if self.width * self.height == 0:
|
|
1453
|
+
log.error(" Image size is 0! ")
|
|
1454
|
+
else:
|
|
1455
|
+
bytesize = 0
|
|
1456
|
+
command = self._addSingleCommand(self.GET_RESULT, None, params=params)
|
|
1444
1457
|
|
|
1445
1458
|
if logLevel == logging.DEBUG:
|
|
1446
1459
|
lapsed = (self.GetTime() - step_time) * 1000
|
|
@@ -2119,38 +2132,69 @@ class Client:
|
|
|
2119
2132
|
print(" %.1fs" % duration)
|
|
2120
2133
|
sys.stdout.flush()
|
|
2121
2134
|
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2135
|
+
def _get_auto_attributes(self, frame_type: FrameType):
|
|
2136
|
+
"""
|
|
2137
|
+
Get automatic attributes for the current acquisition settings.
|
|
2138
|
+
Returns
|
|
2139
|
+
-------
|
|
2140
|
+
Attributes
|
|
2141
|
+
The automatic attributes for the current acquisition settings.
|
|
2142
|
+
"""
|
|
2143
|
+
attributes = Attributes()
|
|
2144
|
+
scan_images = [17, 18, 19, 20, 21, 22, 23, 24, 25]
|
|
2145
|
+
if frame_type.value in scan_images:
|
|
2146
|
+
attributes.windowWidth = self.scan_sizex
|
|
2147
|
+
attributes.windowHeight = self.scan_sizey
|
|
2148
|
+
else:
|
|
2149
|
+
attributes.windowWidth = self.image_sizex
|
|
2150
|
+
attributes.windowHeight = self.image_sizey
|
|
2151
|
+
return attributes
|
|
2152
|
+
|
|
2153
|
+
@deprecated_argument("pixelFormat", alternative="pixel_format", since="5.2.1")
|
|
2154
|
+
@deprecated_argument("fileName", alternative="file_name", since="5.2.1")
|
|
2155
|
+
@deprecated_argument("textSize", alternative="text_size", since="5.2.1")
|
|
2156
|
+
def get_image(
|
|
2157
|
+
self,
|
|
2158
|
+
frame_type: Union[FrameType, str] = FrameType.SUMTOTAL,
|
|
2159
|
+
pixel_format: Union[PixelFormat, str] = PixelFormat.AUTO,
|
|
2160
|
+
attributes: Union[Attributes, str] = "auto",
|
|
2161
|
+
file_name: str = None,
|
|
2162
|
+
text_size: int = 0,
|
|
2163
|
+
):
|
|
2126
2164
|
"""
|
|
2127
2165
|
Get a single image and save it to disk if a file name is provided
|
|
2128
2166
|
|
|
2129
2167
|
Parameters
|
|
2130
2168
|
----------
|
|
2131
|
-
|
|
2169
|
+
frame_type : FrameType or str, optional
|
|
2170
|
+
The frame type of the image, by default FrameType.SUMTOTAL
|
|
2171
|
+
pixel_format : PixelFormat, optional
|
|
2132
2172
|
The pixel format of the image, by default PixelFormat.AUTO
|
|
2133
|
-
|
|
2173
|
+
file_name : str, optional
|
|
2134
2174
|
The file name to save the image, by default None
|
|
2135
|
-
|
|
2175
|
+
attributes : Attributes or "auto", optional
|
|
2176
|
+
The attributes of the image, by default "auto"
|
|
2177
|
+
text_size : int, optional
|
|
2136
2178
|
The text size, by default 0
|
|
2137
2179
|
"""
|
|
2180
|
+
if isinstance(frame_type, str):
|
|
2181
|
+
frame_type = getattr(FrameType, frame_type.upper())
|
|
2182
|
+
if attributes == "auto":
|
|
2183
|
+
attributes = self._get_auto_attributes(frame_type)
|
|
2138
2184
|
|
|
2139
2185
|
self.StartAcquisition(1)
|
|
2140
|
-
frameType = FrameType.SUMTOTAL
|
|
2141
2186
|
|
|
2142
|
-
if
|
|
2143
|
-
|
|
2187
|
+
if pixel_format == "float32":
|
|
2188
|
+
pixel_format = PixelFormat.FLOAT32
|
|
2144
2189
|
|
|
2145
|
-
elif
|
|
2146
|
-
|
|
2190
|
+
elif pixel_format == "uint16":
|
|
2191
|
+
pixel_format = PixelFormat.UINT16
|
|
2147
2192
|
|
|
2148
|
-
attributes = Attributes()
|
|
2149
2193
|
histogram = Histogram()
|
|
2150
|
-
image = self.GetResult(
|
|
2194
|
+
image = self.GetResult(frame_type, pixel_format, attributes, histogram)[0]
|
|
2151
2195
|
|
|
2152
|
-
if
|
|
2153
|
-
self.SaveImage(image,
|
|
2196
|
+
if file_name and len(file_name) > 0:
|
|
2197
|
+
self.SaveImage(image, file_name, text_size)
|
|
2154
2198
|
|
|
2155
2199
|
return image
|
|
2156
2200
|
|
|
@@ -137,6 +137,13 @@ class ContrastStretchType(IntEnum):
|
|
|
137
137
|
WIDERANGE = 7
|
|
138
138
|
|
|
139
139
|
|
|
140
|
+
class BinningMethod(IntEnum):
|
|
141
|
+
NONE = 0
|
|
142
|
+
AVERAGE = 1
|
|
143
|
+
SUM = 2
|
|
144
|
+
FOURIERCROP = 3
|
|
145
|
+
|
|
146
|
+
|
|
140
147
|
class Attributes:
|
|
141
148
|
"""Class to hold attributes for getting the result of an image acquisition
|
|
142
149
|
|
|
@@ -164,8 +171,79 @@ class Attributes:
|
|
|
164
171
|
Maximum value for manual contrast stretching
|
|
165
172
|
manual_stretch_gamma : float, optional
|
|
166
173
|
Gamma value for manual contrast stretching
|
|
167
|
-
|
|
168
|
-
|
|
174
|
+
outlier_percentage : float, optional
|
|
175
|
+
Percentage of outliers to ignore in the image
|
|
176
|
+
buffered : bool, optional
|
|
177
|
+
Whether the image is buffered
|
|
178
|
+
timeout_msec : float, optional
|
|
179
|
+
Timeout in milliseconds for retrieving the image
|
|
180
|
+
frame_width : int, optional
|
|
181
|
+
Width of the frame in pixels
|
|
182
|
+
frame_height : int, optional
|
|
183
|
+
Height of the frame in pixels
|
|
184
|
+
dataset_name : str, optional
|
|
185
|
+
Name of the dataset to retrieve the image from
|
|
186
|
+
acq_index : int, optional
|
|
187
|
+
Index of the acquisition. Returned by the server with a get_result call.
|
|
188
|
+
acq_finished : bool, optional
|
|
189
|
+
Whether the acquisition is finished. Returned by the server with a get_result call.
|
|
190
|
+
image_index : int, optional
|
|
191
|
+
Index of the image in the acquisition. Returned by the server with a get_result call.
|
|
192
|
+
frame_count : int, optional
|
|
193
|
+
Number of frames in the acquisition. Returned by the server with a get_result call.
|
|
194
|
+
image_min : float, optional
|
|
195
|
+
Minimum value of the image data
|
|
196
|
+
image_max : float, optional
|
|
197
|
+
Maximum value of the image data
|
|
198
|
+
image_mean : float, optional
|
|
199
|
+
Mean value of the image data
|
|
200
|
+
image_std : float, optional
|
|
201
|
+
Standard deviation of the image data
|
|
202
|
+
eppix : float, optional
|
|
203
|
+
Electrons per pixel in the image
|
|
204
|
+
eps : float, optional
|
|
205
|
+
Electrons per second in the image
|
|
206
|
+
eppixps : float, optional
|
|
207
|
+
Electrons per pixel per second in the image
|
|
208
|
+
epa2 : float, optional
|
|
209
|
+
Electrons per area squared in the image
|
|
210
|
+
eppixpf : float, optional
|
|
211
|
+
Electrons per pixel per frame in the image
|
|
212
|
+
red_sat_warning_value : float, optional
|
|
213
|
+
Red saturation warning value for the image
|
|
214
|
+
orange_sat_warning_value : float, optional
|
|
215
|
+
Orange saturation warning value for the image
|
|
216
|
+
eppix_incident : float, optional
|
|
217
|
+
Electrons per pixel incident in the image
|
|
218
|
+
eps_incident : float, optional
|
|
219
|
+
Electrons per second incident in the image
|
|
220
|
+
eppixps_incident : float, optional
|
|
221
|
+
Electrons per pixel per second incident in the image
|
|
222
|
+
epa2_incident : float, optional
|
|
223
|
+
Electrons per area squared incident in the image
|
|
224
|
+
eppixpf_incident : float, optional
|
|
225
|
+
Electrons per pixel per frame incident in the image
|
|
226
|
+
under_exposure_rate : float, optional
|
|
227
|
+
Under exposure rate of the image
|
|
228
|
+
over_exposure_rate : float, optional
|
|
229
|
+
Over exposure rate of the image
|
|
230
|
+
timestamp : float, optional
|
|
231
|
+
Timestamp of the image acquisition
|
|
232
|
+
auto_stretch_min : float, optional
|
|
233
|
+
Minimum value for automatic contrast stretching
|
|
234
|
+
auto_stretch_max : float, optional
|
|
235
|
+
Maximum value for automatic contrast stretching
|
|
236
|
+
auto_stretch_gamma : float, optional
|
|
237
|
+
Gamma value for automatic contrast stretching
|
|
238
|
+
saturation : float, optional
|
|
239
|
+
Saturation level of the image
|
|
240
|
+
output_binning_x : int, optional
|
|
241
|
+
Binning factor in the x direction for the output image
|
|
242
|
+
output_binning_y : int, optional
|
|
243
|
+
Binning factor in the y direction for the output image
|
|
244
|
+
output_binning_method : int, optional
|
|
245
|
+
Method used for binning the output image. Defaults to BinningMethod.AVERAGE,
|
|
246
|
+
other options are BinningMethod.NONE, BinningMethod.SUM, and BinningMethod.FOURIERCROP.
|
|
169
247
|
"""
|
|
170
248
|
|
|
171
249
|
def __init__(
|
|
@@ -214,6 +292,9 @@ class Attributes:
|
|
|
214
292
|
auto_stretch_max=0.0,
|
|
215
293
|
auto_stretch_gamma=1.0,
|
|
216
294
|
saturation=0.0,
|
|
295
|
+
output_binning_x: int = 1,
|
|
296
|
+
output_binning_y: int = 1,
|
|
297
|
+
output_binning_method: int = 1, # BinningMethod.AVERAGE
|
|
217
298
|
):
|
|
218
299
|
|
|
219
300
|
self.centerX = center_x
|
|
@@ -260,6 +341,9 @@ class Attributes:
|
|
|
260
341
|
self.autoStretchMax = auto_stretch_max
|
|
261
342
|
self.autoStretchGamma = auto_stretch_gamma
|
|
262
343
|
self.saturation = saturation
|
|
344
|
+
self.output_binning_x = output_binning_x
|
|
345
|
+
self.output_binning_y = output_binning_y
|
|
346
|
+
self.output_binning_method = output_binning_method
|
|
263
347
|
|
|
264
348
|
|
|
265
349
|
class Histogram:
|
|
@@ -384,7 +384,7 @@
|
|
|
384
384
|
"get": "((hardware_roi_size_y / hardware_binning_y)/ binning_y)-crop_offset_y"
|
|
385
385
|
},
|
|
386
386
|
"Server Software Version":{
|
|
387
|
-
"value":"2.7.
|
|
387
|
+
"value":"2.7.5.1352",
|
|
388
388
|
"data_type":"String",
|
|
389
389
|
"value_type":"ReadOnly",
|
|
390
390
|
"category":"Basic",
|
|
@@ -32,4 +32,4 @@ class TestFakeServer:
|
|
|
32
32
|
assert fake_server["Scan - Virtual Detector 1 Calculation"] == "Sum"
|
|
33
33
|
|
|
34
34
|
def test_server_software_version(self, fake_server):
|
|
35
|
-
assert fake_server["Server Software Version"] == "2.7.
|
|
35
|
+
assert fake_server["Server Software Version"] == "2.7.5.1352"
|
deapi-5.2.2/deapi/version.py
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|