sxs 2023.1.2__py3-none-any.whl → 2023.1.4__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.2"
1
+ __version__ = "2023.1.4"
sxs/julia/GWFrames.py ADDED
@@ -0,0 +1,73 @@
1
+ import quaternionic
2
+ from .. import WaveformModes
3
+ from . import PostNewtonian
4
+
5
+ def PNWaveform(
6
+ Approximant, delta, chi1_i, chi2_i, Omega_orb_i, *,
7
+ Omega_orb_0=None, R_frame_i=None, MinStepsPerOrbit=32,
8
+ PNWaveformModeOrder=4.0, PNOrbitalEvolutionOrder=4.0,
9
+ inertial=False, dt=0.0, quiet=True,
10
+ ell_min=2, ell_max=8, Lambda1=0, Lambda2=0,
11
+ **kwargs
12
+ ):
13
+ """Generate a PN waveform.
14
+
15
+ The return value is an `sxs.WaveformModes` object with the
16
+ following additional fields:
17
+
18
+ - `M1` (array): The primary mass as a function of time.
19
+ - `M2` (array): The secondary mass as a function of time.
20
+ - `chi1` (array): The primary spin as a function of time.
21
+ - `chi2` (array): The secondary spin as a function of time.
22
+ - `frame` (array): The quaternionic frame as a function of
23
+ time.
24
+ - `v` (array): The orbital velocity as a function of time.
25
+ - `orbital_phase` (array): The orbital phase as a function of
26
+ time.
27
+
28
+ This is a wrapper around the Julia function
29
+ `PostNewtonian.GWFrames.PNWaveform`. See [the Julia
30
+ documentation](https://moble.github.io/PostNewtonian.jl/dev/interface/gwframes/#PostNewtonian.GWFrames.PNWaveform)
31
+ for details on the optional keyword arguments.
32
+
33
+ """
34
+ Omega_orb_0 = Omega_orb_0 or Omega_orb_i
35
+ R_frame_i = R_frame_i or [1.0]
36
+
37
+ # Integrate the orbital dynamics
38
+ w1 = PostNewtonian.GWFrames.PNWaveform(
39
+ Approximant, delta, chi1_i, chi2_i, Omega_orb_i,
40
+ Omega_orb_0=Omega_orb_0, R_frame_i=R_frame_i,
41
+ MinStepsPerOrbit=MinStepsPerOrbit,
42
+ PNWaveformModeOrder=PNWaveformModeOrder,
43
+ PNOrbitalEvolutionOrder=PNOrbitalEvolutionOrder,
44
+ inertial=inertial, dt=dt, quiet=quiet,
45
+ ell_min=ell_min, ell_max=ell_max, Lambda1=Lambda1, Lambda2=Lambda2,
46
+ **kwargs
47
+ )
48
+
49
+ w = WaveformModes(
50
+ w1.data,
51
+ time=w1.t,
52
+ modes_axis=1,
53
+ ell_min=2,
54
+ ell_max=8,
55
+ M1=w1.M1.to_numpy(),
56
+ M2=w1.M2.to_numpy(),
57
+ chi1=w1.chi1.to_numpy(),
58
+ chi2=w1.chi2.to_numpy(),
59
+ frame=quaternionic.array(w1.frame.to_numpy()),
60
+ v=w1.v.to_numpy(),
61
+ orbital_phase=w1.Phi.to_numpy(),
62
+ )
63
+
64
+ # Allow the extra fields to be accessed naturally
65
+ w.M1 = w._metadata["M1"]
66
+ w.M2 = w._metadata["M2"]
67
+ w.chi1 = w._metadata["chi1"]
68
+ w.chi2 = w._metadata["chi2"]
69
+ #w.frame = w._metadata["frame"] ## Already done
70
+ w.v = w._metadata["v"]
71
+ w.orbital_phase = w._metadata["orbital_phase"]
72
+
73
+ return w
sxs/julia/__init__.py CHANGED
@@ -6,16 +6,28 @@ import juliacall
6
6
 
7
7
  PostNewtonian = juliacall.newmodule("PN")
8
8
  PostNewtonian.seval("using PostNewtonian")
9
+ GWFrames = PostNewtonian.GWFrames
9
10
 
10
-
11
- def update():
12
- """Update the Julia packages."""
11
+ def pkg_update():
12
+ """Update all installed Julia packages (but not julia itself)."""
13
13
  PostNewtonian.seval("import Pkg")
14
14
  return PostNewtonian.seval("Pkg.update()")
15
15
 
16
16
 
17
17
  def PNWaveform(M1, M2, chi1, chi2, Omega_i, **kwargs):
18
18
  """Generate a PN waveform.
19
+
20
+ The return value is an `sxs.WaveformModes` object with the
21
+ following additional fields:
22
+
23
+ - `M1` (array): The primary mass as a function of time.
24
+ - `M2` (array): The secondary mass as a function of time.
25
+ - `chi1` (array): The primary spin as a function of time.
26
+ - `chi2` (array): The secondary spin as a function of time.
27
+ - `frame` (array): The quaternionic frame as a function of time.
28
+ - `v` (array): The orbital velocity as a function of time.
29
+ - `orbital_phase` (array): The orbital phase as a function of
30
+ time.
19
31
 
20
32
  This is a wrapper around the Julia functions
21
33
  `PostNewtonian.orbital_evolution` and
@@ -26,6 +38,7 @@ def PNWaveform(M1, M2, chi1, chi2, Omega_i, **kwargs):
26
38
  """
27
39
  # Integrate the orbital dynamics
28
40
  inspiral = PostNewtonian.orbital_evolution(M1, M2, chi1, chi2, Omega_i, **kwargs)
41
+ values = PostNewtonian.stack(inspiral.u)
29
42
 
30
43
  # Compute the waveform in the inertial frame
31
44
  h = PostNewtonian.inertial_waveform(inspiral).to_numpy().T
@@ -36,13 +49,13 @@ def PNWaveform(M1, M2, chi1, chi2, Omega_i, **kwargs):
36
49
  modes_axis=1,
37
50
  ell_min=2,
38
51
  ell_max=8,
39
- M1=inspiral[0, :].to_numpy(),
40
- M2=inspiral[1, :].to_numpy(),
41
- chi1=inspiral[2:5, :].to_numpy().T,
42
- chi2=inspiral[5:8, :].to_numpy().T,
43
- frame=quaternionic.array(inspiral[8:12, :].to_numpy().T),
44
- v=inspiral[12, :].to_numpy(),
45
- orbital_phase=inspiral[13, :].to_numpy(),
52
+ M1=values[0, :].to_numpy(),
53
+ M2=values[1, :].to_numpy(),
54
+ chi1=values[2:5, :].to_numpy().T,
55
+ chi2=values[5:8, :].to_numpy().T,
56
+ frame=quaternionic.array(values[8:12, :].to_numpy().T),
57
+ v=values[12, :].to_numpy(),
58
+ orbital_phase=values[13, :].to_numpy(),
46
59
  )
47
60
 
48
61
  # Allow the extra fields to be accessed naturally
sxs/juliapkg.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
- "julia": "1.6",
2
+ "julia": "1.9",
3
3
  "packages": {
4
4
  "PostNewtonian": {
5
5
  "uuid": "377afc40-5642-4616-8613-b7ebca523866",
6
- "version": "0.6.4"
6
+ "version": "0.7.1"
7
7
  }
8
8
  }
9
9
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: sxs
3
- Version: 2023.1.2
3
+ Version: 2023.1.4
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,7 +1,7 @@
1
1
  sxs/__init__.py,sha256=mDh2J6wLpie1GJT-Z3cmB3poEOvjXk-JsRu-p9U7zlI,2512
2
- sxs/__version__.py,sha256=NuNM6D5qOmGY9rmiXnKT6h3MgD7ZiSH0U6Jv-qcoWuM,25
2
+ sxs/__version__.py,sha256=s21Xu-A9006ckoa-4vNKxe4sO6GhwdzjLuv_1fbzOvk,25
3
3
  sxs/handlers.py,sha256=odBzrk5f-Q3Nzm2_brKBGiSgo-x8q4DmCt0H0E6J8Ko,20929
4
- sxs/juliapkg.json,sha256=pTBn3UR4pTe_7QT2U4iMjh2F4cokzeOqv_Vy7OtezWA,176
4
+ sxs/juliapkg.json,sha256=7gFXwLT2iVnQp9280M2WLj4uVgWHiNy1qixQK17BSqw,176
5
5
  sxs/time_series.py,sha256=c3doMFyRrC33_YjFO4CLGhBOECWECo4TGzrhetSG8EQ,39641
6
6
  sxs/caltechdata/__init__.py,sha256=s-RXyBiImKsQenqJIU6NAjlsjOX7f1MkIIW9rPtWYyg,14761
7
7
  sxs/caltechdata/catalog.py,sha256=E2nystCaMZLKxTlLgfbfpGkckfkLyIzhn3YeEI3nQYc,4914
@@ -13,7 +13,8 @@ sxs/catalog/description.py,sha256=4eHMde4oGNp69jRmXCsfrIYJ4WK5HYgYFgXyF5htLDM,10
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
- sxs/julia/__init__.py,sha256=14OjHiP1uCkeP_ozQK6-Ic2UVNTv4DrmUQERV5UL64s,1716
16
+ sxs/julia/GWFrames.py,sha256=WIm6TKm_2crM4TDY098XOKZVccUDzN8ndDN5RrG9eHI,2558
17
+ sxs/julia/__init__.py,sha256=mu_hVj7YjXAPrzqb7W0bM-aWA9rawsVobX-6nabISTs,2405
17
18
  sxs/metadata/__init__.py,sha256=KCvJ9Cf1WhIZp-z28UzarKcmUAzV2BOv2gqKiorILjo,149
18
19
  sxs/metadata/metadata.py,sha256=_vGqMUbeiN0fecJj9f9f9ex56WgSZuwwBXykUuj1_ZI,27679
19
20
  sxs/utilities/__init__.py,sha256=Np27-TQRWfGP8HtDWlZcnZ_UL8QHBXLjXHGHGAbHD2g,4580
@@ -74,7 +75,7 @@ sxs/zenodo/api/__init__.py,sha256=EM_eh4Q8R5E0vIfMhyIR1IYFfOBu6vA0UTasgX9gHys,21
74
75
  sxs/zenodo/api/deposit.py,sha256=uor1irig-gBvrEQNg_Wb0ZuiXhZC9AeLwuJu3vB30e0,36946
75
76
  sxs/zenodo/api/login.py,sha256=Yz0ytgi81_5BpDzhrS0WPMXlvU2qUaCK8yn8zxfEbko,18007
76
77
  sxs/zenodo/api/records.py,sha256=nKkhoHZ95CTztHF9Zzaug5p7IiUCJG4Em1i-l-WqH6U,3689
77
- sxs-2023.1.2.dist-info/METADATA,sha256=GCnI0BMNEFh5ilpZ-KGngF98yhj2pS8lV1zfDEmtSZo,9362
78
- sxs-2023.1.2.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
79
- sxs-2023.1.2.dist-info/licenses/LICENSE,sha256=ptVOd5m7LDM5ZF0x32cxb8c2Nd5NDmAhy6DX7xt_7VA,1080
80
- sxs-2023.1.2.dist-info/RECORD,,
78
+ sxs-2023.1.4.dist-info/METADATA,sha256=R_Zl8moau8vaaPTyUcOV24P03QBPTnod2wH4ZtRqg04,9362
79
+ sxs-2023.1.4.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
80
+ sxs-2023.1.4.dist-info/licenses/LICENSE,sha256=ptVOd5m7LDM5ZF0x32cxb8c2Nd5NDmAhy6DX7xt_7VA,1080
81
+ sxs-2023.1.4.dist-info/RECORD,,
File without changes