Closed umranhaji closed 8 years ago
Hi @umranhaji, the latest version should address this. The Filterbank
class creates an array of frequency values, which takes more time if there are more channels. Isabel and I changed this behavior recently for extracting the 21cm data.
The quickest way would be to just use the read_header
function and skip generation of the Filterbank object:
https://github.com/UCBerkeleySETI/filterbank/blob/master/filterbank.py#L290
Thank you @telegraphic!
I'm noticing that using Filterbank to extract header parameters takes significantly longer on larger
.fil
files than on smaller ones. I'm using the Filterbank class to read header information from spliced0002
-resolution.fil
files (all 8 files spliced together) and I've noticed that, for example, extractingfch1
takes between 0.5 and 0.6 seconds per file. In contrast, extractingfch1
from a smaller file, i.e. a non-spliced file of the same frequency resolution, takes about 0.1 seconds.Am I correct in suspecting that if one desires to extract header information without interacting with the data, the speed should be independent of the size of the data part of the file? If so, the difference in speed suggests the entire file is being read before the header information is returned. Is there any way of getting around this?