# Usefulness of inserting fake/synthetic sources

**URL:** <https://www.rubin.community/t/usefulness-of-inserting-fake-synthetic-sources/7778>\
**Category:** Support\
**Tags:** dp0, source-injection\
**Created:** [July 23, 2023, 6:21pm UTC](https://www.rubin.community/t/usefulness-of-inserting-fake-synthetic-sources/7778 "2023-07-23T18:21:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidcue](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@davidcue](https://www.rubin.community/u/davidcue)\
**Post date:** [July 23, 2023, 6:21pm UTC](https://www.rubin.community/t/usefulness-of-inserting-fake-synthetic-sources/7778/1 "2023-07-23T18:21:37Z")

</div>

This summer I was introduced to the Rubin Science Data Preview and am getting accustomed to all of the data manipulation available through the notebook aspect. I am also new to astronomy in general, but I am interested in learning more of fake sources and what they’re uses are to us. For example, being able to create sources that are not available in the data preview and having the ability to change their parameters (psf, ra, dec, etc.). I was also wondering if there is some use in being able to detect sources that may not be detectable without the use of fakes or being able to use fakes to properly distinguish between far away galaxies and stars which both look like point sources. I have read that there is some use to synthetic sources when used with the TruthTable, but I don’t really understand the connection and am hoping to get some clarification. Thank you!

---

<div class="post-metadata">

**Author:** ![ameisner](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/ameisner/32/2392_2.png) [@ameisner](https://www.rubin.community/u/ameisner)\
**Post date:** [July 24, 2023, 10:26am UTC](https://www.rubin.community/t/usefulness-of-inserting-fake-synthetic-sources/7778/2 "2023-07-24T10:26:12Z")

</div>

Hi David,

Thanks very much for your message.

Have you had a chance to check out the paper that describes the DESC DC2 injection of large numbers of stars and galaxies into simulated LSST images? DP0.2 is based on these DESC DC2 image simulations. The DESC DC2 paper is at:

> **[The LSST DESC DC2 Simulated Sky Survey](https://arxiv.org/abs/2010.05926)**
>
> We describe the simulated sky survey underlying the second data challenge
> (DC2) carried out in preparation for analysis of the Vera C. Rubin Observatory
> Legacy Survey of Space and Time (LSST) by the LSST Dark Energy Science
> Collaboration (LSST DESC)....

Also, there’s a [contributed notebook](https://github.com/rubin-dp0/delegate-contributions-dp01/blob/main/fake_source_injection/fake_source_injection_multicolor.ipynb) about injecting and measuring synthetic sources using LSST tools (though it’s over a year old, so some details could need changing; LSST pipelines version `w_2022_12` does appear to still be available from the RSP “server options” page).

Regarding truth tables, there’s a tutorial notebook dedicated to this topic within the following repo:

> **[GitHub - rubin-dp0/tutorial-notebooks: Tutorial Jupyter Notebooks for Data...](https://github.com/rubin-dp0/tutorial-notebooks)**
>
> Tutorial Jupyter Notebooks for Data Preview 0, created and maintained by the Rubin Observatory Community Science Team. - GitHub - rubin-dp0/tutorial-notebooks: Tutorial Jupyter Notebooks for Data P...

And the full truth table schema for DP0.2 are available at:

[https://dm.lsst.org/sdm\_schemas/browser/dp02.html](https://dm.lsst.org/sdm_schemas/browser/dp02.html)

I believe there’s an in-development DP0.2 tutorial dedicated to PSF models, so please stay tuned for that as well…

---

<div class="post-metadata">

**Author:** ![MelissaGraham](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/melissagraham/32/2549_2.png) [@MelissaGraham](https://www.rubin.community/u/MelissaGraham)\
**Post date:** [July 24, 2023, 9:04pm UTC](https://www.rubin.community/t/usefulness-of-inserting-fake-synthetic-sources/7778/3 "2023-07-24T21:04:46Z")

</div>

@ameisner is right that there is a new DP0.2 tutorial coming soon that covers the PSF-related data products. Furthermore, source injection functionality is being added to the LSST Science Pipelines and there will be a DP0.2 tutorial notebook demonstrating how to use that, as well (expected by end of 2023).

Since you mention “being able to use fakes to properly distinguish between far away galaxies and stars which both look like point sources”, you might be interested in [this contributed notebook on the extendedness parameter](https://github.com/rubin-dp0/delegate-contributions-dp02/blob/main/extendedness/intro_to_star_gal_sep.ipynb), which is also in the delegate-contributions-dp02 repo. It retrieves truth information about simulated stars and galaxies and then compares the true extendedness with the measured extendedness. Note that this notebook was created with an older version of the LSST Science Pipelines (Weekly 2022\_40).

@davidcue let us know if that answers your question or if we could provide any more information?

---

<div class="post-metadata">

**Author:** ![ameisner](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/ameisner/32/2392_2.png) [@ameisner](https://www.rubin.community/u/ameisner)\
**Post date:** [September 24, 2023, 11:27am UTC](https://www.rubin.community/t/usefulness-of-inserting-fake-synthetic-sources/7778/4 "2023-09-24T11:27:48Z")

</div>

Hi @davidcue – just wanted to mention that I now see the new DP0.2 PSF tutorials in the DP0.2 [tutorial notebooks repo](https://github.com/rubin-dp0/tutorial-notebooks) as DP02\_12a and DP02\_12b, and I also now see these PSF tutorials available in the corresponding directory within RSP.
