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/627/testskypixelcoords: New notebook to test coordinate system effects with instructions to use example data #629

Merged
merged 61 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
ec3c8fc
feat: Add coordinate_system parameter to compute_tangential_and_cross…
caioolivv Jul 15, 2024
86972dc
Update documentation to account for new coordinate_system option
caioolivv Jul 15, 2024
10a6236
feat: Add coordinate_system conversion test to test_compute_lensing_a…
caioolivv Jul 15, 2024
a2d4989
Add coordinate_system conversion test to test_compute_lensing_angles_…
caioolivv Jul 15, 2024
fd3169b
Set coordinate_system option during creation of GalaxyCluster object
caioolivv Jul 15, 2024
9e8676f
adding a new notebook and data
ts485 Jul 16, 2024
3205ff2
test
ts485 Jul 16, 2024
ca81e1f
Merge main into issue/613/ellipticity_coord_system
caioolivv Jul 16, 2024
a215927
new notebook to test coordinate systems and shear measurements
ts485 Jul 16, 2024
7cae62e
Removed debuggin print in test_dataops.py
caioolivv Jul 16, 2024
e85db0b
editing README for the data availability
ts485 Jul 16, 2024
44422ec
moved tomomi's notebook to examples
cavestruz Jul 16, 2024
24a1470
added prelude to Tomomi's notebook
cavestruz Jul 16, 2024
a6e995a
Fixed typo and set default coordinate_system to "pixel"
caioolivv Jul 16, 2024
c950229
Added option to choose coordinate system for generated mock catalog
caioolivv Jul 16, 2024
9bdc6cd
Added ellipticity coordinate system conversion tests to test_galaxycl…
caioolivv Jul 16, 2024
b1245d5
Added documentation to other test cases in Tomomi's notebook. Still …
cavestruz Jul 16, 2024
479f74a
Fixed formatting
caioolivv Jul 16, 2024
134e65d
starting to work through and document example of lensing signal calcu…
cavestruz Jul 16, 2024
b335218
Finished baseline documentation, including changing colossus cosmolog…
cavestruz Jul 16, 2024
0faa78e
minor change to clarify sections of notebook
cavestruz Jul 16, 2024
1452a3a
added kwargs to GalaxyCluster instance definition in preparation for …
cavestruz Jul 16, 2024
4a1faa6
Updated logic for lensing angle conversion between coordinate systems…
caioolivv Jul 16, 2024
5493cce
Revert "Updated logic for lensing angle conversion between coordinate…
caioolivv Jul 17, 2024
2718680
Added coordinate_system validation and extra tests
caioolivv Jul 17, 2024
d36a771
Changed example notebook to document new coordinate_system option
caioolivv Jul 17, 2024
5dd87bb
examples/test_coordinate.ipynb has additional minor markdown detail
cavestruz Jul 18, 2024
94f8b9d
merged non notebook files from Caio's branch so I can use the coordin…
cavestruz Jul 18, 2024
d408582
test_coordinate.ipynb now runs from top to bottom using Caio's coordi…
cavestruz Jul 18, 2024
a64de00
adding additional docstrings to Tomomi's from-scratch calculation of …
cavestruz Jul 18, 2024
24b7e6f
refactoring code into functions to make loop over cluster lenses mor…
cavestruz Jul 18, 2024
4f753c2
made additional refactoring changes, but refactored functions to calc…
cavestruz Jul 18, 2024
74f559f
some of the refactoring incorporated with pre-broken code
cavestruz Jul 18, 2024
79228d4
cleaned up the loop over rbins
cavestruz Jul 18, 2024
8447b5d
In line comments for portions of calculation
cavestruz Jul 18, 2024
67bd568
modified reverted commit to when the functions did not break, added i…
cavestruz Jul 18, 2024
b46d38d
merged fix from other branch with edits from previous commit
cavestruz Jul 18, 2024
695ee70
renamed the notebook for consistency
cavestruz Jul 18, 2024
1885701
docs/doc-config.ini now includes the demo_coordinate_system notebook
cavestruz Jul 18, 2024
cf9e80c
feat: Add coordinate_system parameter to compute_tangential_and_cross…
caioolivv Jul 18, 2024
f790e37
merged main
cavestruz Jul 18, 2024
844e548
removed a character in a markdown cell that tests complained about in…
cavestruz Jul 18, 2024
40555d9
pulled with rebase of main
cavestruz Jul 18, 2024
31cde03
merged main again(?)
cavestruz Jul 18, 2024
18778f4
swapped pixel/euclidean and sky/celestial in notebook
cavestruz Jul 18, 2024
bf94e9d
pulled from main
cavestruz Jul 18, 2024
2e150b8
merged main from point where Caio's PR got merged to main
cavestruz Jul 18, 2024
3845e85
reverted two files to try to match main
cavestruz Jul 18, 2024
ffa22da
removed outputs in the notebook
cavestruz Jul 18, 2024
35b2a2a
removed OTHER notebook outputs
cavestruz Jul 18, 2024
018d4ac
remove empty cells in notebooks
cavestruz Jul 18, 2024
7fe44dc
made minor edits in response to review, primarily with generalizing f…
cavestruz Jul 19, 2024
18325ff
incorporating original demo_mock_cluster.ipynb from main to remove ch…
cavestruz Jul 19, 2024
17fc2bf
modified the Oguri example to also show incorrect coordinate assumpti…
cavestruz Jul 19, 2024
2e5fb9b
got rid of dollar signs inside markdown code snippet env hoping this …
cavestruz Jul 19, 2024
0dec185
added review contributions line :-)
cavestruz Jul 19, 2024
b1e9c72
added a note for the CosmoDC2 clusters so the user is aware to not ne…
cavestruz Jul 19, 2024
328994e
removed extra cell at end
cavestruz Jul 19, 2024
325f83f
removed rogue savefig
cavestruz Jul 19, 2024
6953dbf
clarified why there might be less signal in the TXPipe outputted Cosm…
cavestruz Jul 19, 2024
c87d95a
Formatted demo_coordinate_system_datasets.ipynb notebook
caioolivv Jul 19, 2024
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# CLMM
[![Build and Check](https://github.com/LSSTDESC/CLMM/workflows/Build%20and%20Check/badge.svg)](https://github.com/LSSTDESC/CLMM/actions?query=workflow%3A%22Build+and+Check%22)
[![Coverage Status](https://coveralls.io/repos/github/LSSTDESC/CLMM/badge.svg?branch=main)](https://coveralls.io/github/LSSTDESC/CLMM?branch=main)
Expand Down Expand Up @@ -110,6 +109,7 @@ the `CCL` publication be cited. See details
The `Cluster Toolkit` documentation can be found
[here](https://cluster-toolkit.readthedocs.io/en/latest/#).

The data for the notebook test_coordinate.ipynb is available at https://www.dropbox.com/scl/fo/dwsccslr5iwb7lnkf8jvx/AJkjgFeemUEHpHaZaHHqpAg?rlkey=efbtsr15mdrs3y6xsm7l48o0r&st=xb58ap0g&dl=0

# Contributing to CLMM <a name="contributing"></a>

Expand Down
1 change: 1 addition & 0 deletions docs/doc-config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ OTHER
../examples/demo_compute_deltasigma_weights.ipynb
../examples/demo_mass_conversion.ipynb
../examples/demo_mock_ensemble_realistic.ipynb
../examples/demo_coordinate_system_datasets.ipynb
#../examples/other_compare_NFW_critical_massdef.ipynb
#../examples/other_flat_sky_limitations.ipynb
4 changes: 2 additions & 2 deletions examples/DC2/DC2_gt_profiles.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -614,7 +614,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.1"
"version": "3.9.0"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion examples/DC2/data_and_model_demo_DC2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.1"
"version": "3.6.9"
}
},
"nbformat": 4,
Expand Down
34 changes: 2 additions & 32 deletions examples/demo_boost_factors.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"cells": [
{
"cell_type": "markdown",
"id": "b803f8e6",
"metadata": {},
"source": [
"# Boost factors"
Expand All @@ -11,7 +10,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "7180b199",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -26,7 +24,6 @@
},
{
"cell_type": "markdown",
"id": "11e76008",
"metadata": {},
"source": [
"Make sure we know which version we're using"
Expand All @@ -35,7 +32,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "389d5ab7",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -44,7 +40,6 @@
},
{
"cell_type": "markdown",
"id": "d86fa53c",
"metadata": {},
"source": [
"### Define cosmology object"
Expand All @@ -53,7 +48,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "74bcb35c",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -62,15 +56,13 @@
},
{
"cell_type": "markdown",
"id": "6b458081",
"metadata": {},
"source": [
"First, we want to generate a $\\Delta\\Sigma$ (excess surface density) profile from mock data, to which we can apply boost factors. The mock data is generated in the following cells."
]
},
{
"cell_type": "markdown",
"id": "de5340ee",
"metadata": {},
"source": [
"Generate cluster object from mock data"
Expand All @@ -79,7 +71,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "6cec7b64",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -107,7 +98,6 @@
},
{
"cell_type": "markdown",
"id": "50045a1f",
"metadata": {},
"source": [
"Loading this into a CLMM cluster object centered on (0,0)"
Expand All @@ -116,7 +106,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "a564b1c9",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -127,7 +116,6 @@
},
{
"cell_type": "markdown",
"id": "eb9c2218",
"metadata": {},
"source": [
"Compute cross and tangential excess surface density for each source galaxy"
Expand All @@ -136,7 +124,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "bc5b051d",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -154,7 +141,6 @@
},
{
"cell_type": "markdown",
"id": "26081451",
"metadata": {},
"source": [
"Calculate the binned profile"
Expand All @@ -163,7 +149,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "eaadac01",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -190,7 +175,6 @@
},
{
"cell_type": "markdown",
"id": "7e88afc4",
"metadata": {},
"source": [
"Plot the $\\Delta\\Sigma$ profile"
Expand All @@ -199,7 +183,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "0aeb2f52",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -219,15 +202,13 @@
},
{
"cell_type": "markdown",
"id": "e28ec4c5",
"metadata": {},
"source": [
"## Boost Factors"
]
},
{
"cell_type": "markdown",
"id": "19912d42",
"metadata": {},
"source": [
"CLMM offers two boost models, the NFW boost model, and a powerlaw boost model. \n",
Expand All @@ -242,7 +223,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "e6b6ee3d",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -255,7 +235,6 @@
},
{
"cell_type": "markdown",
"id": "58cbc299",
"metadata": {},
"source": [
"Plot the two boost factors, $B(R)$"
Expand All @@ -264,7 +243,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "1c1de291",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -278,7 +256,6 @@
},
{
"cell_type": "markdown",
"id": "30e8e6a0",
"metadata": {},
"source": [
"The $\\Delta\\Sigma$ profiles can be corrected with the boost factor using `correct_sigma_with_boost_values` or `correct_sigma_with_boost_model`. \n",
Expand All @@ -289,7 +266,6 @@
},
{
"cell_type": "markdown",
"id": "6c4daf84",
"metadata": {},
"source": [
"\n",
Expand All @@ -309,7 +285,6 @@
},
{
"cell_type": "markdown",
"id": "48e0f2ef",
"metadata": {},
"source": [
"First we will apply the boost factor with `correct_sigma_with_boost_values`"
Expand All @@ -318,7 +293,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d7b5f71d",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -332,7 +306,6 @@
},
{
"cell_type": "markdown",
"id": "15252880",
"metadata": {},
"source": [
"Plot the result"
Expand All @@ -341,7 +314,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "e2d90e0c",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -380,7 +352,6 @@
},
{
"cell_type": "markdown",
"id": "caf00c95",
"metadata": {},
"source": [
"Now the same again but with `correct_sigma_with_boost_model`"
Expand All @@ -389,7 +360,6 @@
{
"cell_type": "code",
"execution_count": null,
"id": "b4b3f953",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -440,7 +410,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -454,7 +424,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.8"
"version": "3.6.9"
}
},
"nbformat": 4,
Expand Down
Loading