From 6fc720f1bab5e41681c765916692b59fee99dd80 Mon Sep 17 00:00:00 2001 From: Josh Dillon Date: Mon, 15 Jul 2024 20:35:34 -0700 Subject: [PATCH] use gain_scale to set vis_units --- notebooks/file_postprocessing.ipynb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/notebooks/file_postprocessing.ipynb b/notebooks/file_postprocessing.ipynb index e4af3c7..dadd306 100644 --- a/notebooks/file_postprocessing.ipynb +++ b/notebooks/file_postprocessing.ipynb @@ -234,10 +234,12 @@ "hc_smooth = io.HERACal(SMOOTH_CAL_FILE)\n", "smooth_gains, cal_flags, _, _ = hc_smooth.read()\n", "pol_convention = hc_smooth.pol_convention\n", + "gain_scale = hc_smooth.gain_scale\n", "\n", "hc_abs = io.HERACal(ABS_CAL_FILE)\n", "abs_gains, abs_cal_flags, _, _ = hc_abs.read()\n", - "assert pol_convention == hc_abs.pol_convention, f'{pol_convention} != {hc_abs.pol_convention}'" + "assert pol_convention == hc_abs.pol_convention, f'{pol_convention} != {hc_abs.pol_convention}'\n", + "assert gain_scale == hc_abs.gain_scale, f'{gain_scale} != {hc_abs.gain_scale}'" ] }, { @@ -715,7 +717,7 @@ " hd_out.history += add_to_history\n", " hd_out.update(flags=red_avg_flags, nsamples=red_avg_nsamples)\n", " hd_out.pol_convention = pol_convention\n", - " hd_out.vis_units = 'Jy'\n", + " hd_out.vis_units = gain_scale\n", " if ALL_FLAGGED:\n", " # put back in all the flags that we had been ignoring up to this point\n", " hd_out.flag_array = np.ones_like(hd_out.flag_array)\n", @@ -778,7 +780,7 @@ " hd_out.empty_arrays()\n", " hd_out.update(data=avg_abs_data, flags=avg_flags, nsamples=avg_nsamples)\n", " hd_out.pol_convention = pol_convention\n", - " hd_out.vis_units = 'Jy' \n", + " hd_out.vis_units = gain_scale\n", " if ALL_FLAGGED:\n", " # put back in all the flags that we had been ignoring up to this point\n", " hd_out.flag_array = np.ones_like(hd_out.flag_array) \n",