Skip to content

Commit

Permalink
actually use SAVE_RESULTS
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdillon committed Feb 4, 2024
1 parent 9826d3b commit 5ecfd1a
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions notebooks/single_baseline_postprocessing_and_pspec.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1860,14 +1860,15 @@
"metadata": {},
"outputs": [],
"source": [
"# Create pspec container and write all interleaves to it\n",
"psc = hp.PSpecContainer(OUT_PSPEC_FILE, mode='rw', keep_open=False)\n",
"psc.set_pspec('stokespol', interleave_names, uvps, overwrite=True)\n",
"\n",
"# write ancillary data products directly to header attributes\n",
"with h5py.File(OUT_PSPEC_FILE, 'r+') as f:\n",
" f['header'].attrs['dpss_coherent_avg_corrections'] = [dpss_coherent_avg_correction(spw) for spw in range(len(bands))]\n",
" f['header'].attrs['frf_losses'] = [frf_losses[band] for band in bands]"
"if SAVE_RESULTS:\n",
" # Create pspec container and write all interleaves to it\n",
" psc = hp.PSpecContainer(OUT_PSPEC_FILE, mode='rw', keep_open=False)\n",
" psc.set_pspec('stokespol', interleave_names, uvps, overwrite=True)\n",
"\n",
" # write ancillary data products directly to header attributes\n",
" with h5py.File(OUT_PSPEC_FILE, 'r+') as f:\n",
" f['header'].attrs['dpss_coherent_avg_corrections'] = [dpss_coherent_avg_correction(spw) for spw in range(len(bands))]\n",
" f['header'].attrs['frf_losses'] = [frf_losses[band] for band in bands]"
]
},
{
Expand Down

0 comments on commit 5ecfd1a

Please sign in to comment.