pyatoa 0.4.0__tar.gz → 0.4.2__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 (52) hide show
  1. {pyatoa-0.4.0 → pyatoa-0.4.2}/PKG-INFO +1 -1
  2. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/core/manager.py +6 -2
  3. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/visuals/wave_maker.py +7 -8
  4. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa.egg-info/PKG-INFO +1 -1
  5. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyproject.toml +1 -1
  6. {pyatoa-0.4.0 → pyatoa-0.4.2}/LICENSE.txt +0 -0
  7. {pyatoa-0.4.0 → pyatoa-0.4.2}/README.md +0 -0
  8. {pyatoa-0.4.0 → pyatoa-0.4.2}/docs/__init__.py +0 -0
  9. {pyatoa-0.4.0 → pyatoa-0.4.2}/docs/conf.py +0 -0
  10. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/__init__.py +0 -0
  11. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/core/__init__.py +0 -0
  12. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/core/config.py +0 -0
  13. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/core/executive.py +0 -0
  14. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/core/inspector.py +0 -0
  15. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/scripts/__init__.py +0 -0
  16. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/scripts/data_data_example.py +0 -0
  17. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/scripts/load_example_data.py +0 -0
  18. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/scripts/process_data_w_mpi.py +0 -0
  19. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/scripts/syn_syn_example.py +0 -0
  20. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/tests/__init__.py +0 -0
  21. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/tests/test_asdf_utils.py +0 -0
  22. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/tests/test_config.py +0 -0
  23. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/tests/test_executive.py +0 -0
  24. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/tests/test_inspector.py +0 -0
  25. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/tests/test_manager.py +0 -0
  26. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/tests/test_mgmt_plot.py +0 -0
  27. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/tests/test_process_util.py +0 -0
  28. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/tests/test_utils.py +0 -0
  29. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/tests/test_wave_maker.py +0 -0
  30. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/utils/__init__.py +0 -0
  31. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/utils/adjoint.py +0 -0
  32. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/utils/asdf/__init__.py +0 -0
  33. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/utils/asdf/add.py +0 -0
  34. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/utils/asdf/clean.py +0 -0
  35. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/utils/asdf/load.py +0 -0
  36. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/utils/asdf/write.py +0 -0
  37. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/utils/calculate.py +0 -0
  38. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/utils/form.py +0 -0
  39. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/utils/images.py +0 -0
  40. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/utils/process.py +0 -0
  41. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/utils/srcrcv.py +0 -0
  42. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/utils/window.py +0 -0
  43. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/utils/write.py +0 -0
  44. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/visuals/__init__.py +0 -0
  45. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/visuals/insp_plot.py +0 -0
  46. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/visuals/map_maker.py +0 -0
  47. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa/visuals/wave_train.py +0 -0
  48. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa.egg-info/SOURCES.txt +0 -0
  49. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa.egg-info/dependency_links.txt +0 -0
  50. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa.egg-info/requires.txt +0 -0
  51. {pyatoa-0.4.0 → pyatoa-0.4.2}/pyatoa.egg-info/top_level.txt +0 -0
  52. {pyatoa-0.4.0 → pyatoa-0.4.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyatoa
3
- Version: 0.4.0
3
+ Version: 0.4.2
4
4
  Summary: Python's Adjoint Tomography Operations Assistant
5
5
  Author: adjTomo Dev Team
6
6
  Author-email: adjtomo@gmail.com
@@ -492,11 +492,14 @@ class Manager:
492
492
  net, sta = code.split('.')
493
493
  sta_tag = f"{net}.{sta}"
494
494
  if sta_tag in ds.waveforms.list():
495
- self.inv = ds.waveforms[sta_tag].StationXML
496
495
  self.st_syn = ds.waveforms[sta_tag][synthetic_tag or
497
496
  self.config.synthetic_tag]
498
497
  self.st_obs = ds.waveforms[sta_tag][observed_tag or
499
498
  self.config.observed_tag]
499
+ try:
500
+ self.inv = ds.waveforms[sta_tag].StationXML
501
+ except AttributeError:
502
+ logger.warning("no StationXML attribute found for station")
500
503
  if windows:
501
504
  self.windows = load_windows(ds, net, sta, iter_, step,
502
505
  return_previous=False)
@@ -1239,7 +1242,8 @@ class Manager:
1239
1242
  else:
1240
1243
  logger.debug("no windows given, adjoint sources will be "
1241
1244
  "calculated on full trace")
1242
- for comp in self.config.component_list:
1245
+ component_list = list(set(_.stats.component for _ in self.st_syn))
1246
+ for comp in component_list:
1243
1247
  dt = self.st_obs.select(component=comp)[0].stats.delta
1244
1248
  npts = self.st_obs.select(component=comp)[0].stats.npts
1245
1249
  # We offset the bounds of the entire trace by 1s to play nice
@@ -6,6 +6,7 @@ outputted by Pyflex as well as adjoint sources from Pyadjoint.
6
6
  Flexible to allow for only waveform plots, or for the addition of objects
7
7
  based on inputs.
8
8
  """
9
+ from re import I
9
10
  import numpy as np
10
11
  import matplotlib as mpl
11
12
  import matplotlib.pyplot as plt
@@ -227,7 +228,7 @@ class WaveMaker:
227
228
  label=f"{obs.id} ({self.config.st_obs_type.upper()})",
228
229
  linewidth=linewidth)
229
230
  a2, = ax.plot(self.time_axis, syn.data, syn_color, zorder=10,
230
- label=f"{syn.id} ({self.config.st_obs_type.upper()})",
231
+ label=f"{syn.id} ({self.config.st_syn_type.upper()})",
231
232
  linewidth=linewidth)
232
233
 
233
234
  return [a1, a2]
@@ -485,7 +486,7 @@ class WaveMaker:
485
486
  b1, = ax.plot(self.time_axis, adjsrc.adjoint_source[::-1], color,
486
487
  alpha=alpha, linewidth=linewidth, linestyle=linestyle,
487
488
  zorder=9,
488
- label=fr"Adjoint Source ($\chi$={adjsrc.misfit:.2f})"
489
+ label=fr"Adjoint Source ($\chi$={adjsrc.misfit:.3E})"
489
490
  )
490
491
  return [b1]
491
492
 
@@ -773,13 +774,11 @@ def format_axis(input_ax, percent_over=0.125):
773
774
  :param percent_over: the percentage above the peak value that the bounds
774
775
  of the axis will be set
775
776
  """
776
- ymin, ymax = input_ax.get_ylim()
777
777
  maxvalue = max([abs(_) for _ in input_ax.get_ylim()])
778
778
  percent_over = maxvalue * percent_over
779
- if abs(round(ymin / ymax)) != 0:
780
- # Set bounds to be the same positive and negative
781
- bounds = (-1 * (maxvalue + percent_over), (maxvalue + percent_over))
782
- else:
783
- bounds = (-0.05, 1.05)
779
+
780
+ # Set bounds to be the same positive and negative
781
+ bounds = (-1 * (maxvalue + percent_over), (maxvalue + percent_over))
782
+
784
783
  input_ax.set_ylim(bounds)
785
784
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyatoa
3
- Version: 0.4.0
3
+ Version: 0.4.2
4
4
  Summary: Python's Adjoint Tomography Operations Assistant
5
5
  Author: adjTomo Dev Team
6
6
  Author-email: adjtomo@gmail.com
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pyatoa"
7
- version = "0.4.0"
7
+ version = "0.4.2"
8
8
  description = "Python's Adjoint Tomography Operations Assistant"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.7"
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