from chandra_aca import aca_image
img = aca_image.ACAImage(np.random.uniform(size=(8, 8)))
img[-1,...]
Gives the following error:
TypeError: unsupported operand type(s) for +: 'int' and 'ellipsis'
This can be reproduced with the current ska3-flight version (chandra_aca 4.44.0) although it has caused no issues up to now. In Ska3 Speedy it started causing an error when an image got passed to np.percentile. In other words, the following code gives an exception in Speedy but works in 2023.9:
np.percentile(img, 50)
NOTE
While checking this issue, I realized that ACAImage displays entries as integers, but internally uses floats, andnp.percentile is applied to the float array, which gives a different result as an integer array.
The following code:
Gives the following error:
This can be reproduced with the current ska3-flight version (chandra_aca 4.44.0) although it has caused no issues up to now. In Ska3 Speedy it started causing an error when an image got passed to
np.percentile
. In other words, the following code gives an exception in Speedy but works in 2023.9:NOTE
While checking this issue, I realized that
ACAImage
displays entries as integers, but internally uses floats, andnp.percentile
is applied to the float array, which gives a different result as an integer array.