Skip to content

Commit

Permalink
redo pol_convention and vis units
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdillon committed Jul 11, 2024
1 parent 1d81967 commit b4687fd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions notebooks/file_calibration.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1675,6 +1675,7 @@
" \n",
" hd_vissol = io.HERAData(SUM_FILE)\n",
" hc_omni = hd_vissol.init_HERACal(gain_convention='divide', cal_style='redundant')\n",
" hc_omni.pol_convention = hd_auto_model.pol_convention\n",
" hc_omni.update(gains=sol.gains, flags=omni_flags, quals=meta['chisq_per_ant'], total_qual=meta['chisq'])\n",
" hc_omni.history += add_to_history\n",
" hc_omni.write_calfits(OMNICAL_FILE, clobber=True)\n",
Expand All @@ -1683,14 +1684,16 @@
" \n",
" if SAVE_OMNIVIS_FILE:\n",
" # output results, harmonizing keys over polarizations\n",
" all_reds = redcal.get_reds(hd.data_antpos, pols=['ee', 'nn'], pol_mode='2pol')\n",
" all_reds = redcal.get_reds(hd.data_antpos, pols=['ee', 'nn', 'en', 'ne'], pol_mode='4pol')\n",
" bl_to_red_map = {bl: red[0] for red in all_reds for bl in red}\n",
" hd_vissol.read(bls=[bl_to_red_map[bl] for bl in sol.vis], return_data=False)\n",
" hd_vissol.empty_arrays()\n",
" hd_vissol.history += add_to_history\n",
" hd_vissol.update(data={bl_to_red_map[bl]: sol.vis[bl] for bl in sol.vis}, \n",
" 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",
" hd_vissol.write_uvh5(OMNIVIS_FILE, clobber=True)"
]
},
Expand Down Expand Up @@ -1803,7 +1806,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 b4687fd

Please sign in to comment.