Raise IOError if heterdoyned HDF5 file cannot be read in
When resuming a heterodyne analysis the code currently tries to read in previous heterodyned files. At the moment it expects an OSError
if the file can't be read in, in which case it ignores that files and will heterodyne from the start. However, it can be that the file reading actually fails with a KeyError
and this is not dealt with causing the whole job to fail. This might happen if the previous job was not able to write anything to the heterodyned file and therefore the file is empty.
This MR checks for any exception during reading the file and raises an IOError
is there is a problem. Also, the heterodyne code will now check for an IOError
in these cases and ignore the file as expected.