Skip to content

Commit 0098e4a

Browse files
committed
add iq params plot
1 parent 9887328 commit 0098e4a

1 file changed

Lines changed: 53 additions & 8 deletions

File tree

DP2/102_Visit_and_tract_metadata.ipynb

Lines changed: 53 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -660,13 +660,13 @@
660660
"* `psf_maglim`: The $5\\sigma$ PSF magnitude limit in the $r$ and $i$ bands, in AB magnitudes.\n",
661661
"* `psf_size`: The PSF characteristic width as computed from the determinant radius, in the $r$ and $i$ bands, in pixels.\n",
662662
"\n",
663-
"The magnitude limit and PSF size columns are evaluated from the survey property maps at the center of the tract:\n",
663+
"The two image quality (IQ) parameters, the magnitude limit and PSF size, are evaluated from the survey property maps at the center of the tract:\n",
664664
"* `deepCoadd_psf_maglim_consolidated_map_weighted_mean`\n",
665665
"* `deepCoadd_psf_size_consolidated_map_weighted_mean`\n",
666666
"\n",
667667
"The `psf_size` is the $\\sigma$ in pixels, and can be approximately converted to arcseconds with a pixel scale of $\\sim0.2$ arcsec/pixel.\n",
668668
"To convert the `psf_size` to a FWHM in arcseconds, use:\n",
669-
"$FWHM = 0.2 \\sigma \\times 2 \\sqrt{2 \\ln(2)}$"
669+
"$FWHM = 0.2 \\sigma \\times 2 \\sqrt{2 \\ln(2)} = 2.3548 \\times 0.2 \\sigma$"
670670
]
671671
},
672672
{
@@ -795,12 +795,57 @@
795795
"del tally"
796796
]
797797
},
798+
{
799+
"cell_type": "markdown",
800+
"id": "4fd69847-90ba-40f1-bac2-392d3166fb06",
801+
"metadata": {},
802+
"source": [
803+
"### 3.3. IQ parameters\n",
804+
"\n",
805+
"Plot histograms of the tract image quality (IQ) parameters provided in the table."
806+
]
807+
},
808+
{
809+
"cell_type": "code",
810+
"execution_count": null,
811+
"id": "db014376-ccb3-4534-a78d-4a3983289288",
812+
"metadata": {},
813+
"outputs": [],
814+
"source": [
815+
"fig, ax = plt.subplots(1, 2, figsize=(10, 4), sharey=True)\n",
816+
"for f, filt in enumerate(['r', 'i']):\n",
817+
" tx1 = np.where(np.isfinite(tracts_table['psf_maglim_' + filt]))[0]\n",
818+
" tx2 = np.where(np.isfinite(tracts_table['psf_size_' + filt]))[0]\n",
819+
" ax[0].hist(tracts_table['psf_maglim_' + filt][tx1], histtype='step',\n",
820+
" bins=75, cumulative=True, log=True,\n",
821+
" linestyle=filter_linestyles[filt], color=filter_colors[filt], label=filt)\n",
822+
" ax[1].hist(0.2 * 2.3548 * tracts_table['psf_size_' + filt][tx2], histtype='step',\n",
823+
" bins=75, cumulative=True, log=True,\n",
824+
" linestyle=filter_linestyles[filt], color=filter_colors[filt], label=filt)\n",
825+
" del tx1, tx2\n",
826+
"ax[1].legend(loc='upper left', ncol=2)\n",
827+
"ax[0].set_xlabel('PSF Magnitude Limit [mag]')\n",
828+
"ax[1].set_xlabel('PSF FWHM [arcsec]')\n",
829+
"ax[0].set_ylabel('Number of tracts per filter')\n",
830+
"plt.subplots_adjust(wspace=0)\n",
831+
"plt.suptitle('Binned cumulative distribution of tract image quality parameters')\n",
832+
"plt.show()"
833+
]
834+
},
835+
{
836+
"cell_type": "markdown",
837+
"id": "34c9b18d-3a40-40d3-9296-847184865e48",
838+
"metadata": {},
839+
"source": [
840+
"> **Figure 9:** The binned cumulative distribution of tract IQ parameters, the PSF magnitude limit (left) and the PSF FWHM (right) in the $r$- and $i$-filters."
841+
]
842+
},
798843
{
799844
"cell_type": "markdown",
800845
"id": "dfda2aae-4f25-4f99-a4ac-85a4126e64fb",
801846
"metadata": {},
802847
"source": [
803-
"### 3.3. Sky distribution\n",
848+
"### 3.4. Sky distribution\n",
804849
"\n",
805850
"Use the tract vertices to draw one polygon per tract."
806851
]
@@ -829,7 +874,7 @@
829874
"id": "709d29e0-ef46-458e-977b-c3166b6804dd",
830875
"metadata": {},
831876
"source": [
832-
"> **Figure 9:** All of the DP2 tracts for which deep coadd images will exist, in any filter."
877+
"> **Figure 10:** All of the DP2 tracts for which deep coadd images will exist, in any filter."
833878
]
834879
},
835880
{
@@ -868,7 +913,7 @@
868913
"id": "331076de-c131-43a3-b1e7-889185625e10",
869914
"metadata": {},
870915
"source": [
871-
"> **Figure 10:** The DP2 tracts for which $r$-band deep coadd images will exist."
916+
"> **Figure 11:** The DP2 tracts for which $r$-band deep coadd images will exist."
872917
]
873918
},
874919
{
@@ -908,7 +953,7 @@
908953
"id": "a1d65a2c-4809-4ecc-9e55-1d703b1794d5",
909954
"metadata": {},
910955
"source": [
911-
"> **Figure 11:** The DP2 tracts for which $r$-band deep coadd images will exist, and have a magnitude limit fainter than 23 mag."
956+
"> **Figure 12:** The DP2 tracts for which $r$-band deep coadd images will exist, and have a magnitude limit fainter than 23 mag."
912957
]
913958
},
914959
{
@@ -1211,7 +1256,7 @@
12111256
"id": "599638e6-f98f-46cf-88e1-350287fc23e9",
12121257
"metadata": {},
12131258
"source": [
1214-
"> **Figure 12:** A 2D histogram illustrating the distribution of DP2 visits on the sky (for all filters, combined), similar to Figure 6 but plotted in blue-scale. Boxes are drawn to represent each skymap tract that will have at least one patch with a deep coadd image (similar to Figure 8). Overplotted are the coordinates of the three target coordinates (1 as a yellow star; 2 as a green triangle; 3 as a magenta square)."
1259+
"> **Figure 13:** A 2D histogram illustrating the distribution of DP2 visits on the sky (for all filters, combined), similar to Figure 6 but plotted in blue-scale. Boxes are drawn to represent each skymap tract that will have at least one patch with a deep coadd image (similar to Figure 8). Overplotted are the coordinates of the three target coordinates (1 as a yellow star; 2 as a green triangle; 3 as a magenta square)."
12151260
]
12161261
},
12171262
{
@@ -1359,7 +1404,7 @@
13591404
"id": "5676c6ae-313e-406e-9998-d514a4bde4e8",
13601405
"metadata": {},
13611406
"source": [
1362-
"> **Figure 13:** Similar to Figure 10, this plot shows the distribution of DP2 visits (blue-scale), with boxes drawn for DP2 tracts, and with the locations of the DP1 fields marked."
1407+
"> **Figure 14:** Similar to Figure 10, this plot shows the distribution of DP2 visits (blue-scale), with boxes drawn for DP2 tracts, and with the locations of the DP1 fields marked."
13631408
]
13641409
},
13651410
{

0 commit comments

Comments
 (0)