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]" ] }, {