sxs 2023.1.5__py3-none-any.whl → 2023.1.7__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 CHANGED
@@ -1 +1 @@
1
- __version__ = "2023.1.5"
1
+ __version__ = "2023.1.7"
sxs/catalog/catalog.py CHANGED
@@ -6,7 +6,7 @@ import functools
6
6
  # noinspection SpellCheckingInspection
7
7
  class Catalog(object):
8
8
  """Container interface to the SXS catalog"""
9
- url = "https://data.black-holes.org/catalog.json"
9
+ url = "https://data.black-holes.org/catalog.zip"
10
10
 
11
11
  def __init__(self, catalog=None, **kwargs):
12
12
  from .. import Metadata
@@ -54,6 +54,19 @@ class Catalog(object):
54
54
  from .. import sxs_directory, read_config
55
55
  from ..utilities import download_file
56
56
 
57
+ from warnings import warn
58
+ deprecation_notice = """
59
+
60
+ You have called a function that uses the `Catalog` class,
61
+ which, as of `sxs` version 2024.0.0, has been deprecated in
62
+ favor of the `Simulations` interface. See the documentation
63
+ for more information.
64
+
65
+ THIS CAN ONLY PROVIDE OLD DATA!
66
+
67
+ """
68
+ warn(deprecation_notice)
69
+
57
70
  progress = read_config("download_progress", True)
58
71
 
59
72
  cache_path = sxs_directory("cache") / "catalog.zip"
@@ -64,36 +77,12 @@ class Catalog(object):
64
77
  if_newer = False
65
78
 
66
79
  if download or download is None:
67
- # 1. Download the full json file (zipped in flight, but auto-decompressed on arrival)
68
- # 2. Zip to a temporary file (using bzip2, which is better than the in-flight compression)
69
- # 3. Replace the original catalog.zip with the temporary zip file
70
- # 4. Remove the full json file
71
- # 5. Make sure the temporary zip file is gone too
72
- temp_json = cache_path.with_suffix(".temp.json")
73
- temp_zip = cache_path.with_suffix(".temp.zip")
74
80
  try:
75
- try:
76
- download_file(cls.url, temp_json, progress=progress, if_newer=if_newer)
77
- except Exception as e:
78
- if download:
79
- raise RuntimeError(f"Failed to download '{cls.url}'; try setting `download=False`") from e
80
- download_failed = e # We'll try the cache
81
- else:
82
- download_failed = False
83
- if temp_json.exists():
84
- with zipfile.ZipFile(temp_zip, "w", compression=zipfile.ZIP_BZIP2) as catalog_zip:
85
- catalog_zip.write(temp_json, arcname="catalog.json")
86
- temp_zip.replace(cache_path)
87
- finally:
88
- # The `missing_ok` argument to `unlink` would be much nicer, but was added in python 3.8
89
- try:
90
- temp_json.unlink()
91
- except FileNotFoundError as e:
92
- pass
93
- try:
94
- temp_zip.unlink()
95
- except FileNotFoundError as e:
96
- pass
81
+ download_file(cls.url, cache_path, progress=progress, if_newer=if_newer)
82
+ except Exception as e:
83
+ if download:
84
+ raise RuntimeError(f"Failed to download '{cls.url}'; try setting `download=False`") from e
85
+ download_failed = e # We'll try the cache
97
86
 
98
87
  if not cache_path.exists():
99
88
  if download is False: # Test if it literally *is* False, rather than just casts to False
sxs/julia/__init__.py CHANGED
@@ -14,7 +14,11 @@ def pkg_update():
14
14
  return PostNewtonian.seval("Pkg.update()")
15
15
 
16
16
 
17
- def PNWaveform(M1, M2, chi1, chi2, Omega_i, **kwargs):
17
+ def PNWaveform(
18
+ M1, M2, chi1, chi2, Omega_i, *,
19
+ ell_min=2, ell_max=8, waveform_pn_order=None,
20
+ **orbital_evolution_kwargs
21
+ ):
18
22
  """Generate a PN waveform.
19
23
 
20
24
  The return value is an `sxs.WaveformModes` object with the
@@ -24,7 +28,8 @@ def PNWaveform(M1, M2, chi1, chi2, Omega_i, **kwargs):
24
28
  - `M2` (array): The secondary mass as a function of time.
25
29
  - `chi1` (array): The primary spin as a function of time.
26
30
  - `chi2` (array): The secondary spin as a function of time.
27
- - `frame` (array): The quaternionic frame as a function of time.
31
+ - `frame` (array): The quaternionic frame as a function of
32
+ time.
28
33
  - `v` (array): The orbital velocity as a function of time.
29
34
  - `orbital_phase` (array): The orbital phase as a function of
30
35
  time.
@@ -34,21 +39,32 @@ def PNWaveform(M1, M2, chi1, chi2, Omega_i, **kwargs):
34
39
  `PostNewtonian.inertial_waveform`. See [the Julia
35
40
  documentation](https://moble.github.io/PostNewtonian.jl/dev/internals/dynamics/#PostNewtonian.orbital_evolution)
36
41
  for details on the optional keyword arguments.
42
+
43
+ Note that the full Julia interface is also accessible from this
44
+ Python module. See [the Julia
45
+ docs](https://moble.github.io/PostNewtonian.jl/dev/interface/python/)
46
+ for details. Also, the GWFrames submodule of this module provides
47
+ another interface.
37
48
 
38
49
  """
39
50
  # Integrate the orbital dynamics
40
- inspiral = PostNewtonian.orbital_evolution(M1, M2, chi1, chi2, Omega_i, **kwargs)
51
+ inspiral = PostNewtonian.orbital_evolution(
52
+ M1, M2, chi1, chi2, Omega_i, **orbital_evolution_kwargs
53
+ )
41
54
  values = PostNewtonian.stack(inspiral.u)
42
55
 
43
56
  # Compute the waveform in the inertial frame
44
- h = PostNewtonian.inertial_waveform(inspiral).to_numpy().T
57
+ waveform_pn_order = waveform_pn_order or PostNewtonian.typemax(PostNewtonian.Int)
58
+ h = PostNewtonian.inertial_waveform(
59
+ inspiral, ell_min=ell_min, ell_max=ell_max, PNOrder=waveform_pn_order
60
+ ).to_numpy().T
45
61
 
46
62
  w = WaveformModes(
47
63
  h,
48
64
  time=inspiral.t,
49
65
  modes_axis=1,
50
- ell_min=2,
51
- ell_max=8,
66
+ ell_min=ell_min,
67
+ ell_max=ell_max,
52
68
  M1=values[0, :].to_numpy(),
53
69
  M2=values[1, :].to_numpy(),
54
70
  chi1=values[2:5, :].to_numpy().T,
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: sxs
3
- Version: 2023.1.5
3
+ Version: 2023.1.7
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/
@@ -62,7 +62,8 @@ Requires-Dist: jupyterlab>=2.2.8; extra == 'ecosystem'
62
62
  Requires-Dist: line-profiler>=3.0.2; extra == 'ecosystem'
63
63
  Requires-Dist: matplotlib>=2.1.1; extra == 'ecosystem'
64
64
  Requires-Dist: memory-profiler>=0.57.0; extra == 'ecosystem'
65
- Requires-Dist: numpy-quaternion>=0.3.1; extra == 'ecosystem'
65
+ Requires-Dist: numpy-quaternion>=2023.0.4; extra == 'ecosystem'
66
+ Requires-Dist: numpy<2.0,>=1.20; extra == 'ecosystem'
66
67
  Requires-Dist: qgrid>=1.3.1; extra == 'ecosystem'
67
68
  Requires-Dist: rise>=5.6.1; extra == 'ecosystem'
68
69
  Requires-Dist: scri>=2020.8.18; (sys_platform != 'win32') and extra == 'ecosystem'
@@ -1,5 +1,5 @@
1
1
  sxs/__init__.py,sha256=mDh2J6wLpie1GJT-Z3cmB3poEOvjXk-JsRu-p9U7zlI,2512
2
- sxs/__version__.py,sha256=fZ7HeugVNRT5R2lUnxHXFntEqqEL9_4owLQUXTsH_c4,25
2
+ sxs/__version__.py,sha256=uKTUqFKNISqFgpM4PcPjcKxuSBUpc2Gf1l2ypuPqCW8,25
3
3
  sxs/handlers.py,sha256=odBzrk5f-Q3Nzm2_brKBGiSgo-x8q4DmCt0H0E6J8Ko,20929
4
4
  sxs/juliapkg.json,sha256=7gFXwLT2iVnQp9280M2WLj4uVgWHiNy1qixQK17BSqw,176
5
5
  sxs/time_series.py,sha256=c3doMFyRrC33_YjFO4CLGhBOECWECo4TGzrhetSG8EQ,39641
@@ -7,14 +7,14 @@ sxs/caltechdata/__init__.py,sha256=s-RXyBiImKsQenqJIU6NAjlsjOX7f1MkIIW9rPtWYyg,1
7
7
  sxs/caltechdata/catalog.py,sha256=E2nystCaMZLKxTlLgfbfpGkckfkLyIzhn3YeEI3nQYc,4914
8
8
  sxs/caltechdata/login.py,sha256=JaNyawXLSq37R1qbGM0fuTbfXmbHHnixEzU7nhwAGeE,21546
9
9
  sxs/catalog/__init__.py,sha256=9-WTMTPDmqqkFyIHOtEbPA6etXm3_RSRrLWvHtLrjLg,205
10
- sxs/catalog/catalog.py,sha256=GUgPQjoYdSzvlHyl0XGQtqC5lSjNxTt_DT5H0XHSeZ8,26481
10
+ sxs/catalog/catalog.py,sha256=C9sG_kBNB7uaAVKP2_jqdD4gd62KjE-QeWkq9LVYZ_U,25586
11
11
  sxs/catalog/create.py,sha256=KL3zHljdLADeLfTDMTSkcVjIFim92Ylc-ziEvpiflEU,4734
12
12
  sxs/catalog/description.py,sha256=4eHMde4oGNp69jRmXCsfrIYJ4WK5HYgYFgXyF5htLDM,10830
13
13
  sxs/horizons/__init__.py,sha256=KR0aaEyreLHJItMBExGhG8bhRrHfPc0jBgPMsHysoEY,16265
14
14
  sxs/horizons/spec_horizons_h5.py,sha256=63cIGXuCEbJWrkRu3_mjL2gmssWtQ4axBTmg_wo_020,3642
15
15
  sxs/horizons/xor_multishuffle_bzip2.py,sha256=y4AKuxmLuj8K1pkdhIoSzENGyMu4uhpiPrBh-XisvK4,6536
16
16
  sxs/julia/GWFrames.py,sha256=WIm6TKm_2crM4TDY098XOKZVccUDzN8ndDN5RrG9eHI,2558
17
- sxs/julia/__init__.py,sha256=mu_hVj7YjXAPrzqb7W0bM-aWA9rawsVobX-6nabISTs,2405
17
+ sxs/julia/__init__.py,sha256=jJ5nyg0z5ao92TuSLM9cQPgy0pddzZLf-jJ-ZI5ei0I,2985
18
18
  sxs/metadata/__init__.py,sha256=KCvJ9Cf1WhIZp-z28UzarKcmUAzV2BOv2gqKiorILjo,149
19
19
  sxs/metadata/metadata.py,sha256=_vGqMUbeiN0fecJj9f9f9ex56WgSZuwwBXykUuj1_ZI,27679
20
20
  sxs/utilities/__init__.py,sha256=Np27-TQRWfGP8HtDWlZcnZ_UL8QHBXLjXHGHGAbHD2g,4580
@@ -75,7 +75,7 @@ sxs/zenodo/api/__init__.py,sha256=EM_eh4Q8R5E0vIfMhyIR1IYFfOBu6vA0UTasgX9gHys,21
75
75
  sxs/zenodo/api/deposit.py,sha256=uor1irig-gBvrEQNg_Wb0ZuiXhZC9AeLwuJu3vB30e0,36946
76
76
  sxs/zenodo/api/login.py,sha256=Yz0ytgi81_5BpDzhrS0WPMXlvU2qUaCK8yn8zxfEbko,18007
77
77
  sxs/zenodo/api/records.py,sha256=nKkhoHZ95CTztHF9Zzaug5p7IiUCJG4Em1i-l-WqH6U,3689
78
- sxs-2023.1.5.dist-info/METADATA,sha256=wC81g5TWr0AhqJMgD6l65HunR_HtDCAOEVetJ010ND0,9362
79
- sxs-2023.1.5.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
80
- sxs-2023.1.5.dist-info/licenses/LICENSE,sha256=ptVOd5m7LDM5ZF0x32cxb8c2Nd5NDmAhy6DX7xt_7VA,1080
81
- sxs-2023.1.5.dist-info/RECORD,,
78
+ sxs-2023.1.7.dist-info/METADATA,sha256=cj8WP_CTUDChjNgx0ayAv5Cl842e3sKhmd-PXZ-7dgg,9419
79
+ sxs-2023.1.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
80
+ sxs-2023.1.7.dist-info/licenses/LICENSE,sha256=ptVOd5m7LDM5ZF0x32cxb8c2Nd5NDmAhy6DX7xt_7VA,1080
81
+ sxs-2023.1.7.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.24.2
2
+ Generator: hatchling 1.27.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any