gmprocess 2.4.0__tar.gz → 2.5.0__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 (249) hide show
  1. {gmprocess-2.4.0 → gmprocess-2.5.0}/CHANGELOG.md +10 -0
  2. {gmprocess-2.4.0 → gmprocess-2.5.0}/PKG-INFO +2 -2
  3. {gmprocess-2.4.0 → gmprocess-2.5.0}/code.json +41 -0
  4. {gmprocess-2.4.0 → gmprocess-2.5.0}/pyproject.toml +1 -1
  5. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/core/stationstream.py +35 -30
  6. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/core/stationtrace.py +9 -25
  7. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/core/streamarray.py +11 -5
  8. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/core/streamcollection.py +12 -5
  9. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/config_production.yml +1 -2
  10. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/config_production_v1.yml +2 -3
  11. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/asdf/flatfile.py +5 -8
  12. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/asdf/stream_workspace.py +1 -1
  13. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/cosmos/cesmd_fetcher.py +8 -6
  14. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/cosmos/cosmos_writer.py +0 -22
  15. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/obspy/core.py +32 -7
  16. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/unam/core.py +3 -3
  17. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/metrics/reduce.py +6 -0
  18. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/metrics/rotate.py +5 -0
  19. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/metrics/transform.py +8 -0
  20. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/metrics/waveform_metric_calculator.py +63 -57
  21. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/subcommands/generate_report.py +5 -4
  22. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/utils/export_gmpacket_utils.py +1 -1
  23. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/corner_frequencies.py +44 -30
  24. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/fft.py +4 -3
  25. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/nn_quality_assurance.py +13 -7
  26. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess.egg-info/PKG-INFO +2 -2
  27. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess.egg-info/requires.txt +1 -1
  28. {gmprocess-2.4.0 → gmprocess-2.5.0}/.coveragerc +0 -0
  29. {gmprocess-2.4.0 → gmprocess-2.5.0}/.gitignore +0 -0
  30. {gmprocess-2.4.0 → gmprocess-2.5.0}/.gitlab-ci.yml +0 -0
  31. {gmprocess-2.4.0 → gmprocess-2.5.0}/CODE_OF_CONDUCT.md +0 -0
  32. {gmprocess-2.4.0 → gmprocess-2.5.0}/CONTRIBUTING.md +0 -0
  33. {gmprocess-2.4.0 → gmprocess-2.5.0}/DISCLAIMER.md +0 -0
  34. {gmprocess-2.4.0 → gmprocess-2.5.0}/LICENSE.md +0 -0
  35. {gmprocess-2.4.0 → gmprocess-2.5.0}/MANIFEST.in +0 -0
  36. {gmprocess-2.4.0 → gmprocess-2.5.0}/README.md +0 -0
  37. {gmprocess-2.4.0 → gmprocess-2.5.0}/pytest.ini +0 -0
  38. {gmprocess-2.4.0 → gmprocess-2.5.0}/setup.cfg +0 -0
  39. {gmprocess-2.4.0 → gmprocess-2.5.0}/setup.py +0 -0
  40. {gmprocess-2.4.0 → gmprocess-2.5.0}/setup_env.sh +0 -0
  41. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/__init__.py +0 -0
  42. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/apps/__init__.py +0 -0
  43. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/apps/gmrecords.py +0 -0
  44. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/bin/__init__.py +0 -0
  45. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/bin/bundle_datarelease.py +0 -0
  46. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/bin/cwa_gather.py +0 -0
  47. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/bin/fetch_orfeus.py +0 -0
  48. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/bin/fix_inventory.py +0 -0
  49. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/bin/gmconvert.py +0 -0
  50. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/bin/gminfo.py +0 -0
  51. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/bin/gmprocess_config.py +0 -0
  52. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/bin/gmrecords.py +0 -0
  53. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/bin/gmworkspace.py +0 -0
  54. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/bin/update_event_json.sh +0 -0
  55. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/core/__init__.py +0 -0
  56. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/core/provenance.py +0 -0
  57. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/core/scalar_event.py +0 -0
  58. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/CESMD_NGA_ids.csv +0 -0
  59. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/__init__.py +0 -0
  60. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/config_test.yml +0 -0
  61. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/config_test_download.yml +0 -0
  62. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/cosmos_table10.xls +0 -0
  63. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/cosmos_table4.xls +0 -0
  64. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/demo/ci38457511/raw/CICCC.RAW +0 -0
  65. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/demo/ci38457511/raw/CICLC.v1 +0 -0
  66. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/demo/ci38457511/raw/CITOW2.RAW +0 -0
  67. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/demo/nc72282711/workspace.h5 +0 -0
  68. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/fdsn_codes.csv +0 -0
  69. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/lme/SA_rotd50.0_2020.03.31.csv +0 -0
  70. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/modules.yml +0 -0
  71. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nga_w2_selected.csv +0 -0
  72. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_clipping/bias_1.csv +0 -0
  73. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_clipping/bias_output.csv +0 -0
  74. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_clipping/masterF.txt +0 -0
  75. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_clipping/weight_1.csv +0 -0
  76. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_clipping/weight_output.csv +0 -0
  77. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_qa/Cant/M.csv +0 -0
  78. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_qa/Cant/bias_1.csv +0 -0
  79. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_qa/Cant/bias_2.csv +0 -0
  80. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_qa/Cant/bias_output.csv +0 -0
  81. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_qa/Cant/final_training.csv +0 -0
  82. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_qa/Cant/masterF.txt +0 -0
  83. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_qa/Cant/model_3.txt +0 -0
  84. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_qa/Cant/model_5.txt +0 -0
  85. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_qa/Cant/mu_sigma.csv +0 -0
  86. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_qa/Cant/weight_1.csv +0 -0
  87. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_qa/Cant/weight_2.csv +0 -0
  88. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_qa/Cant/weight_output.csv +0 -0
  89. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_qa/CantWell/M.csv +0 -0
  90. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_qa/CantWell/bias_1.csv +0 -0
  91. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_qa/CantWell/bias_2.csv +0 -0
  92. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_qa/CantWell/bias_output.csv +0 -0
  93. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_qa/CantWell/final_training.csv +0 -0
  94. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_qa/CantWell/masterF.txt +0 -0
  95. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_qa/CantWell/model_0.txt +0 -0
  96. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_qa/CantWell/mu_sigma.csv +0 -0
  97. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_qa/CantWell/weight_1.csv +0 -0
  98. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_qa/CantWell/weight_2.csv +0 -0
  99. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/nn_qa/CantWell/weight_output.csv +0 -0
  100. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/picker.yml +0 -0
  101. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/station_coordinates.xlsx +0 -0
  102. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/data/usgs_ids_nga_and_srcmod_cross_reference.xlsx +0 -0
  103. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/gui/__init__.py +0 -0
  104. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/gui/gui_ucla/Documentation.md +0 -0
  105. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/gui/gui_ucla/GUI_human_review.ipynb +0 -0
  106. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/gui/gui_ucla/HumanReviewGUI.py +0 -0
  107. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/gui/gui_ucla/__init__.py +0 -0
  108. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/__init__.py +0 -0
  109. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/asdf/__init__.py +0 -0
  110. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/asdf/base_metrics_xml.py +0 -0
  111. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/asdf/core.py +0 -0
  112. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/asdf/flatfile_constants.py +0 -0
  113. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/asdf/path_utils.py +0 -0
  114. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/asdf/rupture.py +0 -0
  115. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/asdf/station_metrics_xml.py +0 -0
  116. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/asdf/utils.py +0 -0
  117. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/asdf/waveform_metrics_xml.py +0 -0
  118. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/asdf/workspace_constants.py +0 -0
  119. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/bhrc/__init__.py +0 -0
  120. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/bhrc/core.py +0 -0
  121. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/cosmos/__init__.py +0 -0
  122. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/cosmos/cesmd_search.py +0 -0
  123. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/cosmos/core.py +0 -0
  124. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/cosmos/data_structures.py +0 -0
  125. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/cwb/__init__.py +0 -0
  126. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/cwb/core.py +0 -0
  127. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/dmg/__init__.py +0 -0
  128. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/dmg/core.py +0 -0
  129. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/dynamic_search_parameters.py +0 -0
  130. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/esm/__init__.py +0 -0
  131. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/esm/core.py +0 -0
  132. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/fetcher.py +0 -0
  133. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/geonet/__init__.py +0 -0
  134. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/geonet/core.py +0 -0
  135. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/global_fetcher.py +0 -0
  136. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/knet/__init__.py +0 -0
  137. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/knet/core.py +0 -0
  138. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/knet/knet_fetcher.py +0 -0
  139. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/nga.py +0 -0
  140. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/nsmn/__init__.py +0 -0
  141. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/nsmn/core.py +0 -0
  142. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/obspy/__init__.py +0 -0
  143. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/obspy/fdsn_fetcher.py +0 -0
  144. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/read.py +0 -0
  145. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/read_directory.py +0 -0
  146. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/renadic/__init__.py +0 -0
  147. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/renadic/core.py +0 -0
  148. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/report.py +0 -0
  149. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/seedname.py +0 -0
  150. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/smc/__init__.py +0 -0
  151. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/smc/core.py +0 -0
  152. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/unam/__init__.py +0 -0
  153. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/usc/__init__.py +0 -0
  154. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/usc/core.py +0 -0
  155. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/io/utils.py +0 -0
  156. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/metrics/__init__.py +0 -0
  157. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/metrics/combine.py +0 -0
  158. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/metrics/containers.py +0 -0
  159. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/metrics/metric_collection_base.py +0 -0
  160. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/metrics/oscillator.py +0 -0
  161. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/metrics/station_metric.py +0 -0
  162. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/metrics/station_metric_collection.py +0 -0
  163. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/metrics/utils.py +0 -0
  164. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/metrics/waveform_metric_calculator_component_base.py +0 -0
  165. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/metrics/waveform_metric_collection.py +0 -0
  166. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/metrics/waveform_metric_component.py +0 -0
  167. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/metrics/waveform_metric_list.py +0 -0
  168. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/metrics/waveform_metric_type.py +0 -0
  169. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/subcommands/__init__.py +0 -0
  170. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/subcommands/arg_dicts.py +0 -0
  171. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/subcommands/assemble.py +0 -0
  172. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/subcommands/autoprocess.py +0 -0
  173. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/subcommands/autoshakemap.py +0 -0
  174. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/subcommands/base.py +0 -0
  175. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/subcommands/clean.py +0 -0
  176. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/subcommands/compute_station_metrics.py +0 -0
  177. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/subcommands/compute_waveform_metrics.py +0 -0
  178. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/subcommands/download.py +0 -0
  179. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/subcommands/export_cosmos.py +0 -0
  180. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/subcommands/export_failure_tables.py +0 -0
  181. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/subcommands/export_gmpacket.py +0 -0
  182. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/subcommands/export_metric_tables.py +0 -0
  183. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/subcommands/export_provenance_tables.py +0 -0
  184. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/subcommands/generate_regression_plot.py +0 -0
  185. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/subcommands/generate_station_maps.py +0 -0
  186. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/subcommands/import_data.py +0 -0
  187. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/subcommands/init.py +0 -0
  188. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/subcommands/lazy_loader.py +0 -0
  189. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/subcommands/process_waveforms.py +0 -0
  190. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/subcommands/processing_steps.py +0 -0
  191. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/subcommands/projects.py +0 -0
  192. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/utils/__init__.py +0 -0
  193. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/utils/args.py +0 -0
  194. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/utils/assemble_utils.py +0 -0
  195. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/utils/config.py +0 -0
  196. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/utils/config_versioning.py +0 -0
  197. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/utils/constants.py +0 -0
  198. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/utils/download_utils.py +0 -0
  199. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/utils/ground_motion_models.py +0 -0
  200. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/utils/logging.py +0 -0
  201. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/utils/memory.py +0 -0
  202. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/utils/misc.py +0 -0
  203. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/utils/misc_plots.py +0 -0
  204. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/utils/prompt.py +0 -0
  205. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/utils/report_utils.py +0 -0
  206. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/utils/rupture_utils.py +0 -0
  207. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/utils/strec.py +0 -0
  208. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/utils/summary_plots.py +0 -0
  209. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/utils/tables.py +0 -0
  210. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/utils/tests_utils.py +0 -0
  211. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/__init__.py +0 -0
  212. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/adjust_highpass.py +0 -0
  213. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/adjust_highpass_ridder.py +0 -0
  214. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/baseline_correction.py +0 -0
  215. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/clipping/clip_detection.py +0 -0
  216. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/clipping/clipping_ann.py +0 -0
  217. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/clipping/clipping_check.py +0 -0
  218. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/clipping/histogram.py +0 -0
  219. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/clipping/jerk.py +0 -0
  220. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/clipping/max_amp.py +0 -0
  221. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/clipping/ping.py +0 -0
  222. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/clipping/std_dev.py +0 -0
  223. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/convert_units.py +0 -0
  224. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/detrend.py +0 -0
  225. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/filtering.py +0 -0
  226. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/instrument_response.py +0 -0
  227. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/integrate.py +0 -0
  228. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/phase.py +0 -0
  229. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/pretesting.py +0 -0
  230. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/prism_adaptive_baseline.py +0 -0
  231. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/processing.py +0 -0
  232. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/processing_step.py +0 -0
  233. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/resample.py +0 -0
  234. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/sanity_checks.py +0 -0
  235. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/snr.py +0 -0
  236. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/spectrum.py +0 -0
  237. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/taper.py +0 -0
  238. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/windows.py +0 -0
  239. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/zero_crossings.py +0 -0
  240. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess/waveform_processing/zero_pad.py +0 -0
  241. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess.egg-info/SOURCES.txt +0 -0
  242. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess.egg-info/dependency_links.txt +0 -0
  243. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess.egg-info/entry_points.txt +0 -0
  244. {gmprocess-2.4.0 → gmprocess-2.5.0}/src/gmprocess.egg-info/top_level.txt +0 -0
  245. {gmprocess-2.4.0 → gmprocess-2.5.0}/tools/matlab/README.md +0 -0
  246. {gmprocess-2.4.0 → gmprocess-2.5.0}/tools/matlab/get_all_waveforms.m +0 -0
  247. {gmprocess-2.4.0 → gmprocess-2.5.0}/tools/matlab/get_events.m +0 -0
  248. {gmprocess-2.4.0 → gmprocess-2.5.0}/tools/matlab/get_waveform_metrics.m +0 -0
  249. {gmprocess-2.4.0 → gmprocess-2.5.0}/tools/matlab/waveform_plot.png +0 -0
@@ -1,5 +1,15 @@
1
1
  ## main
2
2
 
3
+ ## 2.5.0 / 2025-05-21
4
+
5
+ - Enhancements
6
+ - Use location code to distinguish among instruments at a site.
7
+ - Bugfix
8
+ - Bugfixes in the COSMOS fetcher query values.
9
+ - The `any_trace_failures` option was not working as intended. See issue #1261 and the merge request that closes it.
10
+ - Dependencies
11
+ - Require usgs-strec >= 2.3.11, update tests to reflect strec fixes.
12
+
3
13
  ## 2.4.0 / 2025-04-04
4
14
 
5
15
  - Enhancements
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gmprocess
3
- Version: 2.4.0
3
+ Version: 2.5.0
4
4
  Summary: USGS Automated Ground Motion Processing Software
5
5
  Author-email: Eric Thompson <emthompsone@usgs.gov>, Mike Hearne <mhearne@usgs.gov>, Brad Aagaard <baagaard@usgs.gov>, Bruce Worden <cbworden@contractor.usgs.gov>, John Rekoske <jrekoske@ucsd.edu>, Heather Hunsinger <hhunsinger@usgs.gov>, Gabe Ferragut <gferragut@usgs.gov>
6
6
  License: License
@@ -79,7 +79,7 @@ Requires-Dist: scipy>=1.7
79
79
  Requires-Dist: setuptools-scm>=6.3.2
80
80
  Requires-Dist: statsmodels>=0.12.2
81
81
  Requires-Dist: tqdm>4.67
82
- Requires-Dist: usgs-strec>=2.3.2
82
+ Requires-Dist: usgs-strec>=2.3.11
83
83
  Requires-Dist: xlrd>=2.0
84
84
  Provides-Extra: dev
85
85
  Requires-Dist: build>=0.7.0; extra == "dev"
@@ -1,4 +1,45 @@
1
1
  [
2
+ {
3
+ "name": "groundmotion-processing",
4
+ "description": "Read and process ground motion waveform data",
5
+ "version": "v2.5.0",
6
+ "status": "Production",
7
+ "organization": "U.S. Geological Survey",
8
+ "vcs": "git",
9
+ "repositoryURL": "https://code.usgs.gov/ghsc/esi/groundmotion-processing.git",
10
+ "homepageURL": "https://code.usgs.gov/ghsc/esi/groundmotion-processing",
11
+ "downloadURL": "https://code.usgs.gov/ghsc/esi/groundmotion-processing/-/archive/v2.5.0/groundmotion-processing-v2.5.0.zip",
12
+ "disclaimerURL": "https://code.usgs.gov/ghsc/esi/groundmotion-processing/-/raw/v2.5.0/DISCLAIMER.md",
13
+ "permissions": {
14
+ "licenses": [
15
+ {
16
+ "name": "Public Domain, CC0-1.0",
17
+ "URL": "https://code.usgs.gov/ghsc/esi/groundmotion-processing/-/raw/v2.5.0/LICENSE.md"
18
+ }
19
+ ],
20
+ "usageType": "openSource",
21
+ "exemptionText": null
22
+ },
23
+ "laborHours": 1,
24
+ "languages": [
25
+ "python"
26
+ ],
27
+ "tags": [
28
+ "earthquake",
29
+ "impact",
30
+ "strong motion",
31
+ "amplitudes",
32
+ "ground motion",
33
+ "usg-artificial-intelligence"
34
+ ],
35
+ "contact": {
36
+ "name": "Eric Thompson",
37
+ "email": "emthompson@usgs.gov"
38
+ },
39
+ "date": {
40
+ "metadataLastUpdated": "2025-05-21"
41
+ }
42
+ },
2
43
  {
3
44
  "name": "groundmotion-processing",
4
45
  "description": "Read and process ground motion waveform data",
@@ -45,7 +45,7 @@ dependencies = [
45
45
  "setuptools-scm>=6.3.2",
46
46
  "statsmodels>=0.12.2",
47
47
  "tqdm>4.67",
48
- "usgs-strec>=2.3.2",
48
+ "usgs-strec>=2.3.11",
49
49
  "xlrd>=2.0",
50
50
  ]
51
51
 
@@ -225,7 +225,7 @@ class StationStream(Stream):
225
225
  all_codes = []
226
226
  for tr in self:
227
227
  stats = tr.stats
228
- all_codes.append(f"{stats.network}.{stats.station}.{stats.channel}")
228
+ all_codes.append(f"{stats.network}.{stats.station}.{stats.location}.{stats.channel}")
229
229
  if len(set(all_codes)) != len(all_codes):
230
230
  for tr in self:
231
231
  tr.fail("Nonunique channel code in StationStream.")
@@ -233,37 +233,43 @@ class StationStream(Stream):
233
233
  def __check_id(self):
234
234
  # Check that id is consistent, and set id if it passes the check.
235
235
  if len(self):
236
- stats = self.traces[0].stats
237
- if hasattr(self, "use_array") and self.use_array:
238
- trace = self[0]
239
- id_str = ".".join(
240
- [
241
- trace.stats.network,
242
- trace.stats.station,
243
- trace.stats.location,
244
- trace.stats.channel,
245
- ],
246
- )
236
+ use_array = hasattr(self, "use_array") and self.use_array
237
+ stats = self[0].stats
238
+ if use_array:
239
+ id_str = ".".join([
240
+ stats.network,
241
+ stats.station,
242
+ stats.location,
243
+ stats.channel,
244
+ ])
247
245
  else:
248
- id_str = f"{stats.network}.{stats.station}.{stats.channel[0:2]}"
246
+ id_str = ".".join([
247
+ stats.network,
248
+ stats.station,
249
+ stats.location,
250
+ stats.channel[0:2],
251
+ ])
249
252
 
250
253
  # Check that the id would be the same for all traces
251
- for tr in self:
254
+ for tr in self: # Use self to avoid creating temporary object
252
255
  stats = tr.stats
253
- if hasattr(self, "use_array") and self.use_array:
254
- test_str = ".".join(
255
- [
256
- stats.network,
257
- stats.station,
258
- stats.location,
259
- stats.channel,
260
- ],
261
- )
256
+ if use_array:
257
+ test_str = ".".join([
258
+ stats.network,
259
+ stats.station,
260
+ stats.location,
261
+ stats.channel,
262
+ ])
262
263
  else:
263
- test_str = f"{stats.network}.{stats.station}.{stats.channel[0:2]}"
264
+ test_str = ".".join([
265
+ stats.network,
266
+ stats.station,
267
+ stats.location,
268
+ stats.channel[0:2],
269
+ ])
264
270
 
265
271
  if id_str != test_str:
266
- raise ValueError("Inconsistent stream ID for different traces.")
272
+ raise ValueError(f"Inconsistent stream IDs {id_str} and {test_str} for different traces.")
267
273
  self.id = id_str
268
274
 
269
275
  def get_id(self):
@@ -277,13 +283,12 @@ class StationStream(Stream):
277
283
  return self.id
278
284
 
279
285
  def get_net_sta(self):
280
- """Get just the network and station component of the ID."""
281
- return ".".join(self.get_id().split(".")[0:2])
286
+ """Get just the network and station components of the ID."""
287
+ return ".".join(self.id.split(".")[0:2])
282
288
 
283
289
  def get_net_sta_loc(self):
284
- """Get network, station, and location codes."""
285
- stats = self[0].stats
286
- return ".".join([stats.network, stats.station, stats.location])
290
+ """Get just the network, station, and location components of the ID."""
291
+ return ".".join(self.id.split(".")[0:3])
287
292
 
288
293
  def get_inst(self):
289
294
  """Get first two characters of the channel code."""
@@ -185,10 +185,10 @@ class StationTrace(Trace):
185
185
  header["coordinates"] = coords
186
186
  header["standard"] = standard
187
187
  header["format_specific"] = format_specific
188
- except BaseException:
188
+ except BaseException as ex:
189
189
  raise ValueError(
190
190
  "Failed to construct required metadata from header data."
191
- )
191
+ ) from ex
192
192
 
193
193
  # Sometimes the channel names do not indicate which one is the
194
194
  # Z channel. If we have vertical_orientation information, then
@@ -206,6 +206,7 @@ class StationTrace(Trace):
206
206
  if is_vertcomp:
207
207
  pass
208
208
  elif is_horizcomp:
209
+ # Cannot call self.warning() before setting parameters and may update header (before calling constructor)
209
210
  logging.warning(
210
211
  "Found vertical orientation in trace %s, which seems to be a horizontal component. Assuming vertical orientation is incorrect.",
211
212
  trace_id,
@@ -665,6 +666,12 @@ class StationTrace(Trace):
665
666
  frequency_domain (bool):
666
667
  Apply filter in frequency domain?
667
668
  """
669
+ if not frequency_domain and zerophase:
670
+ logging.warning(
671
+ "Filter is only applied once in frequency domain, "
672
+ "even if number of passes is 2"
673
+ )
674
+
668
675
  if zerophase:
669
676
  number_of_passes = 2
670
677
  else:
@@ -688,12 +695,6 @@ class StationTrace(Trace):
688
695
  )
689
696
 
690
697
  else:
691
- if zerophase:
692
- logging.warning(
693
- "Filter is only applied once in frequency domain, "
694
- "even if number of passes is 2"
695
- )
696
-
697
698
  self.__compute_fft()
698
699
  filter = np.sqrt(1.0 + (self.signal_freq / freq) ** (2.0 * corners))
699
700
  self.__apply_filter(filter)
@@ -727,12 +728,6 @@ class StationTrace(Trace):
727
728
  )
728
729
 
729
730
  else:
730
- if zerophase:
731
- logging.warning(
732
- "Filter is only applied once in frequency domain, "
733
- "even if number of passes is 2"
734
- )
735
-
736
731
  self.__compute_fft()
737
732
  filter = np.sqrt(1.0 + (freq / self.signal_freq) ** (2.0 * corners))
738
733
  self.__apply_filter(filter)
@@ -768,11 +763,6 @@ class StationTrace(Trace):
768
763
  )
769
764
 
770
765
  else:
771
- if zerophase:
772
- logging.warning(
773
- "Filter is only applied once in frequency domain, "
774
- "even if number of passes is 2"
775
- )
776
766
  self.__compute_fft()
777
767
  filter = np.sqrt(1.0 + (freqmin / self.signal_freq) ** (2.0 * corners))
778
768
  filter *= np.sqrt(1.0 + (self.signal_freq / freqmax) ** (2.0 * corners))
@@ -809,12 +799,6 @@ class StationTrace(Trace):
809
799
  )
810
800
 
811
801
  else:
812
- if zerophase:
813
- logging.warning(
814
- "Filter is only applied once in frequency domain, "
815
- "even if number of passes is 2"
816
- )
817
-
818
802
  self.__compute_fft()
819
803
  filter = np.sqrt(1.0 + (freq / self.signal_freq) ** (2.0 * corners))
820
804
  filter *= np.sqrt(1.0 + (self.signal_freq / freq) ** (2.0 * corners))
@@ -123,11 +123,11 @@ class StreamArray(object):
123
123
  """Copy method."""
124
124
  return copy.deepcopy(self)
125
125
 
126
- def select(self, network=None, station=None, instrument=None):
126
+ def select(self, network=None, station=None, location=None, instrument=None):
127
127
  """Select Streams.
128
128
 
129
129
  Return a new StreamCollection with only those StationStreams that
130
- match network, station, and/or instrument selection criteria.
130
+ match network, station, location, and/or instrument selection criteria.
131
131
 
132
132
  Based on obspy's `select` method for traces.
133
133
 
@@ -136,6 +136,8 @@ class StreamArray(object):
136
136
  Network code.
137
137
  station (str):
138
138
  Station code.
139
+ location (str):
140
+ Location code.
139
141
  instrument (str):
140
142
  Instrument code; i.e., the first two characters of the
141
143
  channel.
@@ -143,15 +145,19 @@ class StreamArray(object):
143
145
  sel = []
144
146
  for st in self:
145
147
  inst = st.get_inst()
146
- net_sta = st.get_net_sta()
147
- net = net_sta.split(".")[0]
148
- sta = net_sta.split(".")[1]
148
+ net_sta_loc = st.get_net_sta_loc().split(".")
149
+ net = net_sta_loc[0]
150
+ sta = net_sta_loc[1]
151
+ loc = net_sta_loc[2]
149
152
  if network is not None:
150
153
  if not fnmatch.fnmatch(net.upper(), network.upper()):
151
154
  continue
152
155
  if station is not None:
153
156
  if not fnmatch.fnmatch(sta.upper(), station.upper()):
154
157
  continue
158
+ if location is not None:
159
+ if not fnmatch.fnmatch(loc.upper(), location.upper()):
160
+ continue
155
161
  if instrument is not None:
156
162
  if not fnmatch.fnmatch(inst.upper(), instrument.upper()):
157
163
  continue
@@ -114,7 +114,7 @@ class StreamCollection(StreamArray):
114
114
  process_level_preference,
115
115
  format_preference,
116
116
  )
117
- self.__group_by_net_sta_inst()
117
+ self.__group_by_net_sta_loc_inst()
118
118
  self.validate()
119
119
 
120
120
  def validate(self):
@@ -214,6 +214,9 @@ class StreamCollection(StreamArray):
214
214
 
215
215
  # Loop over preferred instruments
216
216
  no_match = True
217
+ group_tr = self[group[0]][0]
218
+ group_network = group_tr.stats.network
219
+ group_station = group_tr.stats.station
217
220
  for pref in preference:
218
221
  # Is this instrument available in the group?
219
222
  r = re.compile(pref[0:2])
@@ -226,11 +229,12 @@ class StreamCollection(StreamArray):
226
229
 
227
230
  # Label all non-selected streams in the group as failed
228
231
  to_fail = group_insts
229
- to_fail.remove(keep)
232
+ for inst in inst_match:
233
+ to_fail.remove(inst)
230
234
  for tf in to_fail:
231
235
  for st in self.select(
232
- network=self[group[0]][0].stats.network,
233
- station=self[group[0]][0].stats.station,
236
+ network=group_network,
237
+ station=group_station,
234
238
  instrument=tf,
235
239
  ):
236
240
  for tr in st:
@@ -304,7 +308,7 @@ class StreamCollection(StreamArray):
304
308
  stream_descript = self.describe_string()
305
309
  print(stream_descript)
306
310
 
307
- def __group_by_net_sta_inst(self):
311
+ def __group_by_net_sta_loc_inst(self):
308
312
  trace_list = []
309
313
  stream_params = gather_stream_parameters(self.streams)
310
314
  for st in self.streams:
@@ -320,6 +324,7 @@ class StreamCollection(StreamArray):
320
324
  matches = [idx1]
321
325
  network = trace1.stats["network"]
322
326
  station = trace1.stats["station"]
327
+ location = trace1.stats["location"]
323
328
  free_field = trace1.free_field
324
329
  # For instrument, use first two characters of the channel
325
330
  inst = trace1.stats["channel"][0:2]
@@ -328,6 +333,7 @@ class StreamCollection(StreamArray):
328
333
  if (
329
334
  network == trace2.stats["network"]
330
335
  and station == trace2.stats["station"]
336
+ and location == trace2.stats["location"]
331
337
  and inst == trace2.stats["channel"][0:2]
332
338
  and free_field == trace2.free_field
333
339
  ):
@@ -653,6 +659,7 @@ def are_duplicates(tr1, tr2, max_dist_tolerance):
653
659
  if (
654
660
  tr1.stats.station == tr2.stats.station
655
661
  and tr1.stats.channel[:2] == tr2.stats.channel[:2]
662
+ and tr1.stats.location == tr2.stats.location
656
663
  and len(orientation_codes) == 1
657
664
  and distance < max_dist_tolerance
658
665
  ):
@@ -260,7 +260,6 @@ fetchers:
260
260
  - 180.0
261
261
  - -90.0
262
262
  - 90.0
263
- url: https://fdsnws.raspberryshakedata.com
264
263
  - SCEDC:
265
264
  bounds:
266
265
  - -160.0
@@ -620,7 +619,7 @@ integration:
620
619
  # -----------------------------------------------------------------------------
621
620
  # This section is for options for differentiation
622
621
  differentiation:
623
- # Frequency or time domain differentation?
622
+ # Frequency or time domain differentiation?
624
623
  frequency: True
625
624
 
626
625
  # -----------------------------------------------------------------------------
@@ -19,7 +19,7 @@ fetchers:
19
19
  max_distance: 800.0
20
20
  # NOTE: the GMM is evaluated with a number of simplifications, including
21
21
  # Ztor=0 and dip=90 deg such that the 'distance' is both Rrup and Rjb. See
22
- # the dynamic_searc_parameters.py module for further details.
22
+ # the dynamic_search_parameters.py module for further details.
23
23
  KNETFetcher:
24
24
  # Enable this fetcher?
25
25
  enabled: True
@@ -255,7 +255,6 @@ fetchers:
255
255
  - 180.0
256
256
  - -90.0
257
257
  - 90.0
258
- url: https://fdsnws.raspberryshakedata.com
259
258
  - SCEDC:
260
259
  bounds:
261
260
  - -160.0
@@ -623,7 +622,7 @@ integration:
623
622
  # -----------------------------------------------------------------------------
624
623
  # This section is for options for differentiation
625
624
  differentiation:
626
- # Frequency or time domain differentation?
625
+ # Frequency or time domain differentiation?
627
626
  frequency: True
628
627
 
629
628
  # -----------------------------------------------------------------------------
@@ -74,12 +74,6 @@ class Flatfile(object):
74
74
  """
75
75
  if hasattr(self.workspace, "config"):
76
76
  config = self.workspace.config
77
- default_config_file = constants.DATA_DIR / constants.CONFIG_FILE_PRODUCTION
78
- with open(default_config_file, "r", encoding="utf-8") as f:
79
- yaml = YAML()
80
- yaml.preserve_quotes = True
81
- default_config = yaml.load(f)
82
- update_dict(self.workspace.config, default_config)
83
77
  else:
84
78
  config = get_config()
85
79
  any_trace_failures = config["check_stream"]["any_trace_failures"]
@@ -95,13 +89,16 @@ class Flatfile(object):
95
89
 
96
90
  self._station_metrics = station_metrics
97
91
  passed_traces = [tr_met for tr_met in stream_meta if tr_met["passed"]]
92
+ n_total = len(stream_meta)
98
93
 
99
94
  n_passed = len(passed_traces)
95
+ n_failed = n_total - n_passed
96
+
100
97
  for tr in passed_traces:
101
98
  tr.update({"use_array": use_array})
102
99
 
103
100
  if any_trace_failures:
104
- if n_passed < 3:
101
+ if n_failed > 0:
105
102
  stream_passed = False
106
103
  else:
107
104
  stream_passed = True
@@ -124,7 +121,7 @@ class Flatfile(object):
124
121
  row = self.get_imt_row(passed_traces, wml, imc)
125
122
  if not row:
126
123
  continue
127
- self.imc_tables[str(imc)].append(row) #
124
+ self.imc_tables[str(imc)].append(row)
128
125
 
129
126
  def get_imt_row(self, passed_traces, wml, imc):
130
127
  """Get one row of the IMT flatfile fom a stream.
@@ -418,7 +418,7 @@ class StreamWorkspace(object):
418
418
  )
419
419
 
420
420
  for stream in streams:
421
- logging.info("Adding waveforms for station %s", stream.get_id())
421
+ logging.info("Adding waveforms for %s", stream.get_id())
422
422
  # is this a raw file? Check the trace for provenance info.
423
423
  is_raw = not stream[0].provenance.ids
424
424
 
@@ -1,6 +1,6 @@
1
1
  # stdlib imports
2
2
  import logging
3
- from datetime import datetime, timedelta
3
+ from datetime import timedelta
4
4
 
5
5
  # third party imports
6
6
  import numpy as np
@@ -172,7 +172,9 @@ class CESMDFetcher(DataFetcher):
172
172
  self.lon = lon
173
173
  self.radius = radius
174
174
  self.station_radius = station_radius
175
- self.eq_dt = eq_dt
175
+ self.dt = eq_dt
176
+ self.dmag = DMAG
177
+ self.ddepth = DDEPTH
176
178
  self.rawdir = rawdir
177
179
  self.depth = depth
178
180
  self.magnitude = magnitude
@@ -202,7 +204,7 @@ class CESMDFetcher(DataFetcher):
202
204
  eqtime=self.time,
203
205
  abandoned=False,
204
206
  station_type=self.station_type,
205
- eqtimewindow=self.eq_dt, # seconds
207
+ eqtimewindow=self.dt, # seconds
206
208
  eqradius=self.radius, # km
207
209
  station_radius=self.station_radius,
208
210
  )
@@ -220,7 +222,7 @@ class CESMDFetcher(DataFetcher):
220
222
  if event["id"] in idlist:
221
223
  continue
222
224
  idlist.append(event["id"])
223
- tevent["time"] = datetime.strptime(event["time"], "%Y-%m-%d %H:%M:%S")
225
+ tevent["time"] = UTCDateTime(event["time"])
224
226
  tevent["lat"] = event["latitude"]
225
227
  tevent["lon"] = event["longitude"]
226
228
  tevent["depth"] = event["depth"]
@@ -259,8 +261,8 @@ class CESMDFetcher(DataFetcher):
259
261
  if not has_event:
260
262
  raise Exception("Could not find matching event.")
261
263
 
262
- starttime = self.time - timedelta(seconds=self.eq_dt // 2)
263
- endtime = self.time + timedelta(seconds=self.eq_dt // 2)
264
+ starttime = self.time - timedelta(seconds=self.dt // 2)
265
+ endtime = self.time + timedelta(seconds=self.dt // 2)
264
266
 
265
267
  if nstations < MAX_STATIONS:
266
268
  try:
@@ -930,8 +930,6 @@ class CosmosWriter(object):
930
930
  sta = trace.stats.station
931
931
  cha = trace.stats.channel
932
932
  loc = trace.stats.location
933
- # COSMOS files will have trace.stats.format_specific,
934
- # miniseed/stationxml will not.
935
933
  if trace.stats.format_specific:
936
934
  trace.stats["stage_1_sensitivity"] = (
937
935
  trace.stats.format_specific["stage_1_sensitivity"]
@@ -939,26 +937,6 @@ class CosmosWriter(object):
939
937
  trace.stats["data_logger_sensitivity"] = (
940
938
  trace.stats.format_specific["data_logger_sensitivity"]
941
939
  )
942
- else:
943
- # Do somthing with StationXML information
944
- tinv = inv.select(
945
- network=trace.stats.network,
946
- station=trace.stats.station,
947
- channel=trace.stats.channel,
948
- location=trace.stats.location,
949
- time=trace.stats.starttime,
950
- )
951
- stages = tinv[0][0][0].response.response_stages
952
- instrument_sensitivity, data_logger_sensitivity = 1, 1
953
- for idx, stage in enumerate(stages):
954
- if idx == 0:
955
- instrument_sensitivity = stage.stage_gain
956
- else:
957
- data_logger_sensitivity *= stage.stage_gain
958
- trace.stats["stage_1_sensitivity"] = instrument_sensitivity
959
- trace.stats["data_logger_sensitivity"] = (
960
- data_logger_sensitivity
961
- )
962
940
 
963
941
  if trace.stats.standard.units_type != "acc":
964
942
  msg = (
@@ -7,6 +7,7 @@ import os
7
7
  import re
8
8
 
9
9
  import numpy as np
10
+ import scipy.constants as sp
10
11
  from obspy import read_inventory
11
12
  from obspy.core.stream import read
12
13
 
@@ -176,19 +177,20 @@ def read_obspy(filename, config=None, **kwargs):
176
177
  network = ttrace.stats.network
177
178
  station = ttrace.stats.station
178
179
  channel = ttrace.stats.channel
179
- nsc = f"{network}.{station}.{channel}"
180
+ location = ttrace.stats.location
181
+ nslc = f"{network}.{station}.{channel}"
180
182
 
181
183
  if inventory:
182
184
  tinventory = inventory.select(
183
- network=ttrace.stats.network,
184
- station=ttrace.stats.station,
185
- channel=ttrace.stats.channel,
186
- location=ttrace.stats.location,
185
+ network=network,
186
+ station=station,
187
+ channel=channel,
188
+ location=location,
187
189
  time=ttrace.stats.starttime,
188
190
  )
189
191
  if tinventory[0][0][0].sample_rate != ttrace.stats.sampling_rate:
190
192
  raise ValueError(
191
- f"Sample rate is not consistent betwen data and metadata ({nsc})"
193
+ f"Sample rate is not consistent betwen data and metadata ({nslc})"
192
194
  )
193
195
  else:
194
196
  tinventory = None
@@ -197,7 +199,10 @@ def read_obspy(filename, config=None, **kwargs):
197
199
  data=ttrace.data, header=ttrace.stats, inventory=tinventory, config=config
198
200
  )
199
201
 
200
- if not np.issubdtype(trace.data.dtype, np.integer):
202
+ if not (
203
+ np.issubdtype(trace.data.dtype, np.integer)
204
+ or np.allclose(trace.data % 1, 0)
205
+ ):
201
206
  trace.fail("Raw data type is not integer.")
202
207
 
203
208
  if ttrace.stats.location == "":
@@ -254,6 +259,26 @@ def read_obspy(filename, config=None, **kwargs):
254
259
  # Apply conversion factor if one was specified for this format
255
260
  trace.data *= float(config["read"]["sac_conversion_factor"])
256
261
 
262
+ if "_format" in trace.stats and trace.stats._format.lower() == "mseed":
263
+ # Unit conversions used by the COSMOS writer for real hdr 22 and 42
264
+ # This code assumes that specific stages in the instrument response
265
+ # correspond to the sensor sensitivity and the data logger sensitivity.
266
+
267
+ stages = tinventory[0][0][0].response.response_stages
268
+ data_logger_sensitivity = 1
269
+ for idx, stage in enumerate(stages):
270
+ if idx == 0:
271
+ # Sensor sensitivity (row 9 column 2)
272
+ trace.stats["format_specific"]["stage_1_sensitivity"] = (
273
+ float(stage.stage_gain)
274
+ ) * sp.g # Units will be in (units per motion) / g
275
+ else:
276
+ data_logger_sensitivity *= stage.stage_gain
277
+ # Data logger sensitivity (row 5 column 2)
278
+ trace.stats["format_specific"]["data_logger_sensitivity"] = (
279
+ 1 / float(data_logger_sensitivity)
280
+ ) * 1e6 # It's the inverse bit-weight in microvolts
281
+
257
282
  traces.append(trace)
258
283
  if no_match:
259
284
  stream = StationStream(traces=traces, config=config)
@@ -218,9 +218,9 @@ def _read_header(filename):
218
218
  channels[2]["npts"] = npts_list[2]
219
219
 
220
220
  # locations
221
- channels[0]["location"] = "--"
222
- channels[1]["location"] = "--"
223
- channels[1]["location"] = "--"
221
+ channels[0]["location"] = ""
222
+ channels[1]["location"] = ""
223
+ channels[2]["location"] = ""
224
224
 
225
225
  # get station coordinates
226
226
  coord1 = header_dict["COORDENADAS DE LA ESTACION"]