MJOLNIRPackage / MJOLNIR

Neutron scattering software to be used at Multiplexing Joint Organization
Mozilla Public License 2.0
4 stars 5 forks source link

More clear error message when trying to plot a file with no data in it #48

Closed henrikjacobsenfys closed 4 years ago

henrikjacobsenfys commented 4 years ago

Right now the error is "AxisError: axis1: axis 1 is out of bounds for array of dimension 0", but it would be helpful to add something about the file having no data.

Jakob-Lass commented 4 years ago

Check for CAMEA files is incorporated in 65e43959576e3ac0b670d22179162e5c9ace83a8. Shape of imported data is to be different from (), which signifies an empty load from a HDF file. Error message is: "'Data File xxx/xxx.hdf has no data in entry/CAMEA/detector/counts. The file might be empty.'