Skip to content

Commit

Permalink
manage pol convention and vis units in file_postprocessing
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdillon committed Jul 11, 2024
1 parent 16fc632 commit 9003896
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions notebooks/file_postprocessing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,11 @@
"# Load calibration solutions and gain flags\n",
"hc_smooth = io.HERACal(SMOOTH_CAL_FILE)\n",
"smooth_gains, cal_flags, _, _ = hc_smooth.read()\n",
"pol_convention = hc_smooth.pol_convention\n",
"\n",
"hc_abs = io.HERACal(ABS_CAL_FILE)\n",
"abs_gains, abs_cal_flags, _, _ = hc_abs.read()"
"abs_gains, abs_cal_flags, _, _ = hc_abs.read()\n",
"assert pol_convention == hc_abs.pol_convention, f'{pol_convention} != {hc_abs.pol_convention}'"
]
},
{
Expand Down Expand Up @@ -712,6 +714,8 @@
" hd_out.empty_arrays()\n",
" 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",
" 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 @@ -773,6 +777,8 @@
" hd_out.read(bls=set([bl[0:2] for bl in avg_abs_data]), polarizations=['ee', 'nn'])\n",
" 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",
" 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 @@ -864,7 +870,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
"version": "3.10.12"
},
"toc": {
"base_numbering": 1,
Expand Down

0 comments on commit 9003896

Please sign in to comment.