// Validate Nbps. Zero silently defaults to 8 for backwards compatibility
// with pre-Nbps versions. Any other value except 8, or 16 is treated as 8
// and a warning is issued to stderr.
if(ctx->Nbps == 0) {
ctx->Nbps = 8;
} else if(ctx->Nbps != 8 && ctx->Nbps != 16) {
NbpsIsExpanded = ctx->Nbps == 4;
ctx->Nbps = 8;
}
16, handled in gpu code, is not in the documentation. This is the case of 1 sample consisting of a 16-bit real and a 16-bit imaginary. Add to documentation.
2 is missing from gpu code. Update documentation to say "not currently supported".
0 is handled in GPU code (replaced with "8") but not mentioned in the document. Update documentation to mention backwards compatibility with pre-Nbps versions of raw header.
Erroneous values (not 4, 8, or 16) should be diagnosed in gpu code and result in a return with 1 (error) to caller.
Nbps = raw hdr NBITS. According to according to the raw file document https://github.com/UCBerkeleySETI/breakthrough/blob/master/doc/RAW-File-Format.md, 3 values are valid:
But, the above GPU code doesn't seem to match.