jayanthc / yapp

Yet Another Pulsar Processor (YAPP) is a suite of radio pulsar data analysis software.
http://jayanthc.github.io/yapp/
Do What The F*ck You Want To Public License
4 stars 1 forks source link

Support for pulsarcentric flag in the header #1

Closed devanshkv closed 6 years ago

devanshkv commented 6 years ago

yapp_viewdata segfaults when given filterbanks with pulsarcentric flag in their header.

WARNING: Unknown field label pulsarcentric encountered!
WARNING: Unknown field label  encountered!
Segmentation fault (core dumped)
jayanthc commented 6 years ago

@devanshkv: Thanks for bringing this up! I'll take a look at it. Is there a file with this flag that I can test with, on bowser, or one of the other WVU machines?

devanshkv commented 6 years ago

These are filterbanks written using filterbank.py from PRESTO. You can find them /hyrule/data/users/dagarwal/FLAG/S02/G75.00f/*.fil

jayanthc commented 6 years ago

@devanshkv: I've fixed the issue. I've added support for the 'pulsarcentric' flag in filterbank headers. I've also modified the metadata-reading behaviour in the following way: If any unknown label is found in a filterbank file, YAPP will throw an error and exit gracefully instead of crashing. (Unfortunately, unknown labels cannot just be skipped because the data type that the label refers to is unknown, so exiting gracefully is the only option.) Please let me know if you find any other issue.