sxs 2024.0.13__py3-none-any.whl → 2024.0.14__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/__version__.py +1 -1
- sxs/handlers.py +3 -0
- sxs/simulations/local.py +1 -0
- sxs/simulations/simulations.py +61 -2
- {sxs-2024.0.13.dist-info → sxs-2024.0.14.dist-info}/METADATA +1 -1
- {sxs-2024.0.13.dist-info → sxs-2024.0.14.dist-info}/RECORD +8 -8
- {sxs-2024.0.13.dist-info → sxs-2024.0.14.dist-info}/WHEEL +0 -0
- {sxs-2024.0.13.dist-info → sxs-2024.0.14.dist-info}/licenses/LICENSE +0 -0
sxs/__version__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "2024.0.
|
|
1
|
+
__version__ = "2024.0.14"
|
sxs/handlers.py
CHANGED
|
@@ -286,6 +286,9 @@ def load(location, download=None, cache=None, progress=None, truepath=None, **kw
|
|
|
286
286
|
elif location == "local_simulations":
|
|
287
287
|
return Simulations.local(download=download)
|
|
288
288
|
|
|
289
|
+
elif location == "dataframe":
|
|
290
|
+
return Simulations.load(download=download).dataframe
|
|
291
|
+
|
|
289
292
|
elif sxs_id_version_lev_exact_re.match(location):
|
|
290
293
|
return Simulation(location, download=download, cache=cache, progress=progress, **kwargs)
|
|
291
294
|
|
sxs/simulations/local.py
CHANGED
|
@@ -119,6 +119,7 @@ def local_simulations(annex_dir):
|
|
|
119
119
|
[d for d in dirnames if d.startswith("Lev")]
|
|
120
120
|
)[-1]
|
|
121
121
|
metadata = Metadata.load(dirpath / highest_lev / "metadata")
|
|
122
|
+
metadata = metadata.add_standard_parameters()
|
|
122
123
|
|
|
123
124
|
metadata["files"] = {
|
|
124
125
|
p2i(file.relative_to(dirpath)): {"link": str(file)}
|
sxs/simulations/simulations.py
CHANGED
|
@@ -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):
|
|
@@ -110,7 +162,14 @@ class Simulations(collections.OrderedDict):
|
|
|
110
162
|
with local_path.open("r") as f:
|
|
111
163
|
local_simulations = json.load(f)
|
|
112
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
|
+
}
|
|
113
170
|
simulations.update(local_simulations)
|
|
171
|
+
for k,v in doi_versions.items():
|
|
172
|
+
simulations[k]["DOI_versions"] = v
|
|
114
173
|
simulations.__file__ = str(local_path)
|
|
115
174
|
return simulations
|
|
116
175
|
|
|
@@ -315,7 +374,7 @@ class Simulations(collections.OrderedDict):
|
|
|
315
374
|
dt = pd.to_datetime("1970-1-1").tz_localize("UTC")
|
|
316
375
|
return dt
|
|
317
376
|
|
|
318
|
-
sims_df = pd.concat((
|
|
377
|
+
sims_df = SimulationsDataFrame(pd.concat((
|
|
319
378
|
simulations["reference_time"].map(floater),
|
|
320
379
|
simulations["reference_mass_ratio"].map(floater),
|
|
321
380
|
simulations["reference_dimensionless_spin1"].map(three_vec),
|
|
@@ -387,7 +446,7 @@ class Simulations(collections.OrderedDict):
|
|
|
387
446
|
simulations["date_run_earliest"].map(datetime_from_string),
|
|
388
447
|
simulations["date_run_latest"].map(datetime_from_string),
|
|
389
448
|
simulations["date_postprocessing"].map(datetime_from_string),
|
|
390
|
-
), axis=1)
|
|
449
|
+
), axis=1))
|
|
391
450
|
|
|
392
451
|
sims_df.insert(0, "deprecated", (
|
|
393
452
|
~sims_df.superseded_by.isna()
|
|
@@ -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/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
sxs/__init__.py,sha256=hbydsXWR88sFiKExPJ1NHWGEvWRbbJBjSc1irSMYKgY,2623
|
|
2
|
-
sxs/__version__.py,sha256=
|
|
3
|
-
sxs/handlers.py,sha256=
|
|
2
|
+
sxs/__version__.py,sha256=vdCUhZemn99E8FoC13JF2FXz3SWQuB-IUxT4uez_vj8,26
|
|
3
|
+
sxs/handlers.py,sha256=B3mCX7sPtnyYpkzuDCUrpHL4pmHDo9I7UjaHAIJ2s5A,16874
|
|
4
4
|
sxs/juliapkg.json,sha256=higH1UDu30K_PN6-o7lAz0j1xjgYEiCCYBAc-Iaw1Iw,178
|
|
5
5
|
sxs/time_series.py,sha256=OKaLg8tFyrtKcef7900ri-a0C6A8wKxA68KovZXvH6I,41081
|
|
6
6
|
sxs/caltechdata/__init__.py,sha256=s-RXyBiImKsQenqJIU6NAjlsjOX7f1MkIIW9rPtWYyg,14761
|
|
@@ -18,9 +18,9 @@ sxs/julia/__init__.py,sha256=uSLP_xfU-GZG7IO5vs0TEkCR4LH8aBYMF-852wDY3kI,3490
|
|
|
18
18
|
sxs/metadata/__init__.py,sha256=KCvJ9Cf1WhIZp-z28UzarKcmUAzV2BOv2gqKiorILjo,149
|
|
19
19
|
sxs/metadata/metadata.py,sha256=y6X7LcsJKiZFjBPTwRHGtsT2uHf2s0r0OG_EGjD27pE,27663
|
|
20
20
|
sxs/simulations/__init__.py,sha256=GrZym0PHTULDg_hyFmISNzDfqVLz_hQo-djbgecZs54,134
|
|
21
|
-
sxs/simulations/local.py,sha256=
|
|
21
|
+
sxs/simulations/local.py,sha256=CEu8PzumNB1-JA05M4tYSW_UZVrldKzOB5T_I3pFWls,5789
|
|
22
22
|
sxs/simulations/simulation.py,sha256=WgxvZexjBH9fwd5qKID7YwvA1wglHerXwS_VQT1LlkY,33915
|
|
23
|
-
sxs/simulations/simulations.py,sha256=
|
|
23
|
+
sxs/simulations/simulations.py,sha256=orsogZOyktC5EiY2U4HzHlF_evMKT5du7t6s6jGphSk,21132
|
|
24
24
|
sxs/utilities/__init__.py,sha256=KTtsBKblP02t20anSzV_7tucRUw_bFObY5my5ZuJEBU,4793
|
|
25
25
|
sxs/utilities/bitwise.py,sha256=G9ZNYgwDQRhq5wbDf-p2HcUqkEP_IRDiQoXW4KyU17k,13205
|
|
26
26
|
sxs/utilities/dicts.py,sha256=CCpm3upG_9SRj9gjawukSUfaJ5asF-XRG2ausEXhYyg,695
|
|
@@ -79,7 +79,7 @@ sxs/zenodo/api/__init__.py,sha256=EM_eh4Q8R5E0vIfMhyIR1IYFfOBu6vA0UTasgX9gHys,21
|
|
|
79
79
|
sxs/zenodo/api/deposit.py,sha256=J4RGvGjh0cEOrN4bBZWEDcPAhNscqB2fzLlvRZ5HTHM,36948
|
|
80
80
|
sxs/zenodo/api/login.py,sha256=Yz0ytgi81_5BpDzhrS0WPMXlvU2qUaCK8yn8zxfEbko,18007
|
|
81
81
|
sxs/zenodo/api/records.py,sha256=nKkhoHZ95CTztHF9Zzaug5p7IiUCJG4Em1i-l-WqH6U,3689
|
|
82
|
-
sxs-2024.0.
|
|
83
|
-
sxs-2024.0.
|
|
84
|
-
sxs-2024.0.
|
|
85
|
-
sxs-2024.0.
|
|
82
|
+
sxs-2024.0.14.dist-info/METADATA,sha256=KttQT3Xa2eCymq08LJ5S0oXqQj_S1f8W2gfDNwJgqGc,9245
|
|
83
|
+
sxs-2024.0.14.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
84
|
+
sxs-2024.0.14.dist-info/licenses/LICENSE,sha256=ptVOd5m7LDM5ZF0x32cxb8c2Nd5NDmAhy6DX7xt_7VA,1080
|
|
85
|
+
sxs-2024.0.14.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|