Skip to content

Image array size doesn't match image1:ArraySize0 * image1:ArraySize1 #13

@ronpandolfi

Description

@ronpandolfi

I'm trying to use ophyd's shaped_image DerivedSignal, but I'm getting this error:

Subscription value callback exception (EpicsSignal(read_pv='ALS:701:image1:ArrayData', name='701_image1_array_data', parent='701_image1', value=array([882, 882, 882, ...,   0,   0,   0], dtype=int16), timestamp=1558385498.360814, auto_monitor=False, string=False, write_pv='ALS:701:image1:ArrayData', limits=False, put_complete=False))
Traceback (most recent call last):
  File "/home/rp/PycharmProjects/ophyd/ophyd/ophydobj.py", line 315, in inner
    cb(*args, **kwargs)
  File "/home/rp/PycharmProjects/ophyd/ophyd/signal.py", line 486, in _derived_value_callback
    value = self.inverse(value)
  File "/home/rp/PycharmProjects/ophyd/ophyd/areadetector/base.py", line 107, in inverse
    return np.array(value).reshape(array_shape)
ValueError: cannot reshape array of size 2361600 into shape (2050,960)

I can see that ...image1.shaped_image._shape[0] maps to ...image1:ArraySize1_RBV. These PVs don't match the size of the image (confirmed with caget).

Rather, ...cam1:ArraySizeX_RBV and ...cam1:ArraySizeX_RBV seem to match the shape of the image (2050,1152).

Is this an issue with the configuration of the detector, or the IOC?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions