Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow filterbank_header to write headers when the machine is FAKE #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

David-McKenna
Copy link

There seems to have been a check for whether or not the machine is an actual machine, but ignoring the fact that not every machine has an alias and many pieces of software fallback and overwrite the machine ID with 0/FAKE when they don't recognise an input machine ID.

As a result, when the machine is set to FAKE, filterbank_header was silently refusing to write a header to disk (I ran into this as a side effect of trying to use filmerge, and finding my output filterbanks didn't have any headers). This changes the check to be such that the machine ID is greater than 0.

The only place where I can find that this is not the case is in the preparation of reading psrfits files, at readpsrfits_hd.c#32, which has been changed to 0 as a result to prevent this issue rearing it's head for someone else in the future.

There might be some internal logic I missed that sets the machine ID to 0 to indicate that the parameters are not setup, but I did not find such as case when I did a quick scan through the code base.

There seems to have been a check for whether or not the machine is an actual machine, but ignoring the fact that not every machine has an alias. As a result, when the machine is set to FAKE, filterbank_header was silently refusing to write a header to disk. This changes the check to be such that the machine ID is greater than 0, the only place where I can find that this is not the case is in the preparation of reading psrfits files, at readpsrfits_hd.c#32, which has been changed to 0 as a result.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant