Skip to content

Commit

Permalink
add zenodo link to RC notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
TristanCantatGaudin authored Feb 7, 2024
1 parent 46a574d commit 6889414
Showing 1 changed file with 39 additions and 37 deletions.
76 changes: 39 additions & 37 deletions docs/notebooks/RedClump_GSP-Spec_SF.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "d06817b8",
"id": "cc892b9a",
"metadata": {},
"source": [
"# Selecting red clump stars from Gaia DR3\n",
Expand All @@ -23,7 +23,9 @@
" \n",
"We limited the query to G<14 to save time, because we know that later in this analysis we will be working with the stars with the most precise chemical abundances, and we know that none of them are fainter than 14.\n",
"\n",
"We will immediately refine this selection by using the parallaxes corrected with the ``zpt`` code which implements the Lindegren et al. (2021) parallax correction:\n",
"The resulting file `rc14_04-result.fits.gz` (220MB) can be downloaded from Zenodo: https://zenodo.org/records/10628724\n",
"\n",
"In this notebook we will immediately refine this selection by correcting the parallaxes with the ``zpt`` code which implements the Lindegren et al. (2021) parallax correction:\n",
"\n",
"https://gitlab.com/icc-ub/public/gaiadr3_zeropoint\n",
"\n",
Expand All @@ -34,7 +36,7 @@
},
{
"cell_type": "markdown",
"id": "4ef487b1",
"id": "95a5c3e0",
"metadata": {},
"source": [
"## Correcting Gaia parallaxes"
Expand All @@ -43,28 +45,28 @@
{
"cell_type": "code",
"execution_count": 1,
"id": "6e92ec65",
"id": "ba5741e3",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 3.75 s, sys: 454 ms, total: 4.2 s\n",
"Wall time: 3.81 s\n"
"CPU times: user 3.68 s, sys: 427 ms, total: 4.11 s\n",
"Wall time: 3.84 s\n"
]
}
],
"source": [
"%%time\n",
"from astropy.table import Table\n",
"tAllRedClump_G14 = Table.read('rc14_04-result.fits.gz')"
"tAllRedClump_G14 = Table.read('rc14_04-result.fits.gz') # file available at https://zenodo.org/records/10628724"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "a6aa9cac",
"id": "b4a2f7d4",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -99,7 +101,7 @@
},
{
"cell_type": "markdown",
"id": "80785726",
"id": "3b5db677",
"metadata": {},
"source": [
"Recompute Gabs, and keep stars within 0.3 mag of the new value:"
Expand All @@ -108,7 +110,7 @@
{
"cell_type": "code",
"execution_count": 3,
"id": "1dfb9c3b",
"id": "223011e2",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -123,18 +125,18 @@
},
{
"cell_type": "markdown",
"id": "603a9fe9",
"id": "b02a803a",
"metadata": {},
"source": [
"## Sample of stars with good GSP-Spec abundances\n",
"\n",
"We used the combination of quality flags listed in Appendix B (Listing 3) of Gaia collaboration, Recio-Blanco et al. (2023A&A...674A..38G) to retrieve a list of stars with precise metallicities and alpha abundances obtained with the Gaia GSP-Spec pipeline. We downloaded this file locally:"
"We used the combination of quality flags listed in Appendix B (Listing 3) of Gaia collaboration, Recio-Blanco et al. (2023A&A...674A..38G) to retrieve a list of stars with precise metallicities and alpha abundances obtained with the Gaia GSP-Spec pipeline. We downloaded this file locally and performed the parallax correction. The resulting 420MB fits table `full_gradient_corrected_parallax.fits` can be downloaded from here: https://zenodo.org/records/10628724"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "b417a742",
"id": "cd4087be",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -149,7 +151,7 @@
},
{
"cell_type": "markdown",
"id": "5cf45f84",
"id": "54fe80b5",
"metadata": {},
"source": [
"We now add an even more stringent precision condition: we want abundances with a total error smaller than 0.1 dex."
Expand All @@ -158,7 +160,7 @@
{
"cell_type": "code",
"execution_count": 5,
"id": "5953bd37",
"id": "dea47c42",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -172,7 +174,7 @@
},
{
"cell_type": "markdown",
"id": "f3c5f2be",
"id": "bea510e3",
"metadata": {},
"source": [
"## Completeness of the good GSP-Spec red clump sample\n",
Expand All @@ -185,7 +187,7 @@
{
"cell_type": "code",
"execution_count": 6,
"id": "c555f9a3",
"id": "581bf48d",
"metadata": {},
"outputs": [
{
Expand All @@ -210,7 +212,7 @@
{
"cell_type": "code",
"execution_count": 7,
"id": "7fc7b4c0",
"id": "20d35259",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -270,7 +272,7 @@
},
{
"cell_type": "markdown",
"id": "e435370f",
"id": "6aa78645",
"metadata": {},
"source": [
"Only 2% of the sources are brighter than G=8, and 0.5% fainter than 13, so we bin them in those magnitude ranges:\n",
Expand All @@ -287,7 +289,7 @@
{
"cell_type": "code",
"execution_count": 8,
"id": "761932d5",
"id": "b0df9cdf",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -357,7 +359,7 @@
{
"cell_type": "code",
"execution_count": 9,
"id": "441a0597",
"id": "88cd51ee",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -426,7 +428,7 @@
},
{
"cell_type": "markdown",
"id": "6374361e",
"id": "7f172506",
"metadata": {},
"source": [
"Order 4 becomes too noisy over most of the sky. Example for one magnitude range:"
Expand All @@ -435,7 +437,7 @@
{
"cell_type": "code",
"execution_count": 10,
"id": "b6e22482",
"id": "70b76d3c",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -493,7 +495,7 @@
},
{
"cell_type": "markdown",
"id": "faa819e9",
"id": "ff6b7202",
"metadata": {},
"source": [
"We wrap all those precomputed maps into a function which takes coordinates and magnitude as input.\n",
Expand All @@ -504,7 +506,7 @@
{
"cell_type": "code",
"execution_count": 11,
"id": "bbade0f6",
"id": "e9630407",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -550,7 +552,7 @@
{
"cell_type": "code",
"execution_count": 12,
"id": "e8b70a0c",
"id": "93b8cd57",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -625,7 +627,7 @@
},
{
"cell_type": "markdown",
"id": "32ee16a8",
"id": "98a1854e",
"metadata": {},
"source": [
"# From S(l,b,G) to a selection function in positional space\n",
Expand All @@ -638,7 +640,7 @@
{
"cell_type": "code",
"execution_count": 13,
"id": "51d4b120",
"id": "bbe077bb",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -674,7 +676,7 @@
{
"cell_type": "code",
"execution_count": 14,
"id": "4f1f0c28",
"id": "9e526f89",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -875,7 +877,7 @@
},
{
"cell_type": "markdown",
"id": "5358137a",
"id": "c1d76645",
"metadata": {},
"source": [
"# The selection function also depends on metallicity\n",
Expand All @@ -886,7 +888,7 @@
{
"cell_type": "code",
"execution_count": 15,
"id": "9d2ba6e1",
"id": "2dd8abc3",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -991,7 +993,7 @@
},
{
"cell_type": "markdown",
"id": "0c4b0c85",
"id": "a1e87975",
"metadata": {},
"source": [
"We can also verify that in all metallicity groups, the faintest stars are distributed along the ridges of high Gaia scan rates:"
Expand All @@ -1000,7 +1002,7 @@
{
"cell_type": "code",
"execution_count": 16,
"id": "c324ef73",
"id": "a34eea9c",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1038,7 +1040,7 @@
},
{
"cell_type": "markdown",
"id": "0a6f020f",
"id": "7ad97f1b",
"metadata": {},
"source": [
"We tune the selection function for each metallicity range by computing the magnitude difference between their G-magn distribution peak and the peak of the overall sample.\n",
Expand All @@ -1049,7 +1051,7 @@
{
"cell_type": "code",
"execution_count": 17,
"id": "ff2806b3",
"id": "1c71955a",
"metadata": {},
"outputs": [
{
Expand All @@ -1068,7 +1070,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -1082,7 +1084,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.9"
"version": "3.7.6"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 6889414

Please sign in to comment.