From 027052142745a723ffdb1cc7a01ff91b2ff5e270 Mon Sep 17 00:00:00 2001 From: jrob93 Date: Wed, 14 Oct 2026 10:26:16 +0000 Subject: [PATCH] save to fits --- .../202_Images/202_1_Deep_coadds.ipynb | 40 ++++++++++++++++++- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/DP2/200_Data_products/202_Images/202_1_Deep_coadds.ipynb b/DP2/200_Data_products/202_Images/202_1_Deep_coadds.ipynb index c4d7e54a..fa41bbf8 100644 --- a/DP2/200_Data_products/202_Images/202_1_Deep_coadds.ipynb +++ b/DP2/200_Data_products/202_Images/202_1_Deep_coadds.ipynb @@ -1826,16 +1826,52 @@ "outputs": [], "source": [ "del ref, dataId, use_tract, use_patch, use_columns, objects, tx\n", - "del dataset_refs, deep_coadd" + "del dataset_refs" + ] + }, + { + "cell_type": "markdown", + "id": "c06ebdd7-482a-43a6-aed8-4ed053c8d184", + "metadata": {}, + "source": [ + "## 6. Save `deep_coadd` to file\n", + "`deep_coadd` is a `CellCoadd` object type and has an associated method to write the object to file, as described in the [API](https://images.lsst.io/api/lsst.images.cells.CellCoadd.html#lsst.images.cells.CellCoadd.write). Uncomment the following cell to save `deep_coadd` as a FITS file." ] }, { "cell_type": "code", "execution_count": null, + "id": "255b693c-4767-4152-addf-1d98a7276783", + "metadata": {}, + "outputs": [], + "source": [ + "# deep_coadd.image.write(\n", + "# \"deep_coadd_{}_{}_{}_{}.fits\".format(\n", + "# deep_coadd.skymap,\n", + "# deep_coadd.tract,\n", + "# deep_coadd.patch.id,\n", + "# deep_coadd.band\n", + "# )\n", + "# )" + ] + }, + { + "cell_type": "markdown", "id": "8270ac15-73ee-4e87-ab72-f0a12b3c455f", "metadata": {}, + "source": [ + "Clean up." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7cf73981-189c-401d-bde8-e6e8fc26b31e", + "metadata": {}, "outputs": [], - "source": [] + "source": [ + "del deep_coadd" + ] } ], "metadata": {