Allow filterbank_header to write headers when the machine is FAKE #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.