diff --git a/nslsii/areadetector/xspress3.py b/nslsii/areadetector/xspress3.py index e097ac02..eddb2c83 100644 --- a/nslsii/areadetector/xspress3.py +++ b/nslsii/areadetector/xspress3.py @@ -136,11 +136,16 @@ class Xspress3ExternalFileReference(Signal): """ - def __init__(self, *args, dtype_str="uint32", bin_count=4096, dim_name="bin_count", **kwargs): + def __init__(self, *args, dtype_str="uint32", bin_count=4096, dim_name=("frame_number", "number_channels", "bin_count"), **kwargs): super().__init__(*args, **kwargs) self.dtype_str = dtype_str self.shape = (bin_count,) - self.dims = (dim_name,) + if isinstance(dim_name, str): + self.dims = (dim_name,) # Keeping this option for backward compatibility with some beamlines + elif isinstance(dim_name, list): + self.dims = (*dim_name,) + else: + self.dims = dim_name def describe(self): res = super().describe() diff --git a/nslsii/tests/test_xspress3.py b/nslsii/tests/test_xspress3.py index 452dcc59..a5578d13 100644 --- a/nslsii/tests/test_xspress3.py +++ b/nslsii/tests/test_xspress3.py @@ -143,7 +143,7 @@ def test_instantiate_channel_class(): assert channel_2.image.dtype_str == "uint32" assert channel_2.image.shape == (4096,) - assert channel_2.image.dims == ("bin_count",) + assert channel_2.image.dims == ("frame_number", "number_channels", "bin_count",) assert channel_2.get_external_file_ref().name == "channel_2_image" assert channel_2.sca.clock_ticks.pvname == "Xsp3:C2SCA:0:Value_RBV"