Skip to content

Commit

Permalink
Added CHIME and more entries for FAST
Browse files Browse the repository at this point in the history
  • Loading branch information
scottransom committed Feb 14, 2018
1 parent 9c22fc7 commit fd732d6
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 7 deletions.
5 changes: 4 additions & 1 deletion lib/python/polycos.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# Constants
NUMCOEFFS_DEFAULT = 12
SPAN_DEFAULT = 60 # span of each poylco in minutes
SPAN_DEFAULT = 60 # span of each polyco in minutes

# Telescope name to TEMPO observatory code conversion
telescope_to_id = {"GBT": '1', \
Expand All @@ -23,6 +23,7 @@
"WSRT": 'i', \
"FAST": 'k', \
"GMRT": 'r', \
"CHIME": 'y', \
"Geocenter": '0', \
"Barycenter": '@'}

Expand All @@ -39,6 +40,7 @@
'i': "WSRT", \
'k': "FAST", \
'r': "GMRT", \
'y': "CHIME", \
'0': "Geocenter", \
'@': "Barycenter"}

Expand All @@ -55,6 +57,7 @@
"Effelsberg": 12, \
"WSRT": 12, \
"GMRT": 12, \
"CHIME": 1, \
"Geocenter": 12, \
"Barycenter": 12}

Expand Down
13 changes: 7 additions & 6 deletions lib/python/sigproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
from psr_constants import ARCSECTORAD

telescope_ids = {"Fake": 0, "Arecibo": 1, "ARECIBO 305m": 1,
"Ooty": 2, "Nancay": 3,
"Parkes": 4, "Jodrell": 5, "GBT": 6, "GMRT": 7,
"Effelsberg": 8, "ATA": 9, "UTR-2": 10, "LOFAR": 11}
"Ooty": 2, "Nancay": 3, "Parkes": 4, "Jodrell": 5,
"GBT": 6, "GMRT": 7, "Effelsberg": 8, "ATA": 9,
"SRT": 10, "LOFAR": 11, "VLA": 12, "CHIME": 20,
"FAST": 21, "MeerKAT": 64, "KAT-7": 65}
ids_to_telescope = dict(zip(telescope_ids.values(), telescope_ids.keys()))

machine_ids = {"FAKE": 0, "PSPM": 1, "Wapp": 2, "WAPP": 2, "AOFTM": 3,
"BCPM1": 4, "BPP": 4, "OOTY": 5, "SCAMP": 6,
"GBT Pulsar Spigot": 7,
"SPIGOT": 7, "BG/P": 11, "PDEV": 12}
"BCPM1": 4, "BPP": 4, "OOTY": 5, "SCAMP": 6,
"GBT Pulsar Spigot": 7, "SPIGOT": 7, "BG/P": 11,
"PDEV": 12, "CHIME+PSR": 20, "KAT": 64, "KAT-DC2": 65}
ids_to_machine = dict(zip(machine_ids.values(), machine_ids.keys()))

header_params = {
Expand Down
3 changes: 3 additions & 0 deletions src/misc_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ void telescope_to_tempocode(char *inname, char *outname, char *obscode)
} else if (strcmp(scope, "gmrt") == 0) {
strcpy(obscode, "GM");
strcpy(outname, "GMRT");
} else if (strcmp(scope, "chime") == 0) {
strcpy(obscode, "CH");
strcpy(outname, "CHIME");
} else if (strcmp(scope, "lofar") == 0) {
strcpy(obscode, "LF");
strcpy(outname, "LOFAR");
Expand Down
3 changes: 3 additions & 0 deletions src/polycos.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ char *make_polycos(char *parfilenm, infodata * idata, char *polycofilenm)
} else if (strcmp(idata->telescope, "GMRT") == 0) {
scopechar = 'r';
tracklen = 12;
} else if (strcmp(idata->telescope, "CHIME") == 0) {
scopechar = 'y';
tracklen = 1;
} else if (strcmp(idata->telescope, "MWA") == 0) {
scopechar = 'u';
tracklen = 12;
Expand Down
11 changes: 11 additions & 0 deletions src/sigproc_fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,14 @@ void get_telescope_name(int telescope_id, struct spectra_info *s)
strcpy(s->telescope, "VLA");
s->beam_FWHM = default_beam;
break;
case 20: // May need to change....
strcpy(s->telescope, "CHIME");
s->beam_FWHM = 2.0 / 3600.0 * beam_halfwidth(s->fctr, 20.0);
break;
case 21: // May need to change....
strcpy(s->telescope, "FAST");
s->beam_FWHM = 2.0 / 3600.0 * beam_halfwidth(s->fctr, 350.0);
break;
case 64:
strcpy(s->telescope, "MeerKAT");
s->beam_FWHM = default_beam;
Expand Down Expand Up @@ -173,6 +181,9 @@ void get_backend_name(int machine_id, struct spectra_info *s)
case 12:
strcpy(string, "PDEV");
break;
case 20:
strcpy(string, "CHIME+PSR");
break;
case 64:
strcpy(string, "KAT");
break;
Expand Down

0 comments on commit fd732d6

Please sign in to comment.