Skip to content

Commit 7d6177b

Browse files
last comments from yumi
1 parent a2d51bc commit 7d6177b

2 files changed

Lines changed: 23 additions & 23 deletions

File tree

DP1/200_Data_Products/206_Deblender_Products/206_1_Deblender_Outputs.ipynb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,11 @@
245245
"source": [
246246
"## 2. The deblender data products\n",
247247
"\n",
248-
"The object catalog contains a number of columns that can be used to identify and characterize blended objects in the `deepCoadd` images. Prior to deblending, blends are identified (referred to as parents) that and are then deblended into child objects by the LSST deblender package, Scarlet Lite. Only the children are ultimately stored in the `Object` table; the parent objects are excluded. Of course, isolated single sources that do not require deblending are also stored in the `Object` table and are not considered parent sources.\n",
248+
"The object catalog contains a number of columns that can be used to identify and characterize blended objects in the `deepCoadd` images. Prior to deblending, blends are identified (referred to as parents), and are then deblended into child objects by the LSST deblender package, Scarlet Lite. Only the children are ultimately stored in the `Object` table; the parent objects are excluded. Of course, isolated single sources that do not require deblending are also stored in the `Object` table and are not considered parent sources.\n",
249249
"\n",
250250
"In this tutorial we will focus on the deblending data products for objects stored in the `Object` table. \n",
251251
"\n",
252-
"The following describes key parameters in the `Object` table: 1) boolean flags that are set by the deblender, Scarlet Lite; 2) measurements or properties of deblended sources that can be used to characterize (de)blended sources 3) blendedness metrics performed after the deblender completes; 4) obsolete keywords still present in the `Object` table.\n",
252+
"The following describes key parameters in the `Object` table: 1) boolean flags that are set by the deblender, Scarlet Lite; 2) measurements or properties of deblended sources that can be used to characterize (de)blended sources; 3) blendedness metrics performed after the deblender completes; 4) obsolete keywords still present in the `Object` table.\n",
253253
"\n",
254254
"\n",
255255
"Scarlet blend flags:\n",
@@ -313,7 +313,7 @@
313313
"id": "fa180093-b8f2-4aed-8bb8-c19d910605a3",
314314
"metadata": {},
315315
"source": [
316-
"Query for objects in a small region of ECDFS for exploration of the deblender data products stored in the objectTable. "
316+
"Query for objects in a small region of ECDFS for exploration of the deblender data products stored in the `Object` table. "
317317
]
318318
},
319319
{
@@ -358,7 +358,7 @@
358358
"id": "820aeb85-3bff-4453-b2b5-f5008143fcd1",
359359
"metadata": {},
360360
"source": [
361-
"Store the resulting objects and columns from the objectTable to a table called results."
361+
"Store the resulting objects and columns from the `Object` table to a table called results."
362362
]
363363
},
364364
{
@@ -451,7 +451,7 @@
451451
"id": "72727e68-9405-4072-b190-a38d6cb02f0a",
452452
"metadata": {},
453453
"source": [
454-
"> Figure 1: The cutout image displayed in greyscale, with cyan + marking objects that are blended in the deep_coadd, red circles marking objects that are isolated (and is not part of a blend). "
454+
"> **Figure 1:** The cutout image displayed in greyscale, with cyan + marking objects that are blended in the `deep_coadd`, red circles marking objects that are isolated (and is not part of a blend). "
455455
]
456456
},
457457
{
@@ -465,7 +465,7 @@
465465
"\n",
466466
"### 3.1. Blend with several children\n",
467467
"\n",
468-
"First, identify a set of unique `parentObjectIds`, and the number of objects that are deblended from those parentObjectIds, (stored as `counts`). Then, select as an example a blend that was made up of 15 children. \n",
468+
"First, identify a set of unique `parentObjectIds`, and the number of objects that are deblended from those `parentObjectId`s, (stored as `counts`). Then, select as an example a blend that was made up of 15 children. \n",
469469
"\n",
470470
"To identify the most blended object in the query, replace the second code line with:\n",
471471
"`most_common_index_in_unique = np.argmax(counts)`\n"
@@ -558,7 +558,7 @@
558558
"id": "5546408c-6009-4230-9ef4-2faf1c302940",
559559
"metadata": {},
560560
"source": [
561-
"The table above confirms that the children returned by the query were deblended from the same parent source, since they all show the same parentObjectId. \n",
561+
"The table above confirms that the children returned by the query were deblended from the same parent source, since they all show the same `parentObjectId`. \n",
562562
"\n",
563563
"\n"
564564
]
@@ -590,7 +590,7 @@
590590
"id": "47c57439-2cc4-4cb6-9273-dab60b3127da",
591591
"metadata": {},
592592
"source": [
593-
"Next, visualize these test cases along with the other child sources of this parentObjectId. Use the `cutout_coadd` function to obtain a cutout image to visualize the blend. Set the size of the cutout to be 2x the square root of the `footprintArea`.\n"
593+
"Next, visualize these test cases along with the other child sources of this `parentObjectId`. Use the `cutout_coadd` function to obtain a cutout image to visualize the blend. Set the size of the cutout to be 2x the square root of the `footprintArea`.\n"
594594
]
595595
},
596596
{
@@ -645,7 +645,7 @@
645645
"id": "4dc608a8-cb6b-48c8-9aa9-e30338da2070",
646646
"metadata": {},
647647
"source": [
648-
"> Figure 2: The cutout image displayed in greyscale, with red circles marking the deblended children, cyan circles indicating any children whose contamination from neighbors prior to deblending is high (>50% of flux from a neighbor). \n"
648+
"> **Figure 2:** The cutout image displayed in greyscale, with red circles marking the deblended children, cyan circles indicating any children whose contamination from neighbors prior to deblending is high (>50% of flux from a neighbor). \n"
649649
]
650650
},
651651
{
@@ -712,7 +712,7 @@
712712
"id": "c27b24b6-29ed-48ae-8a28-2959c0f0a157",
713713
"metadata": {},
714714
"source": [
715-
"> Figure 3: This figure shows the blendedness metric (fraction of flux contributed by neighbors) before deblending vs the deblend_blendedness metric that identifies the fraction of flux contamination after deblending, for heavily blended objects (>50% flux from one or more neighbors). The right panel shows a histogram of the deblend_blendedness, indicating that the deblender is successful at separating flux, such that deblend_blendedness = 0, in the overwhelming majority of objects.\n"
715+
"> **Figure 3:** This figure shows the `blendedness` metric (fraction of flux contributed by neighbors) before deblending vs the `deblend_blendedness` metric that identifies the fraction of flux contamination after deblending, for heavily blended objects (>50% flux from one or more neighbors). The right panel shows a histogram of the `deblend_blendedness`, indicating that the deblender is successful at separating flux, such that `deblend_blendedness` = 0, in the overwhelming majority of objects.\n"
716716
]
717717
},
718718
{
@@ -872,7 +872,7 @@
872872
"id": "3e7906e2-7fd9-4dad-aea9-bfb2f6305a5f",
873873
"metadata": {},
874874
"source": [
875-
"> Figure 4: This figure shows a heavily blended parent for which deblended objects have a fraction of flux contributed by neighbors (red circles). Cyan circles indicate objects whose deblend_blendedness metric is not 0, and remains > 1% contamination even after deblending. They are typically faint objects near the outskirts of the biggest and brightest objects where contamination might be high.\n"
875+
"> **Figure 4:** This figure shows a heavily blended parent for which deblended objects have a fraction of flux contributed by neighbors (red circles). Cyan circles indicate objects whose `deblend_blendedness` metric is not 0, and remains > 1% contamination even after deblending. They are typically faint objects near the outskirts of the biggest and brightest objects where contamination might be high.\n"
876876
]
877877
},
878878
{
@@ -882,7 +882,7 @@
882882
"source": [
883883
"## 5. Exercises for the learner\n",
884884
"\n",
885-
"Use the deblender data products and blend metrics in the objectTable to identify what fraction of sources in ECDFS are contaminated by neighbor flux at the 5% level in the observed frame? What fraction have 5% flux contamination in the PSF-deconvolved (i.e. deblended) frame?\n"
885+
"Use the deblender data products and blend metrics in the `Object` table to identify what fraction of sources in ECDFS are contaminated by neighbor flux at the 5% level in the observed frame? What fraction have 5% flux contamination in the PSF-deconvolved (i.e. deblended) frame?\n"
886886
]
887887
}
888888
],

DP1/200_Data_Products/206_Deblender_Products/206_2_Deblender_Footprints.ipynb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@
399399
"id": "4dc608a8-cb6b-48c8-9aa9-e30338da2070",
400400
"metadata": {},
401401
"source": [
402-
"> Figure 1: The cutout of the i-band `deep_coadd` image displayed in greyscale, with red circles marking the deblended children. \n"
402+
"> **Figure 1:** The cutout of the i-band `deep_coadd` image displayed in greyscale, with red circles marking the deblended children. \n"
403403
]
404404
},
405405
{
@@ -495,7 +495,7 @@
495495
"\n",
496496
"In order to reconstruct the blend, the model PSF from the deconvolved model space is also required. The model PSF is the same for all blends, so extract that here.\n",
497497
"\n",
498-
"Also extract the set of blends associated with this parentId.\n"
498+
"Also extract the set of blends associated with this `parentObjectId`.\n"
499499
]
500500
},
501501
{
@@ -607,7 +607,7 @@
607607
"source": [
608608
"Printing `blend_data.bands` shows that this patch and tract in ECDFS was observed with all 6 bands but they are not in the order of increasing wavelength. To ensure that expected order, specify `model[tuple(\"ugrizy\")]` when retrieving the blend model to display the image with the expected color assignment in the cell below. If fewer bands of coverage exist (as is the case for some DP1 fields), simply replace this by the combination of observed bands, e.g. `tuple(\"griz\")`. For this example, select only 4 filters and exclude the `u` and `y` bands, which add unnecessary noise that makes it difficult to see the underlying objects.\n",
609609
"\n",
610-
"Note: this will change the order of the bands displayed in this instance of the the model but **not** in the `blend` instance. After DP1, a change is planned so that `blend = blend[display_bands]` can be used to reorganize all of the models so that they are displayed in a new order."
610+
"**Note:** this will change the order of the bands displayed in this instance of the the model but **not** in the `blend` instance. After DP1, a change is planned so that `blend = blend[display_bands]` can be used to reorganize all of the models so that they are displayed in a new order."
611611
]
612612
},
613613
{
@@ -648,7 +648,7 @@
648648
"id": "a823522f-8f0a-4ce1-b197-48586016fbfe",
649649
"metadata": {},
650650
"source": [
651-
"> Figure 2: A `griz` RGB color image of the blend model. By default, Scarlet Lite maps the filters into an RGB scaling where shorter wavelength filters contribute to the blue color and longer wavelength filters contribute to red."
651+
"> **Figure 2:** A `griz` RGB color image of the blend model. By default, Scarlet Lite maps the filters into an RGB scaling where shorter wavelength filters contribute to the blue color and longer wavelength filters contribute to red."
652652
]
653653
},
654654
{
@@ -743,7 +743,7 @@
743743
"id": "3740a5c7-ea8d-4d05-bb4a-6841c59766a1",
744744
"metadata": {},
745745
"source": [
746-
"> Figure 3: A `griz` RGB color image of the observed image. By default, Scarlet Lite maps the filters into an RGB scaling where shorter wavelength filters contribute to the blue color and longer wavelength filters contribute to red.\n"
746+
"> **Figure 3:** A `griz` RGB color image of the observed image. By default, Scarlet Lite maps the filters into an RGB scaling where shorter wavelength filters contribute to the blue color and longer wavelength filters contribute to red.\n"
747747
]
748748
},
749749
{
@@ -755,9 +755,9 @@
755755
"\n",
756756
"Now display the scene. The function scarlet `show_scene` will include the model footprints, the model rendered (i.e. convolved with the PSF), the locations on the observed multiband image, and residuals between the real image and the model. Model residuals compared to the observations are of interest for exploring how well the blend model matches the data. \n",
757757
"\n",
758-
"To normalize the image, use the Lupton RGB AsinhMapping, which preserves the observed colors.\n",
758+
"To normalize the image, use the Lupton RGB `AsinhMapping`, which preserves the observed colors.\n",
759759
"\n",
760-
"Note: You'll notice that the colors match the processed color order `observed_bands`, not the correct band order. In the future passing `blend[display_bands]` should display everything in the correct order.\n"
760+
"**Note:** You'll notice that the colors match the processed color order `observed_bands`, not the correct band order. In the future passing `blend[display_bands]` should display everything in the correct order.\n"
761761
]
762762
},
763763
{
@@ -790,11 +790,11 @@
790790
"id": "4d1b1cf7-cd49-4247-9a57-77284f848067",
791791
"metadata": {},
792792
"source": [
793-
"> Figure 4: Visualization of the model generated by Scarlet Lite, with x and y axes indicating pixel number from the patch/tract. The panels show the blend model (not PSF-convolved; top left), the blend model rendered (PSF-convolved; top right), the observation (bottom left) and the residual image (observation - model rendered; bottom right). All deblended sources are identified with white boxes and a number indicating its ID within the set of deblended objects.\n",
793+
"> **Figure 4:** Visualization of the model generated by Scarlet Lite, with x and y axes indicating pixel number from the patch/tract. The panels show the blend model (not PSF-convolved; top left), the blend model rendered (PSF-convolved; top right), the observation (bottom left) and the residual image (observation - model rendered; bottom right). All deblended sources are identified with white boxes and a number indicating its ID within the set of deblended objects.\n",
794794
"\n",
795795
"Finally, use the `show_sources` function to display each individual deblended object's model (left), its location in the image (middle), and its broad-band spectrum (right). Note that since this function takes `blend` as input, whose filter order we did not change. The band order used in the RGB and for the spectrum panel is thus the same as `observed_bands`.\n",
796796
"\n",
797-
"Note: Due to a bug in the DP1 code there is a bug that incorrectly displays the rendered (PSF convolved) model of each source. In the future passing `show_rendered=True` will also display the rendered version of the source."
797+
"**Note:** Due to a bug in the DP1 code there is a bug that incorrectly displays the rendered (PSF convolved) model of each source. In the future passing `show_rendered=True` will also display the rendered version of the source."
798798
]
799799
},
800800
{
@@ -827,7 +827,7 @@
827827
"source": [
828828
"## 5. Analyzing a single object\n",
829829
"\n",
830-
"Individual objects can be inspected. Here, select the second brightest object in the blend (listed as Source 1 in the output in Section 4.1) and access its objectId."
830+
"Individual objects can be inspected. Here, select the second brightest object in the blend (listed as Source 1 in the output in Section 4.1) and access its `objectId`."
831831
]
832832
},
833833
{
@@ -945,7 +945,7 @@
945945
"id": "cb5c74a8-b1cb-4e89-9ec3-182bbe880900",
946946
"metadata": {},
947947
"source": [
948-
"> Figure 5: Visualization of deblended source 1. Left panel shows the PSF-deconvolved model footprint (where the color scale corresponds to the weighted RGB color), middle panel shows the convolution of the scarlet model with the difference kernel and right panel shows the flux-redistributed model that the science pipelines use for measurements."
948+
"> **Figure 5:** Visualization of deblended source 1. Left panel shows the PSF-deconvolved model footprint (where the color scale corresponds to the weighted RGB color), middle panel shows the convolution of the scarlet model with the difference kernel and right panel shows the flux-redistributed model that the science pipelines use for measurements."
949949
]
950950
}
951951
],

0 commit comments

Comments
 (0)