Skip to content

Commit c245899

Browse files
authored
1 parent 21948cf commit c245899

File tree

7 files changed

+522
-569
lines changed

7 files changed

+522
-569
lines changed

drivers.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"acquire-driver-zarr": "0.1.9",
2+
"acquire-driver-zarr": "0.1.10",
33
"acquire-driver-egrabber": "0.1.5",
44
"acquire-driver-hdcam": "0.1.9",
55
"acquire-driver-spinnaker": "0.1.1",
6-
"acquire-driver-pvcam": "0.1.0"
6+
"acquire-driver-pvcam": "0.1.1"
77
}

python/acquire/acquire.pyi

Lines changed: 71 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class AvailableData:
2929
class Camera:
3030
identifier: Optional[DeviceIdentifier]
3131
settings: CameraProperties
32+
3233
def __init__(self, *args: None, **kwargs: Any) -> None: ...
3334
def dict(self) -> Dict[str, Any]: ...
3435

@@ -43,6 +44,7 @@ class CameraCapabilities:
4344
supported_pixel_types: List[SampleType]
4445
digital_lines: DigitalLineCapabilities
4546
triggers: TriggerCapabilities
47+
4648
def dict(self) -> Dict[str, Any]: ...
4749

4850
@final
@@ -56,35 +58,52 @@ class CameraProperties:
5658
shape: Tuple[int, int]
5759
input_triggers: InputTriggers
5860
output_triggers: OutputTriggers
61+
5962
def __init__(self, *args: None, **kwargs: Any) -> None: ...
6063
def dict(self) -> Dict[str, Any]: ...
6164

6265
@final
6366
class Capabilities:
6467
video: Tuple[VideoStreamCapabilities, VideoStreamCapabilities]
68+
6569
def __init__(self, *args: None, **kwargs: Any) -> None: ...
6670
def dict(self) -> Dict[str, Any]: ...
6771

6872
@final
69-
class ChunkDims:
70-
width: int
71-
height: int
72-
planes: int
73-
def dict(self) -> Dict[str, Any]: ...
73+
class DimensionType:
74+
"""The storage dimension type.
7475
75-
@final
76-
class ChunkingCapabilities:
77-
is_supported: bool
78-
width: Property
79-
height: Property
80-
planes: Property
81-
def dict(self) -> Dict[str, Any]: ...
76+
Space: spatial dimension.
77+
Channel: color channel dimension.
78+
Time: time dimension.
79+
Other: other dimension.
80+
81+
When downsampling, Space and Time dimensions are downsampled by the same factor.
82+
Channel and Other dimensions are not downsampled.
83+
84+
This value is also reflected in the dimension metadata of an OME-Zarr dataset.
85+
"""
86+
87+
Space: ClassVar[DimensionType]
88+
Channel: ClassVar[DimensionType]
89+
Time: ClassVar[DimensionType]
90+
Other: ClassVar[DimensionType]
91+
92+
def __init__(self, *args: None, **kwargs: Any) -> None: ...
93+
def __eq__(self, other: object) -> bool: ...
94+
def __ge__(self, other: object) -> bool: ...
95+
def __gt__(self, other: object) -> bool: ...
96+
def __int__(self) -> int: ...
97+
def __le__(self, other: object) -> bool: ...
98+
def __lt__(self, other: object) -> bool: ...
99+
def __ne__(self, other: object) -> bool: ...
82100

83101
@final
84102
class DeviceIdentifier:
85103
id: Tuple[int, int]
86104
kind: DeviceKind
87105
name: str
106+
88107
def __init__(self, *args: None, **kwargs: Any) -> None: ...
89108
def dict(self) -> Dict[str, Any]: ...
90109
@staticmethod
@@ -103,6 +122,7 @@ class DeviceKind:
103122
Signals: ClassVar[DeviceKind]
104123
StageAxis: ClassVar[DeviceKind]
105124
Storage: ClassVar[DeviceKind]
125+
106126
def __init__(self, *args: None, **kwargs: Any) -> None: ...
107127
def __eq__(self, other: object) -> bool: ...
108128
def __ge__(self, other: object) -> bool: ...
@@ -131,6 +151,7 @@ class DeviceState:
131151
AwaitingConfiguration: ClassVar[DeviceState]
132152
Armed: ClassVar[DeviceState]
133153
Running: ClassVar[DeviceState]
154+
134155
def __eq__(self, other: object) -> bool: ...
135156
def __ge__(self, other: object) -> bool: ...
136157
def __gt__(self, other: object) -> bool: ...
@@ -143,12 +164,14 @@ class DeviceState:
143164
class DigitalLineCapabilities:
144165
line_count: int
145166
names: Tuple[str, str, str, str, str, str, str, str]
167+
146168
def dict(self) -> Dict[str, Any]: ...
147169

148170
@final
149171
class Direction:
150172
Backward: ClassVar[Direction]
151173
Forward: ClassVar[Direction]
174+
152175
def __eq__(self, other: object) -> bool: ...
153176
def __ge__(self, other: object) -> bool: ...
154177
def __gt__(self, other: object) -> bool: ...
@@ -162,31 +185,30 @@ class InputTriggers:
162185
acquisition_start: Trigger
163186
exposure: Trigger
164187
frame_start: Trigger
165-
def dict(self) -> Dict[str, Any]: ...
166188

167-
@final
168-
class MultiscaleCapabilities:
169-
is_supported: bool
170189
def dict(self) -> Dict[str, Any]: ...
171190

172191
@final
173192
class OffsetShapeCapabilities:
174193
x: Property
175194
y: Property
195+
176196
def dict(self) -> Dict[str, Any]: ...
177197

178198
@final
179199
class OutputTriggers:
180200
exposure: Trigger
181201
frame_start: Trigger
182202
trigger_wait: Trigger
203+
183204
def dict(self) -> Dict[str, Any]: ...
184205

185206
@final
186207
class PID:
187208
derivative: float
188209
integral: float
189210
proportional: float
211+
190212
def __init__(self, *args: None, **kwargs: Any) -> None: ...
191213
def dict(self) -> Dict[str, Any]: ...
192214

@@ -196,6 +218,7 @@ class Property:
196218
low: float
197219
high: float
198220
kind: PropertyType
221+
199222
def __init__(self, *args: None, **kwargs: Any) -> None: ...
200223
def dict(self) -> Dict[str, Any]: ...
201224

@@ -205,6 +228,7 @@ class PropertyType:
205228
FloatingPrecision: ClassVar[PropertyType]
206229
Enum: ClassVar[PropertyType]
207230
String: ClassVar[PropertyType]
231+
208232
def __eq__(self, other: object) -> bool: ...
209233
def __ge__(self, other: object) -> bool: ...
210234
def __gt__(self, other: object) -> bool: ...
@@ -216,6 +240,7 @@ class PropertyType:
216240
@final
217241
class Properties:
218242
video: Tuple[VideoStream, VideoStream]
243+
219244
def __init__(self, *args: None, **kwargs: Any) -> None: ...
220245
def dict(self) -> Dict[str, Any]: ...
221246

@@ -237,6 +262,7 @@ class Runtime:
237262
class SampleRateHz:
238263
numerator: int
239264
denominator: int
265+
240266
def __init__(self, *args: None, **kwargs: Any) -> None: ...
241267
def dict(self) -> Dict[str, Any]: ...
242268

@@ -250,6 +276,7 @@ class SampleType:
250276
U10: ClassVar[SampleType]
251277
U12: ClassVar[SampleType]
252278
U14: ClassVar[SampleType]
279+
253280
def __eq__(self, other: object) -> bool: ...
254281
def __ge__(self, other: object) -> bool: ...
255282
def __gt__(self, other: object) -> bool: ...
@@ -258,25 +285,11 @@ class SampleType:
258285
def __lt__(self, other: object) -> bool: ...
259286
def __ne__(self, other: object) -> bool: ...
260287

261-
@final
262-
class ShardDims:
263-
width: int
264-
height: int
265-
planes: int
266-
def dict(self) -> Dict[str, Any]: ...
267-
268-
@final
269-
class ShardingCapabilities:
270-
is_supported: bool
271-
width: Property
272-
height: Property
273-
planes: Property
274-
def dict(self) -> Dict[str, Any]: ...
275-
276288
@final
277289
class SignalIOKind:
278290
Input: ClassVar[SignalIOKind]
279291
Output: ClassVar[SignalIOKind]
292+
280293
def __eq__(self, other: object) -> bool: ...
281294
def __ge__(self, other: object) -> bool: ...
282295
def __gt__(self, other: object) -> bool: ...
@@ -289,6 +302,7 @@ class SignalIOKind:
289302
class SignalType:
290303
Analog: ClassVar[SignalType]
291304
Digital: ClassVar[SignalType]
305+
292306
def __eq__(self, other: object) -> bool: ...
293307
def __ge__(self, other: object) -> bool: ...
294308
def __gt__(self, other: object) -> bool: ...
@@ -301,13 +315,25 @@ class SignalType:
301315
class Storage:
302316
identifier: Optional[DeviceIdentifier]
303317
settings: StorageProperties
318+
304319
def dict(self) -> Dict[str, Any]: ...
305320

306321
@final
307322
class StorageCapabilities:
308-
chunk_dims_px: ChunkingCapabilities
309-
shard_dims_chunks: ShardingCapabilities
310-
multiscale: MultiscaleCapabilities
323+
chunking_is_supported: bool
324+
sharding_is_supported: bool
325+
multiscale_is_supported: bool
326+
327+
def dict(self) -> Dict[str, Any]: ...
328+
329+
@final
330+
class StorageDimension:
331+
name: str
332+
kind: DimensionType
333+
array_size_px: int
334+
chunk_size_px: int
335+
shard_size_chunks: int
336+
311337
def dict(self) -> Dict[str, Any]: ...
312338

313339
@final
@@ -316,9 +342,9 @@ class StorageProperties:
316342
filename: Optional[str]
317343
first_frame_id: int
318344
pixel_scale_um: Tuple[float, float]
319-
chunk_dims_px: ChunkDims
320-
shard_dims_chunks: ShardDims
345+
acquisition_dimensions: List[StorageDimension]
321346
enable_multiscale: bool
347+
322348
def dict(self) -> Dict[str, Any]: ...
323349

324350
@final
@@ -327,6 +353,7 @@ class Trigger:
327353
enable: bool
328354
line: int
329355
kind: SignalIOKind
356+
330357
def __init__(self, *args: None, **kwargs: Any) -> None: ...
331358
def dict(self) -> Dict[str, Any]: ...
332359

@@ -335,6 +362,7 @@ class TriggerCapabilities:
335362
acquisition_start: TriggerInputOutputCapabilities
336363
exposure: TriggerInputOutputCapabilities
337364
frame_start: TriggerInputOutputCapabilities
365+
338366
def dict(self) -> Dict[str, Any]: ...
339367

340368
@final
@@ -345,6 +373,7 @@ class TriggerEdge:
345373
AnyEdge: ClassVar[TriggerEdge]
346374
LevelLow: ClassVar[TriggerEdge]
347375
LevelHigh: ClassVar[TriggerEdge]
376+
348377
def __eq__(self, other: object) -> bool: ...
349378
def __ge__(self, other: object) -> bool: ...
350379
def __gt__(self, other: object) -> bool: ...
@@ -357,6 +386,7 @@ class TriggerEdge:
357386
class TriggerInputOutputCapabilities:
358387
input: int
359388
output: int
389+
360390
def dict(self) -> Dict[str, Any]: ...
361391

362392
@final
@@ -368,12 +398,14 @@ class VideoFrame:
368398
class VideoFrameMetadata:
369399
frame_id: int
370400
timestamps: VideoFrameTimestamps
401+
371402
def dict(self) -> Dict[str, Any]: ...
372403

373404
@final
374405
class VideoFrameTimestamps:
375406
hardware: int
376407
acq_thread: int
408+
377409
def dict(self) -> Dict[str, Any]: ...
378410

379411
@final
@@ -382,6 +414,7 @@ class VideoStream:
382414
storage: Storage
383415
max_frame_count: int
384416
frame_average_count: int
417+
385418
def dict(self) -> Dict[str, Any]: ...
386419

387420
@final
@@ -390,12 +423,14 @@ class VideoStreamCapabilities:
390423
storage: StorageCapabilities
391424
max_frame_count: Property
392425
frame_average_count: Property
426+
393427
def dict(self) -> Dict[str, Any]: ...
394428

395429
@final
396430
class VoltageRange:
397431
mn: float
398432
mx: float
433+
399434
@overload
400435
def __init__(self) -> None: ...
401436
@overload

src/lib.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ fn acquire(py: Python, m: &PyModule) -> PyResult<()> {
8080
m.add_class::<camera::TriggerInputOutputCapabilities>()?;
8181
m.add_class::<camera::OffsetShapeCapabilities>()?;
8282
m.add_class::<storage::StorageCapabilities>()?;
83-
m.add_class::<storage::ChunkingCapabilities>()?;
84-
m.add_class::<storage::ShardingCapabilities>()?;
85-
m.add_class::<storage::MultiscaleCapabilities>()?;
8683
m.add_class::<components::Property>()?;
8784
m.add_class::<components::PropertyType>()?;
8885

@@ -91,8 +88,8 @@ fn acquire(py: Python, m: &PyModule) -> PyResult<()> {
9188
m.add_class::<camera::CameraProperties>()?;
9289
m.add_class::<camera::InputTriggers>()?;
9390
m.add_class::<camera::OutputTriggers>()?;
94-
m.add_class::<storage::ChunkDims>()?;
95-
m.add_class::<storage::ShardDims>()?;
91+
m.add_class::<storage::DimensionType>()?;
92+
m.add_class::<storage::StorageDimension>()?;
9693
m.add_class::<storage::StorageProperties>()?;
9794

9895
m.add_class::<components::Direction>()?;

0 commit comments

Comments
 (0)