From fd732d666672cef5902c5daa50faf05af907deef Mon Sep 17 00:00:00 2001 From: Scott Ransom Date: Wed, 14 Feb 2018 12:43:00 -0500 Subject: [PATCH] Added CHIME and more entries for FAST --- lib/python/polycos.py | 5 ++++- lib/python/sigproc.py | 13 +++++++------ src/misc_utils.c | 3 +++ src/polycos.c | 3 +++ src/sigproc_fb.c | 11 +++++++++++ 5 files changed, 28 insertions(+), 7 deletions(-) diff --git a/lib/python/polycos.py b/lib/python/polycos.py index f5f153bfe..0006e65a5 100644 --- a/lib/python/polycos.py +++ b/lib/python/polycos.py @@ -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', \ @@ -23,6 +23,7 @@ "WSRT": 'i', \ "FAST": 'k', \ "GMRT": 'r', \ + "CHIME": 'y', \ "Geocenter": '0', \ "Barycenter": '@'} @@ -39,6 +40,7 @@ 'i': "WSRT", \ 'k': "FAST", \ 'r': "GMRT", \ + 'y': "CHIME", \ '0': "Geocenter", \ '@': "Barycenter"} @@ -55,6 +57,7 @@ "Effelsberg": 12, \ "WSRT": 12, \ "GMRT": 12, \ + "CHIME": 1, \ "Geocenter": 12, \ "Barycenter": 12} diff --git a/lib/python/sigproc.py b/lib/python/sigproc.py index 4fa47c85e..d7674c408 100755 --- a/lib/python/sigproc.py +++ b/lib/python/sigproc.py @@ -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 = { diff --git a/src/misc_utils.c b/src/misc_utils.c index 63bbbde0e..87eb173f9 100644 --- a/src/misc_utils.c +++ b/src/misc_utils.c @@ -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"); diff --git a/src/polycos.c b/src/polycos.c index 8b5ffecf4..f31783751 100644 --- a/src/polycos.c +++ b/src/polycos.c @@ -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; diff --git a/src/sigproc_fb.c b/src/sigproc_fb.c index 6614cd826..9db789913 100644 --- a/src/sigproc_fb.c +++ b/src/sigproc_fb.c @@ -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; @@ -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;