Skip to content

Commit

Permalink
Add shapenoise, make histogram cleaner, add a comment about e_x chang…
Browse files Browse the repository at this point in the history
…ing sign and cleaning metadata
  • Loading branch information
caioolivv committed Nov 19, 2024
1 parent 7b9e9b8 commit ff02258
Showing 1 changed file with 42 additions and 26 deletions.
68 changes: 42 additions & 26 deletions examples/demo_coordinate_system.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"id": "7c7b2a1a-e59e-4f8e-a415-d957af0b4b0f",
"metadata": {},
"outputs": [],
Expand All @@ -109,7 +109,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"id": "11263d57-3e76-4fe1-adbc-9e1299e6900e",
"metadata": {},
"outputs": [],
Expand All @@ -127,7 +127,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"id": "20841454-8b80-4b8b-adb9-c1f189f03c78",
"metadata": {},
"outputs": [],
Expand All @@ -145,7 +145,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"id": "bb8e1555-565e-40c3-8d76-b5039bf6043d",
"metadata": {},
"outputs": [],
Expand All @@ -157,6 +157,7 @@
" \"photoz_sigma_unscaled\": 0.05,\n",
" \"ngals\": 1000,\n",
" \"pz_bins\": np.linspace(0, 10, 1001),\n",
" \"shapenoise\": 0.05,\n",
"}"
]
},
Expand All @@ -170,7 +171,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"id": "4db4311b-7947-4089-b092-d69de52bff69",
"metadata": {},
"outputs": [],
Expand All @@ -184,7 +185,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"id": "e51cb813-c077-4d94-878e-0387e1b21801",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -314,7 +315,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": null,
"id": "353b4dbb-6239-4763-9125-d5d53b2f7d4e",
"metadata": {},
"outputs": [],
Expand All @@ -330,7 +331,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": null,
"id": "20c559a0-0ce2-411c-8d12-dbcb3fc42026",
"metadata": {},
"outputs": [],
Expand All @@ -346,7 +347,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": null,
"id": "a275df25",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -404,7 +405,7 @@
"id": "789c6e25",
"metadata": {},
"source": [
"We will now compute the tangential and cross components of the ellipticity for all three clusters. We should get the same result for `cl_euclidean` and `cl_celestial`, but a completely different dataset for `cl_wrong`."
"We will now compute the tangential and cross components of the ellipticity for all three clusters. We should get the same $e_t$ and a flipped sign $e_x$ for `cl_euclidean` and `cl_celestial`, but a completely different dataset for `cl_wrong`."
]
},
{
Expand Down Expand Up @@ -449,17 +450,32 @@
"source": [
"f, ax = plt.subplots(1, 2, figsize=(10, 4))\n",
"\n",
"ax[0].hist(cl_euclidean.galcat[\"et\"], bins=50, color=\"tab:blue\", alpha=0.5)\n",
"ax[0].hist(cl_celestial.galcat[\"et\"], bins=50, color=\"tab:red\", alpha=0.5)\n",
"ax[0].hist(cl_wrong.galcat[\"et\"], bins=50, color=\"tab:orange\", alpha=0.5)\n",
"ax[0].set_xlabel(\"$\\\\epsilon_t$\", fontsize=\"xx-large\")\n",
"\n",
"ax[1].hist(cl_euclidean.galcat[\"ex\"], bins=50, color=\"tab:blue\", alpha=0.5)\n",
"ax[1].hist(cl_celestial.galcat[\"ex\"], bins=50, color=\"tab:red\", alpha=0.5)\n",
"ax[1].hist(cl_wrong.galcat[\"ex\"], bins=50, color=\"tab:orange\", alpha=0.5)\n",
"ax[1].set_xlabel(\"$\\\\epsilon_x$\", fontsize=\"xx-large\")\n",
"ax[0].hist(cl_euclidean.galcat[\"et\"], bins=50, color=\"tab:blue\", alpha=0.5, label=\"euclidean\")\n",
"ax[0].hist(cl_celestial.galcat[\"et\"], bins=50, color=\"tab:red\", histtype=\"step\", label=\"celestial\")\n",
"ax[0].hist(\n",
" cl_wrong.galcat[\"et\"],\n",
" bins=50,\n",
" color=\"tab:orange\",\n",
" alpha=0.5,\n",
" histtype=\"stepfilled\",\n",
" label=\"incorrect coordinate system\",\n",
")\n",
"ax[0].set_xlabel(\"$\\epsilon_t$\", fontsize=\"xx-large\")\n",
"\n",
"ax[1].hist(cl_euclidean.galcat[\"ex\"], bins=50, color=\"tab:blue\", alpha=0.5, label=\"euclidean\")\n",
"ax[1].hist(cl_celestial.galcat[\"ex\"], bins=50, color=\"tab:red\", histtype=\"step\", label=\"celestial\")\n",
"ax[1].hist(\n",
" cl_wrong.galcat[\"ex\"],\n",
" bins=50,\n",
" color=\"tab:orange\",\n",
" alpha=0.5,\n",
" histtype=\"stepfilled\",\n",
" label=\"incorrect coordinate system\",\n",
")\n",
"ax[1].set_xlabel(\"$\\epsilon_x$\", fontsize=\"xx-large\")\n",
"ax[1].set_yscale(\"log\")\n",
"\n",
"plt.legend()\n",
"plt.show()"
]
},
Expand Down Expand Up @@ -705,7 +721,7 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": null,
"id": "2f61c348",
"metadata": {},
"outputs": [],
Expand All @@ -728,7 +744,7 @@
},
{
"cell_type": "code",
"execution_count": 37,
"execution_count": null,
"id": "8eb0581e",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -780,7 +796,7 @@
},
{
"cell_type": "code",
"execution_count": 38,
"execution_count": null,
"id": "0f237ea0",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -808,7 +824,7 @@
},
{
"cell_type": "code",
"execution_count": 39,
"execution_count": null,
"id": "2a8705d3",
"metadata": {},
"outputs": [],
Expand All @@ -827,7 +843,7 @@
},
{
"cell_type": "code",
"execution_count": 40,
"execution_count": null,
"id": "d76c9464",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -944,7 +960,7 @@
},
{
"cell_type": "code",
"execution_count": 43,
"execution_count": null,
"id": "cba6862c",
"metadata": {},
"outputs": [],
Expand All @@ -971,7 +987,7 @@
},
{
"cell_type": "code",
"execution_count": 44,
"execution_count": null,
"id": "2657871a",
"metadata": {},
"outputs": [],
Expand Down

0 comments on commit ff02258

Please sign in to comment.