For both dspsr and digifil, the option -S (to skip data) does not work when the input files are in psrfits format. It appears that the option gets simply ignored (even though the start mjd gets calculated correctly)
Are you using a metafile that lists the input filenames? e.g.
ls -1 obs*.dat > files.ls && dspsr ... files.ls
If so, I think I found the bug today.
The MultiFile class that is used to string together multiple files into a single logical time series was lazily using the Observation object from the first file as its own. It then set the number of time samples in this Observation object to the total number of time samples over all of the files.
However, when MultiFile::seek is called, it uses the number of times samples stored in the Observation object from each file to determine the correct file offset. Since it set the number of time samples in the first files to that of the sum of all files, any seek always results in file offset = 0.
I just checked in a fix ea73a547..0ead0bac
(Sorry about the delay in getting around to this one!)
Cheers,
Willem
Last edit: Willem van Straten 2022-07-05
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Marta,
Are you using a metafile that lists the input filenames? e.g.
ls -1 obs*.dat > files.ls && dspsr ... files.lsIf so, I think I found the bug today.
The MultiFile class that is used to string together multiple files into a single logical time series was lazily using the Observation object from the first file as its own. It then set the number of time samples in this Observation object to the total number of time samples over all of the files.
However, when MultiFile::seek is called, it uses the number of times samples stored in the Observation object from each file to determine the correct file offset. Since it set the number of time samples in the first files to that of the sum of all files, any seek always results in file offset = 0.
I just checked in a fix ea73a547..0ead0bac
(Sorry about the delay in getting around to this one!)
Cheers,
Willem
Last edit: Willem van Straten 2022-07-05