sxs 2024.0.12__tar.gz → 2024.0.14__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-2024.0.12 → sxs-2024.0.14}/CITATION.cff +2 -2
- {sxs-2024.0.12 → sxs-2024.0.14}/PKG-INFO +1 -1
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/__init__.py +1 -1
- sxs-2024.0.14/sxs/__version__.py +1 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/handlers.py +6 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/simulations/__init__.py +1 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/simulations/local.py +32 -14
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/simulations/simulations.py +110 -2
- sxs-2024.0.12/sxs/__version__.py +0 -1
- {sxs-2024.0.12 → sxs-2024.0.14}/.codecov.yml +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/.github/dependabot.yml +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/.github/scripts/parse_bump_rule.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/.github/workflows/build.yml +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/.github/workflows/pr_rtd_link.yml +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/.gitignore +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/.readthedocs.yaml +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/LICENSE +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/README.md +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/docs/api/catalog.md +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/docs/api/horizons.md +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/docs/api/load.md +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/docs/api/metadata.md +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/docs/api/simulation.md +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/docs/api/simulations.md +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/docs/api/time_series.md +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/docs/api/waveforms.md +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/docs/html/main.html +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/docs/images/favicon.ico +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/docs/index.md +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/docs/javascript/mathjax.js +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/docs/julia.md +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/docs/mathematica.md +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/docs/stylesheets/extra.css +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/docs/tutorials/00-Introduction.ipynb +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/docs/tutorials/01-Simulations_and_Metadata.ipynb +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/docs/tutorials/02-Simulation.ipynb +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/docs/tutorials/03-Horizons.ipynb +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/docs/tutorials/04-Waveforms.ipynb +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/docs/tutorials/05-PreprocessingForFFTs.ipynb +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/mkdocs.yml +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/pyproject.toml +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/caltechdata/__init__.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/caltechdata/catalog.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/caltechdata/login.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/catalog/__init__.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/catalog/catalog.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/catalog/create.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/catalog/description.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/horizons/__init__.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/horizons/spec_horizons_h5.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/horizons/xor_multishuffle_bzip2.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/julia/GWFrames.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/julia/__init__.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/juliapkg.json +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/metadata/__init__.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/metadata/metadata.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/simulations/simulation.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/time_series.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/__init__.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/bitwise.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/decimation/__init__.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/decimation/greedy_spline.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/decimation/linear_bisection.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/decimation/peak_greed.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/decimation/suppression.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/dicts.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/downloads.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/files.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/formats.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/inspire.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/lvcnr/__init__.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/lvcnr/comparisons.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/lvcnr/conversion.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/lvcnr/dataset.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/lvcnr/horizons.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/lvcnr/metadata.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/lvcnr/waveform_amp_phase.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/lvcnr/waveforms.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/monotonicity.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/pretty_print.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/references/__init__.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/references/ads.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/references/arxiv.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/references/fairchild_report.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/references/inspire.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/references/journal_abbreviations.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/references/references.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/select.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/smooth_functions.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/sxs_directories.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/sxs_identifiers.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/utilities/url.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/waveforms/__init__.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/waveforms/alignment.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/waveforms/format_handlers/__init__.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/waveforms/format_handlers/lvc.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/waveforms/format_handlers/nrar.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/waveforms/format_handlers/rotating_paired_diff_multishuffle_bzip2.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/waveforms/format_handlers/rotating_paired_xor_multishuffle_bzip2.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/waveforms/format_handlers/spectre_cce_v1.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/waveforms/memory.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/waveforms/mode_utilities.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/waveforms/transformations.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/waveforms/waveform_grid.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/waveforms/waveform_mixin.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/waveforms/waveform_modes.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/waveforms/waveform_signal.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/zenodo/__init__.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/zenodo/api/__init__.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/zenodo/api/deposit.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/zenodo/api/login.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/zenodo/api/records.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/zenodo/catalog.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/zenodo/creators.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/zenodo/simannex.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/sxs/zenodo/surrogatemodeling.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/tests/__init__.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/tests/conftest.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/tests/test_catalog.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/tests/test_horizons.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/tests/test_julia.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/tests/test_loader.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/tests/test_metadata.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/tests/test_simulation.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/tests/test_time_series.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/tests/test_transformations.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/tests/test_utilities.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/tests/test_waveform_rotations.py +0 -0
- {sxs-2024.0.12 → sxs-2024.0.14}/tests/test_waveforms.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: sxs
|
|
3
|
-
Version: 2024.0.
|
|
3
|
+
Version: 2024.0.14
|
|
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/
|
|
@@ -29,7 +29,7 @@ from .waveforms import rotating_paired_xor_multishuffle_bzip2 as rpxmb
|
|
|
29
29
|
from .waveforms import rotating_paired_diff_multishuffle_bzip2 as rpdmb
|
|
30
30
|
from .waveforms import spectre_cce_v1
|
|
31
31
|
from . import catalog, metadata, horizons, waveforms, zenodo, caltechdata
|
|
32
|
-
from .simulations import Simulation, Simulations
|
|
32
|
+
from .simulations import Simulation, Simulations, write_local_simulations, local_simulations
|
|
33
33
|
from .handlers import load, load_via_sxs_id, loadcontext, load_lvc
|
|
34
34
|
|
|
35
35
|
# The speed of light is, of course, defined to be exactly
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2024.0.14"
|
|
@@ -283,6 +283,12 @@ def load(location, download=None, cache=None, progress=None, truepath=None, **kw
|
|
|
283
283
|
elif location == "simulations":
|
|
284
284
|
return Simulations.load(download=download)
|
|
285
285
|
|
|
286
|
+
elif location == "local_simulations":
|
|
287
|
+
return Simulations.local(download=download)
|
|
288
|
+
|
|
289
|
+
elif location == "dataframe":
|
|
290
|
+
return Simulations.load(download=download).dataframe
|
|
291
|
+
|
|
286
292
|
elif sxs_id_version_lev_exact_re.match(location):
|
|
287
293
|
return Simulation(location, download=download, cache=cache, progress=progress, **kwargs)
|
|
288
294
|
|
|
@@ -84,13 +84,15 @@ def local_simulations(annex_dir):
|
|
|
84
84
|
each file that would be uploaded if the simulation were
|
|
85
85
|
published.
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
87
|
+
Parameters
|
|
88
|
+
----------
|
|
89
|
+
annex_dir : (str or Path)
|
|
90
|
+
The path to the annex directory to be processed.
|
|
91
|
+
|
|
92
|
+
Returns
|
|
93
|
+
-------
|
|
94
|
+
dict :
|
|
95
|
+
A dictionary containing the processed metadata.
|
|
94
96
|
"""
|
|
95
97
|
from os import walk
|
|
96
98
|
|
|
@@ -117,6 +119,7 @@ def local_simulations(annex_dir):
|
|
|
117
119
|
[d for d in dirnames if d.startswith("Lev")]
|
|
118
120
|
)[-1]
|
|
119
121
|
metadata = Metadata.load(dirpath / highest_lev / "metadata")
|
|
122
|
+
metadata = metadata.add_standard_parameters()
|
|
120
123
|
|
|
121
124
|
metadata["files"] = {
|
|
122
125
|
p2i(file.relative_to(dirpath)): {"link": str(file)}
|
|
@@ -130,18 +133,33 @@ def local_simulations(annex_dir):
|
|
|
130
133
|
return simulations
|
|
131
134
|
|
|
132
135
|
|
|
133
|
-
def write_local_simulations(annex_dir):
|
|
136
|
+
def write_local_simulations(annex_dir, output_file=None):
|
|
134
137
|
"""Write the local simulations to a file for use when loading `Simulations`
|
|
135
138
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
Parameters
|
|
140
|
+
----------
|
|
141
|
+
annex_dir : (str or Path)
|
|
142
|
+
The path to the annex directory to be processed.
|
|
143
|
+
output_file : (str or Path, optional)
|
|
144
|
+
The path to the file to be written. By default, the file is
|
|
145
|
+
written to `sxs_directory("cache") / "local_simulations.json"`.
|
|
146
|
+
N.B.: If you specify a different file, `sxs.load` will not
|
|
147
|
+
automatically find it.
|
|
148
|
+
|
|
149
|
+
Returns
|
|
150
|
+
-------
|
|
141
151
|
None
|
|
142
152
|
"""
|
|
143
153
|
from json import dump
|
|
144
154
|
|
|
155
|
+
# Process the annex directory to find all simulations
|
|
145
156
|
simulations = local_simulations(annex_dir)
|
|
146
|
-
|
|
157
|
+
|
|
158
|
+
# Write the simulations to file
|
|
159
|
+
if output_file is None:
|
|
160
|
+
output_file = sxs_directory("cache") / "local_simulations.json"
|
|
161
|
+
else:
|
|
162
|
+
output_file = Path(output_file)
|
|
163
|
+
output_file.parent.mkdir(parents=True, exist_ok=True)
|
|
164
|
+
with output_file.open("w") as f:
|
|
147
165
|
dump(simulations, f, indent=2, separators=(",", ": "), ensure_ascii=True)
|
|
@@ -2,6 +2,58 @@
|
|
|
2
2
|
|
|
3
3
|
import functools
|
|
4
4
|
import collections
|
|
5
|
+
import pandas as pd
|
|
6
|
+
|
|
7
|
+
class SimulationsDataFrame(pd.DataFrame):
|
|
8
|
+
@property
|
|
9
|
+
def BHBH(self):
|
|
10
|
+
"""Restrict dataframe to just binary black hole systems"""
|
|
11
|
+
return type(self)(self[self["object_types"] == "BHBH"])
|
|
12
|
+
BBH = BHBH
|
|
13
|
+
|
|
14
|
+
@property
|
|
15
|
+
def BHNS(self):
|
|
16
|
+
"""Restrict dataframe to just black hole-neutron star systems"""
|
|
17
|
+
return type(self)(self[self["object_types"] == "BHNS"])
|
|
18
|
+
NSBH = BHNS
|
|
19
|
+
|
|
20
|
+
@property
|
|
21
|
+
def NSNS(self):
|
|
22
|
+
"""Restrict dataframe to just binary neutron star systems"""
|
|
23
|
+
return type(self)(self[self["object_types"] == "NSNS"])
|
|
24
|
+
BNS = NSNS
|
|
25
|
+
|
|
26
|
+
@property
|
|
27
|
+
def noneccentric(self):
|
|
28
|
+
"""Restrict dataframe to just non-eccentric systems (e<1e-3)"""
|
|
29
|
+
return type(self)(self[self["reference_eccentricity"] < 1e-3])
|
|
30
|
+
|
|
31
|
+
@property
|
|
32
|
+
def eccentric(self):
|
|
33
|
+
"""Restrict dataframe to just eccentric systems (e>=1e-3)"""
|
|
34
|
+
return type(self)(self[self["reference_eccentricity"] >= 1e-3])
|
|
35
|
+
|
|
36
|
+
@property
|
|
37
|
+
def nonprecessing(self):
|
|
38
|
+
"""Restrict dataframe to just nonprecessing systems
|
|
39
|
+
|
|
40
|
+
The criterion used here is that the sum of the x-y components
|
|
41
|
+
of the spins is less than 1e-3 at the reference time.
|
|
42
|
+
"""
|
|
43
|
+
return type(self)(self[
|
|
44
|
+
(self["reference_chi1_perp"] + self["reference_chi2_perp"]) < 1e-3
|
|
45
|
+
])
|
|
46
|
+
|
|
47
|
+
@property
|
|
48
|
+
def precessing(self):
|
|
49
|
+
"""Restrict dataframe to just precessing systems
|
|
50
|
+
|
|
51
|
+
The criterion used here is that the sum of the x-y components
|
|
52
|
+
of the spins is at least 1e-3 at the reference time.
|
|
53
|
+
"""
|
|
54
|
+
return type(self)(self[
|
|
55
|
+
(self["reference_chi1_perp"] + self["reference_chi2_perp"]) >= 1e-3
|
|
56
|
+
])
|
|
5
57
|
|
|
6
58
|
|
|
7
59
|
class Simulations(collections.OrderedDict):
|
|
@@ -64,6 +116,62 @@ class Simulations(collections.OrderedDict):
|
|
|
64
116
|
)
|
|
65
117
|
return datetime.min.replace(tzinfo=timezone.utc)
|
|
66
118
|
return remote_timestamp
|
|
119
|
+
|
|
120
|
+
@classmethod
|
|
121
|
+
def local(cls, directory=None, *, download=None):
|
|
122
|
+
"""Load the local catalog of SXS simulations
|
|
123
|
+
|
|
124
|
+
This function loads the standard public catalog, but also
|
|
125
|
+
includes any local simulations found in the given directory.
|
|
126
|
+
If no directory is provided, it will look for the local
|
|
127
|
+
simulations file in the sxs cache directory.
|
|
128
|
+
|
|
129
|
+
Parameters
|
|
130
|
+
----------
|
|
131
|
+
directory : {None, str, Path}, optional
|
|
132
|
+
A directory containing subdirectories of SXS simulations.
|
|
133
|
+
See `sxs.local_simulations` for details about what is
|
|
134
|
+
expected in this directory. If None (the default), it
|
|
135
|
+
will look for the local simulations file in the sxs cache
|
|
136
|
+
directory.
|
|
137
|
+
download : {None, bool}, optional
|
|
138
|
+
Passed to `Simulations.load` when loading the public set
|
|
139
|
+
of simulations.
|
|
140
|
+
|
|
141
|
+
See Also
|
|
142
|
+
--------
|
|
143
|
+
sxs.local_simulations : Search for local simulations
|
|
144
|
+
sxs.write_local_simulations : Write local simulations to a file
|
|
145
|
+
|
|
146
|
+
"""
|
|
147
|
+
import json
|
|
148
|
+
from .local import write_local_simulations
|
|
149
|
+
from .. import sxs_directory
|
|
150
|
+
|
|
151
|
+
local_path = sxs_directory("cache") / "local_simulations.json"
|
|
152
|
+
if directory is not None:
|
|
153
|
+
write_local_simulations(directory)
|
|
154
|
+
if not local_path.exists():
|
|
155
|
+
if directory is not None:
|
|
156
|
+
raise ValueError(f"Writing local simulations for {directory=} failed")
|
|
157
|
+
else:
|
|
158
|
+
raise ValueError(
|
|
159
|
+
f"Local simulations file not found, but no `directory` was provided.\n"
|
|
160
|
+
+ "If called from `sxs.load`, just pass the name of the directory."
|
|
161
|
+
)
|
|
162
|
+
with local_path.open("r") as f:
|
|
163
|
+
local_simulations = json.load(f)
|
|
164
|
+
simulations = cls.load(download)
|
|
165
|
+
doi_versions = {
|
|
166
|
+
k: v["DOI_versions"]
|
|
167
|
+
for k,v in simulations.items()
|
|
168
|
+
if "DOI_versions" in v
|
|
169
|
+
}
|
|
170
|
+
simulations.update(local_simulations)
|
|
171
|
+
for k,v in doi_versions.items():
|
|
172
|
+
simulations[k]["DOI_versions"] = v
|
|
173
|
+
simulations.__file__ = str(local_path)
|
|
174
|
+
return simulations
|
|
67
175
|
|
|
68
176
|
@classmethod
|
|
69
177
|
@functools.lru_cache()
|
|
@@ -266,7 +374,7 @@ class Simulations(collections.OrderedDict):
|
|
|
266
374
|
dt = pd.to_datetime("1970-1-1").tz_localize("UTC")
|
|
267
375
|
return dt
|
|
268
376
|
|
|
269
|
-
sims_df = pd.concat((
|
|
377
|
+
sims_df = SimulationsDataFrame(pd.concat((
|
|
270
378
|
simulations["reference_time"].map(floater),
|
|
271
379
|
simulations["reference_mass_ratio"].map(floater),
|
|
272
380
|
simulations["reference_dimensionless_spin1"].map(three_vec),
|
|
@@ -338,7 +446,7 @@ class Simulations(collections.OrderedDict):
|
|
|
338
446
|
simulations["date_run_earliest"].map(datetime_from_string),
|
|
339
447
|
simulations["date_run_latest"].map(datetime_from_string),
|
|
340
448
|
simulations["date_postprocessing"].map(datetime_from_string),
|
|
341
|
-
), axis=1)
|
|
449
|
+
), axis=1))
|
|
342
450
|
|
|
343
451
|
sims_df.insert(0, "deprecated", (
|
|
344
452
|
~sims_df.superseded_by.isna()
|
sxs-2024.0.12/sxs/__version__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2024.0.12"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|