Skip to content

Commit

Permalink
Set default pixel scale to 1 (#183)
Browse files Browse the repository at this point in the history
Closes #182.
  • Loading branch information
aliddell authored Apr 5, 2024
1 parent fb060e1 commit 7f93a2f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ impl Default for StorageProperties {
filename: Default::default(),
external_metadata_json: Default::default(),
first_frame_id: Default::default(),
pixel_scale_um: Default::default(),
pixel_scale_um: (1., 1.), // Default to 1.0 um/pixel (square pixels)
acquisition_dimensions: Default::default(),
enable_multiscale: Default::default(),
}
Expand Down
5 changes: 5 additions & 0 deletions tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ def test_set():
assert t.enable


def test_storage_properties_pixel_scale_defaults_to_1():
storage = acquire.StorageProperties()
assert storage.pixel_scale_um == (1.0, 1.0)


def test_list_devices(runtime: Runtime):
dm = runtime.device_manager()
for d in dm.devices():
Expand Down

0 comments on commit 7f93a2f

Please sign in to comment.