utdquake 0.2__tar.gz → 0.2.1__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 (36) hide show
  1. {utdquake-0.2/utdquake.egg-info → utdquake-0.2.1}/PKG-INFO +1 -1
  2. {utdquake-0.2 → utdquake-0.2.1}/utdquake/__init__.py +1 -1
  3. {utdquake-0.2 → utdquake-0.2.1}/utdquake/core/utdquake.py +12 -3
  4. {utdquake-0.2 → utdquake-0.2.1}/utdquake/qc/travel_time.py +4 -2
  5. {utdquake-0.2 → utdquake-0.2.1/utdquake.egg-info}/PKG-INFO +1 -1
  6. {utdquake-0.2 → utdquake-0.2.1}/LICENSE +0 -0
  7. {utdquake-0.2 → utdquake-0.2.1}/README.md +0 -0
  8. {utdquake-0.2 → utdquake-0.2.1}/setup.cfg +0 -0
  9. {utdquake-0.2 → utdquake-0.2.1}/setup.py +0 -0
  10. {utdquake-0.2 → utdquake-0.2.1}/utdquake/bank/__init__.py +0 -0
  11. {utdquake-0.2 → utdquake-0.2.1}/utdquake/bank/bank.py +0 -0
  12. {utdquake-0.2 → utdquake-0.2.1}/utdquake/bank/utils.py +0 -0
  13. {utdquake-0.2 → utdquake-0.2.1}/utdquake/core/__init__.py +0 -0
  14. {utdquake-0.2 → utdquake-0.2.1}/utdquake/core/config.py +0 -0
  15. {utdquake-0.2 → utdquake-0.2.1}/utdquake/core/data.py +0 -0
  16. {utdquake-0.2 → utdquake-0.2.1}/utdquake/core/load.py +0 -0
  17. {utdquake-0.2 → utdquake-0.2.1}/utdquake/core/patch.py +0 -0
  18. {utdquake-0.2 → utdquake-0.2.1}/utdquake/core/utils.py +0 -0
  19. {utdquake-0.2 → utdquake-0.2.1}/utdquake/qc/__init__.py +0 -0
  20. {utdquake-0.2 → utdquake-0.2.1}/utdquake/qc/catalog.py +0 -0
  21. {utdquake-0.2 → utdquake-0.2.1}/utdquake/qc/config.py +0 -0
  22. {utdquake-0.2 → utdquake-0.2.1}/utdquake/qc/events.py +0 -0
  23. {utdquake-0.2 → utdquake-0.2.1}/utdquake/qc/log.py +0 -0
  24. {utdquake-0.2 → utdquake-0.2.1}/utdquake/qc/picks.py +0 -0
  25. {utdquake-0.2 → utdquake-0.2.1}/utdquake/utils/__init__.py +0 -0
  26. {utdquake-0.2 → utdquake-0.2.1}/utdquake/utils/cache.py +0 -0
  27. {utdquake-0.2 → utdquake-0.2.1}/utdquake/utils/plot.py +0 -0
  28. {utdquake-0.2 → utdquake-0.2.1}/utdquake/utils/utils.py +0 -0
  29. {utdquake-0.2 → utdquake-0.2.1}/utdquake/writers/__init__.py +0 -0
  30. {utdquake-0.2 → utdquake-0.2.1}/utdquake/writers/manifest.py +0 -0
  31. {utdquake-0.2 → utdquake-0.2.1}/utdquake/writers/parquet.py +0 -0
  32. {utdquake-0.2 → utdquake-0.2.1}/utdquake/writers/schema.py +0 -0
  33. {utdquake-0.2 → utdquake-0.2.1}/utdquake.egg-info/SOURCES.txt +0 -0
  34. {utdquake-0.2 → utdquake-0.2.1}/utdquake.egg-info/dependency_links.txt +0 -0
  35. {utdquake-0.2 → utdquake-0.2.1}/utdquake.egg-info/requires.txt +0 -0
  36. {utdquake-0.2 → utdquake-0.2.1}/utdquake.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: utdquake
3
- Version: 0.2
3
+ Version: 0.2.1
4
4
  Summary: University of Texas at Dallas Earthquake Dataset
5
5
  Home-page: https://github.com/ecastillot/UTDQuake
6
6
  Author: ecastillot (Emmanuel Castillo)
@@ -20,7 +20,7 @@ Usage
20
20
  >>> net.events.head()
21
21
 
22
22
  """
23
- __version__ = "0.2"
23
+ __version__ = "0.2.1"
24
24
 
25
25
  from .core.utdquake import Dataset, Network
26
26
  from .core.data import download_snapshot, load
@@ -107,8 +107,8 @@ class Dataset:
107
107
  str
108
108
  Summary of networks, stations, and events.
109
109
  """
110
- return get_network_summary(stations=self.get_stations(),
111
- events= self.get_events())
110
+ return get_network_summary(stations=self.stations,
111
+ events= self.events)
112
112
 
113
113
  @property
114
114
  def networks(self):
@@ -160,6 +160,7 @@ class Dataset:
160
160
  include_stations: bool = False,
161
161
  include_picks: bool = False,
162
162
  include_banks: bool = False,
163
+ include_travel_time: bool = False,
163
164
  unzip_banks: bool = True,
164
165
  overwrite: bool = False,
165
166
  ) -> Path:
@@ -183,6 +184,8 @@ class Dataset:
183
184
  Whether to download seismic picks. Default: False.
184
185
  include_banks : bool, optional
185
186
  Whether to download the bank (synthetic) data. Default: False.
187
+ include_travel_time : bool, optional
188
+ Whether to download the travel time models. Default: False.
186
189
  overwrite : bool, optional
187
190
  If True, existing files will be re-downloaded. Default: False.
188
191
  unzip_banks : bool, optional
@@ -211,6 +214,7 @@ class Dataset:
211
214
  include_stations=include_stations,
212
215
  include_picks=include_picks,
213
216
  include_banks=include_banks,
217
+ include_travel_time=include_travel_time,
214
218
  overwrite=overwrite,
215
219
  unzip_banks=unzip_banks
216
220
  )
@@ -590,7 +594,12 @@ class Network:
590
594
  paths = resolve_network_paths(self.name,das=self.das, include_stations=True)
591
595
  return pd.read_parquet(paths["stations"])
592
596
 
593
-
597
+ @property
598
+ def travel_time(self) -> TravelTimeModel:
599
+ """Return the TravelTimeModel for this network."""
600
+ paths = resolve_network_paths(self.name,das=self.das, include_travel_time=True)
601
+ return TravelTimeModel.load(paths["travel_time"])
602
+
594
603
  def compute_stats(
595
604
  self,
596
605
  use_cache=True,
@@ -775,14 +775,16 @@ class TravelTimeModel:
775
775
  ----------
776
776
  phase : str
777
777
  Phase name.
778
- distance : numpy.ndarray
779
- Distances.
778
+ distance : int, float or numpy.ndarray
779
+ Distances at which to predict.
780
780
 
781
781
  Returns
782
782
  -------
783
783
  pandas.DataFrame
784
784
  Predicted sigma and percentile curves.
785
785
  """
786
+ if isinstance(distance, (int, float)):
787
+ distance = np.array([distance])
786
788
  return self.get_model(phase).predict(distance)
787
789
 
788
790
  # ---------------------------------------------------------------------
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: utdquake
3
- Version: 0.2
3
+ Version: 0.2.1
4
4
  Summary: University of Texas at Dallas Earthquake Dataset
5
5
  Home-page: https://github.com/ecastillot/UTDQuake
6
6
  Author: ecastillot (Emmanuel Castillo)
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