From 5ecfd1af6806c1e90664981f7cd6a897915c7e14 Mon Sep 17 00:00:00 2001 From: Josh Dillon Date: Sun, 4 Feb 2024 14:42:15 -0800 Subject: [PATCH] actually use SAVE_RESULTS --- ...ngle_baseline_postprocessing_and_pspec.ipynb | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/notebooks/single_baseline_postprocessing_and_pspec.ipynb b/notebooks/single_baseline_postprocessing_and_pspec.ipynb index d695398..11b6a2d 100644 --- a/notebooks/single_baseline_postprocessing_and_pspec.ipynb +++ b/notebooks/single_baseline_postprocessing_and_pspec.ipynb @@ -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]" ] }, {