Closed texadactyl closed 2 years ago
i'll have to figure out how to read headers that may or may not be there with this unpleasant hdf5 c api....
Pass a flag that, when set true, forgives a missing header tag and returns some normally impossible value. Normally, the flag is false.
It now checks the heuristics against nfpc in: https://github.com/lacker/seticore/commit/5cffa57b59f0338422d34104a0bc4e527fdc3db9
It still refuses to run on data that doesn't match one of the hard-coded GBT and ATA values, because I'd like to find out if the inference logic is incorrect, but if we run into something we can't distinguish with heuristics then it makes sense to fall back to nfpc I think.
In h5_file.cpp, I saw code to guess the
course_channel size
. When nfpc is present (new rawspec feature), seticore should be looking for the HDF5 header fieldnfpc
= number of fine channels per coarse channel (FFT length). Then,n_coarse_channels = num_freqs / coarse_channel_size = num_freqs / nfpc
Suggestion: put the
n_coarse_channels
calculation in a callable function for convenience.