sxs 2025.0.9__py3-none-any.whl → 2025.0.11__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__ = "2025.0.9"
1
+ __version__ = "2025.0.11"
@@ -7,7 +7,7 @@ from ..utilities import (
7
7
  )
8
8
 
9
9
 
10
- def search_prefixes(file, lev, files, ending=""):
10
+ def search_prefixes(file, sxs_id_stem, lev, files, ending=""):
11
11
  """Find the actual filename present in the list of files
12
12
 
13
13
  Different versions of Zenodo and CaltechDATA place different
@@ -20,16 +20,18 @@ def search_prefixes(file, lev, files, ending=""):
20
20
  there is just one Lev in a simulation, and we try to save the
21
21
  files in a consistent way — including the Lev with the appropriate
22
22
  separator, different versions of Zenodo and CaltechDATA will
23
- either allow or silently remove that prefix. The simplest
23
+ either allow or silently remove that prefix. On top of all that,
24
+ early uploads also got the SXS ID as a prefix. The simplest
24
25
  approach is to just search over all possibilities, for which
25
26
  filename is actually present in the data. That's what this
26
27
  function does.
27
28
 
28
29
  """
29
- for prefix in [f"{lev}:", f"{lev}/", ""]:
30
- fn = f"{prefix}{file}"
31
- if f"{fn}{ending}" in files:
32
- return fn
30
+ for directory in ["", f"{sxs_id_stem}/", f"{sxs_id_stem}:"]:
31
+ for prefix in [f"{lev}:", f"{lev}/", ""]:
32
+ fn = f"{directory}{prefix}{file}"
33
+ if f"{fn}{ending}" in files:
34
+ return fn
33
35
  raise ValueError(f"{file}{ending} not found in any form in files")
34
36
 
35
37
 
@@ -502,11 +504,12 @@ class SimulationBase:
502
504
 
503
505
  @property
504
506
  def metadata_path(self):
505
- for separator in [":", "/"]:
506
- for ending in [".json", ".txt"]:
507
- for prefix in ["", f"{self.lev}{separator}" if self.lev else ""]:
508
- if (fn := f"{prefix}metadata{ending}") in self.files:
509
- return fn
507
+ for beginning in ["", f"{self.sxs_id_stem}/", f"{self.sxs_id_stem}:"]:
508
+ for separator in [":", "/"]:
509
+ for ending in [".json", ".txt"]:
510
+ for prefix in ["", f"{self.lev}{separator}" if self.lev else ""]:
511
+ if (fn := f"{beginning}{prefix}metadata{ending}") in self.files:
512
+ return fn
510
513
  raise ValueError(
511
514
  f"Metadata file not found in simulation files for {self.location}"
512
515
  )
@@ -800,7 +803,10 @@ class Simulation_v1(SimulationBase):
800
803
 
801
804
  @property
802
805
  def horizons_path(self):
803
- return search_prefixes("Horizons.h5", self.lev, self.files)
806
+ return search_prefixes(
807
+ "Horizons.h5",
808
+ self.sxs_id_stem, self.lev, self.files
809
+ )
804
810
 
805
811
  @property
806
812
  def strain_path(self):
@@ -810,7 +816,10 @@ class Simulation_v1(SimulationBase):
810
816
  else "OutermostExtraction.dir"
811
817
  )
812
818
  return (
813
- search_prefixes("rhOverM_Asymptotic_GeometricUnits_CoM.h5", self.lev, self.files),
819
+ search_prefixes(
820
+ "rhOverM_Asymptotic_GeometricUnits_CoM.h5",
821
+ self.sxs_id_stem, self.lev, self.files
822
+ ),
814
823
  extrapolation
815
824
  )
816
825
 
@@ -822,7 +831,10 @@ class Simulation_v1(SimulationBase):
822
831
  else "OutermostExtraction.dir"
823
832
  )
824
833
  return (
825
- search_prefixes("rMPsi4_Asymptotic_GeometricUnits_CoM.h5", self.lev, self.files),
834
+ search_prefixes(
835
+ "rMPsi4_Asymptotic_GeometricUnits_CoM.h5",
836
+ self.sxs_id_stem, self.lev, self.files
837
+ ),
826
838
  extrapolation
827
839
  )
828
840
 
@@ -869,12 +881,18 @@ class Simulation_v2(SimulationBase):
869
881
 
870
882
  @property
871
883
  def horizons_path(self):
872
- return search_prefixes("Horizons.h5", self.lev, self.files)
884
+ return search_prefixes(
885
+ "Horizons.h5",
886
+ self.sxs_id_stem, self.lev, self.files
887
+ )
873
888
 
874
889
  @property
875
890
  def strain_path(self):
876
891
  return (
877
- search_prefixes(f"Strain_{self.extrapolation}", self.lev, self.files, ".h5"),
892
+ search_prefixes(
893
+ f"Strain_{self.extrapolation}",
894
+ self.sxs_id_stem, self.lev, self.files, ".h5"
895
+ ),
878
896
  "/"
879
897
  )
880
898
 
@@ -887,7 +905,10 @@ class Simulation_v2(SimulationBase):
887
905
  )
888
906
  prefix = f"{self.lev}:" if len(self.lev_numbers)>1 else ""
889
907
  return (
890
- search_prefixes(f"ExtraWaveforms", self.lev, self.files, ".h5"),
908
+ search_prefixes(
909
+ f"ExtraWaveforms",
910
+ self.sxs_id_stem, self.lev, self.files, ".h5"
911
+ ),
891
912
  f"/rMPsi4_Asymptotic_GeometricUnits_CoM_Mem/{extrapolation}"
892
913
  )
893
914
 
@@ -925,17 +946,26 @@ class Simulation_v3(Simulation_v2):
925
946
  @property
926
947
  def strain_path(self):
927
948
  return (
928
- search_prefixes(f"Strain_{self.extrapolation}", self.lev, self.files, ".h5"),
949
+ search_prefixes(
950
+ f"Strain_{self.extrapolation}",
951
+ self.sxs_id_stem, self.lev, self.files, ".h5"
952
+ ),
929
953
  "/"
930
954
  ) if self.extrapolation == self.default_extrapolation else (
931
- search_prefixes("ExtraWaveforms", self.lev, self.files, ".h5"),
955
+ search_prefixes(
956
+ "ExtraWaveforms",
957
+ self.sxs_id_stem, self.lev, self.files, ".h5"
958
+ ),
932
959
  f"/Strain_{self.extrapolation}.dir"
933
960
  )
934
961
 
935
962
  @property
936
963
  def psi4_path(self):
937
964
  return (
938
- search_prefixes("ExtraWaveforms", self.lev, self.files, ".h5"),
965
+ search_prefixes(
966
+ "ExtraWaveforms",
967
+ self.sxs_id_stem, self.lev, self.files, ".h5"
968
+ ),
939
969
  f"/Psi4_{self.extrapolation}.dir"
940
970
  )
941
971
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sxs
3
- Version: 2025.0.9
3
+ Version: 2025.0.11
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,5 +1,5 @@
1
1
  sxs/__init__.py,sha256=8PntABL6yx7Ad70hP7WedNAVDTZiwm_2At5xIQGo4k8,2610
2
- sxs/__version__.py,sha256=bJ1sZ9oROn9G9ZDBWzG6wiJYNXAEycXq6KeuuangpJc,25
2
+ sxs/__version__.py,sha256=KWkIhC5DpAzOIpYXYPNnUmkaOrYro7RmtnOyJRZo0yY,26
3
3
  sxs/handlers.py,sha256=jVV-HK-omzoBx5N2wcpLHvyoWq86hUfWCjnGbPpD91I,18343
4
4
  sxs/juliapkg.json,sha256=-baaa3Za_KBmmiGjlh2YYLWmvUvZl6GaKKXwNI4S7qU,178
5
5
  sxs/time_series.py,sha256=OKaLg8tFyrtKcef7900ri-a0C6A8wKxA68KovZXvH6I,41081
@@ -18,7 +18,7 @@ sxs/metadata/metric.py,sha256=Tsig1Jm50OO8r89zfjCuQ4i3JAoiazSb4J9qYtPWKgM,41
18
18
  sxs/simulations/__init__.py,sha256=eXkheYhRaYyKjul5J1IXpoJ7Wq4nr3Tgwr-HSS3BTek,156
19
19
  sxs/simulations/analyze.py,sha256=YwX0i_GRATRpvp7T8VheShkclvqYsraGDDKEkJQxJnw,11530
20
20
  sxs/simulations/local.py,sha256=e77SeaWMl2PWX_EndQtShOXZxcFKhQsUDQ55R2Njcuc,43
21
- sxs/simulations/simulation.py,sha256=8PJOyvC901XYzY1adPqrP-zpfVHYm8AsuHWx-FoREWo,42435
21
+ sxs/simulations/simulation.py,sha256=t7t7rXNDQFC-1llOQNdTChVXemuImEiEa-OYBts_JFs,43274
22
22
  sxs/simulations/simulations.py,sha256=sMle89VoD1CQni1N23Vjo3h2yj9LHHAtuaB_qfD3Wgg,109
23
23
  sxs/utilities/__init__.py,sha256=WSStlqljfgQheMxHGfuofSc5LdmASGvO3FNO3f_zaT0,4806
24
24
  sxs/utilities/bitwise.py,sha256=G9ZNYgwDQRhq5wbDf-p2HcUqkEP_IRDiQoXW4KyU17k,13205
@@ -82,7 +82,7 @@ sxs/zenodo/api/__init__.py,sha256=EM_eh4Q8R5E0vIfMhyIR1IYFfOBu6vA0UTasgX9gHys,21
82
82
  sxs/zenodo/api/deposit.py,sha256=J4RGvGjh0cEOrN4bBZWEDcPAhNscqB2fzLlvRZ5HTHM,36948
83
83
  sxs/zenodo/api/login.py,sha256=Yz0ytgi81_5BpDzhrS0WPMXlvU2qUaCK8yn8zxfEbko,18007
84
84
  sxs/zenodo/api/records.py,sha256=nKkhoHZ95CTztHF9Zzaug5p7IiUCJG4Em1i-l-WqH6U,3689
85
- sxs-2025.0.9.dist-info/METADATA,sha256=6x201xfU_VJBuOrRmF6zYuzpJHrh5iWn_hb5s_lPqAY,9311
86
- sxs-2025.0.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
87
- sxs-2025.0.9.dist-info/licenses/LICENSE,sha256=ptVOd5m7LDM5ZF0x32cxb8c2Nd5NDmAhy6DX7xt_7VA,1080
88
- sxs-2025.0.9.dist-info/RECORD,,
85
+ sxs-2025.0.11.dist-info/METADATA,sha256=VWHynMtaV8mRIqRJs1OjKy5UOXijNof3ZZdLMZkQaS4,9312
86
+ sxs-2025.0.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
87
+ sxs-2025.0.11.dist-info/licenses/LICENSE,sha256=ptVOd5m7LDM5ZF0x32cxb8c2Nd5NDmAhy6DX7xt_7VA,1080
88
+ sxs-2025.0.11.dist-info/RECORD,,