Skip to content

Commit

Permalink
put back effective_nights
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler-a-cox committed Jun 6, 2024
1 parent 5f77d49 commit a401115
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions hera_notebook_templates/notebooks/lststack.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@
" )\n",
" outfile = outdir / cal_fname\n",
" \n",
" #np.savez(outfile, **calibration_parameters)\n",
" np.savez(outfile, **calibration_parameters)\n",
" \n",
" # Recompute auto and cross averages after calibration - needed for STD files \n",
" cross_lstavg = [\n",
Expand Down Expand Up @@ -1214,9 +1214,8 @@
" for _weighted_diff_dpss in weighted_diff_dpss\n",
" ], axis=0)\n",
" \n",
" \n",
" #effective_nights = np.sum(np.mean(mask[:, band], axis=1))\n",
" effective_nights = np.sum(is_unflagged_night)\n",
" # Calculate effective nights\n",
" effective_nights = np.sum(np.mean(mask[:, band], axis=1))\n",
" \n",
" # TODO: Sample covariance is overestimated and has a fudge factor, this is probably close to correct\n",
" # but not exactly right. We should revisit this.\n",
Expand Down Expand Up @@ -1280,6 +1279,24 @@
" return lstavg, all_models"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "cbcbe32b",
"metadata": {},
"outputs": [],
"source": [
"for iap, antpair in enumerate(stack.antpairs): \n",
" # Get the baseline vector and length\n",
" bl_vec = (antpos[antpair[1]] - antpos[antpair[0]])[:]\n",
" bl_len = np.linalg.norm(bl_vec) / constants.c\n",
" filter_centers, filter_half_widths = vis_clean.gen_filter_properties(\n",
" ax='freq',\n",
" bl_len=max(bl_len, 7.0 / constants.c),\n",
" **filter_properties,\n",
" )"
]
},
{
"cell_type": "markdown",
"id": "af3b55b2",
Expand Down

0 comments on commit a401115

Please sign in to comment.