sxs 2025.0.12__py3-none-any.whl → 2025.0.13__py3-none-any.whl
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/__init__.py +1 -0
- sxs/__version__.py +1 -1
- sxs/citation.py +205 -0
- sxs/simulations/simulation.py +16 -9
- sxs/zenodo/api/login.py +1 -1
- {sxs-2025.0.12.dist-info → sxs-2025.0.13.dist-info}/METADATA +106 -53
- {sxs-2025.0.12.dist-info → sxs-2025.0.13.dist-info}/RECORD +9 -8
- {sxs-2025.0.12.dist-info → sxs-2025.0.13.dist-info}/WHEEL +0 -0
- {sxs-2025.0.12.dist-info → sxs-2025.0.13.dist-info}/licenses/LICENSE +0 -0
sxs/__init__.py
CHANGED
sxs/__version__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "2025.0.
|
|
1
|
+
__version__ = "2025.0.13"
|
sxs/citation.py
ADDED
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
def cite(*sxs_ids, bibtex=True):
|
|
2
|
+
"""Cite this package and/or data
|
|
3
|
+
|
|
4
|
+
Prints out a citation for the package, the most recent paper
|
|
5
|
+
describing the catalog, the catalog data itself, and optionally
|
|
6
|
+
individual simulations.
|
|
7
|
+
|
|
8
|
+
Note that this function makes web requests to obtain the DOIs and
|
|
9
|
+
corresponding BibTeX entries.
|
|
10
|
+
|
|
11
|
+
If you want to cite a specific version of the SXS catalog data, be
|
|
12
|
+
sure to load it with `sxs.load("dataframe", tag="v3.0.0")` or
|
|
13
|
+
similar *before* calling this function. Otherwise, the most recent
|
|
14
|
+
version will be used.
|
|
15
|
+
|
|
16
|
+
Parameters
|
|
17
|
+
----------
|
|
18
|
+
sxs_ids : str
|
|
19
|
+
Any number of SXS IDs to include in the citation.
|
|
20
|
+
bibtex : bool, optional
|
|
21
|
+
If True — the default — returns full BibTeX entries.
|
|
22
|
+
Otherwise, just returns a list of DOIs to cite.
|
|
23
|
+
|
|
24
|
+
Returns
|
|
25
|
+
-------
|
|
26
|
+
str or list[str]
|
|
27
|
+
A string containing BibTeX entries, or a list of DOI strings.
|
|
28
|
+
|
|
29
|
+
"""
|
|
30
|
+
from . import doi_prefix, load, __version__
|
|
31
|
+
from . import sxs_id as sxs_identifier
|
|
32
|
+
|
|
33
|
+
simulations = load("simulations")
|
|
34
|
+
|
|
35
|
+
# Get the DOI for this version of this package
|
|
36
|
+
package_version = f"v{__version__}"
|
|
37
|
+
package_doi = get_zenodo_doi("The sxs package", package_version)
|
|
38
|
+
|
|
39
|
+
# Get the DOI for the paper
|
|
40
|
+
paper_doi = f"{doi_prefix}/SXSCatalog3"
|
|
41
|
+
|
|
42
|
+
# Get the DOI for this version of the catalog
|
|
43
|
+
catalog_tag = getattr(simulations, "tag", "v3.0.0")
|
|
44
|
+
catalog_doi = get_zenodo_doi(
|
|
45
|
+
"The SXS catalog of simulations",
|
|
46
|
+
catalog_tag
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
sxs_id_references = {
|
|
50
|
+
doi
|
|
51
|
+
for sxs_id in sxs_ids
|
|
52
|
+
for doi in simulations[sxs_identifier(sxs_id)].get("citation_dois", [])
|
|
53
|
+
if doi.startswith("10.")
|
|
54
|
+
} - {package_doi, paper_doi, catalog_doi}
|
|
55
|
+
|
|
56
|
+
if bibtex:
|
|
57
|
+
package_bibtex = doi2bibtex(package_doi, key=f"SXSPackage_{package_version}")
|
|
58
|
+
paper_bibtex = doi2bibtex(paper_doi, key="SXSCatalogPaper_3")
|
|
59
|
+
catalog_bibtex = doi2bibtex(
|
|
60
|
+
catalog_doi,
|
|
61
|
+
key=f"SXSCatalogData_{catalog_tag[1:]}",
|
|
62
|
+
title_suffix=f" {catalog_tag}"
|
|
63
|
+
)
|
|
64
|
+
sxs_id_references_bibtex = [
|
|
65
|
+
doi2bibtex(doi) for doi in sxs_id_references
|
|
66
|
+
]
|
|
67
|
+
sxs_id_bibtex = [
|
|
68
|
+
doi2bibtex(f"{doi_prefix}/{sxs_id}", key=sxs_id)
|
|
69
|
+
for sxs_id in sxs_ids
|
|
70
|
+
]
|
|
71
|
+
return "\n".join(
|
|
72
|
+
[package_bibtex, paper_bibtex, catalog_bibtex]
|
|
73
|
+
+ sxs_id_references_bibtex
|
|
74
|
+
+ sxs_id_bibtex
|
|
75
|
+
)
|
|
76
|
+
else:
|
|
77
|
+
sxs_id_references_dois = list(sxs_id_references)
|
|
78
|
+
sxs_id_dois = [f"{doi_prefix}/{sxs_id}" for sxs_id in sxs_ids]
|
|
79
|
+
return [package_doi, paper_doi, catalog_doi] + sxs_id_references_dois + sxs_id_dois
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def doi2bibtex(doi, key="", title_suffix=""):
|
|
83
|
+
"""Convert a DOI to a BibTeX entry
|
|
84
|
+
|
|
85
|
+
This function queries doi.org — and possibly the service it
|
|
86
|
+
redirects to — for the BibTeX entry corresponding to the DOI.
|
|
87
|
+
|
|
88
|
+
Note that there are some services that do not provide good BibTeX.
|
|
89
|
+
In particular, MNRAS does not support this service very well.
|
|
90
|
+
|
|
91
|
+
Parameters
|
|
92
|
+
----------
|
|
93
|
+
doi : str
|
|
94
|
+
The DOI to convert.
|
|
95
|
+
key : str, optional
|
|
96
|
+
The BibTeX key to use. If not provided, the key will be
|
|
97
|
+
generated from the DOI. If multiple entries are found, this
|
|
98
|
+
function will raise an exception.
|
|
99
|
+
|
|
100
|
+
Returns
|
|
101
|
+
-------
|
|
102
|
+
str
|
|
103
|
+
The BibTeX entry as a string.
|
|
104
|
+
|
|
105
|
+
"""
|
|
106
|
+
import requests
|
|
107
|
+
import bibtexparser
|
|
108
|
+
from .utilities import sxs_identifier_re
|
|
109
|
+
|
|
110
|
+
url = f"https://doi.org/{doi}"
|
|
111
|
+
headers = {"Accept": "application/x-bibtex"}
|
|
112
|
+
response = requests.get(url, headers=headers)
|
|
113
|
+
response.raise_for_status()
|
|
114
|
+
bibtex = response.text
|
|
115
|
+
|
|
116
|
+
bibtex_format = bibtexparser.BibtexFormat()
|
|
117
|
+
bibtex_format.indent = " "
|
|
118
|
+
bibtex_format.block_separator = "\n"
|
|
119
|
+
|
|
120
|
+
try:
|
|
121
|
+
library = bibtexparser.parse_string(bibtex)
|
|
122
|
+
|
|
123
|
+
for i,entry in enumerate(library.entries):
|
|
124
|
+
# Replace the key, if requested
|
|
125
|
+
if key:
|
|
126
|
+
if i>1:
|
|
127
|
+
raise Exception("Multiple entries found in BibTeX, but one key was given.")
|
|
128
|
+
entry.key = key
|
|
129
|
+
|
|
130
|
+
# Ensure that the "author" field does not end in ","
|
|
131
|
+
if (author := entry.fields_dict.get("author", "")):
|
|
132
|
+
if author.value.rstrip().endswith(","):
|
|
133
|
+
author.value = author.value.rstrip()[:-1]
|
|
134
|
+
if author.value == "SXS Collaboration":
|
|
135
|
+
author.value = "{SXS Collaboration}"
|
|
136
|
+
entry.set_field(author)
|
|
137
|
+
|
|
138
|
+
# Now, look for an SXS ID in the `title` field; if present
|
|
139
|
+
# surround it with curly braces to prevent BibTeX from
|
|
140
|
+
# downcasing it.
|
|
141
|
+
title = entry.fields_dict.get("title", "")
|
|
142
|
+
if (m:=sxs_identifier_re.search(title.value)):
|
|
143
|
+
# Surround the SXS ID with curly braces
|
|
144
|
+
replacement = f"{{{m.group('sxs_identifier')}}}"
|
|
145
|
+
|
|
146
|
+
# The title will not (currently) include the version,
|
|
147
|
+
# but if the requested DOI contains a *versioned* SXS
|
|
148
|
+
# ID, we add the version (e.g., "v3.0") to the
|
|
149
|
+
# replacement string
|
|
150
|
+
if (
|
|
151
|
+
(match:=sxs_identifier_re.search(doi))
|
|
152
|
+
and match.group("sxs_identifier") == m.group("sxs_identifier")
|
|
153
|
+
and match.group("version")
|
|
154
|
+
):
|
|
155
|
+
replacement += "v" + match.group("version")
|
|
156
|
+
|
|
157
|
+
title.value = title.value.replace(m.group("sxs_identifier"), replacement)
|
|
158
|
+
entry.set_field(title)
|
|
159
|
+
elif title_suffix:
|
|
160
|
+
title.value += title_suffix
|
|
161
|
+
entry.set_field(title)
|
|
162
|
+
|
|
163
|
+
bibtex = bibtexparser.write_string(library, bibtex_format=bibtex_format)
|
|
164
|
+
|
|
165
|
+
except Exception as e:
|
|
166
|
+
print("Failed to replace key and/or escape titles in BibTeX entry:\n")
|
|
167
|
+
for line in bibtex.split("\n"):
|
|
168
|
+
print(" " + line)
|
|
169
|
+
print("")
|
|
170
|
+
raise
|
|
171
|
+
|
|
172
|
+
return bibtex
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
def get_zenodo_doi(title, version):
|
|
176
|
+
import requests
|
|
177
|
+
|
|
178
|
+
params = {
|
|
179
|
+
"q": f'metadata.title:"{title}" AND metadata.version:"{version}"',
|
|
180
|
+
"size": 1,
|
|
181
|
+
"page": 1,
|
|
182
|
+
"sort": "mostrecent",
|
|
183
|
+
"all_versions": "", # Need to include this to get older versions
|
|
184
|
+
}
|
|
185
|
+
url = "https://zenodo.org/api/records"
|
|
186
|
+
r = requests.get(url, params=params)
|
|
187
|
+
|
|
188
|
+
if r.status_code != 200:
|
|
189
|
+
print(f"An unknown error occurred when trying to access '{url}'.")
|
|
190
|
+
print(f"The search parameters were '{params}'")
|
|
191
|
+
try:
|
|
192
|
+
print(r.json())
|
|
193
|
+
except:
|
|
194
|
+
pass
|
|
195
|
+
r.raise_for_status()
|
|
196
|
+
raise RuntimeError() # Will only happen if the response was not strictly an error
|
|
197
|
+
|
|
198
|
+
json = r.json()
|
|
199
|
+
|
|
200
|
+
if json.get("hits", {}).get("total", 0) == 0:
|
|
201
|
+
print(f"No results found for '{title}' version '{version}'.")
|
|
202
|
+
return None
|
|
203
|
+
else:
|
|
204
|
+
hit = json["hits"]["hits"][0]
|
|
205
|
+
return hit["doi"]
|
sxs/simulations/simulation.py
CHANGED
|
@@ -45,10 +45,10 @@ def Simulation(location, *args, **kwargs):
|
|
|
45
45
|
the version number must be in the form "v2.0", not "2.0", and it
|
|
46
46
|
must exist, or no files will be found to load the data from.
|
|
47
47
|
|
|
48
|
-
The returned object will be either a `Simulation_v1
|
|
49
|
-
`Simulation_v2` object, depending on the
|
|
50
|
-
Hopefully, most details of the two versions will
|
|
51
|
-
the user, so that the interface is identical.
|
|
48
|
+
The returned object will be either a `Simulation_v1`,
|
|
49
|
+
`Simulation_v2`, or `Simulation_v3` object, depending on the
|
|
50
|
+
version number. Hopefully, most details of the two versions will
|
|
51
|
+
be hidden from the user, so that the interface is identical.
|
|
52
52
|
|
|
53
53
|
Note that some simulations are deprecated and/or superseded by
|
|
54
54
|
other simulations. By default, this function will raise an error
|
|
@@ -119,13 +119,13 @@ def Simulation(location, *args, **kwargs):
|
|
|
119
119
|
Returns
|
|
120
120
|
-------
|
|
121
121
|
simulation : SimulationBase
|
|
122
|
-
A `Simulation_v1` or `
|
|
123
|
-
version of the simulation data.
|
|
122
|
+
A `Simulation_v1`, `Simulation_v2`, or `Simulation_v3` object,
|
|
123
|
+
depending on the version of the simulation data.
|
|
124
124
|
|
|
125
125
|
Note that all remaining arguments (including keyword arguments)
|
|
126
|
-
are passed on to the `SimulationBase`, `Simulation_v1`,
|
|
127
|
-
`Simulation_v2` constructors, though none
|
|
128
|
-
arguments other than those listed above.
|
|
126
|
+
are passed on to the `SimulationBase`, `Simulation_v1`,
|
|
127
|
+
`Simulation_v2`, and/or `Simulation_v3` constructors, though none
|
|
128
|
+
currently recognize any arguments other than those listed above.
|
|
129
129
|
|
|
130
130
|
"""
|
|
131
131
|
import numpy as np
|
|
@@ -938,6 +938,13 @@ class Simulation_v2(SimulationBase):
|
|
|
938
938
|
|
|
939
939
|
|
|
940
940
|
class Simulation_v3(Simulation_v2):
|
|
941
|
+
"""Simulation object for version 3 of the data format
|
|
942
|
+
|
|
943
|
+
Note that users almost certainly never need to call this function;
|
|
944
|
+
see the `Simulation` function or `sxs.load` function instead. See
|
|
945
|
+
also `SimulationBase` for the base class that this class inherits
|
|
946
|
+
from.
|
|
947
|
+
"""
|
|
941
948
|
# Default extrapolation order for this simulation version
|
|
942
949
|
default_extrapolation = "N2"
|
|
943
950
|
|
sxs/zenodo/api/login.py
CHANGED
|
@@ -237,7 +237,7 @@ class Login(object):
|
|
|
237
237
|
-------------------
|
|
238
238
|
q: string [optional]
|
|
239
239
|
Search query, using Elasticsearch query string syntax. See
|
|
240
|
-
https://help.zenodo.org/
|
|
240
|
+
https://help.zenodo.org/help/search/ for details.
|
|
241
241
|
status: string, either 'draft' or 'published' [optional]
|
|
242
242
|
Filter result based on deposit status.
|
|
243
243
|
sort: string [optional]
|
|
@@ -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.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
sxs/__init__.py,sha256=
|
|
2
|
-
sxs/__version__.py,sha256=
|
|
1
|
+
sxs/__init__.py,sha256=C8VhmrUPAa70Y-C2KfZv9BhS6ef-eB7uaNtwm18IRhk,2637
|
|
2
|
+
sxs/__version__.py,sha256=qT5_mCWSL-clhzUVFYLfMLmGxxmlJqEydwiwpos4nFw,26
|
|
3
|
+
sxs/citation.py,sha256=hPns9t996GeKJe2HviUs00hM3fJb7JQu_f54XOPV3BE,7061
|
|
3
4
|
sxs/handlers.py,sha256=jVV-HK-omzoBx5N2wcpLHvyoWq86hUfWCjnGbPpD91I,18343
|
|
4
5
|
sxs/juliapkg.json,sha256=-baaa3Za_KBmmiGjlh2YYLWmvUvZl6GaKKXwNI4S7qU,178
|
|
5
6
|
sxs/time_series.py,sha256=OKaLg8tFyrtKcef7900ri-a0C6A8wKxA68KovZXvH6I,41081
|
|
@@ -18,7 +19,7 @@ sxs/metadata/metric.py,sha256=Tsig1Jm50OO8r89zfjCuQ4i3JAoiazSb4J9qYtPWKgM,41
|
|
|
18
19
|
sxs/simulations/__init__.py,sha256=eXkheYhRaYyKjul5J1IXpoJ7Wq4nr3Tgwr-HSS3BTek,156
|
|
19
20
|
sxs/simulations/analyze.py,sha256=YwX0i_GRATRpvp7T8VheShkclvqYsraGDDKEkJQxJnw,11530
|
|
20
21
|
sxs/simulations/local.py,sha256=e77SeaWMl2PWX_EndQtShOXZxcFKhQsUDQ55R2Njcuc,43
|
|
21
|
-
sxs/simulations/simulation.py,sha256=
|
|
22
|
+
sxs/simulations/simulation.py,sha256=vTqroGL4QVOl0wFcOve69ScSNRJn4bWAuJtA_hg1PAw,43673
|
|
22
23
|
sxs/simulations/simulations.py,sha256=sMle89VoD1CQni1N23Vjo3h2yj9LHHAtuaB_qfD3Wgg,109
|
|
23
24
|
sxs/utilities/__init__.py,sha256=WSStlqljfgQheMxHGfuofSc5LdmASGvO3FNO3f_zaT0,4806
|
|
24
25
|
sxs/utilities/bitwise.py,sha256=G9ZNYgwDQRhq5wbDf-p2HcUqkEP_IRDiQoXW4KyU17k,13205
|
|
@@ -80,9 +81,9 @@ sxs/zenodo/simannex.py,sha256=t-j_xChmND7vXnGu4rWyW6pa-5aZ31iokZOUaobzgak,4491
|
|
|
80
81
|
sxs/zenodo/surrogatemodeling.py,sha256=NTJXrnyXdrbX4KsoYP2obxVy-lakXtD7LqOEB4jQ_MI,8381
|
|
81
82
|
sxs/zenodo/api/__init__.py,sha256=EM_eh4Q8R5E0vIfMhyIR1IYFfOBu6vA0UTasgX9gHys,217
|
|
82
83
|
sxs/zenodo/api/deposit.py,sha256=J4RGvGjh0cEOrN4bBZWEDcPAhNscqB2fzLlvRZ5HTHM,36948
|
|
83
|
-
sxs/zenodo/api/login.py,sha256=
|
|
84
|
+
sxs/zenodo/api/login.py,sha256=hXyxLrx1PALaEEH76XrBvlO5Wwz-qa-MCjkI8UyB3t0,18005
|
|
84
85
|
sxs/zenodo/api/records.py,sha256=nKkhoHZ95CTztHF9Zzaug5p7IiUCJG4Em1i-l-WqH6U,3689
|
|
85
|
-
sxs-2025.0.
|
|
86
|
-
sxs-2025.0.
|
|
87
|
-
sxs-2025.0.
|
|
88
|
-
sxs-2025.0.
|
|
86
|
+
sxs-2025.0.13.dist-info/METADATA,sha256=kiyO3KLqzK_lqQe3cIMsMunkIUv6dqeuTHUgWJzbwck,11644
|
|
87
|
+
sxs-2025.0.13.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
88
|
+
sxs-2025.0.13.dist-info/licenses/LICENSE,sha256=ptVOd5m7LDM5ZF0x32cxb8c2Nd5NDmAhy6DX7xt_7VA,1080
|
|
89
|
+
sxs-2025.0.13.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|