sxs 2025.0.12__tar.gz → 2025.0.13__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.
- {sxs-2025.0.12 → sxs-2025.0.13}/CITATION.cff +7 -1
- {sxs-2025.0.12 → sxs-2025.0.13}/PKG-INFO +106 -53
- sxs-2025.0.13/README.md +182 -0
- sxs-2025.0.13/docs/api/metadata.md +3 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/docs/mathematica.md +1 -1
- {sxs-2025.0.12 → sxs-2025.0.13}/docs/tutorials/00-Introduction.ipynb +21 -21
- sxs-2025.0.13/docs/tutorials/01-Catalog_Dataframe.ipynb +4318 -0
- sxs-2025.0.13/docs/tutorials/02-Simulation.ipynb +700 -0
- sxs-2025.0.13/docs/tutorials/03-Horizons.ipynb +422 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/docs/tutorials/04-Waveforms.ipynb +78 -30
- sxs-2025.0.13/docs/tutorials/05-PreprocessingForFFTs.ipynb +524 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/mkdocs.yml +1 -1
- {sxs-2025.0.12 → sxs-2025.0.13}/pyproject.toml +1 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/__init__.py +1 -0
- sxs-2025.0.13/sxs/__version__.py +1 -0
- sxs-2025.0.13/sxs/citation.py +205 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/simulations/simulation.py +16 -9
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/zenodo/api/login.py +1 -1
- sxs-2025.0.12/README.md +0 -130
- sxs-2025.0.12/docs/api/metadata.md +0 -3
- sxs-2025.0.12/docs/tutorials/01-Simulations_and_Metadata.ipynb +0 -4739
- sxs-2025.0.12/docs/tutorials/02-Simulation.ipynb +0 -564
- sxs-2025.0.12/docs/tutorials/03-Horizons.ipynb +0 -412
- sxs-2025.0.12/docs/tutorials/05-PreprocessingForFFTs.ipynb +0 -521
- sxs-2025.0.12/sxs/__version__.py +0 -1
- {sxs-2025.0.12 → sxs-2025.0.13}/.codecov.yml +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/.github/ISSUE_TEMPLATE/catalog-data-issue-template.md +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/.github/dependabot.yml +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/.github/scripts/parse_bump_rule.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/.github/workflows/build.yml +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/.github/workflows/pr_rtd_link.yml +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/.gitignore +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/.readthedocs.yaml +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/LICENSE +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/docs/api/catalog.md +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/docs/api/horizons.md +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/docs/api/load.md +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/docs/api/simulation.md +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/docs/api/simulations.md +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/docs/api/time_series.md +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/docs/api/waveforms.md +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/docs/html/main.html +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/docs/images/favicon.ico +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/docs/index.md +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/docs/javascript/mathjax.js +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/docs/julia.md +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/docs/stylesheets/extra.css +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/catalog/__init__.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/catalog/catalog.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/catalog/create.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/catalog/description.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/handlers.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/horizons/__init__.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/horizons/spec_horizons_h5.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/horizons/xor_multishuffle_bzip2.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/julia/GWFrames.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/julia/__init__.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/juliapkg.json +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/metadata/__init__.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/metadata/metadata.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/metadata/metric.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/simulations/__init__.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/simulations/analyze.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/simulations/local.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/simulations/simulations.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/time_series.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/__init__.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/bitwise.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/decimation/__init__.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/decimation/greedy_spline.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/decimation/linear_bisection.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/decimation/peak_greed.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/decimation/suppression.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/dicts.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/downloads.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/files.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/formats.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/inspire.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/lvcnr/__init__.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/lvcnr/comparisons.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/lvcnr/conversion.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/lvcnr/dataset.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/lvcnr/horizons.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/lvcnr/metadata.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/lvcnr/waveform_amp_phase.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/lvcnr/waveforms.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/monotonicity.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/pretty_print.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/references/__init__.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/references/ads.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/references/arxiv.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/references/fairchild_report.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/references/inspire.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/references/journal_abbreviations.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/references/references.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/select.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/smooth_functions.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/string_converters.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/sxs_directories.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/sxs_identifiers.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/utilities/url.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/waveforms/__init__.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/waveforms/alignment.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/waveforms/format_handlers/__init__.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/waveforms/format_handlers/grathena.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/waveforms/format_handlers/lvc.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/waveforms/format_handlers/nrar.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/waveforms/format_handlers/rotating_paired_diff_multishuffle_bzip2.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/waveforms/format_handlers/rotating_paired_xor_multishuffle_bzip2.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/waveforms/format_handlers/spectre_cce_v1.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/waveforms/memory.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/waveforms/mode_utilities.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/waveforms/norms.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/waveforms/transformations.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/waveforms/waveform_grid.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/waveforms/waveform_mixin.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/waveforms/waveform_modes.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/waveforms/waveform_mts.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/waveforms/waveform_signal.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/zenodo/__init__.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/zenodo/api/__init__.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/zenodo/api/deposit.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/zenodo/api/records.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/zenodo/catalog.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/zenodo/creators.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/zenodo/simannex.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/sxs/zenodo/surrogatemodeling.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/tests/__init__.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/tests/conftest.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/tests/test_alignment.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/tests/test_catalog.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/tests/test_horizons.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/tests/test_julia.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/tests/test_loader.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/tests/test_metadata.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/tests/test_simulation.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/tests/test_time_series.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/tests/test_transformations.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/tests/test_utilities.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/tests/test_waveform_rotations.py +0 -0
- {sxs-2025.0.12 → sxs-2025.0.13}/tests/test_waveforms.py +0 -0
|
@@ -4,11 +4,17 @@ authors:
|
|
|
4
4
|
- family-names: Boyle
|
|
5
5
|
given-names: Michael
|
|
6
6
|
orcid: https://orcid.org/0000-0002-5075-5116
|
|
7
|
+
- family-names: "Mitman"
|
|
8
|
+
given-names: "Keefe"
|
|
9
|
+
orcid: "https://orcid.org/0000-0003-0276-3856"
|
|
7
10
|
- family-names: "Scheel"
|
|
8
11
|
given-names: "Mark"
|
|
9
12
|
orcid: "https://orcid.org/0000-0001-6656-9134"
|
|
13
|
+
- family-names: "Stein"
|
|
14
|
+
given-names: "Leo"
|
|
15
|
+
orcid: "https://orcid.org/0000-0001-7559-9597"
|
|
10
16
|
title: "The sxs package"
|
|
11
17
|
license: MIT
|
|
12
18
|
doi: 10.5281/zenodo.4034006
|
|
13
|
-
version: 2025.0.
|
|
19
|
+
version: 2025.0.13
|
|
14
20
|
date-released: 2025-05-12
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sxs
|
|
3
|
-
Version: 2025.0.
|
|
3
|
+
Version: 2025.0.13
|
|
4
4
|
Summary: Interface to data produced by the Simulating eXtreme Spacetimes collaboration
|
|
5
5
|
Project-URL: Homepage, https://github.com/sxs-collaboration/sxs
|
|
6
6
|
Project-URL: Documentation, https://sxs.readthedocs.io/
|
|
@@ -35,6 +35,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
35
35
|
Classifier: Topic :: Scientific/Engineering :: Astronomy
|
|
36
36
|
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
37
37
|
Requires-Python: >=3.10
|
|
38
|
+
Requires-Dist: bibtexparser>=2.0.0b8
|
|
38
39
|
Requires-Dist: h5py>=3
|
|
39
40
|
Requires-Dist: inflection>=0.5.1
|
|
40
41
|
Requires-Dist: juliacall>=0.9.20
|
|
@@ -91,11 +92,11 @@ automatically select the newest or highest-resolution dataset for a given
|
|
|
91
92
|
simulation, or return a range of versions or resolutions. Currently, the
|
|
92
93
|
high-level objects encapsulate
|
|
93
94
|
|
|
94
|
-
*
|
|
95
|
+
* Dataframe — a catalog of all simulations produced by the SXS collaboration
|
|
95
96
|
* Simulation — an object encapsulating all data for a single simulation
|
|
96
97
|
* Metadata — data describing the simulation parameters
|
|
97
98
|
* Horizons — time-series data describing the apparent horizons
|
|
98
|
-
*
|
|
99
|
+
* Waveform — time-series data describing the extrapolated gravitational-wave
|
|
99
100
|
modes
|
|
100
101
|
|
|
101
102
|
|
|
@@ -105,36 +106,25 @@ Because this package is pure python code, installation is very simple. In
|
|
|
105
106
|
particular, with a reasonably modern installation, you can just run a command
|
|
106
107
|
like
|
|
107
108
|
|
|
108
|
-
```bash
|
|
109
|
-
conda install -c conda-forge sxs
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
or
|
|
113
|
-
|
|
114
109
|
```bash
|
|
115
110
|
python -m pip install sxs
|
|
116
111
|
```
|
|
117
112
|
|
|
118
|
-
Here, `conda` requires the [conda](https://docs.anaconda.com/anaconda/install/)
|
|
119
|
-
installation of python, which is the most recommended approach for scientific
|
|
120
|
-
python; the second command assumes that you have an appropriate python
|
|
121
|
-
environment set up in some other way. Either of these commands will download
|
|
122
|
-
and install the `sxs` package and its most vital requirements.
|
|
123
|
-
|
|
124
|
-
If you want to install all the goodies that enable things like jupyter
|
|
125
|
-
notebooks with plots and interactive tables, you could run
|
|
126
|
-
|
|
127
|
-
```bash
|
|
128
|
-
conda install -c conda-forge sxs-ecosystem
|
|
129
|
-
```
|
|
130
|
-
|
|
131
113
|
or
|
|
132
114
|
|
|
133
115
|
```bash
|
|
134
|
-
|
|
116
|
+
mamba install -c conda-forge sxs
|
|
135
117
|
```
|
|
136
118
|
|
|
137
|
-
|
|
119
|
+
Here, the first command assumes that you have an appropriate python
|
|
120
|
+
environment set up in some other way;
|
|
121
|
+
[`mamba`](https://mamba.readthedocs.io/en/latest/index.html) is the
|
|
122
|
+
newer replacement for `conda`, and is a convenient way to install
|
|
123
|
+
python and manage environments. Either of these commands will
|
|
124
|
+
download and install the `sxs` package and its most vital
|
|
125
|
+
requirements.
|
|
126
|
+
|
|
127
|
+
You may also want to set some convenient defaults to automatically
|
|
138
128
|
download and cache data:
|
|
139
129
|
|
|
140
130
|
```bash
|
|
@@ -147,6 +137,16 @@ directory returned by `sxs.sxs_directory("cache")`. See [that function's
|
|
|
147
137
|
documentation](https://sxs.readthedocs.io/en/main/api/sxs.utilities.sxs_directories/#sxsutilitiessxs_directoriessxs_directory)
|
|
148
138
|
for details.
|
|
149
139
|
|
|
140
|
+
## Citing this package and/or data
|
|
141
|
+
|
|
142
|
+
If you use this package and/or the data it provides in your research,
|
|
143
|
+
please cite them, including the *specific version of the data* that
|
|
144
|
+
you use (see below). To help with this, we provide the function
|
|
145
|
+
`sxs.cite`, which will print out a citation — in BibTeX format or just
|
|
146
|
+
the DOIs — for the package, the most recent paper describing the
|
|
147
|
+
catalog, the catalog data itself, and optionally individual
|
|
148
|
+
simulations.
|
|
149
|
+
|
|
150
150
|
|
|
151
151
|
## Usage
|
|
152
152
|
|
|
@@ -156,36 +156,83 @@ interactive jupyter notebooks that are actually running this code and some
|
|
|
156
156
|
pre-downloaded data. The following is just a very brief overview of the `sxs`
|
|
157
157
|
package's main components.
|
|
158
158
|
|
|
159
|
-
|
|
159
|
+
### Loading a specific version of the catalog
|
|
160
|
+
|
|
161
|
+
For the purposes of reproducibility — both reproducing your own
|
|
162
|
+
results and allowing others to reproduce them — it is important to be
|
|
163
|
+
aware of which version of the catalog you are using, and to cite it
|
|
164
|
+
when you publish results using SXS data. Whenever `sxs` tries to load
|
|
165
|
+
data, it most first load some version of the catalog. If you do not
|
|
166
|
+
specify a version, it will automatically find and load the most recent
|
|
167
|
+
version available via github, and print out a message telling you
|
|
168
|
+
which version it is using, like
|
|
169
|
+
|
|
170
|
+
```python
|
|
171
|
+
Loading SXS simulations using latest tag 'v3.0.0', published at 2025-05-12T10:00:00Z.
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
For the rest of that Python session, all data loaded will be from that
|
|
175
|
+
version of the catalog. If you want to use a different version, you
|
|
176
|
+
can specify it explicitly while loading the catalog — preferably as
|
|
177
|
+
|
|
178
|
+
```python
|
|
179
|
+
sxs.load("dataframe", tag="3.0.0")
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Even if you do not use the returned object from this command, it will
|
|
183
|
+
ensure that all data will be loaded from the specified version of the
|
|
184
|
+
catalog. Thus, it is best practice to make this call as soon as you
|
|
185
|
+
import the `sxs` package.
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
### Interacting with the data
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
There are four important objects to understand in this package:
|
|
160
192
|
|
|
161
193
|
```python
|
|
162
194
|
import sxs
|
|
163
195
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
196
|
+
# Load a specific version of the catalog for reproducibility
|
|
197
|
+
df = sxs.load("dataframe", tag="3.0.0")
|
|
198
|
+
|
|
199
|
+
# Load a specific simulation
|
|
200
|
+
sim = sxs.load("SXS:BBH:4001")
|
|
201
|
+
|
|
202
|
+
# Obtain data about the horizons
|
|
203
|
+
horizons = sim.horizons
|
|
204
|
+
|
|
205
|
+
# Obtain data about the gravitational-wave strain
|
|
206
|
+
h = sim.h
|
|
169
207
|
```
|
|
170
208
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
available
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
`
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
209
|
+
Note that `tag` is optional, but is good to include because it sets
|
|
210
|
+
the version of the catalog from which data is loaded, which ensures
|
|
211
|
+
reproducibility. Leave it out to see the most recent version
|
|
212
|
+
available, and then use that version consistently in any analysis. Be
|
|
213
|
+
sure to cite the specific version of the catalog you used in any
|
|
214
|
+
publications.
|
|
215
|
+
|
|
216
|
+
[The "dataframe"](https://sxs.readthedocs.io/en/main/api/dataframe/)
|
|
217
|
+
`df` contains information about every simulation in the catalog,
|
|
218
|
+
including all available data files, and information about how to get
|
|
219
|
+
them. You probably don't need to actually know about details like
|
|
220
|
+
where to get the data, but `df` can help you find the simulations you
|
|
221
|
+
care about. It is a
|
|
222
|
+
[`pandas.DataFrame`](https://pandas.pydata.org/docs/) object, where
|
|
223
|
+
the rows are names of simulations (like "SXS:BBH:0123") and the
|
|
224
|
+
columns include [the
|
|
225
|
+
`metadata`](https://sxs.readthedocs.io/en/main/api/sxs.metadata.metadata/#sxs.metadata.metadata.Metadata)
|
|
226
|
+
for the simulations — things like mass ratio, spins, eccentricity,
|
|
227
|
+
etc. — in addition to extra refinements like spin magnitudes, etc.
|
|
228
|
+
|
|
229
|
+
Once you have found a simulation you want to work with, you can load
|
|
230
|
+
it with, e.g., `sxs.load("SXS:BBH:4001")`, which will return a
|
|
231
|
+
[`Simulation`](https://sxs.readthedocs.io/en/main/api/sxs.simulation/#sxs.simulation.Simulation)
|
|
232
|
+
object, which contains metadata about the simulation, and allows you
|
|
233
|
+
to load data from the simulation. By default, it uses the
|
|
234
|
+
highest-resolution run of the simulation, though this lower
|
|
235
|
+
resolutions can be specified.
|
|
189
236
|
|
|
190
237
|
The actual data itself is primarily contained in the next two objects. [The
|
|
191
238
|
`horizons`
|
|
@@ -197,8 +244,14 @@ be `None`. Otherwise, each of these three is a
|
|
|
197
244
|
[`HorizonQuantities`](https://sxs.readthedocs.io/en/main/api/sxs.horizons/#sxs.horizons.HorizonQuantities)
|
|
198
245
|
object, containing several timeseries relating to mass, spin, and position.
|
|
199
246
|
|
|
200
|
-
Finally, the
|
|
201
|
-
|
|
202
|
-
encapsulates the modes of the waveform and the corresponding
|
|
203
|
-
along with relevant metadata like data type, spin
|
|
204
|
-
features like numpy-array-style slicing.
|
|
247
|
+
Finally, the [`h`
|
|
248
|
+
waveform](https://sxs.readthedocs.io/en/main/api/sxs.waveforms.waveform_modes/#sxs.waveforms.waveform_modes.WaveformModes)
|
|
249
|
+
encapsulates the modes of the strain waveform and the corresponding
|
|
250
|
+
time information, along with relevant metadata like data type, spin
|
|
251
|
+
weight, etc., with useful features like numpy-array-style slicing.
|
|
252
|
+
|
|
253
|
+
There is also `psi4` data available, which is computed with entirely
|
|
254
|
+
different methods; `h` and `psi4` are not just computed one from the
|
|
255
|
+
other by a double integral or differentiation. As a result, we
|
|
256
|
+
generally recommend using `h` instead of `psi4` unless you have very
|
|
257
|
+
specific requirements.
|
sxs-2025.0.13/README.md
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
[](https://github.com/sxs-collaboration/sxs/actions)
|
|
2
|
+
[](https://sxs.readthedocs.io/en/main/?badge=main)
|
|
3
|
+
[](https://pypi.org/project/sxs/)
|
|
4
|
+
[](https://anaconda.org/conda-forge/sxs)
|
|
5
|
+
[](https://github.com/sxs-collaboration/sxs/blob/main/LICENSE)
|
|
6
|
+
[](https://mybinder.org/v2/gh/moble/sxs_notebooks/main)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# Simulating eXtreme Spacetimes package
|
|
10
|
+
|
|
11
|
+
The `sxs` python package provides a high-level interface for using data
|
|
12
|
+
produced by the SXS collaboration. In particular, the function `sxs.load` can
|
|
13
|
+
automatically find, download, and load data, returning objects that provide
|
|
14
|
+
common interfaces to the various types of data, without forcing the user to
|
|
15
|
+
worry about details like data formats or where to find the data. It can also
|
|
16
|
+
automatically select the newest or highest-resolution dataset for a given
|
|
17
|
+
simulation, or return a range of versions or resolutions. Currently, the
|
|
18
|
+
high-level objects encapsulate
|
|
19
|
+
|
|
20
|
+
* Dataframe — a catalog of all simulations produced by the SXS collaboration
|
|
21
|
+
* Simulation — an object encapsulating all data for a single simulation
|
|
22
|
+
* Metadata — data describing the simulation parameters
|
|
23
|
+
* Horizons — time-series data describing the apparent horizons
|
|
24
|
+
* Waveform — time-series data describing the extrapolated gravitational-wave
|
|
25
|
+
modes
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
|
|
30
|
+
Because this package is pure python code, installation is very simple. In
|
|
31
|
+
particular, with a reasonably modern installation, you can just run a command
|
|
32
|
+
like
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
python -m pip install sxs
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
or
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
mamba install -c conda-forge sxs
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Here, the first command assumes that you have an appropriate python
|
|
45
|
+
environment set up in some other way;
|
|
46
|
+
[`mamba`](https://mamba.readthedocs.io/en/latest/index.html) is the
|
|
47
|
+
newer replacement for `conda`, and is a convenient way to install
|
|
48
|
+
python and manage environments. Either of these commands will
|
|
49
|
+
download and install the `sxs` package and its most vital
|
|
50
|
+
requirements.
|
|
51
|
+
|
|
52
|
+
You may also want to set some convenient defaults to automatically
|
|
53
|
+
download and cache data:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
python -c "import sxs; sxs.write_config(download=True, cache=True)"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
This will write a configuration file in the directory returned by
|
|
60
|
+
`sxs.sxs_directory("config")`, and downloaded data will be cached in the
|
|
61
|
+
directory returned by `sxs.sxs_directory("cache")`. See [that function's
|
|
62
|
+
documentation](https://sxs.readthedocs.io/en/main/api/sxs.utilities.sxs_directories/#sxsutilitiessxs_directoriessxs_directory)
|
|
63
|
+
for details.
|
|
64
|
+
|
|
65
|
+
## Citing this package and/or data
|
|
66
|
+
|
|
67
|
+
If you use this package and/or the data it provides in your research,
|
|
68
|
+
please cite them, including the *specific version of the data* that
|
|
69
|
+
you use (see below). To help with this, we provide the function
|
|
70
|
+
`sxs.cite`, which will print out a citation — in BibTeX format or just
|
|
71
|
+
the DOIs — for the package, the most recent paper describing the
|
|
72
|
+
catalog, the catalog data itself, and optionally individual
|
|
73
|
+
simulations.
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
## Usage
|
|
77
|
+
|
|
78
|
+
An extensive demonstration of this package's capabilities is available
|
|
79
|
+
[here](https://mybinder.org/v2/gh/moble/sxs_notebooks/main), in the form of
|
|
80
|
+
interactive jupyter notebooks that are actually running this code and some
|
|
81
|
+
pre-downloaded data. The following is just a very brief overview of the `sxs`
|
|
82
|
+
package's main components.
|
|
83
|
+
|
|
84
|
+
### Loading a specific version of the catalog
|
|
85
|
+
|
|
86
|
+
For the purposes of reproducibility — both reproducing your own
|
|
87
|
+
results and allowing others to reproduce them — it is important to be
|
|
88
|
+
aware of which version of the catalog you are using, and to cite it
|
|
89
|
+
when you publish results using SXS data. Whenever `sxs` tries to load
|
|
90
|
+
data, it most first load some version of the catalog. If you do not
|
|
91
|
+
specify a version, it will automatically find and load the most recent
|
|
92
|
+
version available via github, and print out a message telling you
|
|
93
|
+
which version it is using, like
|
|
94
|
+
|
|
95
|
+
```python
|
|
96
|
+
Loading SXS simulations using latest tag 'v3.0.0', published at 2025-05-12T10:00:00Z.
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
For the rest of that Python session, all data loaded will be from that
|
|
100
|
+
version of the catalog. If you want to use a different version, you
|
|
101
|
+
can specify it explicitly while loading the catalog — preferably as
|
|
102
|
+
|
|
103
|
+
```python
|
|
104
|
+
sxs.load("dataframe", tag="3.0.0")
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Even if you do not use the returned object from this command, it will
|
|
108
|
+
ensure that all data will be loaded from the specified version of the
|
|
109
|
+
catalog. Thus, it is best practice to make this call as soon as you
|
|
110
|
+
import the `sxs` package.
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
### Interacting with the data
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
There are four important objects to understand in this package:
|
|
117
|
+
|
|
118
|
+
```python
|
|
119
|
+
import sxs
|
|
120
|
+
|
|
121
|
+
# Load a specific version of the catalog for reproducibility
|
|
122
|
+
df = sxs.load("dataframe", tag="3.0.0")
|
|
123
|
+
|
|
124
|
+
# Load a specific simulation
|
|
125
|
+
sim = sxs.load("SXS:BBH:4001")
|
|
126
|
+
|
|
127
|
+
# Obtain data about the horizons
|
|
128
|
+
horizons = sim.horizons
|
|
129
|
+
|
|
130
|
+
# Obtain data about the gravitational-wave strain
|
|
131
|
+
h = sim.h
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Note that `tag` is optional, but is good to include because it sets
|
|
135
|
+
the version of the catalog from which data is loaded, which ensures
|
|
136
|
+
reproducibility. Leave it out to see the most recent version
|
|
137
|
+
available, and then use that version consistently in any analysis. Be
|
|
138
|
+
sure to cite the specific version of the catalog you used in any
|
|
139
|
+
publications.
|
|
140
|
+
|
|
141
|
+
[The "dataframe"](https://sxs.readthedocs.io/en/main/api/dataframe/)
|
|
142
|
+
`df` contains information about every simulation in the catalog,
|
|
143
|
+
including all available data files, and information about how to get
|
|
144
|
+
them. You probably don't need to actually know about details like
|
|
145
|
+
where to get the data, but `df` can help you find the simulations you
|
|
146
|
+
care about. It is a
|
|
147
|
+
[`pandas.DataFrame`](https://pandas.pydata.org/docs/) object, where
|
|
148
|
+
the rows are names of simulations (like "SXS:BBH:0123") and the
|
|
149
|
+
columns include [the
|
|
150
|
+
`metadata`](https://sxs.readthedocs.io/en/main/api/sxs.metadata.metadata/#sxs.metadata.metadata.Metadata)
|
|
151
|
+
for the simulations — things like mass ratio, spins, eccentricity,
|
|
152
|
+
etc. — in addition to extra refinements like spin magnitudes, etc.
|
|
153
|
+
|
|
154
|
+
Once you have found a simulation you want to work with, you can load
|
|
155
|
+
it with, e.g., `sxs.load("SXS:BBH:4001")`, which will return a
|
|
156
|
+
[`Simulation`](https://sxs.readthedocs.io/en/main/api/sxs.simulation/#sxs.simulation.Simulation)
|
|
157
|
+
object, which contains metadata about the simulation, and allows you
|
|
158
|
+
to load data from the simulation. By default, it uses the
|
|
159
|
+
highest-resolution run of the simulation, though this lower
|
|
160
|
+
resolutions can be specified.
|
|
161
|
+
|
|
162
|
+
The actual data itself is primarily contained in the next two objects. [The
|
|
163
|
+
`horizons`
|
|
164
|
+
object](https://sxs.readthedocs.io/en/main/api/sxs.horizons/#sxs.horizons.Horizons)
|
|
165
|
+
has three attributes — `horizons.A`, `horizons.B`, and `horizons.C` — typically
|
|
166
|
+
representing the original two horizons of the black-hole binary and the common
|
|
167
|
+
horizon that forms at merger. In matter simulations, one or more of these may
|
|
168
|
+
be `None`. Otherwise, each of these three is a
|
|
169
|
+
[`HorizonQuantities`](https://sxs.readthedocs.io/en/main/api/sxs.horizons/#sxs.horizons.HorizonQuantities)
|
|
170
|
+
object, containing several timeseries relating to mass, spin, and position.
|
|
171
|
+
|
|
172
|
+
Finally, the [`h`
|
|
173
|
+
waveform](https://sxs.readthedocs.io/en/main/api/sxs.waveforms.waveform_modes/#sxs.waveforms.waveform_modes.WaveformModes)
|
|
174
|
+
encapsulates the modes of the strain waveform and the corresponding
|
|
175
|
+
time information, along with relevant metadata like data type, spin
|
|
176
|
+
weight, etc., with useful features like numpy-array-style slicing.
|
|
177
|
+
|
|
178
|
+
There is also `psi4` data available, which is computed with entirely
|
|
179
|
+
different methods; `h` and `psi4` are not just computed one from the
|
|
180
|
+
other by a double integral or differentiation. As a result, we
|
|
181
|
+
generally recommend using `h` instead of `psi4` unless you have very
|
|
182
|
+
specific requirements.
|
|
@@ -8,7 +8,7 @@ containing the Python code you want to run.
|
|
|
8
8
|
## Getting Mathematica working with Python
|
|
9
9
|
|
|
10
10
|
As of this writing, Mathematica *claims* that it works with all reasonably
|
|
11
|
-
modern versions of Python —
|
|
11
|
+
modern versions of Python — specifically ["Python
|
|
12
12
|
3.4+"](https://reference.wolfram.com/language/ref/externalevaluationsystem/Python.html).
|
|
13
13
|
Assuming this is true, the only extra thing to worry about is that Mathematica
|
|
14
14
|
requires the `pyzmq` package to interface with Python.
|
|
@@ -17,41 +17,39 @@
|
|
|
17
17
|
"source": [
|
|
18
18
|
"# Pythonic Preliminaries\n",
|
|
19
19
|
"\n",
|
|
20
|
-
"* ***Don't*** use your system python. Installing packages to it might
|
|
20
|
+
"* ***Don't*** use your system python. Installing packages to it might mess up how your OS works.\n",
|
|
21
21
|
"* ***Don't*** use `sudo` when doing anything involving python.\n",
|
|
22
22
|
"* ***Do*** use an environment manager:\n",
|
|
23
|
-
" * [
|
|
24
|
-
" * [
|
|
25
|
-
" * [Pip](https://pip.pypa.io/en/stable/) is a useful tool, but is not an environment manager; don't rely on it alone\n",
|
|
26
|
-
" * Pipenv is only suitable for web development, not scientific python; don't use this at all\n",
|
|
23
|
+
" * [`pixi`](https://pixi.sh/) is the latest way to use [conda](https://docs.conda.io/projects/conda/en/latest/index.html)/[mamba](https://mamba.readthedocs.io/en/latest/index.html).\n",
|
|
24
|
+
" * [`uv`](https://docs.astral.sh/uv/) is the only reasonable way to use [`pip`](https://pip.pypa.io/en/stable/).\n",
|
|
27
25
|
"\n",
|
|
28
|
-
"The `sxs` package requires python 3.
|
|
26
|
+
"The `sxs` package requires python 3.10 or greater, and a bunch of other packages that should be automatically installed along with it.\n",
|
|
29
27
|
"\n",
|
|
30
|
-
"The
|
|
28
|
+
"The old-fashioned ways to install this package work as usual:\n",
|
|
31
29
|
"\n",
|
|
32
30
|
"```python\n",
|
|
33
|
-
"
|
|
31
|
+
"python -m pip install sxs\n",
|
|
34
32
|
"```\n",
|
|
35
33
|
"\n",
|
|
36
|
-
"
|
|
34
|
+
"or\n",
|
|
37
35
|
"\n",
|
|
38
36
|
"```python\n",
|
|
39
|
-
"
|
|
37
|
+
"mamba install -c conda-forge sxs\n",
|
|
40
38
|
"```\n",
|
|
41
39
|
"\n",
|
|
42
|
-
"
|
|
40
|
+
"When using either `pixi` or `uv` — as we recommend — you can add the package to your workspace/environment with\n",
|
|
43
41
|
"\n",
|
|
44
42
|
"```python\n",
|
|
45
|
-
"
|
|
43
|
+
"pixi init sxs # If you don't have a workspace already\n",
|
|
44
|
+
"pixi add sxs\n",
|
|
46
45
|
"```\n",
|
|
47
46
|
"\n",
|
|
48
47
|
"or\n",
|
|
49
48
|
"\n",
|
|
50
49
|
"```python\n",
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"This installs nice goodies like [Matplotlib](https://matplotlib.org/) for plotting and [Jupyter](https://jupyter.org/) for running interactive notebooks like this one yourself. On non-Windows systems, this also installs some other useful packages from the SXS collaboration, like [`scri`](https://github.com/moble/scri)."
|
|
50
|
+
"uv venv # If you don't have a venv already\n",
|
|
51
|
+
"uv pip install sxs\n",
|
|
52
|
+
"```"
|
|
55
53
|
]
|
|
56
54
|
},
|
|
57
55
|
{
|
|
@@ -104,7 +102,7 @@
|
|
|
104
102
|
"metadata": {},
|
|
105
103
|
"outputs": [],
|
|
106
104
|
"source": [
|
|
107
|
-
"sxs.write_config(download=True, cache=True, auto_supersede=
|
|
105
|
+
"sxs.write_config(download=True, cache=True, auto_supersede=False)"
|
|
108
106
|
]
|
|
109
107
|
},
|
|
110
108
|
{
|
|
@@ -122,7 +120,7 @@
|
|
|
122
120
|
{
|
|
123
121
|
"data": {
|
|
124
122
|
"text/plain": [
|
|
125
|
-
"{'download': True, 'cache': True, 'auto_supersede':
|
|
123
|
+
"{'download': True, 'cache': True, 'auto_supersede': False}"
|
|
126
124
|
]
|
|
127
125
|
},
|
|
128
126
|
"execution_count": 3,
|
|
@@ -183,7 +181,7 @@
|
|
|
183
181
|
"\n",
|
|
184
182
|
"The first line will\n",
|
|
185
183
|
"\n",
|
|
186
|
-
" 1. download the catalog of SXS
|
|
184
|
+
" 1. download the catalog of SXS simulations with relevant metadata, if necessary, and cache it to disk if desired\n",
|
|
187
185
|
" 2. find the metadata for the simulation with the given ID\n",
|
|
188
186
|
" 3. check that the simulation has not been deprecated (if so, it will advise you of what to do)\n",
|
|
189
187
|
" 4. decide on the version and `Lev` to use — defaulting to the most recent of each\n",
|
|
@@ -240,6 +238,8 @@
|
|
|
240
238
|
"source": [
|
|
241
239
|
"(If this failed for you, it's probably because you don't already have the data, and you haven't set up the sensible defaults in the previous section. Review that advice to see how to set up those defaults, or pass `download=True` to the `sxs.load` function to download just this once.)\n",
|
|
242
240
|
"\n",
|
|
241
|
+
"Note that `h.data` represents the modes of the strain waveform, which do not asymptote to zero after merger because of memory effects — real physical effects that should be present in the waveforms.\n",
|
|
242
|
+
"\n",
|
|
243
243
|
"This example loads the metadata into the `sxs_bbh_1234` object. Then, as soon as `sxs_bbh_1234.h` is accessed, it downloads and loads the waveform. We extract the time data with `sxs_bbh_1234.h.t`, and the real part of the complex data with `sxs_bbh_1234.h.data.real`. We will get into much more detail about this in the following notebooks."
|
|
244
244
|
]
|
|
245
245
|
},
|
|
@@ -251,7 +251,7 @@
|
|
|
251
251
|
"\n",
|
|
252
252
|
"It is probably best to go through these notebooks in order:\n",
|
|
253
253
|
"\n",
|
|
254
|
-
" 1. [The `
|
|
254
|
+
" 1. [The catalog `DataFrame` interface](/tutorials/01-Catalog_Dataframe)\n",
|
|
255
255
|
" 2. [The `Simulation` interface](/tutorials/02-Simulation)\n",
|
|
256
256
|
" 3. [Data describing `Horizons`](/tutorials/03-Horizons)\n",
|
|
257
257
|
" 4. [Introduction to `WaveformModes` objects](/tutorials/04-Waveforms)"
|
|
@@ -274,7 +274,7 @@
|
|
|
274
274
|
"name": "python",
|
|
275
275
|
"nbconvert_exporter": "python",
|
|
276
276
|
"pygments_lexer": "ipython3",
|
|
277
|
-
"version": "3.
|
|
277
|
+
"version": "3.12.3"
|
|
278
278
|
},
|
|
279
279
|
"widgets": {
|
|
280
280
|
"application/vnd.jupyter.widget-state+json": {
|