Closed mattlebofsky closed 5 years ago
This should be supported already?
The relevant code in filterbank.py is:
if filename:
self.filename = filename
if HAS_HDF5:
if h5py.is_hdf5(filename):
self.read_hdf5(filename, f_start, f_stop, t_start, t_stop, load_data)
else:
self.read_filterbank(filename, f_start, f_stop, t_start, t_stop, load_data)
else:
self.read_filterbank(filename, f_start, f_stop, t_start, t_stop, load_data)
Ah ok, waterfall won't support this as it has special file readers. I think this is the code that needs a mod: https://github.com/UCBerkeleySETI/blimpy/blob/master/blimpy/file_wrapper.py#L1062
I think this is supported now. Matt could you check?
If you are doing something basic like, say, watutil, it works. Regardless of the suffix it figures out the file format. However! It's still a little buggy with fil2h5. If you have a filterbank file called "test.blah" and you do:
fil2h5 test.blah
It just overwrites the filterbank file "test.blah" with an hdf5 file called "test.blah." Not expected or correct behavior. I imagine this is due to some incorrect search and replace logic somewhere.
But at least it isn't erroring out!
Great detective work! I think I have fixed, this, could you check again?
Well.... the fil2h5/h52fil now work.
BUT now watutil doesn't work. Doing something simple like watutil test.fil
gives me the error unrecognized arguments: test.fil
Ok, should have fixed this now. Let me know if you agree!
Looks like this is resolved, closing :door:
Currently blimpy errors out (in a confusing manner) if the filename doesn't end in .fil or .h5, even if it's a filterbank or hdf5 file. Maybe have a filetype command switch?