Skip to content

Commit

Permalink
checking extragalatic and object cat tutorials are running
Browse files Browse the repository at this point in the history
  • Loading branch information
heather999 committed Feb 23, 2024
1 parent a2bbf21 commit e7a21f2
Show file tree
Hide file tree
Showing 7 changed files with 319 additions and 113 deletions.
35 changes: 26 additions & 9 deletions tutorials/extragalactic_gcr_cluster_colors.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"\n",
"Owners: **Dan Korytov [@dkorytov](https://github.com/LSSTDESC/DC2-analysis/issues/new?body=@dkorytov)**\n",
"\n",
"Last verified run: Nov 30, 2018 (by @yymao)\n",
"Last verified run: Feb 23, 2024 (by @heather999)\n",
"\n",
"This notebook demonstrates how to access the extra galactic catalog through the Generic Catalog Reader (GCR, https://github.com/yymao/generic-catalog-reader) as well as how filter on galaxy features and cluster membership.\n",
"\n",
Expand All @@ -21,13 +21,15 @@
"3. Select and plot cluster members\n",
"\n",
"\n",
"__Logistics__: This notebook is intended to be run through the JupyterHub NERSC interface available here: https://jupyter-dev.nersc.gov. To setup your NERSC environment, please follow the instructions available here: https://confluence.slac.stanford.edu/display/LSSTDESC/Using+Jupyter-dev+at+NERSC"
"__Logistics__: This notebook is intended to be run through the JupyterHub NERSC interface available here: https://jupyter.nersc.gov. To setup your NERSC environment, please follow the instructions available here: https://confluence.slac.stanford.edu/display/LSSTDESC/Using+Jupyter+at+NERSC"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import GCRCatalogs\n",
Expand All @@ -40,7 +42,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"gc = GCRCatalogs.load_catalog('cosmoDC2_v1.1.4_small')"
Expand All @@ -49,7 +53,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"data = gc.get_quantities(['halo_mass', 'redshift',\n",
Expand All @@ -73,7 +79,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"plt.figure()\n",
Expand All @@ -95,7 +103,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"plt.figure()\n",
Expand Down Expand Up @@ -124,6 +134,13 @@
"source": [
"After load the catalog and data, we are able to plot the color distribution as a function of redshift for cluster galaxies with very little effort!"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -142,9 +159,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.6"
"version": "3.10.13"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
39 changes: 29 additions & 10 deletions tutorials/extragalactic_gcr_cluster_members.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"\n",
"Owners: **Dan Korytov [@dkorytov](https://github.com/LSSTDESC/DC2-analysis/issues/new?body=@dkorytov)**, **Patricia Larsen**\n",
"\n",
"Last verified run: **Nov 30, 2018** by @yymao\n",
"Last verified run: **Feb 23, 2024** by @heather999\n",
"\n",
"This notebook demonstrates how to access the extra galactic catalog through the Generic Catalog Reader (GCR, https://github.com/yymao/generic-catalog-reader) as well as how filter on galaxy features and cluster membership.\n",
"\n",
Expand All @@ -24,13 +24,15 @@
"4. Plotting galaxy clustermembers positions on the sky as well as their comoving position in space.\n",
"\n",
"\n",
"__Logistics__: This notebook is intended to be run through the JupyterHub NERSC interface available here: https://jupyter-dev.nersc.gov. To setup your NERSC environment, please follow the instructions available here: https://confluence.slac.stanford.edu/display/LSSTDESC/Using+Jupyter-dev+at+NERSC"
"__Logistics__: This notebook is intended to be run through the JupyterHub NERSC interface available here: https://jupyter.nersc.gov. To setup your NERSC environment, please follow the instructions available here: https://confluence.slac.stanford.edu/display/LSSTDESC/Using+Jupyter+at+NERSC"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import GCRCatalogs\n",
Expand All @@ -57,7 +59,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"gc = GCRCatalogs.load_catalog('cosmoDC2_v1.1.4_small')"
Expand All @@ -66,7 +70,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"galaxy_data = gc.get_quantities(['ra', 'dec', 'mag_r', 'halo_id'], filters=['mag_r < 19'])\n",
Expand All @@ -89,7 +95,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"cluster_data = Table(cluster_data)\n",
Expand Down Expand Up @@ -126,7 +134,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"galaxy_data = gc.get_quantities(['ra', 'dec', 'mag_r', 'halo_id', 'position_x', 'position_y', 'velocity_x', 'velocity_y'], filters=['mag_r < 19'])\n",
Expand All @@ -137,7 +147,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"cluster_data = Table(cluster_data)\n",
Expand All @@ -161,6 +173,13 @@
" plt.colorbar(label='km/s')\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -179,9 +198,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.6"
"version": "3.10.13"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
41 changes: 31 additions & 10 deletions tutorials/extragalactic_gcr_mass_relations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"source": [
"# Extragalactic catalogs: mass relations\n",
"\n",
"> Notebook owner: Yao-Yuan Mao [@yymao](https://github.com/LSSTDESC/DC2-analysis/issues/new?body=@yymao). Last run: Nov 30, 2018\n",
"> Notebook owner: Yao-Yuan Mao [@yymao](https://github.com/LSSTDESC/DC2-analysis/issues/new?body=@yymao). Last run: Feb 23, 2024\n",
"\n",
"In this notebook we demostrate how to plot the halo mass-stellar mass relation and also the BH mass-bulge mass relation for the protoDC2/cosmoDC2 galaxy catalog.\n",
"\n",
Expand All @@ -19,7 +19,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import GCRCatalogs"
Expand All @@ -28,7 +30,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import numpy as np\n",
Expand All @@ -39,7 +43,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"gc = GCRCatalogs.load_catalog('cosmoDC2_v1.1.4_small')"
Expand All @@ -48,7 +54,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"# let's see what masses are availble \n",
Expand All @@ -65,7 +73,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"data = gc.get_quantities(['stellar_mass', 'halo_mass'], filters=['redshift < 0.2', 'is_central'])\n",
Expand All @@ -86,7 +96,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"data = gc.get_quantities(['stellar_mass', 'halo_mass'], filters=['redshift > 0.9', 'redshift < 1', 'is_central'])\n",
Expand All @@ -107,7 +119,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"data = gc.get_quantities(['stellar_mass_bulge', 'blackHoleMass'], filters=['redshift < 0.2', 'is_central'])\n",
Expand All @@ -116,6 +130,13 @@
"plt.xlabel(r'$\\log \\, {\\rm M}_{\\rm bulge} \\, / \\, {\\rm M}_\\odot$');\n",
"plt.ylabel(r'$\\log \\, {\\rm M}_{\\rm BH} \\, / \\, {\\rm M}_\\odot$');"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -134,9 +155,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.6"
"version": "3.10.13"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
Loading

0 comments on commit e7a21f2

Please sign in to comment.