glass.ext.extend 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- glass_ext_extend-0.1.0/.github/workflows/release.yml +16 -0
- glass_ext_extend-0.1.0/.gitignore +11 -0
- glass_ext_extend-0.1.0/.python-version +1 -0
- glass_ext_extend-0.1.0/.readthedocs.yml +8 -0
- glass_ext_extend-0.1.0/LICENSE.txt +21 -0
- glass_ext_extend-0.1.0/PKG-INFO +130 -0
- glass_ext_extend-0.1.0/README.md +96 -0
- glass_ext_extend-0.1.0/docs/Makefile +20 -0
- glass_ext_extend-0.1.0/docs/_static/android-chrome-192x192.png +0 -0
- glass_ext_extend-0.1.0/docs/_static/android-chrome-512x512.png +0 -0
- glass_ext_extend-0.1.0/docs/_static/apple-touch-icon.png +0 -0
- glass_ext_extend-0.1.0/docs/_static/favicon-16x16.png +0 -0
- glass_ext_extend-0.1.0/docs/_static/favicon-32x32.png +0 -0
- glass_ext_extend-0.1.0/docs/_static/favicon.ico +0 -0
- glass_ext_extend-0.1.0/docs/_static/logo.png +0 -0
- glass_ext_extend-0.1.0/docs/conf.py +90 -0
- glass_ext_extend-0.1.0/docs/index.rst +27 -0
- glass_ext_extend-0.1.0/docs/make.bat +35 -0
- glass_ext_extend-0.1.0/docs/usage.rst +98 -0
- glass_ext_extend-0.1.0/glass/ext/extend/__init__.py +16 -0
- glass_ext_extend-0.1.0/glass/ext/extend/cli.py +169 -0
- glass_ext_extend-0.1.0/glass/ext/extend/corrections.py +121 -0
- glass_ext_extend-0.1.0/glass/ext/extend/loaders/__init__.py +0 -0
- glass_ext_extend-0.1.0/glass/ext/extend/loaders/agora.py +613 -0
- glass_ext_extend-0.1.0/glass/ext/extend/loaders/cosmogrid.py +384 -0
- glass_ext_extend-0.1.0/glass/ext/extend/loaders/gowerstreet.py +432 -0
- glass_ext_extend-0.1.0/glass/ext/extend/loaders/gowerstreet2.py +448 -0
- glass_ext_extend-0.1.0/glass/ext/extend/paths.py +31 -0
- glass_ext_extend-0.1.0/glass/ext/extend/pilotfig.py +370 -0
- glass_ext_extend-0.1.0/glass/ext/extend/produce.py +865 -0
- glass_ext_extend-0.1.0/glass/ext/extend/sampler.py +236 -0
- glass_ext_extend-0.1.0/glass/ext/extend/theory.py +79 -0
- glass_ext_extend-0.1.0/glass/ext/extend/validate.py +923 -0
- glass_ext_extend-0.1.0/hooks/pre-commit +23 -0
- glass_ext_extend-0.1.0/pyproject.toml +67 -0
- glass_ext_extend-0.1.0/requirements.txt +18 -0
- glass_ext_extend-0.1.0/tests/_reference_loop.py +121 -0
- glass_ext_extend-0.1.0/tests/data_paths.py +34 -0
- glass_ext_extend-0.1.0/tests/test_cli.py +118 -0
- glass_ext_extend-0.1.0/tests/test_guards.py +129 -0
- glass_ext_extend-0.1.0/tests/test_loaders.py +86 -0
- glass_ext_extend-0.1.0/tests/test_loaders_agora.py +588 -0
- glass_ext_extend-0.1.0/tests/test_loaders_cosmogrid.py +275 -0
- glass_ext_extend-0.1.0/tests/test_loaders_gowerstreet2.py +322 -0
- glass_ext_extend-0.1.0/tests/test_paths.py +31 -0
- glass_ext_extend-0.1.0/tests/test_pilotfig.py +42 -0
- glass_ext_extend-0.1.0/tests/test_produce_z_max_base.py +141 -0
- glass_ext_extend-0.1.0/tests/test_quad_convention.py +72 -0
- glass_ext_extend-0.1.0/tests/test_regressions.py +147 -0
- glass_ext_extend-0.1.0/tests/test_sampler.py +64 -0
- glass_ext_extend-0.1.0/tests/test_sampler_core.py +98 -0
- glass_ext_extend-0.1.0/tests/test_sampler_vectorised.py +88 -0
- glass_ext_extend-0.1.0/tests/test_theory.py +43 -0
- glass_ext_extend-0.1.0/tests/test_theory_inputs.py +162 -0
- glass_ext_extend-0.1.0/tests/test_theory_inputs_gowerstreet2.py +127 -0
- glass_ext_extend-0.1.0/tests/test_validate_agora.py +219 -0
- glass_ext_extend-0.1.0/uv.lock +1167 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
on:
|
|
3
|
+
release:
|
|
4
|
+
types:
|
|
5
|
+
- published
|
|
6
|
+
jobs:
|
|
7
|
+
publish:
|
|
8
|
+
name: Publish on PyPI
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
id-token: write
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v5
|
|
15
|
+
- run: pipx run build
|
|
16
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13.1
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Lorenzo Fusari
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: glass.ext.extend
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: GLASS extension for continuing lightcone simulations to higher redshift
|
|
5
|
+
Project-URL: Homepage, https://github.com/glass-dev/glass.ext.extend
|
|
6
|
+
Project-URL: Issues, https://github.com/glass-dev/glass.ext.extend/issues
|
|
7
|
+
Author: Lorenzo Fusari
|
|
8
|
+
License: MIT License
|
|
9
|
+
License-File: LICENSE.txt
|
|
10
|
+
Keywords: CMB lensing,cosmology,lightcone,lognormal,simulations
|
|
11
|
+
Classifier: Intended Audience :: Science/Research
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Topic :: Scientific/Engineering :: Astronomy
|
|
16
|
+
Requires-Python: >=3.11
|
|
17
|
+
Requires-Dist: camb==1.5.9
|
|
18
|
+
Requires-Dist: classy==3.3.4.0
|
|
19
|
+
Requires-Dist: cosmology-compat-camb==0.2.0
|
|
20
|
+
Requires-Dist: gaussiancl==2023.1.post0
|
|
21
|
+
Requires-Dist: glass-ext-camb==2023.6
|
|
22
|
+
Requires-Dist: glass-ext-pkdgrav==0.4
|
|
23
|
+
Requires-Dist: glass==2026.4
|
|
24
|
+
Requires-Dist: h5py==3.15.1
|
|
25
|
+
Requires-Dist: healpy==1.20.1
|
|
26
|
+
Requires-Dist: matplotlib==3.10.1
|
|
27
|
+
Requires-Dist: numpy==2.2.4
|
|
28
|
+
Requires-Dist: pyyaml==6.0.2
|
|
29
|
+
Requires-Dist: scipy==1.15.2
|
|
30
|
+
Requires-Dist: transformcl==2026.1
|
|
31
|
+
Provides-Extra: test
|
|
32
|
+
Requires-Dist: pytest; extra == 'test'
|
|
33
|
+
Description-Content-Type: text/markdown
|
|
34
|
+
|
|
35
|
+
# GLASS extension for continuing lightcone simulations to higher redshift
|
|
36
|
+
|
|
37
|
+
This repository contains a GLASS extension that extends an N-body lightcone
|
|
38
|
+
simulation to higher redshift. New matter shells are drawn beyond the last
|
|
39
|
+
simulated shell, conditional on the shells before them, so that structure stays
|
|
40
|
+
correlated across the boundary. With the shells extended to the last scattering
|
|
41
|
+
surface, the extension makes a full-sky CMB lensing convergence map.
|
|
42
|
+
|
|
43
|
+
The method is described in *Conditional random field sampling for high-redshift
|
|
44
|
+
extensions of lightcone simulations with application to CMB lensing* (Fusari,
|
|
45
|
+
Jeffrey & Joachimi, in prep).
|
|
46
|
+
|
|
47
|
+
## Installation
|
|
48
|
+
|
|
49
|
+
Install the package with pip into a new environment:
|
|
50
|
+
|
|
51
|
+
pip install glass.ext.extend
|
|
52
|
+
|
|
53
|
+
The dependencies are pinned to the versions the results of the paper were
|
|
54
|
+
produced with, so a map can be reproduced bit for bit from its seed.
|
|
55
|
+
|
|
56
|
+
## Supported simulations
|
|
57
|
+
|
|
58
|
+
The extension reads a simulation through a loader. It does not detect the kind
|
|
59
|
+
of simulation from the directory, so name the loader with `--suite`:
|
|
60
|
+
|
|
61
|
+
| `--suite` | Simulation |
|
|
62
|
+
|---------------|-------------------------------------|
|
|
63
|
+
| `gowerstreet` | Gower Street simulations (PKDGRAV3) |
|
|
64
|
+
| `cosmogrid` | CosmoGridV1 |
|
|
65
|
+
| `agora` | Agora |
|
|
66
|
+
|
|
67
|
+
If your simulation is not in the list, you can write a loader for it. A loader
|
|
68
|
+
tells the extension where the matter shells are, what their redshift edges are
|
|
69
|
+
and what the cosmology of the simulation is. The modules in
|
|
70
|
+
`glass/ext/extend/loaders/` are the examples to start from. Please contribute
|
|
71
|
+
your loader back with a pull request.
|
|
72
|
+
|
|
73
|
+
## Quick start
|
|
74
|
+
|
|
75
|
+
Point the `glass-extend` command to a simulation directory, on your computer or
|
|
76
|
+
on your cluster, and name its loader. For a Gower Street simulation:
|
|
77
|
+
|
|
78
|
+
glass-extend --suite gowerstreet --sim /path/to/GowerStreetSims/sim00230
|
|
79
|
+
|
|
80
|
+
This reads the matter shells of the simulation up to redshift 2, generates the
|
|
81
|
+
shells from there to redshift 1100, and writes the CMB lensing convergence map
|
|
82
|
+
as a HEALPix FITS file:
|
|
83
|
+
|
|
84
|
+
production_runs/gowerstreet_grid_2048_dchi400_sh100_sim00230/kappa_map_0000.fits
|
|
85
|
+
|
|
86
|
+
It then compares the power spectrum of the map with theory and writes the
|
|
87
|
+
figures next to the map. Outputs go under the directory the command is run
|
|
88
|
+
from.
|
|
89
|
+
|
|
90
|
+
## Changing the settings
|
|
91
|
+
|
|
92
|
+
The defaults are the settings of the paper. The main ones can be changed on the
|
|
93
|
+
command line:
|
|
94
|
+
|
|
95
|
+
glass-extend --suite gowerstreet --sim /path/to/GowerStreetSims/sim00230 \
|
|
96
|
+
--nside 1024 --num-shells 50 --delta-chi 300 --shift 1.0
|
|
97
|
+
|
|
98
|
+
- `--nside`: resolution of the shells and of the map (default 2048);
|
|
99
|
+
- `--num-shells`: number of generated shells between the simulation and
|
|
100
|
+
redshift 1100 (default 100);
|
|
101
|
+
- `--delta-chi`: how far back the shells that condition each new shell reach,
|
|
102
|
+
in Mpc/h (default 400);
|
|
103
|
+
- `--shift`: shift of the lognormal distribution of the generated shells
|
|
104
|
+
(default 1, the GLASS default). At a fixed variance a smaller shift gives a
|
|
105
|
+
more skewed matter distribution. The shift must be larger than minus the
|
|
106
|
+
lowest density contrast in the simulation shells, and the command stops with
|
|
107
|
+
a message if it is not.
|
|
108
|
+
|
|
109
|
+
`glass-extend --help` lists all options.
|
|
110
|
+
|
|
111
|
+
## Changing the boundary redshift
|
|
112
|
+
|
|
113
|
+
By default the simulation is used up to redshift 2 and extended from there. To
|
|
114
|
+
use the simulation up to another redshift, run the production step on its own
|
|
115
|
+
and give the boundary with `--z-max-base`:
|
|
116
|
+
|
|
117
|
+
glass-extend-produce --suite gowerstreet \
|
|
118
|
+
--sim-dir /path/to/GowerStreetSims/sim00230 --z-max-base 3
|
|
119
|
+
|
|
120
|
+
The number of generated shells stays the same, so each of them is thinner for a
|
|
121
|
+
higher boundary. `glass-extend-produce` writes the map only. To compare an
|
|
122
|
+
existing map with theory, run `glass-extend-validate --input` on its output
|
|
123
|
+
directory.
|
|
124
|
+
|
|
125
|
+
## Tests
|
|
126
|
+
|
|
127
|
+
pip install pytest
|
|
128
|
+
pytest
|
|
129
|
+
|
|
130
|
+
Tests that need simulation data are skipped when the data is absent.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# GLASS extension for continuing lightcone simulations to higher redshift
|
|
2
|
+
|
|
3
|
+
This repository contains a GLASS extension that extends an N-body lightcone
|
|
4
|
+
simulation to higher redshift. New matter shells are drawn beyond the last
|
|
5
|
+
simulated shell, conditional on the shells before them, so that structure stays
|
|
6
|
+
correlated across the boundary. With the shells extended to the last scattering
|
|
7
|
+
surface, the extension makes a full-sky CMB lensing convergence map.
|
|
8
|
+
|
|
9
|
+
The method is described in *Conditional random field sampling for high-redshift
|
|
10
|
+
extensions of lightcone simulations with application to CMB lensing* (Fusari,
|
|
11
|
+
Jeffrey & Joachimi, in prep).
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
Install the package with pip into a new environment:
|
|
16
|
+
|
|
17
|
+
pip install glass.ext.extend
|
|
18
|
+
|
|
19
|
+
The dependencies are pinned to the versions the results of the paper were
|
|
20
|
+
produced with, so a map can be reproduced bit for bit from its seed.
|
|
21
|
+
|
|
22
|
+
## Supported simulations
|
|
23
|
+
|
|
24
|
+
The extension reads a simulation through a loader. It does not detect the kind
|
|
25
|
+
of simulation from the directory, so name the loader with `--suite`:
|
|
26
|
+
|
|
27
|
+
| `--suite` | Simulation |
|
|
28
|
+
|---------------|-------------------------------------|
|
|
29
|
+
| `gowerstreet` | Gower Street simulations (PKDGRAV3) |
|
|
30
|
+
| `cosmogrid` | CosmoGridV1 |
|
|
31
|
+
| `agora` | Agora |
|
|
32
|
+
|
|
33
|
+
If your simulation is not in the list, you can write a loader for it. A loader
|
|
34
|
+
tells the extension where the matter shells are, what their redshift edges are
|
|
35
|
+
and what the cosmology of the simulation is. The modules in
|
|
36
|
+
`glass/ext/extend/loaders/` are the examples to start from. Please contribute
|
|
37
|
+
your loader back with a pull request.
|
|
38
|
+
|
|
39
|
+
## Quick start
|
|
40
|
+
|
|
41
|
+
Point the `glass-extend` command to a simulation directory, on your computer or
|
|
42
|
+
on your cluster, and name its loader. For a Gower Street simulation:
|
|
43
|
+
|
|
44
|
+
glass-extend --suite gowerstreet --sim /path/to/GowerStreetSims/sim00230
|
|
45
|
+
|
|
46
|
+
This reads the matter shells of the simulation up to redshift 2, generates the
|
|
47
|
+
shells from there to redshift 1100, and writes the CMB lensing convergence map
|
|
48
|
+
as a HEALPix FITS file:
|
|
49
|
+
|
|
50
|
+
production_runs/gowerstreet_grid_2048_dchi400_sh100_sim00230/kappa_map_0000.fits
|
|
51
|
+
|
|
52
|
+
It then compares the power spectrum of the map with theory and writes the
|
|
53
|
+
figures next to the map. Outputs go under the directory the command is run
|
|
54
|
+
from.
|
|
55
|
+
|
|
56
|
+
## Changing the settings
|
|
57
|
+
|
|
58
|
+
The defaults are the settings of the paper. The main ones can be changed on the
|
|
59
|
+
command line:
|
|
60
|
+
|
|
61
|
+
glass-extend --suite gowerstreet --sim /path/to/GowerStreetSims/sim00230 \
|
|
62
|
+
--nside 1024 --num-shells 50 --delta-chi 300 --shift 1.0
|
|
63
|
+
|
|
64
|
+
- `--nside`: resolution of the shells and of the map (default 2048);
|
|
65
|
+
- `--num-shells`: number of generated shells between the simulation and
|
|
66
|
+
redshift 1100 (default 100);
|
|
67
|
+
- `--delta-chi`: how far back the shells that condition each new shell reach,
|
|
68
|
+
in Mpc/h (default 400);
|
|
69
|
+
- `--shift`: shift of the lognormal distribution of the generated shells
|
|
70
|
+
(default 1, the GLASS default). At a fixed variance a smaller shift gives a
|
|
71
|
+
more skewed matter distribution. The shift must be larger than minus the
|
|
72
|
+
lowest density contrast in the simulation shells, and the command stops with
|
|
73
|
+
a message if it is not.
|
|
74
|
+
|
|
75
|
+
`glass-extend --help` lists all options.
|
|
76
|
+
|
|
77
|
+
## Changing the boundary redshift
|
|
78
|
+
|
|
79
|
+
By default the simulation is used up to redshift 2 and extended from there. To
|
|
80
|
+
use the simulation up to another redshift, run the production step on its own
|
|
81
|
+
and give the boundary with `--z-max-base`:
|
|
82
|
+
|
|
83
|
+
glass-extend-produce --suite gowerstreet \
|
|
84
|
+
--sim-dir /path/to/GowerStreetSims/sim00230 --z-max-base 3
|
|
85
|
+
|
|
86
|
+
The number of generated shells stays the same, so each of them is thinner for a
|
|
87
|
+
higher boundary. `glass-extend-produce` writes the map only. To compare an
|
|
88
|
+
existing map with theory, run `glass-extend-validate --input` on its output
|
|
89
|
+
directory.
|
|
90
|
+
|
|
91
|
+
## Tests
|
|
92
|
+
|
|
93
|
+
pip install pytest
|
|
94
|
+
pytest
|
|
95
|
+
|
|
96
|
+
Tests that need simulation data are skipped when the data is absent.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Minimal makefile for Sphinx documentation
|
|
2
|
+
#
|
|
3
|
+
|
|
4
|
+
# You can set these variables from the command line, and also
|
|
5
|
+
# from the environment for the first two.
|
|
6
|
+
SPHINXOPTS ?=
|
|
7
|
+
SPHINXBUILD ?= sphinx-build
|
|
8
|
+
SOURCEDIR = .
|
|
9
|
+
BUILDDIR = _build
|
|
10
|
+
|
|
11
|
+
# Put it first so that "make" without argument is like "make help".
|
|
12
|
+
help:
|
|
13
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
14
|
+
|
|
15
|
+
.PHONY: help Makefile
|
|
16
|
+
|
|
17
|
+
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
18
|
+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
19
|
+
%: Makefile
|
|
20
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Configuration file for the Sphinx documentation builder.
|
|
2
|
+
#
|
|
3
|
+
# This file only contains a selection of the most common options. For a full
|
|
4
|
+
# list see the documentation:
|
|
5
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
6
|
+
|
|
7
|
+
# -- Path setup --------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
# If extensions (or modules to document with autodoc) are in another directory,
|
|
10
|
+
# add these directories to sys.path here. If the directory is relative to the
|
|
11
|
+
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
12
|
+
#
|
|
13
|
+
#import os
|
|
14
|
+
#import sys
|
|
15
|
+
#sys.path.insert(0, os.path.abspath('..'))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# -- Project information -----------------------------------------------------
|
|
19
|
+
|
|
20
|
+
project = 'glass.ext.extend'
|
|
21
|
+
copyright = '2026, Lorenzo Fusari'
|
|
22
|
+
author = 'Lorenzo Fusari'
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# -- General configuration ---------------------------------------------------
|
|
26
|
+
|
|
27
|
+
# Add any Sphinx extension module names here, as strings. They can be
|
|
28
|
+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
29
|
+
# ones.
|
|
30
|
+
extensions = [
|
|
31
|
+
'numpydoc',
|
|
32
|
+
'sphinx.ext.intersphinx',
|
|
33
|
+
'sphinxcontrib.katex',
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
# Add any paths that contain templates here, relative to this directory.
|
|
37
|
+
templates_path = ['_templates']
|
|
38
|
+
|
|
39
|
+
# List of patterns, relative to source directory, that match files and
|
|
40
|
+
# directories to ignore when looking for source files.
|
|
41
|
+
# This pattern also affects html_static_path and html_extra_path.
|
|
42
|
+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
# -- Options for HTML output -------------------------------------------------
|
|
46
|
+
|
|
47
|
+
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
48
|
+
# a list of builtin themes.
|
|
49
|
+
#
|
|
50
|
+
html_theme = 'furo'
|
|
51
|
+
|
|
52
|
+
# Add any paths that contain custom static files (such as style sheets) here,
|
|
53
|
+
# relative to this directory. They are copied after the builtin static files,
|
|
54
|
+
# so a file named "default.css" will overwrite the builtin "default.css".
|
|
55
|
+
html_static_path = ['_static']
|
|
56
|
+
|
|
57
|
+
html_logo = '_static/logo.png'
|
|
58
|
+
|
|
59
|
+
html_favicon = '_static/favicon.ico'
|
|
60
|
+
|
|
61
|
+
html_theme_options = {
|
|
62
|
+
'footer_icons': [
|
|
63
|
+
{
|
|
64
|
+
'name': 'Documentation',
|
|
65
|
+
'url': 'https://glass.readthedocs.io',
|
|
66
|
+
'html': '<svg xmlns="http://www.w3.org/2000/svg" stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M575.8 255.5c0 18-15 32.1-32 32.1h-32l.7 160.2c0 2.7-.2 5.4-.5 8.1V472c0 22.1-17.9 40-40 40H456c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1H416 392c-22.1 0-40-17.9-40-40V448 384c0-17.7-14.3-32-32-32H256c-17.7 0-32 14.3-32 32v64 24c0 22.1-17.9 40-40 40H160 128.1c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2H104c-22.1 0-40-17.9-40-40V360c0-.9 0-1.9 .1-2.8V287.6H32c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"/></svg>',
|
|
67
|
+
'class': '',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
'name': 'GitHub',
|
|
71
|
+
'url': 'https://github.com/glass-dev/glass.ext.extend',
|
|
72
|
+
'html': '<svg xmlns="http://www.w3.org/2000/svg" stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 496 512"><!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg>',
|
|
73
|
+
'class': '',
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
html_css_files = [
|
|
79
|
+
]
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
# -- Intersphinx -------------------------------------------------------------
|
|
83
|
+
|
|
84
|
+
# This config value contains the locations and names of other projects that
|
|
85
|
+
# should be linked to in this documentation.
|
|
86
|
+
intersphinx_mapping = {
|
|
87
|
+
'python': ('https://docs.python.org/3', None),
|
|
88
|
+
'numpy': ('https://numpy.org/doc/stable/', None),
|
|
89
|
+
'glass': ('https://glass.readthedocs.io/en/latest/', None),
|
|
90
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
****************
|
|
3
|
+
glass.ext.extend
|
|
4
|
+
****************
|
|
5
|
+
|
|
6
|
+
This is a `GLASS`__ extension that extends an N-body lightcone simulation to
|
|
7
|
+
higher redshift. New matter shells are drawn beyond the last simulated shell,
|
|
8
|
+
conditional on the shells before them, so that structure stays correlated
|
|
9
|
+
across the boundary. With the shells extended to the last scattering surface,
|
|
10
|
+
the extension makes a full-sky CMB lensing convergence map.
|
|
11
|
+
|
|
12
|
+
The method is described in *Conditional random field sampling for
|
|
13
|
+
high-redshift extensions of lightcone simulations with application to CMB
|
|
14
|
+
lensing* (Fusari, Jeffrey & Joachimi, in prep).
|
|
15
|
+
|
|
16
|
+
__ https://glass.readthedocs.io
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
=================
|
|
20
|
+
Table of Contents
|
|
21
|
+
=================
|
|
22
|
+
|
|
23
|
+
.. toctree::
|
|
24
|
+
:maxdepth: 2
|
|
25
|
+
|
|
26
|
+
GLASS documentation <https://glass.readthedocs.io>
|
|
27
|
+
usage
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
@ECHO OFF
|
|
2
|
+
|
|
3
|
+
pushd %~dp0
|
|
4
|
+
|
|
5
|
+
REM Command file for Sphinx documentation
|
|
6
|
+
|
|
7
|
+
if "%SPHINXBUILD%" == "" (
|
|
8
|
+
set SPHINXBUILD=sphinx-build
|
|
9
|
+
)
|
|
10
|
+
set SOURCEDIR=.
|
|
11
|
+
set BUILDDIR=_build
|
|
12
|
+
|
|
13
|
+
if "%1" == "" goto help
|
|
14
|
+
|
|
15
|
+
%SPHINXBUILD% >NUL 2>NUL
|
|
16
|
+
if errorlevel 9009 (
|
|
17
|
+
echo.
|
|
18
|
+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
|
19
|
+
echo.installed, then set the SPHINXBUILD environment variable to point
|
|
20
|
+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
|
21
|
+
echo.may add the Sphinx directory to PATH.
|
|
22
|
+
echo.
|
|
23
|
+
echo.If you don't have Sphinx installed, grab it from
|
|
24
|
+
echo.https://www.sphinx-doc.org/
|
|
25
|
+
exit /b 1
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
|
29
|
+
goto end
|
|
30
|
+
|
|
31
|
+
:help
|
|
32
|
+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
|
33
|
+
|
|
34
|
+
:end
|
|
35
|
+
popd
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
Usage
|
|
2
|
+
=====
|
|
3
|
+
|
|
4
|
+
Installation
|
|
5
|
+
------------
|
|
6
|
+
|
|
7
|
+
Install the package with pip into a new environment::
|
|
8
|
+
|
|
9
|
+
pip install glass.ext.extend
|
|
10
|
+
|
|
11
|
+
The dependencies are pinned to the versions the results of the paper were
|
|
12
|
+
produced with, so a map can be reproduced bit for bit from its seed.
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
Supported simulations
|
|
16
|
+
---------------------
|
|
17
|
+
|
|
18
|
+
The extension reads a simulation through a loader. It does not detect the kind
|
|
19
|
+
of simulation from the directory, so name the loader with ``--suite``:
|
|
20
|
+
|
|
21
|
+
=============== ===================================
|
|
22
|
+
``--suite`` Simulation
|
|
23
|
+
=============== ===================================
|
|
24
|
+
``gowerstreet`` Gower Street simulations (PKDGRAV3)
|
|
25
|
+
``cosmogrid`` CosmoGridV1
|
|
26
|
+
``agora`` Agora
|
|
27
|
+
=============== ===================================
|
|
28
|
+
|
|
29
|
+
If your simulation is not in the list, you can write a loader for it. A loader
|
|
30
|
+
tells the extension where the matter shells are, what their redshift edges are
|
|
31
|
+
and what the cosmology of the simulation is. The modules in
|
|
32
|
+
``glass/ext/extend/loaders/`` are the examples to start from. Please
|
|
33
|
+
contribute your loader back with a pull request.
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
Quick start
|
|
37
|
+
-----------
|
|
38
|
+
|
|
39
|
+
Point the ``glass-extend`` command to a simulation directory, on your computer
|
|
40
|
+
or on your cluster, and name its loader. For a Gower Street simulation::
|
|
41
|
+
|
|
42
|
+
glass-extend --suite gowerstreet --sim /path/to/GowerStreetSims/sim00230
|
|
43
|
+
|
|
44
|
+
This reads the matter shells of the simulation up to redshift 2, generates the
|
|
45
|
+
shells from there to redshift 1100, and writes the CMB lensing convergence map
|
|
46
|
+
as a HEALPix FITS file::
|
|
47
|
+
|
|
48
|
+
production_runs/gowerstreet_grid_2048_dchi400_sh100_sim00230/kappa_map_0000.fits
|
|
49
|
+
|
|
50
|
+
It then compares the power spectrum of the map with theory and writes the
|
|
51
|
+
figures next to the map. Outputs go under the directory the command is run
|
|
52
|
+
from.
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
Changing the settings
|
|
56
|
+
---------------------
|
|
57
|
+
|
|
58
|
+
The defaults are the settings of the paper. The main ones can be changed on
|
|
59
|
+
the command line::
|
|
60
|
+
|
|
61
|
+
glass-extend --suite gowerstreet --sim /path/to/GowerStreetSims/sim00230 \
|
|
62
|
+
--nside 1024 --num-shells 50 --delta-chi 300 --shift 1.0
|
|
63
|
+
|
|
64
|
+
``--nside``
|
|
65
|
+
resolution of the shells and of the map (default 2048)
|
|
66
|
+
|
|
67
|
+
``--num-shells``
|
|
68
|
+
number of generated shells between the simulation and redshift 1100
|
|
69
|
+
(default 100)
|
|
70
|
+
|
|
71
|
+
``--delta-chi``
|
|
72
|
+
how far back the shells that condition each new shell reach, in Mpc/h
|
|
73
|
+
(default 400)
|
|
74
|
+
|
|
75
|
+
``--shift``
|
|
76
|
+
shift of the lognormal distribution of the generated shells (default 1,
|
|
77
|
+
the GLASS default). At a fixed variance a smaller shift gives a more
|
|
78
|
+
skewed matter distribution. The shift must be larger than minus the
|
|
79
|
+
lowest density contrast in the simulation shells, and the command stops
|
|
80
|
+
with a message if it is not.
|
|
81
|
+
|
|
82
|
+
``glass-extend --help`` lists all options.
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
Changing the boundary redshift
|
|
86
|
+
------------------------------
|
|
87
|
+
|
|
88
|
+
By default the simulation is used up to redshift 2 and extended from there.
|
|
89
|
+
To use the simulation up to another redshift, run the production step on its
|
|
90
|
+
own and give the boundary with ``--z-max-base``::
|
|
91
|
+
|
|
92
|
+
glass-extend-produce --suite gowerstreet \
|
|
93
|
+
--sim-dir /path/to/GowerStreetSims/sim00230 --z-max-base 3
|
|
94
|
+
|
|
95
|
+
The number of generated shells stays the same, so each of them is thinner for
|
|
96
|
+
a higher boundary. ``glass-extend-produce`` writes the map only. To compare
|
|
97
|
+
an existing map with theory, run ``glass-extend-validate --input`` on its
|
|
98
|
+
output directory.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""
|
|
2
|
+
glass.ext.extend: conditional sampling for the high-redshift extension of N-body lightcones.
|
|
3
|
+
|
|
4
|
+
Implements the method of "Conditional random field sampling for high-redshift
|
|
5
|
+
extensions of lightcone simulations with application to CMB lensing"
|
|
6
|
+
(Fusari, Jeffrey, Joachimi, in prep).
|
|
7
|
+
|
|
8
|
+
The production and validation drivers are base-suite-agnostic; suite-specific
|
|
9
|
+
knowledge lives in the loaders:
|
|
10
|
+
glass.ext.extend.loaders.gowerstreet Gower Street loader (shells, edges, HDF5-first
|
|
11
|
+
cosmology with hard stops on missing parameters)
|
|
12
|
+
glass.ext.extend.loaders.gowerstreet2 Gower Street 2 loader (same interface)
|
|
13
|
+
glass.ext.extend.loaders.cosmogrid CosmoGridV1 loader (same interface)
|
|
14
|
+
glass.ext.extend.loaders.agora Agora loader (same interface)
|
|
15
|
+
glass.ext.extend.paths dispatches base-simulation resolution to the loaders
|
|
16
|
+
"""
|