Skip to content

Commit

Permalink
add save results
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdillon committed Feb 1, 2024
1 parent 6c2d339 commit 3703547
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions notebooks/single_baseline_postprocessing_and_pspec.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1852,7 +1852,22 @@
"metadata": {},
"outputs": [],
"source": [
"# TODO: write out results"
"# 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]"
]
},
{
"cell_type": "markdown",
"id": "1cdff354",
"metadata": {},
"source": [
"## Metadata"
]
},
{
Expand All @@ -1876,14 +1891,6 @@
"source": [
"print(f'Finished execution in {(time.time() - tstart) / 60:.2f} minutes.')"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "604875fe",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit 3703547

Please sign in to comment.