sxs 2024.0.31__tar.gz → 2024.0.33__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.
Files changed (130) hide show
  1. {sxs-2024.0.31 → sxs-2024.0.33}/CITATION.cff +2 -2
  2. {sxs-2024.0.31 → sxs-2024.0.33}/PKG-INFO +2 -2
  3. {sxs-2024.0.31 → sxs-2024.0.33}/pyproject.toml +1 -1
  4. sxs-2024.0.33/sxs/__version__.py +1 -0
  5. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/simulations/local.py +21 -4
  6. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/waveforms/alignment.py +11 -6
  7. sxs-2024.0.31/sxs/__version__.py +0 -1
  8. {sxs-2024.0.31 → sxs-2024.0.33}/.codecov.yml +0 -0
  9. {sxs-2024.0.31 → sxs-2024.0.33}/.github/dependabot.yml +0 -0
  10. {sxs-2024.0.31 → sxs-2024.0.33}/.github/scripts/parse_bump_rule.py +0 -0
  11. {sxs-2024.0.31 → sxs-2024.0.33}/.github/workflows/build.yml +0 -0
  12. {sxs-2024.0.31 → sxs-2024.0.33}/.github/workflows/pr_rtd_link.yml +0 -0
  13. {sxs-2024.0.31 → sxs-2024.0.33}/.gitignore +0 -0
  14. {sxs-2024.0.31 → sxs-2024.0.33}/.readthedocs.yaml +0 -0
  15. {sxs-2024.0.31 → sxs-2024.0.33}/LICENSE +0 -0
  16. {sxs-2024.0.31 → sxs-2024.0.33}/README.md +0 -0
  17. {sxs-2024.0.31 → sxs-2024.0.33}/docs/api/catalog.md +0 -0
  18. {sxs-2024.0.31 → sxs-2024.0.33}/docs/api/horizons.md +0 -0
  19. {sxs-2024.0.31 → sxs-2024.0.33}/docs/api/load.md +0 -0
  20. {sxs-2024.0.31 → sxs-2024.0.33}/docs/api/metadata.md +0 -0
  21. {sxs-2024.0.31 → sxs-2024.0.33}/docs/api/simulation.md +0 -0
  22. {sxs-2024.0.31 → sxs-2024.0.33}/docs/api/simulations.md +0 -0
  23. {sxs-2024.0.31 → sxs-2024.0.33}/docs/api/time_series.md +0 -0
  24. {sxs-2024.0.31 → sxs-2024.0.33}/docs/api/waveforms.md +0 -0
  25. {sxs-2024.0.31 → sxs-2024.0.33}/docs/html/main.html +0 -0
  26. {sxs-2024.0.31 → sxs-2024.0.33}/docs/images/favicon.ico +0 -0
  27. {sxs-2024.0.31 → sxs-2024.0.33}/docs/index.md +0 -0
  28. {sxs-2024.0.31 → sxs-2024.0.33}/docs/javascript/mathjax.js +0 -0
  29. {sxs-2024.0.31 → sxs-2024.0.33}/docs/julia.md +0 -0
  30. {sxs-2024.0.31 → sxs-2024.0.33}/docs/mathematica.md +0 -0
  31. {sxs-2024.0.31 → sxs-2024.0.33}/docs/stylesheets/extra.css +0 -0
  32. {sxs-2024.0.31 → sxs-2024.0.33}/docs/tutorials/00-Introduction.ipynb +0 -0
  33. {sxs-2024.0.31 → sxs-2024.0.33}/docs/tutorials/01-Simulations_and_Metadata.ipynb +0 -0
  34. {sxs-2024.0.31 → sxs-2024.0.33}/docs/tutorials/02-Simulation.ipynb +0 -0
  35. {sxs-2024.0.31 → sxs-2024.0.33}/docs/tutorials/03-Horizons.ipynb +0 -0
  36. {sxs-2024.0.31 → sxs-2024.0.33}/docs/tutorials/04-Waveforms.ipynb +0 -0
  37. {sxs-2024.0.31 → sxs-2024.0.33}/docs/tutorials/05-PreprocessingForFFTs.ipynb +0 -0
  38. {sxs-2024.0.31 → sxs-2024.0.33}/mkdocs.yml +0 -0
  39. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/__init__.py +0 -0
  40. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/caltechdata/__init__.py +0 -0
  41. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/caltechdata/catalog.py +0 -0
  42. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/caltechdata/login.py +0 -0
  43. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/catalog/__init__.py +0 -0
  44. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/catalog/catalog.py +0 -0
  45. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/catalog/create.py +0 -0
  46. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/catalog/description.py +0 -0
  47. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/handlers.py +0 -0
  48. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/horizons/__init__.py +0 -0
  49. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/horizons/spec_horizons_h5.py +0 -0
  50. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/horizons/xor_multishuffle_bzip2.py +0 -0
  51. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/julia/GWFrames.py +0 -0
  52. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/julia/__init__.py +0 -0
  53. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/juliapkg.json +0 -0
  54. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/metadata/__init__.py +0 -0
  55. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/metadata/metadata.py +0 -0
  56. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/simulations/__init__.py +0 -0
  57. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/simulations/simulation.py +0 -0
  58. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/simulations/simulations.py +0 -0
  59. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/time_series.py +0 -0
  60. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/__init__.py +0 -0
  61. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/bitwise.py +0 -0
  62. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/decimation/__init__.py +0 -0
  63. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/decimation/greedy_spline.py +0 -0
  64. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/decimation/linear_bisection.py +0 -0
  65. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/decimation/peak_greed.py +0 -0
  66. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/decimation/suppression.py +0 -0
  67. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/dicts.py +0 -0
  68. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/downloads.py +0 -0
  69. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/files.py +0 -0
  70. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/formats.py +0 -0
  71. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/inspire.py +0 -0
  72. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/lvcnr/__init__.py +0 -0
  73. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/lvcnr/comparisons.py +0 -0
  74. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/lvcnr/conversion.py +0 -0
  75. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/lvcnr/dataset.py +0 -0
  76. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/lvcnr/horizons.py +0 -0
  77. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/lvcnr/metadata.py +0 -0
  78. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/lvcnr/waveform_amp_phase.py +0 -0
  79. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/lvcnr/waveforms.py +0 -0
  80. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/monotonicity.py +0 -0
  81. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/pretty_print.py +0 -0
  82. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/references/__init__.py +0 -0
  83. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/references/ads.py +0 -0
  84. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/references/arxiv.py +0 -0
  85. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/references/fairchild_report.py +0 -0
  86. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/references/inspire.py +0 -0
  87. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/references/journal_abbreviations.py +0 -0
  88. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/references/references.py +0 -0
  89. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/select.py +0 -0
  90. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/smooth_functions.py +0 -0
  91. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/sxs_directories.py +0 -0
  92. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/sxs_identifiers.py +0 -0
  93. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/utilities/url.py +0 -0
  94. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/waveforms/__init__.py +0 -0
  95. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/waveforms/format_handlers/__init__.py +0 -0
  96. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/waveforms/format_handlers/grathena.py +0 -0
  97. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/waveforms/format_handlers/lvc.py +0 -0
  98. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/waveforms/format_handlers/nrar.py +0 -0
  99. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/waveforms/format_handlers/rotating_paired_diff_multishuffle_bzip2.py +0 -0
  100. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/waveforms/format_handlers/rotating_paired_xor_multishuffle_bzip2.py +0 -0
  101. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/waveforms/format_handlers/spectre_cce_v1.py +0 -0
  102. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/waveforms/memory.py +0 -0
  103. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/waveforms/mode_utilities.py +0 -0
  104. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/waveforms/transformations.py +0 -0
  105. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/waveforms/waveform_grid.py +0 -0
  106. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/waveforms/waveform_mixin.py +0 -0
  107. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/waveforms/waveform_modes.py +0 -0
  108. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/waveforms/waveform_signal.py +0 -0
  109. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/zenodo/__init__.py +0 -0
  110. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/zenodo/api/__init__.py +0 -0
  111. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/zenodo/api/deposit.py +0 -0
  112. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/zenodo/api/login.py +0 -0
  113. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/zenodo/api/records.py +0 -0
  114. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/zenodo/catalog.py +0 -0
  115. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/zenodo/creators.py +0 -0
  116. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/zenodo/simannex.py +0 -0
  117. {sxs-2024.0.31 → sxs-2024.0.33}/sxs/zenodo/surrogatemodeling.py +0 -0
  118. {sxs-2024.0.31 → sxs-2024.0.33}/tests/__init__.py +0 -0
  119. {sxs-2024.0.31 → sxs-2024.0.33}/tests/conftest.py +0 -0
  120. {sxs-2024.0.31 → sxs-2024.0.33}/tests/test_catalog.py +0 -0
  121. {sxs-2024.0.31 → sxs-2024.0.33}/tests/test_horizons.py +0 -0
  122. {sxs-2024.0.31 → sxs-2024.0.33}/tests/test_julia.py +0 -0
  123. {sxs-2024.0.31 → sxs-2024.0.33}/tests/test_loader.py +0 -0
  124. {sxs-2024.0.31 → sxs-2024.0.33}/tests/test_metadata.py +0 -0
  125. {sxs-2024.0.31 → sxs-2024.0.33}/tests/test_simulation.py +0 -0
  126. {sxs-2024.0.31 → sxs-2024.0.33}/tests/test_time_series.py +0 -0
  127. {sxs-2024.0.31 → sxs-2024.0.33}/tests/test_transformations.py +0 -0
  128. {sxs-2024.0.31 → sxs-2024.0.33}/tests/test_utilities.py +0 -0
  129. {sxs-2024.0.31 → sxs-2024.0.33}/tests/test_waveform_rotations.py +0 -0
  130. {sxs-2024.0.31 → sxs-2024.0.33}/tests/test_waveforms.py +0 -0
@@ -10,5 +10,5 @@ authors:
10
10
  title: "The sxs package"
11
11
  license: MIT
12
12
  doi: 10.5281/zenodo.4034006
13
- version: 2024.0.31
14
- date-released: 2025-02-15
13
+ version: 2024.0.33
14
+ date-released: 2025-02-19
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sxs
3
- Version: 2024.0.31
3
+ Version: 2024.0.33
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/
@@ -42,7 +42,7 @@ Requires-Dist: numba>=0.55; implementation_name == 'cpython'
42
42
  Requires-Dist: numpy>=1.25
43
43
  Requires-Dist: pandas>=1.1.2
44
44
  Requires-Dist: pytz>=2020.1
45
- Requires-Dist: quaternionic>=1.0
45
+ 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
@@ -21,7 +21,7 @@ dependencies = [
21
21
  "numpy >=1.25",
22
22
  "scipy >=1.13",
23
23
  "numba >=0.55; implementation_name == 'cpython'",
24
- "quaternionic >=1.0",
24
+ "quaternionic >=1.0.15",
25
25
  "spherical >=1.0.15",
26
26
  "h5py >=3",
27
27
  "inflection >=0.5.1",
@@ -0,0 +1 @@
1
+ __version__ = "2024.0.33"
@@ -1,7 +1,7 @@
1
1
  from pathlib import Path
2
2
  from .. import sxs_id, Metadata, sxs_directory
3
3
  from ..utilities import sxs_identifier_re
4
- from ..zenodo import path_to_invenio as p2i
4
+ from ..zenodo import path_to_invenio
5
5
 
6
6
  def file_upload_allowed(file, directory_listing):
7
7
  """Return True if the file should be uploaded
@@ -65,7 +65,7 @@ def extract_id_from_common_metadata(file, annex_dir):
65
65
  return key
66
66
 
67
67
 
68
- def local_simulations(annex_dir):
68
+ def local_simulations(annex_dir, compute_md5=False):
69
69
  """
70
70
  Walk the annex directory to find and process all simulations
71
71
 
@@ -88,6 +88,9 @@ def local_simulations(annex_dir):
88
88
  ----------
89
89
  annex_dir : (str or Path)
90
90
  The path to the annex directory to be processed.
91
+ compute_md5 : bool, optional
92
+ Whether to compute the MD5 hash of each file. Default is
93
+ False.
91
94
 
92
95
  Returns
93
96
  -------
@@ -95,6 +98,7 @@ def local_simulations(annex_dir):
95
98
  A dictionary containing the processed metadata.
96
99
  """
97
100
  from os import walk
101
+ from ..utilities import md5checksum
98
102
 
99
103
  simulations = {}
100
104
  annex_dir = Path(annex_dir).resolve()
@@ -121,8 +125,14 @@ def local_simulations(annex_dir):
121
125
  metadata = Metadata.load(dirpath / highest_lev / "metadata")
122
126
  metadata = metadata.add_standard_parameters()
123
127
 
128
+ metadata["directory"] = str(dirpath.relative_to(annex_dir))
129
+
124
130
  metadata["files"] = {
125
- p2i(file.relative_to(dirpath)): {"link": str(file)}
131
+ path_to_invenio(file.relative_to(dirpath)): {
132
+ "link": str(file),
133
+ "size": file.stat().st_size,
134
+ "checksum": md5checksum(file) if compute_md5 else "",
135
+ }
126
136
  for file in files_to_upload(dirpath, annex_dir)
127
137
  }
128
138
 
@@ -136,6 +146,10 @@ def local_simulations(annex_dir):
136
146
  def write_local_simulations(annex_dir, output_file=None):
137
147
  """Write the local simulations to a file for use when loading `Simulations`
138
148
 
149
+ This function calls `local_simulations` to obtain the dictionary,
150
+ but also writes the dictionary to a JSON file.
151
+
152
+
139
153
  Parameters
140
154
  ----------
141
155
  annex_dir : (str or Path)
@@ -148,7 +162,8 @@ def write_local_simulations(annex_dir, output_file=None):
148
162
 
149
163
  Returns
150
164
  -------
151
- None
165
+ dict :
166
+ A dictionary containing the processed metadata.
152
167
  """
153
168
  from json import dump
154
169
 
@@ -163,3 +178,5 @@ def write_local_simulations(annex_dir, output_file=None):
163
178
  output_file.parent.mkdir(parents=True, exist_ok=True)
164
179
  with output_file.open("w") as f:
165
180
  dump(simulations, f, indent=2, separators=(",", ": "), ensure_ascii=True)
181
+
182
+ return simulations
@@ -312,7 +312,7 @@ def _cost4d(δt_δso3, args):
312
312
 
313
313
  modes_A, modes_B, t_reference, normalization = args
314
314
  δt = δt_δso3[0]
315
- δSO3 = np.exp(quaternionic.array.from_vector_part(δt_δso3[1:]))
315
+ δSpin3 = np.exp(quaternionic.array.from_vector_part(δt_δso3[1:]))
316
316
 
317
317
  modes_A_at_δt = modes_A(t_reference + δt)
318
318
  ell_max = int(np.sqrt(modes_A_at_δt.shape[1] + 4)) - 1
@@ -327,7 +327,7 @@ def _cost4d(δt_δso3, args):
327
327
  spin_weight=-2,
328
328
  )
329
329
 
330
- wa_prime = wa_prime.rotate(δSO3)
330
+ wa_prime = wa_prime.rotate(δSpin3)
331
331
 
332
332
  # Take the sqrt because least_squares squares the inputs...
333
333
  diff = trapezoid(
@@ -479,8 +479,13 @@ def align4d(
479
479
  # Brute force over R_IG * exp(theta * z / 2) with δt_IG
480
480
  n_brute_force_δϕ = n_brute_force_δϕ or 2 * (2 * ell_max + 1)
481
481
  δt_δso3_brute_force = [
482
- [δt_IG, *np.log(R_IG * np.exp(quaternionic.array([0, 0, 0, angle / 2]))).vector]
483
- for angle in np.linspace(0, 2 * np.pi, num=n_brute_force_δϕ, endpoint=False)
482
+ [
483
+ δt_IG,
484
+ *np.log(
485
+ (R_IG * np.exp(quaternionic.array([0, 0, 0, angle / 2]))).canonicalized
486
+ ).vector
487
+ ]
488
+ for angle in np.linspace(-np.pi, np.pi, num=n_brute_force_δϕ, endpoint=False)
484
489
  ]
485
490
 
486
491
  # Remove certain modes, if requested
@@ -529,7 +534,7 @@ def align4d(
529
534
  max_nfev=50000,
530
535
  )
531
536
  δt = optimum.x[0]
532
- δSO3 = np.exp(quaternionic.array.from_vector_part(optimum.x[1:]))
537
+ δSpin3 = np.exp(quaternionic.array.from_vector_part(optimum.x[1:]))
533
538
 
534
539
  wa_prime = WaveformModes(
535
540
  input_array=(wa_orig[:, wa_orig.index(ell_min, -ell_min) : wa_orig.index(ell_max, ell_max)+1].data),
@@ -540,6 +545,6 @@ def align4d(
540
545
  ell_max=ell_max,
541
546
  spin_weight=spin_weight,
542
547
  )
543
- wa_prime = wa_prime.rotate(δSO3)
548
+ wa_prime = wa_prime.rotate(δSpin3)
544
549
 
545
550
  return optimum.cost, wa_prime, optimum
@@ -1 +0,0 @@
1
- __version__ = "2024.0.31"
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