sxs 2024.0.44__py3-none-any.whl → 2025.0.2__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 -1
- sxs/__version__.py +1 -1
- sxs/handlers.py +23 -20
- sxs/metadata/__init__.py +1 -9
- sxs/metadata/metadata.py +1 -640
- sxs/metadata/metric.py +1 -152
- sxs/simulations/local.py +1 -227
- sxs/simulations/simulation.py +19 -4
- sxs/simulations/simulations.py +1 -572
- sxs/utilities/downloads.py +1 -103
- sxs/utilities/string_converters.py +1 -47
- sxs/utilities/sxs_directories.py +1 -205
- sxs/utilities/sxs_identifiers.py +1 -126
- sxs/waveforms/format_handlers/lvc.py +6 -5
- sxs/waveforms/format_handlers/rotating_paired_diff_multishuffle_bzip2.py +6 -0
- sxs/zenodo/__init__.py +1 -11
- {sxs-2024.0.44.dist-info → sxs-2025.0.2.dist-info}/METADATA +2 -1
- {sxs-2024.0.44.dist-info → sxs-2025.0.2.dist-info}/RECORD +20 -23
- sxs/caltechdata/__init__.py +0 -342
- sxs/caltechdata/catalog.py +0 -85
- sxs/caltechdata/login.py +0 -506
- {sxs-2024.0.44.dist-info → sxs-2025.0.2.dist-info}/WHEEL +0 -0
- {sxs-2024.0.44.dist-info → sxs-2025.0.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,47 +1 @@
|
|
|
1
|
-
|
|
2
|
-
# Assemble some helper functions
|
|
3
|
-
|
|
4
|
-
def floater(x):
|
|
5
|
-
import numpy as np
|
|
6
|
-
try:
|
|
7
|
-
f = float(x)
|
|
8
|
-
except:
|
|
9
|
-
f = np.nan
|
|
10
|
-
return f
|
|
11
|
-
|
|
12
|
-
def floaterbound(x):
|
|
13
|
-
import numpy as np
|
|
14
|
-
try:
|
|
15
|
-
f = float(x)
|
|
16
|
-
except:
|
|
17
|
-
try:
|
|
18
|
-
f = float(x.replace("<", ""))
|
|
19
|
-
except:
|
|
20
|
-
f = np.nan
|
|
21
|
-
return f
|
|
22
|
-
|
|
23
|
-
def norm(x):
|
|
24
|
-
import numpy as np
|
|
25
|
-
try:
|
|
26
|
-
n = np.linalg.norm(x)
|
|
27
|
-
except:
|
|
28
|
-
n = np.nan
|
|
29
|
-
return n
|
|
30
|
-
|
|
31
|
-
def three_vec(x):
|
|
32
|
-
import numpy as np
|
|
33
|
-
try:
|
|
34
|
-
a = np.array(x, dtype=float)
|
|
35
|
-
if a.shape != (3,):
|
|
36
|
-
raise ValueError("Don't understand input as a three-vector")
|
|
37
|
-
except:
|
|
38
|
-
a = np.array([np.nan, np.nan, np.nan])
|
|
39
|
-
return a
|
|
40
|
-
|
|
41
|
-
def datetime_from_string(x):
|
|
42
|
-
import pandas as pd
|
|
43
|
-
try:
|
|
44
|
-
dt = pd.to_datetime(x).tz_convert("UTC")
|
|
45
|
-
except:
|
|
46
|
-
dt = pd.to_datetime("1970-1-1").tz_localize("UTC")
|
|
47
|
-
return dt
|
|
1
|
+
from sxscatalog.utilities.string_converters import *
|
sxs/utilities/sxs_directories.py
CHANGED
|
@@ -3,216 +3,12 @@
|
|
|
3
3
|
import re
|
|
4
4
|
import platform
|
|
5
5
|
import functools
|
|
6
|
+
from sxscatalog.utilities import read_config, write_config, sxs_directory
|
|
6
7
|
from .sxs_identifiers import sxs_path_re
|
|
7
8
|
|
|
8
9
|
_platform_system = platform.system()
|
|
9
10
|
|
|
10
11
|
|
|
11
|
-
def read_config(key=None, default=None):
|
|
12
|
-
"""Read variable from SXS configuration file
|
|
13
|
-
|
|
14
|
-
The configuration file is named `config.json` and is stored in the directory
|
|
15
|
-
returned by `sxs_directory("config")`.
|
|
16
|
-
|
|
17
|
-
Parameters
|
|
18
|
-
----------
|
|
19
|
-
key : {None, str}
|
|
20
|
-
If None (the default), the entire configuration file is returned as a
|
|
21
|
-
dictionary. Otherwise, this is used as a key for this dictionary.
|
|
22
|
-
default : Any
|
|
23
|
-
An arbitrary object that is returned if the `key` is not found in the
|
|
24
|
-
dictionary.
|
|
25
|
-
|
|
26
|
-
Returns
|
|
27
|
-
-------
|
|
28
|
-
config : {dict, Any}
|
|
29
|
-
If `key` is None (the default), the entire configuration dictionary is
|
|
30
|
-
returned. Otherwise, the value indexed by that key in the configuration
|
|
31
|
-
file is returned.
|
|
32
|
-
|
|
33
|
-
"""
|
|
34
|
-
import json
|
|
35
|
-
config_path = sxs_directory("config") / "config.json"
|
|
36
|
-
if config_path.exists():
|
|
37
|
-
config = json.load(config_path.open("r"))
|
|
38
|
-
else:
|
|
39
|
-
config = {}
|
|
40
|
-
if key is None:
|
|
41
|
-
return config
|
|
42
|
-
else:
|
|
43
|
-
return config.get(key, default)
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
def write_config(**kwargs):
|
|
47
|
-
"""Write variables to SXS configuration file
|
|
48
|
-
|
|
49
|
-
The configuration file is named `config.json` and is stored in the directory
|
|
50
|
-
returned by `sxs_directory("config")`.
|
|
51
|
-
|
|
52
|
-
All parameters must be passed as keyword arguments, as in
|
|
53
|
-
|
|
54
|
-
write_config(key=value)
|
|
55
|
-
|
|
56
|
-
which are then inserted as `key:value` pairs into the config dictionary and
|
|
57
|
-
written into the `config.json` file.
|
|
58
|
-
|
|
59
|
-
Useful settings include
|
|
60
|
-
|
|
61
|
-
* `write_config(download=True)`, to download data whenever necessary
|
|
62
|
-
* `write_config(cache=True)`, to ensure that caching is used for downloads
|
|
63
|
-
* `write_config(cache_directory="/some/path/you/choose")`, to manually choose
|
|
64
|
-
the directory to use for caching
|
|
65
|
-
|
|
66
|
-
"""
|
|
67
|
-
import json
|
|
68
|
-
config_path = sxs_directory("config") / "config.json"
|
|
69
|
-
if config_path.exists():
|
|
70
|
-
config = json.load(config_path.open("r"))
|
|
71
|
-
else:
|
|
72
|
-
config = {}
|
|
73
|
-
config.update(**kwargs)
|
|
74
|
-
with config_path.open("w") as c:
|
|
75
|
-
json.dump(config, c, indent=4, separators=(',', ': '))
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
@functools.lru_cache()
|
|
79
|
-
def sxs_directory(directory_type, persistent=True):
|
|
80
|
-
# noinspection SpellCheckingInspection
|
|
81
|
-
"""Return the SXS directory location, creating it if necessary
|
|
82
|
-
|
|
83
|
-
Parameters
|
|
84
|
-
----------
|
|
85
|
-
directory_type : {"cache", "config"}
|
|
86
|
-
The type of user directory to be found.
|
|
87
|
-
persistent : bool
|
|
88
|
-
If True (the default) try to return a persistent directory; otherwise,
|
|
89
|
-
return a temporary directory that will be deleted when the calling python
|
|
90
|
-
process exits (via the standard-library function `atexit.register`).
|
|
91
|
-
|
|
92
|
-
Returns
|
|
93
|
-
-------
|
|
94
|
-
directory : pathlib.Path
|
|
95
|
-
The full path to the config or cache directory. The directory is created
|
|
96
|
-
if it does not exist, and it is checked to make sure it can be written to.
|
|
97
|
-
|
|
98
|
-
Notes
|
|
99
|
-
-----
|
|
100
|
-
This function's return value is cached after the first call in a given python
|
|
101
|
-
session. To clear that cache, execute `sxs_directory.cache_clear()`.
|
|
102
|
-
|
|
103
|
-
In order of priority, if `persistent` is True, this function will choose one of
|
|
104
|
-
these directories:
|
|
105
|
-
|
|
106
|
-
1) The value found by `read_config("cache_directory")` if `directory_type` is
|
|
107
|
-
"cache"
|
|
108
|
-
2) Environment variable 'SXSCACHEDIR' or 'SXSCONFIGDIR'
|
|
109
|
-
3) On 'linux' or 'freebsd' platforms
|
|
110
|
-
a) Environment variable 'XDG_CACHE_HOME' or 'XDG_CONFIG_HOME'
|
|
111
|
-
b) The '.cache/sxs' or '.config/sxs' directory in the user's home directory
|
|
112
|
-
4) The '.sxs' directory in the user's home directory
|
|
113
|
-
|
|
114
|
-
Whichever directory is chosen, this function will try to create the directory
|
|
115
|
-
if necessary, and then check that it can be accessed and written to. If that
|
|
116
|
-
check fails, or if `persistent` is False, the function will create and return
|
|
117
|
-
|
|
118
|
-
5) A temporary directory that will be removed when python exits
|
|
119
|
-
|
|
120
|
-
This is based on matplotlib._get_config_or_cache_dir.
|
|
121
|
-
|
|
122
|
-
"""
|
|
123
|
-
import warnings
|
|
124
|
-
import sys
|
|
125
|
-
import os
|
|
126
|
-
import atexit
|
|
127
|
-
import shutil
|
|
128
|
-
import tempfile
|
|
129
|
-
from pathlib import Path
|
|
130
|
-
|
|
131
|
-
if directory_type not in ["cache", "config"]:
|
|
132
|
-
raise ValueError(f"Can only find 'cache' or 'config' directories, not '{directory_type}'")
|
|
133
|
-
|
|
134
|
-
suffix = Path("cache") if directory_type == "cache" else Path()
|
|
135
|
-
|
|
136
|
-
if persistent:
|
|
137
|
-
# Try to read config file first
|
|
138
|
-
if directory_type == "cache":
|
|
139
|
-
sxs_dir = read_config("cache_directory")
|
|
140
|
-
if sxs_dir is not None:
|
|
141
|
-
sxs_dir = Path(sxs_dir).expanduser().resolve()
|
|
142
|
-
try:
|
|
143
|
-
sxs_dir.mkdir(parents=True, exist_ok=True)
|
|
144
|
-
except OSError:
|
|
145
|
-
pass
|
|
146
|
-
else:
|
|
147
|
-
if os.access(str(sxs_dir), os.W_OK) and sxs_dir.is_dir():
|
|
148
|
-
return sxs_dir
|
|
149
|
-
message = (
|
|
150
|
-
f"\nThe `sxs` module failed to find or create a writable directory at {sxs_dir},\n"
|
|
151
|
-
f"even though {sxs_directory('config')} specified that directory for the cache."
|
|
152
|
-
)
|
|
153
|
-
warnings.warn(message)
|
|
154
|
-
|
|
155
|
-
# Use SXSCONFIGDIR or SXSCACHEDIR if they are set
|
|
156
|
-
sxs_dir = os.getenv(f'SXS{directory_type.upper()}DIR', default=False)
|
|
157
|
-
if sxs_dir:
|
|
158
|
-
sxs_dir = Path(sxs_dir).expanduser().resolve()
|
|
159
|
-
|
|
160
|
-
# On linux/freebsd
|
|
161
|
-
# a) Use ${XDG_CONFIG_HOME}/sxs or ${XDG_CACHE_HOME}/sxs if they are set
|
|
162
|
-
# b) Default to ~/.config/sxs or ~/.cache/sxs
|
|
163
|
-
elif sys.platform.startswith(('linux', 'freebsd')):
|
|
164
|
-
xdg_base = os.environ.get(f'XDG_{directory_type.upper()}_HOME')
|
|
165
|
-
if xdg_base is None:
|
|
166
|
-
xdg_base = Path.home() / f".{directory_type}"
|
|
167
|
-
sxs_dir = Path(xdg_base).expanduser().resolve() / "sxs"
|
|
168
|
-
|
|
169
|
-
# Elsewhere, default to ~/.sxs ~/.sxs/cache
|
|
170
|
-
else:
|
|
171
|
-
sxs_dir = Path.home() / ".sxs" / suffix
|
|
172
|
-
|
|
173
|
-
# Ensure that we have a writable directory
|
|
174
|
-
try:
|
|
175
|
-
sxs_dir.mkdir(parents=True, exist_ok=True)
|
|
176
|
-
except OSError:
|
|
177
|
-
pass
|
|
178
|
-
else:
|
|
179
|
-
if os.access(str(sxs_dir), os.W_OK) and sxs_dir.is_dir():
|
|
180
|
-
return sxs_dir
|
|
181
|
-
|
|
182
|
-
unwritable_dir = sxs_dir
|
|
183
|
-
|
|
184
|
-
# We've fallen through to creating a temporary directory. We want the cache directory to be a
|
|
185
|
-
# subdirectory of the main directory, so we fetch it through the lru_cache. We can't do this
|
|
186
|
-
# above, because it should be possible to get different results for certain settings.
|
|
187
|
-
if directory_type == "cache":
|
|
188
|
-
sxs_dir = sxs_directory("config", persistent=persistent) / "cache"
|
|
189
|
-
try:
|
|
190
|
-
sxs_dir.mkdir(exist_ok=True)
|
|
191
|
-
except OSError:
|
|
192
|
-
pass
|
|
193
|
-
else:
|
|
194
|
-
if os.access(str(sxs_dir), os.W_OK) and sxs_dir.is_dir():
|
|
195
|
-
return sxs_dir
|
|
196
|
-
|
|
197
|
-
# If the config or cache directory cannot be created or is not a writable
|
|
198
|
-
# directory, create a temporary one.
|
|
199
|
-
tmpdir = os.environ[f'SXS{directory_type.upper()}DIR'] = tempfile.mkdtemp(prefix="sxs-")
|
|
200
|
-
atexit.register(shutil.rmtree, tmpdir)
|
|
201
|
-
sxs_dir = Path(tmpdir) / suffix
|
|
202
|
-
if persistent:
|
|
203
|
-
# noinspection PyUnboundLocalVariable
|
|
204
|
-
message = (
|
|
205
|
-
f"\nThe `sxs` module created a temporary {directory_type} directory at {sxs_dir}\n"
|
|
206
|
-
f"because the default path ({unwritable_dir}) is not a writable directory;\n"
|
|
207
|
-
f"it is highly recommended to set the SXS{directory_type.upper()}DIR environment\n"
|
|
208
|
-
f"variable to a writable directory to enable caching of downloaded waveforms."
|
|
209
|
-
)
|
|
210
|
-
warnings.warn(message)
|
|
211
|
-
if directory_type == "cache":
|
|
212
|
-
sxs_dir.mkdir(exist_ok=True)
|
|
213
|
-
return sxs_dir
|
|
214
|
-
|
|
215
|
-
|
|
216
12
|
def sxs_path_to_system_path(path):
|
|
217
13
|
r"""Translate SXS path to a system-compatible path
|
|
218
14
|
|
sxs/utilities/sxs_identifiers.py
CHANGED
|
@@ -1,127 +1,2 @@
|
|
|
1
1
|
"""Simple regexes to understand SXS IDs"""
|
|
2
|
-
|
|
3
|
-
import re
|
|
4
|
-
import os
|
|
5
|
-
|
|
6
|
-
sep_regex = r"(:|/)" if os.sep == "/" else r"(:|/|\\)"
|
|
7
|
-
|
|
8
|
-
sxs_identifier_regex = (
|
|
9
|
-
r"(?P<sxs_identifier>SXS:(?P<simulation_type>BBH|BHNS|NSNS)(?:_ExtCCE)?:"
|
|
10
|
-
r"(?P<sxs_number>[0-9]+))(?:(v|V)(?P<version>[0-9.]+))?"
|
|
11
|
-
)
|
|
12
|
-
lev_regex = r"Lev(?P<lev>-?[0-9]+)"
|
|
13
|
-
sxs_id_version_lev_regex = sxs_identifier_regex + rf"(?:{sep_regex}{lev_regex})?"
|
|
14
|
-
sxs_id_version_lev_exact_regex = f"^{sxs_id_version_lev_regex}$"
|
|
15
|
-
|
|
16
|
-
file_regex = r"(?P<file>[a-zA-Z0-9_]+\.[a-zA-Z0-9]+)"
|
|
17
|
-
sxs_path_regex = sxs_id_version_lev_regex + rf"(?:{sep_regex}{file_regex})?"
|
|
18
|
-
|
|
19
|
-
sxs_identifier_re = re.compile(sxs_identifier_regex)
|
|
20
|
-
lev_re = re.compile(lev_regex)
|
|
21
|
-
lev_path_re = re.compile(f"{sep_regex}{lev_regex}")
|
|
22
|
-
sxs_id_version_lev_re = re.compile(sxs_id_version_lev_regex)
|
|
23
|
-
sxs_id_version_lev_exact_re = re.compile(sxs_id_version_lev_exact_regex)
|
|
24
|
-
sxs_path_re = re.compile(sxs_path_regex)
|
|
25
|
-
|
|
26
|
-
def sxs_id(s, default="", include_version=False):
|
|
27
|
-
"""Return the SXS ID contained in the input string
|
|
28
|
-
|
|
29
|
-
An SXS ID is anything that matches the following regular expression:
|
|
30
|
-
|
|
31
|
-
SXS:(BBH|BHNS|NSNS)(_ExtCCE)?:[0-9]+(v[0-9.]+)?
|
|
32
|
-
|
|
33
|
-
If no match is found, the empty string is returned. If multiple matches are
|
|
34
|
-
found, only the first is returned.
|
|
35
|
-
|
|
36
|
-
The input parameter may be:
|
|
37
|
-
1) A string believed to contain the SXS ID
|
|
38
|
-
2) The path to a file (like common-metadata.txt) containing such a string
|
|
39
|
-
3) An object with a 'title' attribute
|
|
40
|
-
4) An object with a 'title' item
|
|
41
|
-
|
|
42
|
-
"""
|
|
43
|
-
id, version = sxs_id_and_version(s, default)
|
|
44
|
-
if include_version:
|
|
45
|
-
return f"{id}{version}"
|
|
46
|
-
else:
|
|
47
|
-
return id
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
def sxs_id_and_version(s, default=""):
|
|
51
|
-
"""Return the SXS ID and version contained in the input string"""
|
|
52
|
-
import os.path
|
|
53
|
-
import re
|
|
54
|
-
try:
|
|
55
|
-
s = s["title"]
|
|
56
|
-
except (TypeError, KeyError):
|
|
57
|
-
pass
|
|
58
|
-
if hasattr(s, "title") and not isinstance(s.title, type("a".title)):
|
|
59
|
-
s = s.title
|
|
60
|
-
try:
|
|
61
|
-
if os.path.isfile(s):
|
|
62
|
-
with open(s, "r") as f:
|
|
63
|
-
s = [l.strip() for l in f.splitlines()]
|
|
64
|
-
for line in s:
|
|
65
|
-
sxs_id_line = sxs_id_and_version(line)
|
|
66
|
-
if sxs_id_line[0]:
|
|
67
|
-
return sxs_id_line
|
|
68
|
-
return default, ""
|
|
69
|
-
except TypeError:
|
|
70
|
-
pass
|
|
71
|
-
m = re.search(sxs_identifier_regex, s)
|
|
72
|
-
if m:
|
|
73
|
-
return m["sxs_identifier"], (f"v{m['version']}" if m["version"] else "")
|
|
74
|
-
else:
|
|
75
|
-
return default, ""
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
def simulation_title(sxs_id):
|
|
79
|
-
"""Create simulation title given just the SXS ID
|
|
80
|
-
|
|
81
|
-
Currently supported types return output that looks like
|
|
82
|
-
|
|
83
|
-
Binary black-hole simulation SXS:BBH:0001
|
|
84
|
-
Black-hole neutron-star binary simulation SXS:BHNS:0001
|
|
85
|
-
Binary neutron-star simulation SXS:NSNS:0001
|
|
86
|
-
|
|
87
|
-
"""
|
|
88
|
-
import re
|
|
89
|
-
sxs_system_re = re.compile(sxs_identifier_regex)
|
|
90
|
-
m = sxs_system_re.search(sxs_id)
|
|
91
|
-
if not m:
|
|
92
|
-
raise ValueError(f"No SXS identifier found in '{sxs_id}'")
|
|
93
|
-
sxs_identifier = m["sxs_identifier"]
|
|
94
|
-
simulation_type = m["simulation_type"]
|
|
95
|
-
if simulation_type == "BBH":
|
|
96
|
-
title = f"Binary black-hole simulation {sxs_identifier}"
|
|
97
|
-
elif simulation_type == "BHNS":
|
|
98
|
-
title = f"Black-hole neutron-star binary simulation {sxs_identifier}"
|
|
99
|
-
elif simulation_type == "NSNS":
|
|
100
|
-
title = f"Binary neutron-star simulation {sxs_identifier}"
|
|
101
|
-
else:
|
|
102
|
-
raise ValueError(f"Did not recognize SXS system type '{simulation_type}'; should be BBH, BHNS, or NSNS.")
|
|
103
|
-
return title
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
def lev_number(s):
|
|
107
|
-
"""Return the integer Lev number contained in the input string
|
|
108
|
-
|
|
109
|
-
The Lev number is anything that matches the following regular expression:
|
|
110
|
-
|
|
111
|
-
Lev(?P<lev>-?[0-9]+)
|
|
112
|
-
|
|
113
|
-
If no match is found, `None` is returned. If multiple matches are found,
|
|
114
|
-
only the first is returned.
|
|
115
|
-
|
|
116
|
-
"""
|
|
117
|
-
import re
|
|
118
|
-
m = re.search(lev_regex, s)
|
|
119
|
-
if m:
|
|
120
|
-
return int(m["lev"])
|
|
121
|
-
else:
|
|
122
|
-
return None
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
def sxs_id_to_url(sxs_id):
|
|
126
|
-
"""Return the DOI URL for the SXS ID"""
|
|
127
|
-
return f"https://doi.org/10.26138/{sxs_id}"
|
|
2
|
+
from sxscatalog.utilities.sxs_identifiers import *
|
|
@@ -36,11 +36,12 @@ def to_lvc_conventions(
|
|
|
36
36
|
):
|
|
37
37
|
r"""Return SXS waveform in LVC conventions.
|
|
38
38
|
|
|
39
|
-
This is the function underpinning `
|
|
40
|
-
that function is a
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
outputs, see that
|
|
39
|
+
This is the function underpinning the `to_lvk` method of the
|
|
40
|
+
various `Simulation` types. Essentially, that function is a
|
|
41
|
+
fairly thin wrapper around this one; it just loads the `h` and
|
|
42
|
+
`horizons` data and passes it to this function. For explanation
|
|
43
|
+
of what this function does, the inputs, and outputs, see that
|
|
44
|
+
function's docstring.
|
|
44
45
|
|
|
45
46
|
"""
|
|
46
47
|
if t_ref is None and f_ref is None:
|
|
@@ -413,6 +413,12 @@ def load(
|
|
|
413
413
|
raise ValueError(message)
|
|
414
414
|
|
|
415
415
|
file_name_str = str(file_name)
|
|
416
|
+
if file_name_str.endswith(".json"):
|
|
417
|
+
# This is just a JSON file with the "sxs_format" key, not an H5 file
|
|
418
|
+
# with the data in it. Just return the JSON data.
|
|
419
|
+
from ...handlers import JSONHandler
|
|
420
|
+
return JSONHandler.load(file_name_str)
|
|
421
|
+
|
|
416
422
|
group = kwargs.get("group", None)
|
|
417
423
|
if ".h5" in file_name_str and not file_name_str.endswith(".h5"):
|
|
418
424
|
file_name_str, group = file_name_str.split(".h5")
|
sxs/zenodo/__init__.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import os.path
|
|
6
6
|
from pathlib import Path
|
|
7
|
-
|
|
7
|
+
from sxscatalog.utilities import path_to_invenio, invenio_to_path
|
|
8
8
|
from .api import Login, Deposit, Records
|
|
9
9
|
from . import catalog, simannex, surrogatemodeling
|
|
10
10
|
|
|
@@ -12,16 +12,6 @@ from . import catalog, simannex, surrogatemodeling
|
|
|
12
12
|
# The other python API interface I found is here: https://github.com/moble/zenodo-python
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
def path_to_invenio(file_path):
|
|
16
|
-
"""Convert a file path to an invenio-compatible name"""
|
|
17
|
-
return str(file_path).replace(os.path.sep, ":")
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
def invenio_to_path(file_name):
|
|
21
|
-
"""Convert an invenio-compatible name to a file path"""
|
|
22
|
-
return Path(file_name.replace(":", os.path.sep))
|
|
23
|
-
|
|
24
|
-
|
|
25
15
|
def translate(sxs_identifier, url=False):
|
|
26
16
|
"""Query data.black-holes.org to get the current Zenodo equivalent of the given SXS ID
|
|
27
17
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sxs
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2025.0.2
|
|
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/
|
|
@@ -46,6 +46,7 @@ Requires-Dist: quaternionic>=1.0.15
|
|
|
46
46
|
Requires-Dist: requests>=2.24.0
|
|
47
47
|
Requires-Dist: scipy>=1.13
|
|
48
48
|
Requires-Dist: spherical>=1.0.15
|
|
49
|
+
Requires-Dist: sxscatalog>=3.0.0a26
|
|
49
50
|
Requires-Dist: tqdm>=4.63.1
|
|
50
51
|
Requires-Dist: urllib3>=1.25.10
|
|
51
52
|
Provides-Extra: docs
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
sxs/__init__.py,sha256=
|
|
2
|
-
sxs/__version__.py,sha256=
|
|
3
|
-
sxs/handlers.py,sha256=
|
|
1
|
+
sxs/__init__.py,sha256=8PntABL6yx7Ad70hP7WedNAVDTZiwm_2At5xIQGo4k8,2610
|
|
2
|
+
sxs/__version__.py,sha256=00CnSIbrBDJK1w5pLXr3qrweMV-XKl67exMRg7gte3Q,25
|
|
3
|
+
sxs/handlers.py,sha256=Rhj6HAKPKSCJYwpWcz2eUkd6yuQZdCndQjZhq71QQ1A,18308
|
|
4
4
|
sxs/juliapkg.json,sha256=-baaa3Za_KBmmiGjlh2YYLWmvUvZl6GaKKXwNI4S7qU,178
|
|
5
5
|
sxs/time_series.py,sha256=OKaLg8tFyrtKcef7900ri-a0C6A8wKxA68KovZXvH6I,41081
|
|
6
|
-
sxs/caltechdata/__init__.py,sha256=pvyc2Djch4DA6t06op-0NSTegrMSywzNi7Z3W_91-Cg,14670
|
|
7
|
-
sxs/caltechdata/catalog.py,sha256=E2nystCaMZLKxTlLgfbfpGkckfkLyIzhn3YeEI3nQYc,4914
|
|
8
|
-
sxs/caltechdata/login.py,sha256=JaNyawXLSq37R1qbGM0fuTbfXmbHHnixEzU7nhwAGeE,21546
|
|
9
6
|
sxs/catalog/__init__.py,sha256=9-WTMTPDmqqkFyIHOtEbPA6etXm3_RSRrLWvHtLrjLg,205
|
|
10
7
|
sxs/catalog/catalog.py,sha256=3sUNREH-eyNwtjBVW9MKih_B6hHooPj_I1OYxP_adao,26804
|
|
11
8
|
sxs/catalog/create.py,sha256=KL3zHljdLADeLfTDMTSkcVjIFim92Ylc-ziEvpiflEU,4734
|
|
@@ -15,17 +12,17 @@ sxs/horizons/spec_horizons_h5.py,sha256=63cIGXuCEbJWrkRu3_mjL2gmssWtQ4axBTmg_wo_
|
|
|
15
12
|
sxs/horizons/xor_multishuffle_bzip2.py,sha256=y4AKuxmLuj8K1pkdhIoSzENGyMu4uhpiPrBh-XisvK4,6536
|
|
16
13
|
sxs/julia/GWFrames.py,sha256=47H9Ugff7ldGBujiUTcADT3b4MSxUtqmajvSApI91WA,2892
|
|
17
14
|
sxs/julia/__init__.py,sha256=uSLP_xfU-GZG7IO5vs0TEkCR4LH8aBYMF-852wDY3kI,3490
|
|
18
|
-
sxs/metadata/__init__.py,sha256=
|
|
19
|
-
sxs/metadata/metadata.py,sha256=
|
|
20
|
-
sxs/metadata/metric.py,sha256=
|
|
15
|
+
sxs/metadata/__init__.py,sha256=vEb633hoKAnI9O7kBtejZXFFsWM6h_ShuTq2_Xl3hUs,72
|
|
16
|
+
sxs/metadata/metadata.py,sha256=8LBDWeUAtLOP-MTqbwf_m5eb6k8UKj0L_yKthidF7lA,98
|
|
17
|
+
sxs/metadata/metric.py,sha256=Tsig1Jm50OO8r89zfjCuQ4i3JAoiazSb4J9qYtPWKgM,41
|
|
21
18
|
sxs/simulations/__init__.py,sha256=GrZym0PHTULDg_hyFmISNzDfqVLz_hQo-djbgecZs54,134
|
|
22
|
-
sxs/simulations/local.py,sha256=
|
|
23
|
-
sxs/simulations/simulation.py,sha256=
|
|
24
|
-
sxs/simulations/simulations.py,sha256=
|
|
19
|
+
sxs/simulations/local.py,sha256=e77SeaWMl2PWX_EndQtShOXZxcFKhQsUDQ55R2Njcuc,43
|
|
20
|
+
sxs/simulations/simulation.py,sha256=OCkpzKtjkX6CgCbnY8d_CWv4oDKY7spaqvj8rEHM3TY,38223
|
|
21
|
+
sxs/simulations/simulations.py,sha256=sMle89VoD1CQni1N23Vjo3h2yj9LHHAtuaB_qfD3Wgg,109
|
|
25
22
|
sxs/utilities/__init__.py,sha256=WSStlqljfgQheMxHGfuofSc5LdmASGvO3FNO3f_zaT0,4806
|
|
26
23
|
sxs/utilities/bitwise.py,sha256=G9ZNYgwDQRhq5wbDf-p2HcUqkEP_IRDiQoXW4KyU17k,13205
|
|
27
24
|
sxs/utilities/dicts.py,sha256=CCpm3upG_9SRj9gjawukSUfaJ5asF-XRG2ausEXhYyg,695
|
|
28
|
-
sxs/utilities/downloads.py,sha256=
|
|
25
|
+
sxs/utilities/downloads.py,sha256=dgQvlpY3DffDX1HrmISb6iThuuIDt9BAPbgXFBrh2PQ,116
|
|
29
26
|
sxs/utilities/files.py,sha256=l7SNOg0ikgqXV3bmPJdXZQMQ_XPGXVUsIJIOjDVp3Mg,4517
|
|
30
27
|
sxs/utilities/formats.py,sha256=EekLcSi-fhFdkPT7R9h10d9_0gZH4EomH5-RVQp-sg8,3867
|
|
31
28
|
sxs/utilities/inspire.py,sha256=5F4KJ2D9qaEArl7dlhMv-K3Dym5S5oQI5RTwZXKhXRw,5298
|
|
@@ -33,9 +30,9 @@ sxs/utilities/monotonicity.py,sha256=YVwj3Tjew8dkpJJ9TReyuISD2ul5HJfkEJgCoiLru5Q
|
|
|
33
30
|
sxs/utilities/pretty_print.py,sha256=ZDHR3uvkzQ3Whk_eIp3BB7Abh796nqyrVsQRa68zgGc,1473
|
|
34
31
|
sxs/utilities/select.py,sha256=UgoEQIvkm8NBe6sD5O2gK0g9Pep-xvWoYQ3b7RxI-Ww,6727
|
|
35
32
|
sxs/utilities/smooth_functions.py,sha256=apoz3cDay10ozYiBAkj0Z6Bmksz7htKI9cr_Wa1Idp0,9077
|
|
36
|
-
sxs/utilities/string_converters.py,sha256=
|
|
37
|
-
sxs/utilities/sxs_directories.py,sha256=
|
|
38
|
-
sxs/utilities/sxs_identifiers.py,sha256=
|
|
33
|
+
sxs/utilities/string_converters.py,sha256=lbud4HskWK9ROQEkGhZh492l-hcbtQN-ELXR-KEOc7g,53
|
|
34
|
+
sxs/utilities/sxs_directories.py,sha256=8RJXP6Gw0BtmdUAoTw_E2NOHi3vJiHJB95mwfJEPrfo,2043
|
|
35
|
+
sxs/utilities/sxs_identifiers.py,sha256=1T7Skh1lcJZ5kfIAYePgms0CPoFpAzFdppOrr1zkCTU,94
|
|
39
36
|
sxs/utilities/url.py,sha256=dH73Vrtjy4AKqazoeP2EZNdknzhkXQLzMaFZCr9ocjY,1904
|
|
40
37
|
sxs/utilities/decimation/__init__.py,sha256=aE1p-NLwfd5nI4i6POT7Tttk0kZ2RUFuZf0Wjm-4W10,1336
|
|
41
38
|
sxs/utilities/decimation/greedy_spline.py,sha256=NVnwoEFIFkcqrNIoV3sssOyB-BrM8G7I4ldKhWqwQQw,4335
|
|
@@ -68,12 +65,12 @@ sxs/waveforms/waveform_modes.py,sha256=NousbAeSedN1RNh21g_5LAh0K82ikIumHPELKf9X_
|
|
|
68
65
|
sxs/waveforms/waveform_signal.py,sha256=Ojrt6DSDdleB0qmu6UwjjPnYdaWsrjnpBA_8dhnM_q4,182
|
|
69
66
|
sxs/waveforms/format_handlers/__init__.py,sha256=0wsnuBYCYsCkN19L2ipga7BtigvPyBcqiy_4qrzmLpE,50
|
|
70
67
|
sxs/waveforms/format_handlers/grathena.py,sha256=5NrHL3K0mRHApnFx5YsMUufDKUD1A_dZu8mGQqOdBeE,3622
|
|
71
|
-
sxs/waveforms/format_handlers/lvc.py,sha256=
|
|
68
|
+
sxs/waveforms/format_handlers/lvc.py,sha256=8hGyjSaXRfS1RPiknbACi6mSLDU-xoD3EiDG2CqEit4,7861
|
|
72
69
|
sxs/waveforms/format_handlers/nrar.py,sha256=3ycVoqQcWAAixV3mKp58_wUhYBHt6QeLv2YGSvy-EGM,21538
|
|
73
|
-
sxs/waveforms/format_handlers/rotating_paired_diff_multishuffle_bzip2.py,sha256=
|
|
70
|
+
sxs/waveforms/format_handlers/rotating_paired_diff_multishuffle_bzip2.py,sha256=7XgXnroQ-3dHCYnN6KrDkz8z9EVl57f8W6iOX6bUemA,27745
|
|
74
71
|
sxs/waveforms/format_handlers/rotating_paired_xor_multishuffle_bzip2.py,sha256=pFEJIlb6OQQNhv6r48ALFnZMKNZjuQY55ydWBADCDgU,2348
|
|
75
72
|
sxs/waveforms/format_handlers/spectre_cce_v1.py,sha256=nh57zbG_uWJZQVhMrz7H05fpsjl1X6oaita8aTRcWxU,3963
|
|
76
|
-
sxs/zenodo/__init__.py,sha256=
|
|
73
|
+
sxs/zenodo/__init__.py,sha256=rgFd1jN7IVcZEeed7iAoht1DitbLj31-8EtA0pd_e3c,25996
|
|
77
74
|
sxs/zenodo/catalog.py,sha256=3lbuV4M7XY1Z34jUTfVN_BHbm8blUVJPlSZQi2EXq9o,28737
|
|
78
75
|
sxs/zenodo/creators.py,sha256=z2KgTUK5daOez8Pe2JFFjsFNfvriQ8eJQ1PYic9rMEY,2573
|
|
79
76
|
sxs/zenodo/simannex.py,sha256=t-j_xChmND7vXnGu4rWyW6pa-5aZ31iokZOUaobzgak,4491
|
|
@@ -82,7 +79,7 @@ sxs/zenodo/api/__init__.py,sha256=EM_eh4Q8R5E0vIfMhyIR1IYFfOBu6vA0UTasgX9gHys,21
|
|
|
82
79
|
sxs/zenodo/api/deposit.py,sha256=J4RGvGjh0cEOrN4bBZWEDcPAhNscqB2fzLlvRZ5HTHM,36948
|
|
83
80
|
sxs/zenodo/api/login.py,sha256=Yz0ytgi81_5BpDzhrS0WPMXlvU2qUaCK8yn8zxfEbko,18007
|
|
84
81
|
sxs/zenodo/api/records.py,sha256=nKkhoHZ95CTztHF9Zzaug5p7IiUCJG4Em1i-l-WqH6U,3689
|
|
85
|
-
sxs-
|
|
86
|
-
sxs-
|
|
87
|
-
sxs-
|
|
88
|
-
sxs-
|
|
82
|
+
sxs-2025.0.2.dist-info/METADATA,sha256=1LSOQXL_n4JZSL1Z_EW-ShJ5JLvurIp2WbHYBFuHHqY,9288
|
|
83
|
+
sxs-2025.0.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
84
|
+
sxs-2025.0.2.dist-info/licenses/LICENSE,sha256=ptVOd5m7LDM5ZF0x32cxb8c2Nd5NDmAhy6DX7xt_7VA,1080
|
|
85
|
+
sxs-2025.0.2.dist-info/RECORD,,
|