From d897fe86084597e030a450b774e778f7858c3930 Mon Sep 17 00:00:00 2001 From: NickSwainston Date: Thu, 14 Mar 2024 11:45:29 +1100 Subject: [PATCH] Updated SBAND_1 freq chop range and test to cover it --- meerpipe/archive_utils.py | 4 ++-- tests/test_archive_utils.py | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/meerpipe/archive_utils.py b/meerpipe/archive_utils.py index cfdf2aa..e2f3009 100644 --- a/meerpipe/archive_utils.py +++ b/meerpipe/archive_utils.py @@ -170,8 +170,8 @@ def chopping_utility( low_freq = 1790.57 high_freq = 2583.57 elif band == "SBAND_1": - low_freq = 2009.0 - high_freq = 2802.7 + low_freq = 2009.35 + high_freq = 2802.3 elif band == "SBAND_2": low_freq = 2227.2 high_freq = 3020.9 diff --git a/tests/test_archive_utils.py b/tests/test_archive_utils.py index 0da242d..d1cc2a4 100644 --- a/tests/test_archive_utils.py +++ b/tests/test_archive_utils.py @@ -1,4 +1,5 @@ import os +import logging import psrchive as ps @@ -7,14 +8,14 @@ TEST_DATA_DIR = os.path.join(os.path.dirname(__file__), 'test_data') -logger = setup_logging(console=True) +logger = setup_logging(console=True, level=logging.DEBUG) def test_chopping_utility(): # Test archives for each bands that have been time and polarisation scrunched. test_archives = [ # Standard 1024 nchan - ("LBAND", "J0437-4715_2019-03-26-16:26:02_zap.ar", 1024, 928), ("UHF", "J0255-5304_2020-08-03-23:36:45_zap.ar", 1024, 928), + ("LBAND", "J0437-4715_2019-03-26-16:26:02_zap.ar", 1024, 928), ("SBAND_0", "J0737-3039A_2023-05-16-11:38:55_zap_ch1024.ar", 1024, 928), ("SBAND_1", "J1757-1854_2023-12-03-09:37:38_zap.ar", 1024, 928), # ("SBAND_2", "", 1024, 928), @@ -25,10 +26,11 @@ def test_chopping_utility(): # A 768 nchan obs ("LBAND", "J1827-0750_2020-01-10-08:29:29_zap.ar", 768, 768), # High nchan obs - ("LBAND", "J2317+1439_2022-12-03-15:09:15_zap.ar", 4096, 3712), ("UHF", "J1350-5115_2022-01-03-04:04:15_zap.ar", 4096, 3712), - ("SBAND_0", "J0737-3039A_2023-05-16-11:38:55_zap_ch16384.ar", 16384, 14848), + ("LBAND", "J2317+1439_2022-12-03-15:09:15_zap.ar", 4096, 3712), ("LBAND", "J0737-3039A_2022-09-18-07:10:50_zap.ar", 16384, 14848), + ("SBAND_0", "J0737-3039A_2023-05-16-11:38:55_zap_ch16384.ar", 16384, 14848), + ("SBAND_1", "J1756-2251_2023-05-25-20:54:23_zap.ar", 16384, 14848), ] for band, archive, input_nchan, output_nchan in test_archives: logger.info(f"Testing chopping utility for {archive} in {band} band")