From 16fc6321e828f9f84714e26392dfe5eb3d3c2cad Mon Sep 17 00:00:00 2001 From: Josh Dillon Date: Thu, 11 Jul 2024 14:16:17 -0700 Subject: [PATCH] enforce that vis_units are Jy --- notebooks/file_calibration.ipynb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/notebooks/file_calibration.ipynb b/notebooks/file_calibration.ipynb index 5848f67..e5817d1 100644 --- a/notebooks/file_calibration.ipynb +++ b/notebooks/file_calibration.ipynb @@ -1693,7 +1693,9 @@ " flags={bl_to_red_map[bl]: vissol_flags[bl] for bl in vissol_flags}, \n", " nsamples={bl_to_red_map[bl]: vissol_nsamples[bl] for bl in vissol_nsamples})\n", " hd_vissol.pol_convention = hd_auto_model.pol_convention\n", - " hd_vissol.vis_units = hd_auto_model.vis_units\n", + " if hd_auto_model.vis_units != 'Jy':\n", + " raise ValueError(f'The HERA pipeline is hard-coded for calibrated visibilities in Jy, but somehow this abscal model is in {hd_auto_model.vis_units}')\n", + " hd_vissol.vis_units = 'Jy'\n", " hd_vissol.write_uvh5(OMNIVIS_FILE, clobber=True)" ] },