Skip to content

Commit b4d31f8

Browse files
committed
v* NBEAM != 0: NANTS=1
1 parent 7b5f8fd commit b4d31f8

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

rawspec.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -580,11 +580,11 @@ int main(int argc, char *argv[])
580580

581581
// If first file for stem, check sizing
582582
if(fi == 0) {
583-
if(raw_hdr.nbeams > 0) {
584-
printf("Header has NBEAMS (%d), which overrides NANTS (%d)\n",
585-
raw_hdr.nbeams, raw_hdr.nants
583+
if(raw_hdr.nbeam != 0) {
584+
printf("Header has NBEAM (%d), which indicates that the data is that of a beam, overriding NANTS (%d) with 1.\n",
585+
raw_hdr.nbeam, raw_hdr.nants
586586
);
587-
raw_hdr.nants = raw_hdr.nbeams;
587+
raw_hdr.nants = 1;
588588
}
589589

590590
// Verify that obsnchan is divisible by nants
@@ -1036,8 +1036,8 @@ int main(int argc, char *argv[])
10361036
}
10371037
break;
10381038
}
1039-
if(raw_hdr.nbeams > 0) {
1040-
raw_hdr.nants = raw_hdr.nbeams;
1039+
if(raw_hdr.nbeam != 0) {
1040+
raw_hdr.nants = 1;
10411041
}
10421042
} // For each block
10431043

rawspec_rawutils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ void rawspec_raw_parse_header(const char * buf, rawspec_raw_hdr_t * raw_hdr)
168168
raw_hdr->directio = rawspec_raw_get_s32(buf, "DIRECTIO", 0);
169169
raw_hdr->pktidx = rawspec_raw_get_u64(buf, "PKTIDX", -1);
170170
raw_hdr->beam_id = rawspec_raw_get_s32(buf, "BEAM_ID", -1);
171-
raw_hdr->nbeams = rawspec_raw_get_s32(buf, "NBEAMS", -1);
171+
raw_hdr->nbeam = rawspec_raw_get_s32(buf, "NBEAM", -1);
172172
raw_hdr->nants = rawspec_raw_get_u32(buf, "NANTS", 1);
173173

174174
rawspec_raw_get_str(buf, "DATATYPE", "INTEGER", tmp, 80);

rawspec_rawutils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ typedef struct {
1818
double dec; // degrees
1919
double mjd;
2020
int beam_id; // -1 is unknown or single beam receiver
21-
int nbeams; // -1 is unknown or single beam receiver
21+
int nbeam; // -1 is unknown or single beam receiver
2222
unsigned int nants;
2323
char src_name[81];
2424
char telescop[81];

0 commit comments

Comments
 (0)