UCBerkeleySETI / rawspec

6 stars 7 forks source link

rawspec_initialize needs better Nbps diagnosis and comment cleanup. #61

Closed texadactyl closed 2 years ago

texadactyl commented 2 years ago
// 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;
  }

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.