Closed wfarah closed 1 month ago
This is specifically a bug for antenna_names that are stored as variable length strings in the HDF5 file (as opposed to fixed length strings).
After some digging, I think it's clear that this was introduced in v3.0. Prior to that the decoding was actually done in a loop (in a list comprehension) so it wasn’t calling np.char.decode
. That was introduced as a computational improvement in version 3.0, but we didn’t have a test that included files with variable length strings, so didn’t realize we were introducing a bug.
Using
pyuvdata==3.0.0
,h5py==3.11.0
,numpy==2.0.1
, reading in a file throws this error:Upon further inspection, it seems like the
np.char.decode
in the header-parsing function that readsantenna_names
is the culprit. I can reproduce the same error if I try to do it manually: