Hi All,
I was hoping based on the help info for digifil that you would be able to do incoherent dedispersion while subbanding/fscrunching (ala psrfits_subband). I'd like to do this for some filterbank files (and also output filterbank files). I can fscrunch just fine, but the "-K" option doesn't seem to remove the interchannel delays as I thought it would (if used in conjunction with "-D") from the help screen. Is that a bug? Or something that is not yet implemented?
If the latter, please consider this a feature request!
Thanks a bunch,
Scott
Hi Scott, from a quick look at the code I think dedispersion (-K option) should be applied before fscrunch (-f) if both options are used. I guess that is not what you are seeing?
Hi Paul,
It seems to run, but the resulting file is definitely not dedispersed properly (and, in fact, seems
to have extra artifacts etc).
My command lines were like:
digifil -D 71.02 -K -f 8 -o out.fil input.fil
Scott
On 4/5/22 1:38 PM, Paul Demorest wrote:
--
Scott M. Ransom Address: NRAO
Phone: (434) 296-0320 520 Edgemont Rd.
email: sransom@nrao.edu Charlottesville, VA 22903 USA
GPG Fingerprint: A40A 94F2 3F48 4136 3AC4 9598 92D5 25CB 22A6 7B65
Related
Bugs:
#98Does -K work on its own in this case (ie, without also using -f)?
I'm not sure what should be expected, but I think so? It seems like the data now has a DM of 0.0.
However, there is a bunch of junk at the beginning of the output file (like the buffer had garbage
in it, or all zeros).
Maybe things are working with fscrunch and -K and I was just expecting something different. For
the subbanding that psrfits_subband does, the resulting file acts like a coherently dedispersed .fil
file with bigger channels. In other words, the subbands have not had their center-freq DM delays
removed. Only the inter-channel within-subband delays were removed.
I'll test to see if that is the case.
Scott
On 4/5/22 3:25 PM, Paul Demorest wrote:
--
Scott M. Ransom Address: NRAO
Phone: (434) 296-0320 520 Edgemont Rd.
email: sransom@nrao.edu Charlottesville, VA 22903 USA
GPG Fingerprint: A40A 94F2 3F48 4136 3AC4 9598 92D5 25CB 22A6 7B65
Related
Bugs:
#98And nope. With the fscrunching, it is even more messed up and definitely not correct.
S
On 4/5/22 3:38 PM, Scott Ransom wrote:
--
Scott M. Ransom Address: NRAO
Phone: (434) 296-0320 520 Edgemont Rd.
email: sransom@nrao.edu Charlottesville, VA 22903 USA
GPG Fingerprint: A40A 94F2 3F48 4136 3AC4 9598 92D5 25CB 22A6 7B65
Related
Bugs:
#98Hi Scott & Paul,
I was looking into another issue I was having with DSPSR this week (ended up being due to the fact I was using an outdated version) and spotted this ticket. I thought I had this issue in late 2020, and isolated the cause to be some kind of error that occurs when dedispersing while data resampling/rescaling is enabled.
I tried to get a group of results together to show what I had seen previously, but have run into a large number of inconsistent results, where sometimes things break, but other times they don't, making me think there's some array indexing issues at play here.
Overall, the trends that I have noticed are that
I've uploaded a zip file with a text file of all the commands I've mentioned here (too big for sourceforge: https://drive.google.com/file/d/1zzhpxC0f0ozflzoD100WxByqKhqp7PrC/view?usp=sharing ), alongside plots of the data. These outputs were generated with the current heads of the main branches of DSPSR (124a0bda) and PSRCHIVE (350d0ad) and some random data I observed this week. I've uploaded this data snippet here if you want to try and replicate what I've seen: https://drive.google.com/file/d/1t3Q_xuN3p0aQWV7JdIA4dJB4fPfs4qdP/view?usp=sharing
Cheers,
David
Last edit: David McKenna 2022-05-13
Hi David,
Thanks for providing the example data set and lots of tests that you have run, that has been quite useful in determining the cause of the issue. I can indeed see a problem is being caused by the Recsale class and I believe I've got a fix that addresses many of these problem cases, perhaps the original one that Scott reported too. I hope to have a branch ready for you to test against soon.
Cheers,
Andrew
David, would you be able to test against this branch and let me know how you find the results?
https://sourceforge.net/p/dspsr/code/ci/bug98-rescale-first-integration/tree/
Cheers,
Andrew
Hey Andrew,
Thanks! Indeed that seems to have fixed the bulk of the issues, though looking closely at the data I've spotted that the first two output timesamples (across all frequency channels) appear to be malformed (first sample is all 0, second is possibly a median value) for these commands:
Looking at my old plots, this is was an issue in the previous master branch I tested with for the first and third command as well (second had a full block of 0s at the start), so it's likely another separate issue at play here.
Cheers,
David
Hi David,
The issue of the first sample being zero and subsequent sample being close to the mean is a consequence of the default, small block that digifil uses (256 MB). Since your data set is quite large (many channels) and your Tscrunching quite substantial (128) , when digifil reads a block of data, it arises that all of those samples are scrunched into a single output time sample for the channel, and in this situation the rescaling algorithm can not determine the mean value - since it is trying to take a statistical mean of a single valued time series.
Once some subsequent blocks are processed, the estimate of the mean becomes sensible and so the algorithm functions correctly. As to the best solution for this situation, I'm not sure, but it should be handled separately to the bug that has been fixed in this branch.
Cheers,
Andrew
Fixed in commit cba272