Skip to content

Commit

Permalink
use gain_scale to set vis_units
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdillon committed Jul 16, 2024
1 parent bf12493 commit 6fc720f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions notebooks/file_postprocessing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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}'"
]
},
{
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 6fc720f

Please sign in to comment.