Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions nslsii/areadetector/xspress3.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
from pathlib import Path
from uuid import uuid4

import numpy as np

from databroker.assets.handlers import Xspress3HDF5Handler

from event_model import compose_resource
Expand Down Expand Up @@ -136,9 +138,9 @@ class Xspress3ExternalFileReference(Signal):

"""

def __init__(self, *args, dtype_str="uint32", bin_count=4096, dim_name="bin_count", **kwargs):
def __init__(self, *args, dtype_str="<u4", bin_count=4096, dim_name="bin_count", **kwargs):
super().__init__(*args, **kwargs)
self.dtype_str = dtype_str
self.dtype_str = np.dtype(dtype_str).str
self.shape = (bin_count,)
self.dims = (dim_name,)

Expand Down Expand Up @@ -923,7 +925,7 @@ def clear_all_rois(self):

def get_external_file_ref(self):
"""Return the Xspress3ExternalFileReference.

image_data_key is an optional attribute
if it is not present return None
"""
Expand Down Expand Up @@ -1142,7 +1144,7 @@ def iterate_channels(self):

def get_external_file_ref(self):
"""Return the Xspress3ExternalFileReference.

image_data_key is an optional attribute
if it is not present return None
"""
Expand Down
2 changes: 1 addition & 1 deletion nslsii/tests/test_xspress3.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def test_instantiate_channel_class():
)
channel_2 = channel_class(prefix="Xsp3:", name="channel_2")

assert channel_2.image.dtype_str == "uint32"
assert channel_2.image.dtype_str == "<u4"
assert channel_2.image.shape == (4096,)
assert channel_2.image.dims == ("bin_count",)
assert channel_2.get_external_file_ref().name == "channel_2_image"
Expand Down
Loading