Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue/635/Modify coordinate system implementation #649

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
2d5aa5b
issue/627/testskypixelcoords: New notebook to test coordinate system …
ts485 Jul 19, 2024
b2e53bd
added notebook to highlight issues$
marina-ricci Jul 30, 2024
d58bbb7
added example for delta_sigma
marina-ricci Jul 30, 2024
4cb5dcd
Warn wehn coordinate_system has not been set
caioolivv Oct 1, 2024
b63d4bf
Fix bug in _validate_coordinate_system
caioolivv Oct 3, 2024
2636448
Moved coordinate_system logic from GalaxyCluster objects to GCData ob…
caioolivv Oct 4, 2024
2097dc5
Merge branch 'main' into issue_#635_coordinate_implementation
caioolivv Oct 4, 2024
8892a02
Formatting
caioolivv Oct 4, 2024
842ddae
Formatting and linting
caioolivv Oct 4, 2024
d711560
Add option to update coordinate systems for a GalaxyCluster object
caioolivv Oct 11, 2024
6525850
Merge branch 'main' into issue_#635_coordinate_implementation
caioolivv Oct 15, 2024
d21562f
Fix import ordering
caioolivv Oct 15, 2024
6380316
Merge the two demo_coordinate_system notebooks into one and document …
caioolivv Oct 21, 2024
ac99bcc
Update doc configuration
caioolivv Oct 21, 2024
b378ed8
Fix path to data dir
caioolivv Oct 21, 2024
08fde7c
Merge branch 'main' into issue/635/coordinate_implementation
Nov 14, 2024
8d0d13d
Update demo_mock_cluster.ipynb to new coordinate_system framework
caioolivv Nov 19, 2024
4284e6b
Remove DC2 example and clean code
caioolivv Nov 19, 2024
7b9e9b8
Merge branch 'main' into issue/635/coordinate_implementation
Nov 19, 2024
ff02258
Add shapenoise, make histogram cleaner, add a comment about e_x chang…
caioolivv Nov 19, 2024
92a5364
Add coordinate_system to compute_tangential_and_cross_components docu…
caioolivv Nov 19, 2024
6f9f2be
fix merge conflicts
m-aguena Feb 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add shapenoise, make histogram cleaner, add a comment about e_x chang…
…ing sign and cleaning metadata
caioolivv committed Nov 19, 2024
commit ff02258949aeabecb77c9104f301aaf9d0c86411
68 changes: 42 additions & 26 deletions examples/demo_coordinate_system.ipynb
Original file line number Diff line number Diff line change
@@ -99,7 +99,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"id": "7c7b2a1a-e59e-4f8e-a415-d957af0b4b0f",
"metadata": {},
"outputs": [],
@@ -109,7 +109,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"id": "11263d57-3e76-4fe1-adbc-9e1299e6900e",
"metadata": {},
"outputs": [],
@@ -127,7 +127,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"id": "20841454-8b80-4b8b-adb9-c1f189f03c78",
"metadata": {},
"outputs": [],
@@ -145,7 +145,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"id": "bb8e1555-565e-40c3-8d76-b5039bf6043d",
"metadata": {},
"outputs": [],
@@ -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",
"}"
]
},
@@ -170,7 +171,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"id": "4db4311b-7947-4089-b092-d69de52bff69",
"metadata": {},
"outputs": [],
@@ -184,7 +185,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"id": "e51cb813-c077-4d94-878e-0387e1b21801",
"metadata": {},
"outputs": [],
@@ -314,7 +315,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": null,
"id": "353b4dbb-6239-4763-9125-d5d53b2f7d4e",
"metadata": {},
"outputs": [],
@@ -330,7 +331,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": null,
"id": "20c559a0-0ce2-411c-8d12-dbcb3fc42026",
"metadata": {},
"outputs": [],
@@ -346,7 +347,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": null,
"id": "a275df25",
"metadata": {},
"outputs": [],
@@ -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`."
]
},
{
@@ -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()"
]
},
@@ -705,7 +721,7 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": null,
"id": "2f61c348",
"metadata": {},
"outputs": [],
@@ -728,7 +744,7 @@
},
{
"cell_type": "code",
"execution_count": 37,
"execution_count": null,
"id": "8eb0581e",
"metadata": {},
"outputs": [],
@@ -780,7 +796,7 @@
},
{
"cell_type": "code",
"execution_count": 38,
"execution_count": null,
"id": "0f237ea0",
"metadata": {},
"outputs": [],
@@ -808,7 +824,7 @@
},
{
"cell_type": "code",
"execution_count": 39,
"execution_count": null,
"id": "2a8705d3",
"metadata": {},
"outputs": [],
@@ -827,7 +843,7 @@
},
{
"cell_type": "code",
"execution_count": 40,
"execution_count": null,
"id": "d76c9464",
"metadata": {},
"outputs": [],
@@ -944,7 +960,7 @@
},
{
"cell_type": "code",
"execution_count": 43,
"execution_count": null,
"id": "cba6862c",
"metadata": {},
"outputs": [],
@@ -971,7 +987,7 @@
},
{
"cell_type": "code",
"execution_count": 44,
"execution_count": null,
"id": "2657871a",
"metadata": {},
"outputs": [],