sxs 2024.0.11__tar.gz → 2024.0.13__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 (129) hide show
  1. {sxs-2024.0.11 → sxs-2024.0.13}/CITATION.cff +2 -2
  2. {sxs-2024.0.11 → sxs-2024.0.13}/PKG-INFO +2 -2
  3. {sxs-2024.0.11 → sxs-2024.0.13}/pyproject.toml +1 -1
  4. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/__init__.py +1 -1
  5. sxs-2024.0.13/sxs/__version__.py +1 -0
  6. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/handlers.py +3 -0
  7. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/simulations/__init__.py +1 -0
  8. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/simulations/local.py +31 -14
  9. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/simulations/simulation.py +2 -2
  10. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/simulations/simulations.py +49 -0
  11. sxs-2024.0.11/sxs/__version__.py +0 -1
  12. {sxs-2024.0.11 → sxs-2024.0.13}/.codecov.yml +0 -0
  13. {sxs-2024.0.11 → sxs-2024.0.13}/.github/dependabot.yml +0 -0
  14. {sxs-2024.0.11 → sxs-2024.0.13}/.github/scripts/parse_bump_rule.py +0 -0
  15. {sxs-2024.0.11 → sxs-2024.0.13}/.github/workflows/build.yml +0 -0
  16. {sxs-2024.0.11 → sxs-2024.0.13}/.github/workflows/pr_rtd_link.yml +0 -0
  17. {sxs-2024.0.11 → sxs-2024.0.13}/.gitignore +0 -0
  18. {sxs-2024.0.11 → sxs-2024.0.13}/.readthedocs.yaml +0 -0
  19. {sxs-2024.0.11 → sxs-2024.0.13}/LICENSE +0 -0
  20. {sxs-2024.0.11 → sxs-2024.0.13}/README.md +0 -0
  21. {sxs-2024.0.11 → sxs-2024.0.13}/docs/api/catalog.md +0 -0
  22. {sxs-2024.0.11 → sxs-2024.0.13}/docs/api/horizons.md +0 -0
  23. {sxs-2024.0.11 → sxs-2024.0.13}/docs/api/load.md +0 -0
  24. {sxs-2024.0.11 → sxs-2024.0.13}/docs/api/metadata.md +0 -0
  25. {sxs-2024.0.11 → sxs-2024.0.13}/docs/api/simulation.md +0 -0
  26. {sxs-2024.0.11 → sxs-2024.0.13}/docs/api/simulations.md +0 -0
  27. {sxs-2024.0.11 → sxs-2024.0.13}/docs/api/time_series.md +0 -0
  28. {sxs-2024.0.11 → sxs-2024.0.13}/docs/api/waveforms.md +0 -0
  29. {sxs-2024.0.11 → sxs-2024.0.13}/docs/html/main.html +0 -0
  30. {sxs-2024.0.11 → sxs-2024.0.13}/docs/images/favicon.ico +0 -0
  31. {sxs-2024.0.11 → sxs-2024.0.13}/docs/index.md +0 -0
  32. {sxs-2024.0.11 → sxs-2024.0.13}/docs/javascript/mathjax.js +0 -0
  33. {sxs-2024.0.11 → sxs-2024.0.13}/docs/julia.md +0 -0
  34. {sxs-2024.0.11 → sxs-2024.0.13}/docs/mathematica.md +0 -0
  35. {sxs-2024.0.11 → sxs-2024.0.13}/docs/stylesheets/extra.css +0 -0
  36. {sxs-2024.0.11 → sxs-2024.0.13}/docs/tutorials/00-Introduction.ipynb +0 -0
  37. {sxs-2024.0.11 → sxs-2024.0.13}/docs/tutorials/01-Simulations_and_Metadata.ipynb +0 -0
  38. {sxs-2024.0.11 → sxs-2024.0.13}/docs/tutorials/02-Simulation.ipynb +0 -0
  39. {sxs-2024.0.11 → sxs-2024.0.13}/docs/tutorials/03-Horizons.ipynb +0 -0
  40. {sxs-2024.0.11 → sxs-2024.0.13}/docs/tutorials/04-Waveforms.ipynb +0 -0
  41. {sxs-2024.0.11 → sxs-2024.0.13}/docs/tutorials/05-PreprocessingForFFTs.ipynb +0 -0
  42. {sxs-2024.0.11 → sxs-2024.0.13}/mkdocs.yml +0 -0
  43. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/caltechdata/__init__.py +0 -0
  44. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/caltechdata/catalog.py +0 -0
  45. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/caltechdata/login.py +0 -0
  46. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/catalog/__init__.py +0 -0
  47. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/catalog/catalog.py +0 -0
  48. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/catalog/create.py +0 -0
  49. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/catalog/description.py +0 -0
  50. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/horizons/__init__.py +0 -0
  51. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/horizons/spec_horizons_h5.py +0 -0
  52. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/horizons/xor_multishuffle_bzip2.py +0 -0
  53. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/julia/GWFrames.py +0 -0
  54. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/julia/__init__.py +0 -0
  55. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/juliapkg.json +0 -0
  56. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/metadata/__init__.py +0 -0
  57. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/metadata/metadata.py +0 -0
  58. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/time_series.py +0 -0
  59. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/__init__.py +0 -0
  60. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/bitwise.py +0 -0
  61. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/decimation/__init__.py +0 -0
  62. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/decimation/greedy_spline.py +0 -0
  63. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/decimation/linear_bisection.py +0 -0
  64. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/decimation/peak_greed.py +0 -0
  65. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/decimation/suppression.py +0 -0
  66. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/dicts.py +0 -0
  67. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/downloads.py +0 -0
  68. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/files.py +0 -0
  69. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/formats.py +0 -0
  70. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/inspire.py +0 -0
  71. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/lvcnr/__init__.py +0 -0
  72. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/lvcnr/comparisons.py +0 -0
  73. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/lvcnr/conversion.py +0 -0
  74. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/lvcnr/dataset.py +0 -0
  75. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/lvcnr/horizons.py +0 -0
  76. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/lvcnr/metadata.py +0 -0
  77. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/lvcnr/waveform_amp_phase.py +0 -0
  78. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/lvcnr/waveforms.py +0 -0
  79. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/monotonicity.py +0 -0
  80. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/pretty_print.py +0 -0
  81. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/references/__init__.py +0 -0
  82. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/references/ads.py +0 -0
  83. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/references/arxiv.py +0 -0
  84. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/references/fairchild_report.py +0 -0
  85. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/references/inspire.py +0 -0
  86. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/references/journal_abbreviations.py +0 -0
  87. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/references/references.py +0 -0
  88. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/select.py +0 -0
  89. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/smooth_functions.py +0 -0
  90. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/sxs_directories.py +0 -0
  91. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/sxs_identifiers.py +0 -0
  92. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/utilities/url.py +0 -0
  93. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/waveforms/__init__.py +0 -0
  94. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/waveforms/alignment.py +0 -0
  95. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/waveforms/format_handlers/__init__.py +0 -0
  96. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/waveforms/format_handlers/lvc.py +0 -0
  97. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/waveforms/format_handlers/nrar.py +0 -0
  98. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/waveforms/format_handlers/rotating_paired_diff_multishuffle_bzip2.py +0 -0
  99. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/waveforms/format_handlers/rotating_paired_xor_multishuffle_bzip2.py +0 -0
  100. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/waveforms/format_handlers/spectre_cce_v1.py +0 -0
  101. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/waveforms/memory.py +0 -0
  102. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/waveforms/mode_utilities.py +0 -0
  103. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/waveforms/transformations.py +0 -0
  104. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/waveforms/waveform_grid.py +0 -0
  105. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/waveforms/waveform_mixin.py +0 -0
  106. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/waveforms/waveform_modes.py +0 -0
  107. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/waveforms/waveform_signal.py +0 -0
  108. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/zenodo/__init__.py +0 -0
  109. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/zenodo/api/__init__.py +0 -0
  110. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/zenodo/api/deposit.py +0 -0
  111. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/zenodo/api/login.py +0 -0
  112. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/zenodo/api/records.py +0 -0
  113. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/zenodo/catalog.py +0 -0
  114. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/zenodo/creators.py +0 -0
  115. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/zenodo/simannex.py +0 -0
  116. {sxs-2024.0.11 → sxs-2024.0.13}/sxs/zenodo/surrogatemodeling.py +0 -0
  117. {sxs-2024.0.11 → sxs-2024.0.13}/tests/__init__.py +0 -0
  118. {sxs-2024.0.11 → sxs-2024.0.13}/tests/conftest.py +0 -0
  119. {sxs-2024.0.11 → sxs-2024.0.13}/tests/test_catalog.py +0 -0
  120. {sxs-2024.0.11 → sxs-2024.0.13}/tests/test_horizons.py +0 -0
  121. {sxs-2024.0.11 → sxs-2024.0.13}/tests/test_julia.py +0 -0
  122. {sxs-2024.0.11 → sxs-2024.0.13}/tests/test_loader.py +0 -0
  123. {sxs-2024.0.11 → sxs-2024.0.13}/tests/test_metadata.py +0 -0
  124. {sxs-2024.0.11 → sxs-2024.0.13}/tests/test_simulation.py +0 -0
  125. {sxs-2024.0.11 → sxs-2024.0.13}/tests/test_time_series.py +0 -0
  126. {sxs-2024.0.11 → sxs-2024.0.13}/tests/test_transformations.py +0 -0
  127. {sxs-2024.0.11 → sxs-2024.0.13}/tests/test_utilities.py +0 -0
  128. {sxs-2024.0.11 → sxs-2024.0.13}/tests/test_waveform_rotations.py +0 -0
  129. {sxs-2024.0.11 → sxs-2024.0.13}/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.11
14
- date-released: 2024-09-28
13
+ version: 2024.0.13
14
+ date-released: 2024-10-09
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: sxs
3
- Version: 2024.0.11
3
+ Version: 2024.0.13
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/
@@ -44,7 +44,7 @@ Requires-Dist: pandas>=1.1.2
44
44
  Requires-Dist: pytz>=2020.1
45
45
  Requires-Dist: quaternionic>=1.0
46
46
  Requires-Dist: requests>=2.24.0
47
- Requires-Dist: scipy>=1.0
47
+ Requires-Dist: scipy>=1.7
48
48
  Requires-Dist: spherical>=1.0
49
49
  Requires-Dist: tqdm>=4.63.1
50
50
  Requires-Dist: urllib3>=1.25.10
@@ -19,7 +19,7 @@ classifiers = [
19
19
  ]
20
20
  dependencies = [
21
21
  "numpy >=1.20",
22
- "scipy >=1.0",
22
+ "scipy >=1.7",
23
23
  "numba >=0.55; implementation_name == 'cpython'",
24
24
  "quaternionic >=1.0",
25
25
  "spherical >=1.0",
@@ -29,7 +29,7 @@ from .waveforms import rotating_paired_xor_multishuffle_bzip2 as rpxmb
29
29
  from .waveforms import rotating_paired_diff_multishuffle_bzip2 as rpdmb
30
30
  from .waveforms import spectre_cce_v1
31
31
  from . import catalog, metadata, horizons, waveforms, zenodo, caltechdata
32
- from .simulations import Simulation, Simulations
32
+ from .simulations import Simulation, Simulations, write_local_simulations, local_simulations
33
33
  from .handlers import load, load_via_sxs_id, loadcontext, load_lvc
34
34
 
35
35
  # The speed of light is, of course, defined to be exactly
@@ -0,0 +1 @@
1
+ __version__ = "2024.0.13"
@@ -283,6 +283,9 @@ def load(location, download=None, cache=None, progress=None, truepath=None, **kw
283
283
  elif location == "simulations":
284
284
  return Simulations.load(download=download)
285
285
 
286
+ elif location == "local_simulations":
287
+ return Simulations.local(download=download)
288
+
286
289
  elif sxs_id_version_lev_exact_re.match(location):
287
290
  return Simulation(location, download=download, cache=cache, progress=progress, **kwargs)
288
291
 
@@ -1,2 +1,3 @@
1
1
  from .simulation import Simulation
2
2
  from .simulations import Simulations
3
+ from .local import write_local_simulations, local_simulations
@@ -84,13 +84,15 @@ def local_simulations(annex_dir):
84
84
  each file that would be uploaded if the simulation were
85
85
  published.
86
86
 
87
- Args:
88
- annex_dir (str or Path): The path to the annex directory to be
89
- processed.
90
-
91
- Returns:
92
- dict: A dictionary containing the processed simulations
93
- metadata.
87
+ Parameters
88
+ ----------
89
+ annex_dir : (str or Path)
90
+ The path to the annex directory to be processed.
91
+
92
+ Returns
93
+ -------
94
+ dict :
95
+ A dictionary containing the processed metadata.
94
96
  """
95
97
  from os import walk
96
98
 
@@ -130,18 +132,33 @@ def local_simulations(annex_dir):
130
132
  return simulations
131
133
 
132
134
 
133
- def write_local_simulations(annex_dir):
135
+ def write_local_simulations(annex_dir, output_file=None):
134
136
  """Write the local simulations to a file for use when loading `Simulations`
135
137
 
136
- Args:
137
- annex_dir (str or Path): The path to the annex directory to be
138
- processed.
139
-
140
- Returns:
138
+ Parameters
139
+ ----------
140
+ annex_dir : (str or Path)
141
+ The path to the annex directory to be processed.
142
+ output_file : (str or Path, optional)
143
+ The path to the file to be written. By default, the file is
144
+ written to `sxs_directory("cache") / "local_simulations.json"`.
145
+ N.B.: If you specify a different file, `sxs.load` will not
146
+ automatically find it.
147
+
148
+ Returns
149
+ -------
141
150
  None
142
151
  """
143
152
  from json import dump
144
153
 
154
+ # Process the annex directory to find all simulations
145
155
  simulations = local_simulations(annex_dir)
146
- with open(sxs_directory("cache") / "local_simulations.json", "w") as f:
156
+
157
+ # Write the simulations to file
158
+ if output_file is None:
159
+ output_file = sxs_directory("cache") / "local_simulations.json"
160
+ else:
161
+ output_file = Path(output_file)
162
+ output_file.parent.mkdir(parents=True, exist_ok=True)
163
+ with output_file.open("w") as f:
147
164
  dump(simulations, f, indent=2, separators=(",", ": "), ensure_ascii=True)
@@ -423,7 +423,7 @@ class SimulationBase:
423
423
  `f_ref`.
424
424
 
425
425
  Parameters
426
- ==========
426
+ ----------
427
427
  t_ref : float, optional
428
428
  The reference time at which the waveform frame is specified.
429
429
  This is measured in units of M, and defined relative to the
@@ -456,7 +456,7 @@ class SimulationBase:
456
456
  including all modes up to and including this ell value.
457
457
 
458
458
  Returns
459
- =======
459
+ -------
460
460
  times : float array
461
461
  Uniformly spaced 1D array of times, in units of M, at which
462
462
  the waveform and dynamics quantities are returned. Aligned
@@ -64,6 +64,55 @@ class Simulations(collections.OrderedDict):
64
64
  )
65
65
  return datetime.min.replace(tzinfo=timezone.utc)
66
66
  return remote_timestamp
67
+
68
+ @classmethod
69
+ def local(cls, directory=None, *, download=None):
70
+ """Load the local catalog of SXS simulations
71
+
72
+ This function loads the standard public catalog, but also
73
+ includes any local simulations found in the given directory.
74
+ If no directory is provided, it will look for the local
75
+ simulations file in the sxs cache directory.
76
+
77
+ Parameters
78
+ ----------
79
+ directory : {None, str, Path}, optional
80
+ A directory containing subdirectories of SXS simulations.
81
+ See `sxs.local_simulations` for details about what is
82
+ expected in this directory. If None (the default), it
83
+ will look for the local simulations file in the sxs cache
84
+ directory.
85
+ download : {None, bool}, optional
86
+ Passed to `Simulations.load` when loading the public set
87
+ of simulations.
88
+
89
+ See Also
90
+ --------
91
+ sxs.local_simulations : Search for local simulations
92
+ sxs.write_local_simulations : Write local simulations to a file
93
+
94
+ """
95
+ import json
96
+ from .local import write_local_simulations
97
+ from .. import sxs_directory
98
+
99
+ local_path = sxs_directory("cache") / "local_simulations.json"
100
+ if directory is not None:
101
+ write_local_simulations(directory)
102
+ if not local_path.exists():
103
+ if directory is not None:
104
+ raise ValueError(f"Writing local simulations for {directory=} failed")
105
+ else:
106
+ raise ValueError(
107
+ f"Local simulations file not found, but no `directory` was provided.\n"
108
+ + "If called from `sxs.load`, just pass the name of the directory."
109
+ )
110
+ with local_path.open("r") as f:
111
+ local_simulations = json.load(f)
112
+ simulations = cls.load(download)
113
+ simulations.update(local_simulations)
114
+ simulations.__file__ = str(local_path)
115
+ return simulations
67
116
 
68
117
  @classmethod
69
118
  @functools.lru_cache()
@@ -1 +0,0 @@
1
- __version__ = "2024.0.11"
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