Menu

#96 dspsr -S / digifil -S problem for psrfits files

version_1.0
pending
None
5
2022-07-05
2021-06-08
No

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)

Discussion

  • Willem van Straten

    • status: open --> pending
    • assigned_to: Willem van Straten
     
  • Willem van Straten

    Hi Marta,

    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

Log in to post a comment.

MongoDB Logo MongoDB