Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions src/readpsrfits_hd.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void readpsrfits_hd(char *filename,int *machine_id,int *telescope_id,int *data_t
int status;
float obsbw,fc;
char sobsbw[100],sfc[100],ras[100],decs[100];
char name[100],telescope[100];
char name[100],telescope[100],machine[100];
double h,m,sec,chanbw,smjd,offs;
int imjd;

Expand Down Expand Up @@ -79,9 +79,25 @@ void readpsrfits_hd(char *filename,int *machine_id,int *telescope_id,int *data_t
*telescope_id=8;
else if (strcasecmp(telescope,"SRT")==0)
*telescope_id=10;
else
else if (strcasecmp(telescope,"MEERKAT")==0)
*telescope_id=64;
else if (strcasecmp(telescope,"KAT-7")==0)
*telescope_id=65;
else
*telescope_id = -1;

// Parse machine_id
fits_read_key(fp, TSTRING, "BACKEND", machine, NULL, &status);
fits_report_error(stderr,status);
if (strcasecmp(machine,"PSPM")==0)
*machine_id=1;
else if (strcasecmp(machine,"KAT")==0)
*machine_id=64;
else if (strcasecmp(machine,"KAT-DC2")==0)
*machine_id=65;
else
*machine_id = -1;

// Start time
*tstart = imjd+(smjd+offs)/86400.0;

Expand Down