From f7ef3f0acbf6c5fbe134e8559b0ed0a27ca72905 Mon Sep 17 00:00:00 2001 From: Matthew Pitkin Date: Wed, 6 Mar 2024 17:29:21 +0000 Subject: [PATCH] models.py: allow model_singlepsr_noise to work with .tim TOA files that do not contain 'pta' or 'f' flags --- enterprise_extensions/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enterprise_extensions/models.py b/enterprise_extensions/models.py index 5e5e5268..206c4f19 100644 --- a/enterprise_extensions/models.py +++ b/enterprise_extensions/models.py @@ -317,7 +317,7 @@ def model_singlepsr_noise(psr, tm_var=False, tm_linear=False, s += extra_sigs # adding white-noise, and acting on psr objects - if ('NANOGrav' in psr.flags['pta'] or 'CHIME' in psr.flags['f']) and not is_wideband: + if ("NANOGrav" in psr.flags.get("pta", "") or "CHIME" in psr.flags.get("f", "")) and not is_wideband: s2 = s + white_noise_block(vary=white_vary, inc_ecorr=True, tnequad=tnequad, select=select) model = s2(psr)