Skip to content

Commit 6acf192

Browse files
committed
addressing Christina's feedback
1 parent e0b1d4c commit 6acf192

1 file changed

Lines changed: 19 additions & 12 deletions

File tree

DP1/300_Science_Demos/309_Astronomical_analysis/309_3_Extendedness_parameter.ipynb

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"Data Release: [Data Preview 1](https://dp1.lsst.io)\\\n",
2525
"Container Size: large\\\n",
2626
"LSST Science Pipelines version: r29.2.0\\\n",
27-
"Last verified to run: 2026-04-08\\\n",
27+
"Last verified to run: 2026-04-17\\\n",
2828
"Repository: [github.com/lsst/tutorial-notebooks](https://github.com/lsst/tutorial-notebooks)\\\n",
2929
"DOI: [10.11578/rubin/dc.20250909.20](https://doi.org/10.11578/rubin/dc.20250909.20)"
3030
]
@@ -61,7 +61,7 @@
6161
"In astronomical photometric surveys like the Vera C. Rubin Observatory’s Legacy Survey of Space and Time (LSST), the robust separation of point-like sources (stars) from extended sources (galaxies) is a foundational step for most downstream science.\n",
6262
"\n",
6363
"In Data Preview 1 (DP1), this morphological classification is primarily driven by two complementary methodologies:\n",
64-
"- Flux-based extendedness: Utilizes the ratio between Point Spread Function (PSF) and Composite model (CModel) fluxes to determine if a source’s profile is consistent with the local Point Spread Function.\n",
64+
"- Flux-based extendedness: Utilizes the ratio between Point Spread Function (`PSF`) and Composite model (`cModel`) fluxes to determine if a source’s profile is consistent with the local PSF.\n",
6565
"- Size-based extendedness: Leverages shape-based parameters (adaptive second moments) to quantify the spatial extent of a source relative to the PSF.\n",
6666
"\n",
6767
"This tutorial illustrates the computation of these parameters in DP1, demonstrates their characteristics, and explores their relative performance using observations of the Fornax dSph field.\n",
@@ -221,6 +221,13 @@
221221
" If True, the subplots will share the y-axis. Defaults to True.\n",
222222
" figsize : tuple, optional\n",
223223
" Figure size. Defaults to (4 * number of plots, 4).\n",
224+
"\n",
225+
" Returns:\n",
226+
" --------\n",
227+
" fig : matplotlib.figure.Figure\n",
228+
" The figure object containing the density comparison plots.\n",
229+
" axes : list of matplotlib.axes.Axes\n",
230+
" An array/list of the individual subplot axes.\n",
224231
" \"\"\"\n",
225232
" n_plots = len(x_cols)\n",
226233
" if figsize is None:\n",
@@ -378,10 +385,10 @@
378385
"### 3.1. Flux-based extendedness\n",
379386
"\n",
380387
"The LSST Science Pipelines distinguish stars from galaxies by comparing two different flux measurements for every detected object:\n",
381-
"- PSF flux: The flux measured by fitting the PSF model to the source. This model assumes the source is unresolved.\n",
382-
"- CModel flux: The flux measured by fitting a \"Composite Model\". This model allows for the source to be extended.\n",
388+
"- `PSF` flux (`<band>_free_psfFlux`): The flux measured by fitting the PSF model to the source (free, not forced). This model assumes the source is unresolved.\n",
389+
"- `cModel` flux (`<band>_free_cModelFlux`): The flux measured by fitting a \"Composite Model\" (free, not forced). This model allows for the source to be extended.\n",
383390
"\n",
384-
"For a star, the object is unresolved, meaning the PSF flux captures the same amount of light as the composite model, and the ratio is close to unity. For a galaxy, the object is extended, so the PSF fit fails to capture flux in the wings, causing the PSF flux to be significantly lower than the cModel flux. The pipeline applies a configurable threshold to this ratio to assign a binary flag. If the ratio PSF Flux/CModel Flux is greater than or equal to 0.985, the `extendedness` parameter is set to 0, indicating a star. Conversely, if the ratio is less than 0.985, the parameter is set to 1, indicating a galaxy."
391+
"For a star, the object is unresolved, meaning the `PSF` flux captures the same amount of light as the composite model, and the ratio is close to unity. For a galaxy, the object is extended, so the PSF fit fails to capture flux in the wings, causing the `PSF` flux to be significantly lower than the `cModel` flux. The pipeline applies a configurable threshold to this ratio to assign a binary flag. If the ratio `PSF` Flux/`cModel` Flux is greater than or equal to 0.985, the `extendedness` parameter is set to 0, indicating a star. Conversely, if the ratio is less than 0.985, the parameter is set to 1, indicating a galaxy."
385392
]
386393
},
387394
{
@@ -391,7 +398,7 @@
391398
"source": [
392399
"#### 3.1.1. Extendedness vs. flux ratio per band\n",
393400
"\n",
394-
"The `extendedness` parameter plotted against the PSF-to-cModel flux ratio for the $g,r,i$ bands. "
401+
"The `extendedness` parameter plotted against the `PSF`-to-`cModel` flux ratio for the $g,r,i$ bands. "
395402
]
396403
},
397404
{
@@ -421,7 +428,7 @@
421428
"id": "c8a87863-23aa-47ed-aa0d-c051d928e930",
422429
"metadata": {},
423430
"source": [
424-
"> **Figure 1:** Distribution of the PSF-to-cModel flux ratio across the $g,r,i$ bands. The vertical red dashed line indicates the threshold at 0.985 used for morphological classification in DP1. Sources with a ratio $\\ge$0.985 are classified as point-like (`extendedness` = 0), while those below this value are classified as extended (`extendedness` = 1)."
431+
"> **Figure 1:** Distribution of the `PSF`-to-`cModel` flux ratio across the $g,r,i$ bands. The vertical red dashed line indicates the threshold at 0.985 used for morphological classification in DP1. Sources with a ratio $\\ge$0.985 are classified as point-like (`extendedness` = 0), while those below this value are classified as extended (`extendedness` = 1)."
425432
]
426433
},
427434
{
@@ -509,9 +516,9 @@
509516
"source": [
510517
"### 3.2. Size-based extendedness\n",
511518
"\n",
512-
"This parameter provides a continuous metric for star-galaxy separation by comparing the resolved size of a source to the local PSF. The classification relies on the \"trace\" of the adaptive moments matrix, defined as: $T=Ixx + Iyy$, where $Ixx$ and $Iyy$ are the second-order moments of the source's intensity distribution. $T$ serves as a robust, model-independent measure of the square of the radius. \n",
519+
"This parameter (`<band>_sizeExtendedness`) provides a continuous metric for star-galaxy separation by comparing the resolved size of a source to the local PSF. The classification relies on the \"trace\" of the adaptive moments matrix, defined as: $T=Ixx + Iyy$, where $Ixx$ and $Iyy$ are the second-order moments of the source's intensity distribution. $T$ serves as a robust, model-independent measure of the square of the radius. \n",
513520
"\n",
514-
"The $\\chi^{2}$ statistic quantifies the extendedness by calculating the squared difference between the source's measured size and the expected PSF's size at the source's location, normalized by a power of the PSF size. This ensures the deviation is scaled appropriately relative to the local image quality. The output is mapped onto a scale from 0 to 1, representing the probability of being a galaxy: {band}_`sizeExtendedness` $= 1 - e^{-0.5\\chi^{2}}$."
521+
"The $\\chi^{2}$ statistic quantifies the extendedness by calculating the squared difference between the source's measured size and the expected PSF's size at the source's location, normalized by a power of the PSF size. This ensures the deviation is scaled appropriately relative to the local image quality. The output is mapped onto a scale from 0 to 1, representing the probability of being a galaxy: <band>_`sizeExtendedness` $= 1 - e^{-0.5\\chi^{2}}$."
515522
]
516523
},
517524
{
@@ -670,7 +677,7 @@
670677
"source": [
671678
"## 5. Star-galaxy separation performance\n",
672679
"\n",
673-
"This section explores the star-galaxy separation performance of the two morphological classifiers within the color-magnitude diagram (CMD) space\n",
680+
"This section explores the star-galaxy separation performance of the two morphological classifiers within the color-magnitude diagram (CMD) space.\n",
674681
"\n",
675682
"### 5.1. Using flux-based metric \n",
676683
"\n",
@@ -799,11 +806,11 @@
799806
"source": [
800807
"## 6. Usage notes and recommendations\n",
801808
"\n",
802-
"- The flux-based `extendedness` parameter is optimized for use with the `Object` table, not with the `Source` table. This classification requires both a PSF flux and a galaxy-model flux (CModel) as inputs. Because the DP1 pipelines did not perform full galaxy modeling on single-visit images, the `extendedness` values in the `Source` table utilize a lower-fidelity proxy for galaxy flux. Consequently, morphological classification in the `Source` table should be treated with caution and is generally not recommended for sensitive star-galaxy separation.\n",
809+
"- The flux-based `extendedness` parameter is optimized for use with the `Object` table, not with the `Source` table. This classification requires both a `PSF` flux and a galaxy-model flux (`cModel`) as inputs. Because the DP1 pipelines did not perform full galaxy modeling on single-visit images, the `extendedness` values in the `Source` table utilize a lower-fidelity proxy for galaxy flux. Consequently, morphological classification in the `Source` table should be treated with caution and is generally not recommended for sensitive star-galaxy separation.\n",
803810
"\n",
804811
"- While both `extendedness` and `sizeExtendedness` are available for every individual filter in the `Object` table, most scientific applications should prioritize reference-band values (i.e., `refExtendedness` and `refSizeExtendedness`). These are derived from a designated filter chosen for its superior detection significance and measurement quality. Utilizing the reference-band classification ensures a single, robust morphological definition for each object, minimizing the risk of inconsistent classification across different wavebands.\n",
805812
"\n",
806-
"- For sources where the flags for extendedness parameter are set for any failure, the corresponding extendedness values were not populated."
813+
"- For sources where the flags for extendedness parameter are set for any failure, the corresponding extendedness values were not populated, resulting in blank entries."
807814
]
808815
},
809816
{

0 commit comments

Comments
 (0)