gmprocess 1.3.2__tar.gz → 2.0.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 (284) hide show
  1. {gmprocess-1.3.2 → gmprocess-2.0.0}/MANIFEST.in +2 -2
  2. {gmprocess-1.3.2/src/gmprocess.egg-info → gmprocess-2.0.0}/PKG-INFO +14 -8
  3. {gmprocess-1.3.2 → gmprocess-2.0.0}/README.md +10 -5
  4. {gmprocess-1.3.2 → gmprocess-2.0.0}/pyproject.toml +6 -4
  5. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/apps/gmrecords.py +4 -3
  6. gmprocess-2.0.0/src/gmprocess/bin/cwa_gather.py +210 -0
  7. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/bin/fix_inventory.py +1 -1
  8. gmprocess-2.0.0/src/gmprocess/bin/gmprocess_config.py +73 -0
  9. gmprocess-2.0.0/src/gmprocess/bin/update_event_json.sh +5 -0
  10. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/core/provenance.py +5 -2
  11. gmprocess-2.0.0/src/gmprocess/core/scalar_event.py +349 -0
  12. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/core/stationstream.py +3 -5
  13. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/core/stationtrace.py +19 -23
  14. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/core/streamarray.py +1 -1
  15. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/core/streamcollection.py +28 -14
  16. gmprocess-2.0.0/src/gmprocess/data/config_production.yml +709 -0
  17. gmprocess-1.3.2/src/gmprocess/data/config_production.yml → gmprocess-2.0.0/src/gmprocess/data/config_production_v1.yml +94 -95
  18. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/config_test.yml +44 -72
  19. gmprocess-2.0.0/src/gmprocess/data/demo/nc72282711/workspace.h5 +0 -0
  20. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/asdf/core.py +4 -2
  21. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/asdf/flatfile.py +34 -77
  22. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/asdf/flatfile_constants.py +2 -1
  23. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/asdf/rupture.py +2 -2
  24. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/asdf/stream_workspace.py +140 -163
  25. gmprocess-2.0.0/src/gmprocess/io/asdf/waveform_metrics_xml.py +175 -0
  26. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/cosmos/cesmd_search.py +1 -1
  27. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/cosmos/core.py +211 -134
  28. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/cosmos/cosmos_writer.py +4 -5
  29. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/obspy/fdsn_fetcher.py +8 -0
  30. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/read.py +1 -1
  31. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/report.py +4 -1
  32. gmprocess-2.0.0/src/gmprocess/metrics/combine.py +63 -0
  33. gmprocess-2.0.0/src/gmprocess/metrics/containers.py +201 -0
  34. gmprocess-2.0.0/src/gmprocess/metrics/oscillator.py +44 -0
  35. gmprocess-2.0.0/src/gmprocess/metrics/reduce.py +185 -0
  36. gmprocess-2.0.0/src/gmprocess/metrics/rotate.py +37 -0
  37. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/metrics/station_metric_collection.py +3 -3
  38. gmprocess-2.0.0/src/gmprocess/metrics/transform.py +229 -0
  39. gmprocess-2.0.0/src/gmprocess/metrics/waveform_metric_calculator.py +301 -0
  40. gmprocess-2.0.0/src/gmprocess/metrics/waveform_metric_calculator_component_base.py +146 -0
  41. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/metrics/waveform_metric_collection.py +8 -24
  42. gmprocess-2.0.0/src/gmprocess/metrics/waveform_metric_component.py +166 -0
  43. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/metrics/waveform_metric_list.py +52 -17
  44. gmprocess-1.3.2/src/gmprocess/metrics/waveform_metric.py → gmprocess-2.0.0/src/gmprocess/metrics/waveform_metric_type.py +98 -43
  45. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/subcommands/assemble.py +24 -14
  46. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/subcommands/autoprocess.py +12 -6
  47. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/subcommands/autoshakemap.py +29 -16
  48. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/subcommands/base.py +24 -60
  49. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/subcommands/clean.py +5 -4
  50. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/subcommands/compute_station_metrics.py +23 -36
  51. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/subcommands/compute_waveform_metrics.py +14 -24
  52. gmprocess-2.0.0/src/gmprocess/subcommands/download.py +66 -0
  53. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/subcommands/export_failure_tables.py +13 -19
  54. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/subcommands/export_gmpacket.py +9 -12
  55. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/subcommands/export_metric_tables.py +17 -29
  56. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/subcommands/export_provenance_tables.py +13 -21
  57. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/subcommands/export_shakemap.py +11 -19
  58. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/subcommands/generate_regression_plot.py +42 -43
  59. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/subcommands/generate_report.py +18 -27
  60. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/subcommands/generate_station_maps.py +16 -19
  61. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/subcommands/import_data.py +28 -30
  62. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/subcommands/process_waveforms.py +16 -14
  63. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/subcommands/processing_steps.py +31 -10
  64. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/subcommands/projects.py +7 -8
  65. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/utils/assemble_utils.py +52 -12
  66. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/utils/config.py +21 -75
  67. gmprocess-2.0.0/src/gmprocess/utils/config_versioning.py +222 -0
  68. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/utils/constants.py +19 -13
  69. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/utils/download_utils.py +43 -72
  70. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/utils/export_gmpacket_utils.py +12 -12
  71. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/utils/export_shakemap_utils.py +40 -34
  72. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/utils/misc_plots.py +21 -17
  73. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/utils/rupture_utils.py +6 -9
  74. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/utils/strec.py +0 -4
  75. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/utils/summary_plots.py +7 -5
  76. gmprocess-1.3.2/src/gmprocess/utils/test_utils.py → gmprocess-2.0.0/src/gmprocess/utils/tests_utils.py +32 -13
  77. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/clipping/clipping_check.py +1 -1
  78. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/corner_frequencies.py +5 -9
  79. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/fft.py +10 -6
  80. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/instrument_response.py +27 -14
  81. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/integrate.py +2 -2
  82. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/phase.py +25 -38
  83. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/snr.py +14 -12
  84. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/spectrum.py +1 -1
  85. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/windows.py +38 -53
  86. {gmprocess-1.3.2 → gmprocess-2.0.0/src/gmprocess.egg-info}/PKG-INFO +14 -8
  87. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess.egg-info/SOURCES.txt +19 -60
  88. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess.egg-info/entry_points.txt +2 -1
  89. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess.egg-info/requires.txt +3 -2
  90. gmprocess-1.3.2/src/gmprocess/bin/cwb_gather.py +0 -210
  91. gmprocess-1.3.2/src/gmprocess/bin/list_metrics.py +0 -74
  92. gmprocess-1.3.2/src/gmprocess/data/GDMSstations.json +0 -1
  93. gmprocess-1.3.2/src/gmprocess/io/asdf/waveform_metrics_xml.py +0 -123
  94. gmprocess-1.3.2/src/gmprocess/metrics/combination/arithmetic_mean.py +0 -47
  95. gmprocess-1.3.2/src/gmprocess/metrics/combination/combination.py +0 -63
  96. gmprocess-1.3.2/src/gmprocess/metrics/combination/geometric_mean.py +0 -48
  97. gmprocess-1.3.2/src/gmprocess/metrics/combination/greater_of_two_horizontals.py +0 -29
  98. gmprocess-1.3.2/src/gmprocess/metrics/combination/null_combination.py +0 -26
  99. gmprocess-1.3.2/src/gmprocess/metrics/combination/quadratic_mean.py +0 -48
  100. gmprocess-1.3.2/src/gmprocess/metrics/exception.py +0 -9
  101. gmprocess-1.3.2/src/gmprocess/metrics/gather.py +0 -21
  102. gmprocess-1.3.2/src/gmprocess/metrics/imc/arithmetic_mean.py +0 -36
  103. gmprocess-1.3.2/src/gmprocess/metrics/imc/channels.py +0 -35
  104. gmprocess-1.3.2/src/gmprocess/metrics/imc/geometric_mean.py +0 -36
  105. gmprocess-1.3.2/src/gmprocess/metrics/imc/gmrotd.py +0 -34
  106. gmprocess-1.3.2/src/gmprocess/metrics/imc/greater_of_two_horizontals.py +0 -35
  107. gmprocess-1.3.2/src/gmprocess/metrics/imc/imc.py +0 -53
  108. gmprocess-1.3.2/src/gmprocess/metrics/imc/quadratic_mean.py +0 -39
  109. gmprocess-1.3.2/src/gmprocess/metrics/imc/radial_transverse.py +0 -35
  110. gmprocess-1.3.2/src/gmprocess/metrics/imc/rotd.py +0 -40
  111. gmprocess-1.3.2/src/gmprocess/metrics/imt/arias.py +0 -35
  112. gmprocess-1.3.2/src/gmprocess/metrics/imt/duration.py +0 -39
  113. gmprocess-1.3.2/src/gmprocess/metrics/imt/fas.py +0 -35
  114. gmprocess-1.3.2/src/gmprocess/metrics/imt/imt.py +0 -52
  115. gmprocess-1.3.2/src/gmprocess/metrics/imt/pga.py +0 -33
  116. gmprocess-1.3.2/src/gmprocess/metrics/imt/pgv.py +0 -33
  117. gmprocess-1.3.2/src/gmprocess/metrics/imt/sa.py +0 -32
  118. gmprocess-1.3.2/src/gmprocess/metrics/imt/sorted_duration.py +0 -39
  119. gmprocess-1.3.2/src/gmprocess/metrics/metrics_controller.py +0 -860
  120. gmprocess-1.3.2/src/gmprocess/metrics/reduction/__init__.py +0 -0
  121. gmprocess-1.3.2/src/gmprocess/metrics/reduction/arias.py +0 -91
  122. gmprocess-1.3.2/src/gmprocess/metrics/reduction/duration.py +0 -87
  123. gmprocess-1.3.2/src/gmprocess/metrics/reduction/max.py +0 -87
  124. gmprocess-1.3.2/src/gmprocess/metrics/reduction/null_reduction.py +0 -56
  125. gmprocess-1.3.2/src/gmprocess/metrics/reduction/percentile.py +0 -92
  126. gmprocess-1.3.2/src/gmprocess/metrics/reduction/reduction.py +0 -40
  127. gmprocess-1.3.2/src/gmprocess/metrics/reduction/smooth_select.py +0 -106
  128. gmprocess-1.3.2/src/gmprocess/metrics/reduction/sorted_duration.py +0 -93
  129. gmprocess-1.3.2/src/gmprocess/metrics/rotation/__init__.py +0 -0
  130. gmprocess-1.3.2/src/gmprocess/metrics/rotation/gmrotd.py +0 -38
  131. gmprocess-1.3.2/src/gmprocess/metrics/rotation/null_rotation.py +0 -20
  132. gmprocess-1.3.2/src/gmprocess/metrics/rotation/radial_transverse.py +0 -93
  133. gmprocess-1.3.2/src/gmprocess/metrics/rotation/rotation.py +0 -213
  134. gmprocess-1.3.2/src/gmprocess/metrics/rotation/rotd.py +0 -40
  135. gmprocess-1.3.2/src/gmprocess/metrics/transform/__init__.py +0 -0
  136. gmprocess-1.3.2/src/gmprocess/metrics/transform/differentiate.py +0 -77
  137. gmprocess-1.3.2/src/gmprocess/metrics/transform/fft.py +0 -107
  138. gmprocess-1.3.2/src/gmprocess/metrics/transform/integrate.py +0 -62
  139. gmprocess-1.3.2/src/gmprocess/metrics/transform/null_transform.py +0 -39
  140. gmprocess-1.3.2/src/gmprocess/metrics/transform/oscillator.py +0 -195
  141. gmprocess-1.3.2/src/gmprocess/metrics/transform/transform.py +0 -67
  142. gmprocess-1.3.2/src/gmprocess/subcommands/__init__.py +0 -0
  143. gmprocess-1.3.2/src/gmprocess/subcommands/config.py +0 -125
  144. gmprocess-1.3.2/src/gmprocess/subcommands/download.py +0 -43
  145. gmprocess-1.3.2/src/gmprocess/utils/__init__.py +0 -0
  146. gmprocess-1.3.2/src/gmprocess/utils/base_utils.py +0 -210
  147. gmprocess-1.3.2/src/gmprocess/utils/event.py +0 -243
  148. gmprocess-1.3.2/src/gmprocess/waveform_processing/__init__.py +0 -0
  149. {gmprocess-1.3.2 → gmprocess-2.0.0}/LICENSE.md +0 -0
  150. {gmprocess-1.3.2 → gmprocess-2.0.0}/setup.cfg +0 -0
  151. {gmprocess-1.3.2 → gmprocess-2.0.0}/setup.py +0 -0
  152. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/__init__.py +0 -0
  153. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/apps/__init__.py +0 -0
  154. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/bin/__init__.py +0 -0
  155. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/bin/bundle_datarelease.py +0 -0
  156. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/bin/gmconvert.py +0 -0
  157. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/bin/gminfo.py +0 -0
  158. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/bin/gmrecords.py +0 -0
  159. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/bin/gmworkspace.py +0 -0
  160. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/core/__init__.py +0 -0
  161. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/CESMD_NGA_ids.csv +0 -0
  162. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/__init__.py +0 -0
  163. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/cosmos_table10.xls +0 -0
  164. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/cosmos_table4.xls +0 -0
  165. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/demo/ci38457511/raw/CICCC.RAW +0 -0
  166. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/demo/ci38457511/raw/CICLC.v1 +0 -0
  167. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/demo/ci38457511/raw/CITOW2.RAW +0 -0
  168. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/fdsn_codes.csv +0 -0
  169. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/lme/SA_rotd50.0_2020.03.31.csv +0 -0
  170. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/modules.yml +0 -0
  171. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nga_w2_selected.csv +0 -0
  172. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_clipping/bias_1.csv +0 -0
  173. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_clipping/bias_output.csv +0 -0
  174. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_clipping/masterF.txt +0 -0
  175. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_clipping/weight_1.csv +0 -0
  176. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_clipping/weight_output.csv +0 -0
  177. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_qa/Cant/M.csv +0 -0
  178. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_qa/Cant/bias_1.csv +0 -0
  179. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_qa/Cant/bias_2.csv +0 -0
  180. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_qa/Cant/bias_output.csv +0 -0
  181. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_qa/Cant/final_training.csv +0 -0
  182. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_qa/Cant/masterF.txt +0 -0
  183. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_qa/Cant/model_3.txt +0 -0
  184. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_qa/Cant/model_5.txt +0 -0
  185. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_qa/Cant/mu_sigma.csv +0 -0
  186. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_qa/Cant/weight_1.csv +0 -0
  187. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_qa/Cant/weight_2.csv +0 -0
  188. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_qa/Cant/weight_output.csv +0 -0
  189. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_qa/CantWell/M.csv +0 -0
  190. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_qa/CantWell/bias_1.csv +0 -0
  191. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_qa/CantWell/bias_2.csv +0 -0
  192. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_qa/CantWell/bias_output.csv +0 -0
  193. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_qa/CantWell/final_training.csv +0 -0
  194. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_qa/CantWell/masterF.txt +0 -0
  195. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_qa/CantWell/model_0.txt +0 -0
  196. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_qa/CantWell/mu_sigma.csv +0 -0
  197. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_qa/CantWell/weight_1.csv +0 -0
  198. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_qa/CantWell/weight_2.csv +0 -0
  199. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/nn_qa/CantWell/weight_output.csv +0 -0
  200. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/picker.yml +0 -0
  201. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/station_coordinates.xlsx +0 -0
  202. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/data/usgs_ids_nga_and_srcmod_cross_reference.xlsx +0 -0
  203. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/__init__.py +0 -0
  204. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/asdf/__init__.py +0 -0
  205. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/asdf/base_metrics_xml.py +0 -0
  206. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/asdf/path_utils.py +0 -0
  207. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/asdf/station_metrics_xml.py +0 -0
  208. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/asdf/utils.py +0 -0
  209. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/asdf/workspace_constants.py +0 -0
  210. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/bhrc/__init__.py +0 -0
  211. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/bhrc/core.py +0 -0
  212. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/cosmos/__init__.py +0 -0
  213. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/cosmos/cesmd_fetcher.py +0 -0
  214. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/cosmos/data_structures.py +0 -0
  215. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/cwb/__init__.py +0 -0
  216. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/cwb/core.py +0 -0
  217. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/dmg/__init__.py +0 -0
  218. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/dmg/core.py +0 -0
  219. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/dynamic_search_parameters.py +0 -0
  220. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/esm/__init__.py +0 -0
  221. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/esm/core.py +0 -0
  222. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/fetcher.py +0 -0
  223. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/geonet/__init__.py +0 -0
  224. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/geonet/core.py +0 -0
  225. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/global_fetcher.py +0 -0
  226. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/knet/__init__.py +0 -0
  227. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/knet/core.py +0 -0
  228. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/knet/knet_fetcher.py +0 -0
  229. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/nga.py +0 -0
  230. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/nsmn/__init__.py +0 -0
  231. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/nsmn/core.py +0 -0
  232. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/obspy/__init__.py +0 -0
  233. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/obspy/core.py +0 -0
  234. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/read_directory.py +0 -0
  235. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/renadic/__init__.py +0 -0
  236. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/renadic/core.py +0 -0
  237. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/seedname.py +0 -0
  238. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/smc/__init__.py +0 -0
  239. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/smc/core.py +0 -0
  240. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/unam/__init__.py +0 -0
  241. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/unam/core.py +0 -0
  242. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/usc/__init__.py +0 -0
  243. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/usc/core.py +0 -0
  244. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/io/utils.py +0 -0
  245. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/metrics/__init__.py +0 -0
  246. /gmprocess-1.3.2/src/gmprocess/metrics/base_metric_collection.py → /gmprocess-2.0.0/src/gmprocess/metrics/metric_collection_base.py +0 -0
  247. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/metrics/station_metric.py +0 -0
  248. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/metrics/utils.py +0 -0
  249. {gmprocess-1.3.2/src/gmprocess/metrics/combination → gmprocess-2.0.0/src/gmprocess/subcommands}/__init__.py +0 -0
  250. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/subcommands/arg_dicts.py +0 -0
  251. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/subcommands/init.py +0 -0
  252. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/subcommands/lazy_loader.py +0 -0
  253. {gmprocess-1.3.2/src/gmprocess/metrics/imc → gmprocess-2.0.0/src/gmprocess/utils}/__init__.py +0 -0
  254. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/utils/args.py +0 -0
  255. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/utils/ground_motion_models.py +0 -0
  256. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/utils/logging.py +0 -0
  257. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/utils/misc.py +0 -0
  258. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/utils/prompt.py +0 -0
  259. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/utils/report_utils.py +0 -0
  260. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/utils/stderr.py +0 -0
  261. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/utils/tables.py +0 -0
  262. {gmprocess-1.3.2/src/gmprocess/metrics/imt → gmprocess-2.0.0/src/gmprocess/waveform_processing}/__init__.py +0 -0
  263. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/adjust_highpass.py +0 -0
  264. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/adjust_highpass_ridder.py +0 -0
  265. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/baseline_correction.py +0 -0
  266. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/clipping/clip_detection.py +0 -0
  267. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/clipping/clipping_ann.py +0 -0
  268. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/clipping/histogram.py +0 -0
  269. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/clipping/jerk.py +0 -0
  270. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/clipping/max_amp.py +0 -0
  271. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/clipping/ping.py +0 -0
  272. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/clipping/std_dev.py +0 -0
  273. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/detrend.py +0 -0
  274. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/filtering.py +0 -0
  275. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/nn_quality_assurance.py +0 -0
  276. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/pretesting.py +0 -0
  277. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/processing.py +0 -0
  278. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/processing_step.py +0 -0
  279. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/resample.py +0 -0
  280. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/sanity_checks.py +0 -0
  281. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/taper.py +0 -0
  282. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess/waveform_processing/zero_crossings.py +0 -0
  283. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess.egg-info/dependency_links.txt +0 -0
  284. {gmprocess-1.3.2 → gmprocess-2.0.0}/src/gmprocess.egg-info/top_level.txt +0 -0
@@ -1,5 +1,5 @@
1
1
  recursive-include src/gmprocess/data *
2
+ recursive-include src/gmprocess/bin *
2
3
  prune tests
3
- prune doc_source
4
+ prune docs
4
5
  prune notebooks
5
- prune src/gmprocess/data/asdf
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gmprocess
3
- Version: 1.3.2
3
+ Version: 2.0.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
@@ -48,7 +48,7 @@ License: License
48
48
 
49
49
  [1]: https://creativecommons.org/publicdomain/zero/1.0/legalcode
50
50
 
51
- Requires-Python: <3.11,>=3.8
51
+ Requires-Python: >=3.9
52
52
  Description-Content-Type: text/markdown
53
53
  License-File: LICENSE.md
54
54
  Requires-Dist: beautifulsoup4>=4.11.0
@@ -62,10 +62,11 @@ Requires-Dist: gmpacket>=0.1.6
62
62
  Requires-Dist: h5py>=2.8
63
63
  Requires-Dist: lxml>=4.6.1
64
64
  Requires-Dist: matplotlib>=3.1.0
65
+ Requires-Dist: numba>=0.58
65
66
  Requires-Dist: numpy<2.0,>=1.21
66
67
  Requires-Dist: obspy>=1.4.0
67
68
  Requires-Dist: openpyxl>=3.0.8
68
- Requires-Dist: openquake.engine>=3.14
69
+ Requires-Dist: openquake.engine>=3.18
69
70
  Requires-Dist: pandas>=1.0
70
71
  Requires-Dist: ps2ff>=1.5.2
71
72
  Requires-Dist: pyasdf>=0.7
@@ -73,7 +74,7 @@ Requires-Dist: pydantic>=2.0
73
74
  Requires-Dist: requests>=2.29
74
75
  Requires-Dist: ruamel.yaml>=0.17.16
75
76
  Requires-Dist: schema>=0.7
76
- Requires-Dist: scipy>=1.7
77
+ Requires-Dist: scipy<1.13,>=1.7
77
78
  Requires-Dist: setuptools-scm>=6.3.2
78
79
  Requires-Dist: statsmodels>=0.12.2
79
80
  Requires-Dist: usgs-strec>=2.3.2
@@ -114,8 +115,9 @@ Most of the extensions that we provide are to handle strong motion data and rela
114
115
 
115
116
  # Documentation
116
117
  - Please note, we are in the process of improving the documentation and that there are some incomplete sections.
117
- - The full documentation can be viewed locally by running the `doc_source/makedocs.sh` script.
118
+ - The full documentation can be viewed locally by running the `docs/makedocs.sh` script.
118
119
  - The documentation is also available [here](https://ghsc.code-pages.usgs.gov/esi/groundmotion-processing/).
120
+ - The MATLAB functions included in the `tools/matlab` directory include a short [tutorial](tools/matlab/readme.md)
119
121
 
120
122
  # Getting Help
121
123
  The developers can be reached at [gmprocess@usgs.gov](mailto:gmprocess@usgs.gov).
@@ -125,8 +127,12 @@ If you would like to post an issue to ask a question, request a new feature, or
125
127
  If you would like to contribute merge requests to this repository, please let us know and we can add you as a collaborator.
126
128
  This will require that you create an account at code.usgs.gov, which is a more involved process than creating a personal account at gitub.com and posting to the issues on the github mirror.
127
129
 
128
- # Reference
129
- If you wish to cite this software, please use this reference:
130
+ # Suggested Citation
131
+ If you wish to cite this software please cite:
130
132
 
131
- - Hearne, M., E. M. Thompson, H. Schovanec, J. Rekoske, B. T. Aagaard, and C. B. Worden (2019). USGS automated ground motion processing software, USGS Software Release, doi: [10.5066/P9ANQXN3](https://dx.doi.org/10.5066/P9ANQXN3).
133
+ - Thompson, E.M., M. Hearne, B.T. Aagaard, J.M. Rekoske, C.B. Worden, M.P. Moschetti, H.E. Hunsinger, G.C. Ferragut, G.A. Parker, J.A. Smith, K.K. Smith, and A.R. Kottke (2024). USGS Automated Ground Motion Processing Software Version 2, U.S. Geological Survey software release. [https://doi.org/10.5066/P13HMKFJ](https://doi.org/10.5066/P13HMKFJ)
132
134
 
135
+
136
+ # Disclaimer
137
+
138
+ Any use of trade, firm, or product names is for descriptive purposes only and does not imply endorsement by the U.S. Government.
@@ -5,8 +5,9 @@ Most of the extensions that we provide are to handle strong motion data and rela
5
5
 
6
6
  # Documentation
7
7
  - Please note, we are in the process of improving the documentation and that there are some incomplete sections.
8
- - The full documentation can be viewed locally by running the `doc_source/makedocs.sh` script.
8
+ - The full documentation can be viewed locally by running the `docs/makedocs.sh` script.
9
9
  - The documentation is also available [here](https://ghsc.code-pages.usgs.gov/esi/groundmotion-processing/).
10
+ - The MATLAB functions included in the `tools/matlab` directory include a short [tutorial](tools/matlab/readme.md)
10
11
 
11
12
  # Getting Help
12
13
  The developers can be reached at [gmprocess@usgs.gov](mailto:gmprocess@usgs.gov).
@@ -16,8 +17,12 @@ If you would like to post an issue to ask a question, request a new feature, or
16
17
  If you would like to contribute merge requests to this repository, please let us know and we can add you as a collaborator.
17
18
  This will require that you create an account at code.usgs.gov, which is a more involved process than creating a personal account at gitub.com and posting to the issues on the github mirror.
18
19
 
19
- # Reference
20
- If you wish to cite this software, please use this reference:
20
+ # Suggested Citation
21
+ If you wish to cite this software please cite:
21
22
 
22
- - Hearne, M., E. M. Thompson, H. Schovanec, J. Rekoske, B. T. Aagaard, and C. B. Worden (2019). USGS automated ground motion processing software, USGS Software Release, doi: [10.5066/P9ANQXN3](https://dx.doi.org/10.5066/P9ANQXN3).
23
-
23
+ - Thompson, E.M., M. Hearne, B.T. Aagaard, J.M. Rekoske, C.B. Worden, M.P. Moschetti, H.E. Hunsinger, G.C. Ferragut, G.A. Parker, J.A. Smith, K.K. Smith, and A.R. Kottke (2024). USGS Automated Ground Motion Processing Software Version 2, U.S. Geological Survey software release. [https://doi.org/10.5066/P13HMKFJ](https://doi.org/10.5066/P13HMKFJ)
24
+
25
+
26
+ # Disclaimer
27
+
28
+ Any use of trade, firm, or product names is for descriptive purposes only and does not imply endorsement by the U.S. Government.
@@ -13,7 +13,7 @@ authors = [
13
13
  ]
14
14
  license = {file = "LICENSE.md"}
15
15
  readme = "README.md"
16
- requires-python = ">=3.8,<3.11"
16
+ requires-python = ">=3.9"
17
17
 
18
18
  # Requirements:
19
19
  dependencies = [
@@ -28,10 +28,11 @@ dependencies = [
28
28
  "h5py>=2.8",
29
29
  "lxml>=4.6.1",
30
30
  "matplotlib>=3.1.0",
31
+ "numba>=0.58",
31
32
  "numpy>=1.21,<2.0",
32
33
  "obspy>=1.4.0",
33
34
  "openpyxl>=3.0.8",
34
- "openquake.engine>=3.14",
35
+ "openquake.engine>=3.18",
35
36
  "pandas>=1.0",
36
37
  "ps2ff>=1.5.2",
37
38
  "pyasdf>=0.7",
@@ -39,7 +40,7 @@ dependencies = [
39
40
  "requests>=2.29",
40
41
  "ruamel.yaml>=0.17.16",
41
42
  "schema>=0.7",
42
- "scipy>=1.7",
43
+ "scipy>=1.7,<1.13",
43
44
  "setuptools-scm>=6.3.2",
44
45
  "statsmodels>=0.12.2",
45
46
  "usgs-strec>=2.3.2",
@@ -87,8 +88,9 @@ gmconvert = "gmprocess.bin.gmconvert:main"
87
88
  gminfo = "gmprocess.bin.gminfo:main"
88
89
  gmrecords = "gmprocess.bin.gmrecords:main"
89
90
  gmworkspace = "gmprocess.bin.gmworkspace:main"
91
+ gmprocess_config = "gmprocess.bin.gmprocess_config:main"
90
92
  list_metrics = "gmprocess.bin.list_metrics:main"
91
- cwb_gather = "gmprocess.bin.cwb_gather:main"
93
+ cwa_gather = "gmprocess.bin.cwa_gather:main"
92
94
  fix_inventory = "gmprocess.bin.fix_inventory:main"
93
95
 
94
96
  [build-system]
@@ -279,16 +279,17 @@ class GMrecordsApp(object):
279
279
  "--log",
280
280
  type=str,
281
281
  default=None,
282
- help="Path to log file; if provided, loging is directed to this file.",
282
+ help="Path to log file; if provided, logging is directed to this file.",
283
283
  )
284
284
 
285
285
  parser.add_argument(
286
286
  "-e",
287
287
  "--eventid",
288
288
  type=str,
289
+ dest="event_id",
289
290
  default=None,
290
291
  help=(
291
- "Comcat event ID. If None (default) all events in project data "
292
+ "ComCat event ID. If None (default) all events in project data "
292
293
  "directory will be used. To specify multiple eventids, use a comma "
293
294
  "separated list like "
294
295
  '`gmrecords -e "nc73799091, nc73774300" autoprocess`'
@@ -304,7 +305,7 @@ class GMrecordsApp(object):
304
305
  "A CSV file without column headers. The columns can be either: "
305
306
  "(1) a single column with ComCat event IDs, or "
306
307
  "(2) six columns in which those columns are: "
307
- "id (string, no spaces), time (any ISO standard for date/time), "
308
+ "event_id (string, no spaces), time (any ISO standard for date/time), "
308
309
  "latitutde (float, decimal degrees), longitude (float, decimal "
309
310
  "degrees), depth (float, km), magnitude (float)."
310
311
  ),
@@ -0,0 +1,210 @@
1
+ #!/usr/bin/env python
2
+
3
+ # stdlib imports
4
+ import os
5
+ import argparse
6
+ import sys
7
+ import pathlib
8
+
9
+ # third party imports
10
+ import numpy as np
11
+ from obspy import read, read_inventory
12
+ import configobj
13
+
14
+ # local imports
15
+ from gmprocess.core import scalar_event
16
+ from gmprocess.utils import constants
17
+ from gmprocess.utils import download_utils
18
+ from gmprocess.core.scalar_event import ScalarEvent
19
+
20
+
21
+ def main():
22
+ desc = """Convert CWA data from web site into form ingestible by gmprocess.
23
+
24
+ To obtain CWA strong motion data, create an account on the CWA:
25
+
26
+ https://gdms.cwa.gov.tw/
27
+
28
+
29
+ Step 1: CWBSN metadata
30
+ ----------------------
31
+
32
+ Click on the "Data" icon, then click on "Instrument Response".
33
+
34
+ - For "Output Format", choose "Station XML".
35
+ - For "Network", choose "CWBSN".
36
+ - For "Station", check "All Stations".
37
+ - For "Location", choose "*" for all locations.
38
+ - For "Channel", choose "HN?" for all strong motion stations.
39
+ - For "Start Time (UTC)", enter a date before the event of interest.
40
+ - For "End Time (UTC)", enter a date after the event of interest.
41
+ - "Label", doesn't matter becasue they don't use what you put here.
42
+ - Click the "Submit" button, and you should see a "Success!" pop up.
43
+ - Next will be a screen showing a list of all of your downloads.
44
+ - Right click on the most recent entry, it will be called "output.stationXML"
45
+ - Select "save link as" and name it <eventid>_cwbsn.xml
46
+
47
+ Step 2: TSMIP metadata
48
+ ----------------------
49
+
50
+ Click on the "Data" icon, then click on "Instrument Response".
51
+
52
+ - For "Output Format", choose "Station XML".
53
+ - For "Network", choose "TSMIP".
54
+ - For "Station", check "All Stations".
55
+ - For "Location", choose "*" for all locations.
56
+ - For "Channel", choose "HL?" for all strong motion stations.
57
+ - For "Start Time (UTC)", enter a date before the event of interest.
58
+ - For "End Time (UTC)", enter a date after the event of interest.
59
+ - "Label", doesn't matter becasue they don't use what you put here.
60
+ - Click the "Submit" button, and you should see a "Success!" pop up.
61
+ - Next will be a screen showing a list of all of your downloads.
62
+ - Right click on the most recent entry, it will be called "output.stationXML"
63
+ - Select "save link as" and name it <eventid>_tsmip.xml
64
+
65
+ Step 3: CWBSN ground motions
66
+ ----------------------------
67
+
68
+ Click on the "Data" icon, then click on "Multi-Station Waveform Data".
69
+
70
+ - For "Output Format", choose "MiniSEED".
71
+ - For "Network", choose "CWBSN".
72
+ - For "Station", check "All Stations".
73
+ - For "Location", choose "*" for all locations.
74
+ - For "Channel", choose "HN?" for all strong motion stations.
75
+ - For "Start Time (UTC)", enter a time 30 seconds before the origin time of
76
+ interest.
77
+ - For "End Time (UTC)", enter a time 4 minutes after the origin time of interest.
78
+ Note that this can be adjusted up for larger earthquakes or down for smaller.
79
+ - For "Label" use <eventid>_cwbsn_data
80
+ - Click the "Submit" button, and you should see a "Success!" pop up.
81
+ - Next will be a screen showing a list of all of your downloads. Data links will
82
+ take a few minutes to process.
83
+ - Download the file, which will be named <eventid>_cwbsn_data
84
+
85
+ Step 4: TSMIP ground motions
86
+ ----------------------------
87
+
88
+ Click on the "Data" icon, then click on "Multi-Station Waveform Data".
89
+
90
+ - For "Output Format", choose "MiniSEED".
91
+ - For "Network", choose "TSMIP".
92
+ - For "Station", check "All Stations".
93
+ - For "Location", choose "*" for all locations.
94
+ - For "Channel", choose "HN?" for all strong motion stations.
95
+ - For "Start Time (UTC)", enter a time 30 seconds before the origin time of
96
+ interest.
97
+ - For "End Time (UTC)", enter a time 4 minutes after the origin time of interest.
98
+ Note that this can be adjusted up for larger earthquakes or down for smaller.
99
+ - For "Label" use <eventid>_tsmip_data
100
+ - Click the "Submit" button, and you should see a "Success!" pop up.
101
+ - Next will be a screen showing a list of all of your downloads. Data links will
102
+ take a few minutes to process.
103
+ - Download the file, which will be named <eventid>_tsmip_data
104
+
105
+
106
+ You will need to run the cwa_gather command twice, once for each pair of XML and
107
+ tgz files for the CWBSN and TSMIP networks.
108
+ """
109
+ parser = argparse.ArgumentParser(
110
+ description=desc,
111
+ formatter_class=argparse.RawDescriptionHelpFormatter,
112
+ )
113
+ parser.add_argument(
114
+ "--event",
115
+ dest="event_id",
116
+ help="ComCat Event ID",
117
+ )
118
+ parser.add_argument(
119
+ "datafile",
120
+ help="The <eventid>_*_data.mseed file that you downloaded.",
121
+ )
122
+ parser.add_argument(
123
+ "metadata",
124
+ help="StationXML file that you downloaded.",
125
+ )
126
+ if len(sys.argv) == 1:
127
+ parser.print_help(sys.stderr)
128
+ sys.exit(1)
129
+ args = parser.parse_args()
130
+
131
+ if "CALLED_FROM_PYTEST" in os.environ:
132
+ CONF_PATH = pathlib.Path(".") / ".gmprocess"
133
+ else:
134
+ CONF_PATH = pathlib.Path.home() / ".gmprocess"
135
+ PROJECTS_FILE = CONF_PATH / "projects.conf"
136
+ projects_conf = configobj.ConfigObj(str(PROJECTS_FILE), encoding="utf-8")
137
+ project = projects_conf["project"]
138
+ current_project = projects_conf["projects"][project]
139
+ data_parts = pathlib.PurePath(current_project["data_path"]).parts
140
+ data_path = CONF_PATH.joinpath(*data_parts).resolve()
141
+ event_path = data_path / args.event_id
142
+ raw_path = event_path / "raw"
143
+ if not event_path.exists():
144
+ event_path.mkdir()
145
+ raw_path.mkdir()
146
+ raw_stream = read(args.datafile)
147
+ # some of these files are returned from CWB web site in time chunks
148
+ # using this merge method joins up all of the traces with the same
149
+ # NSCL. Thanks Obspy!
150
+ stream = raw_stream.merge()
151
+ trace_count = 0
152
+ for trace in stream:
153
+ if isinstance(trace.data, np.ma.core.MaskedArray):
154
+ continue
155
+ network = trace.stats.network
156
+ station = trace.stats.station
157
+ channel = trace.stats.channel
158
+ location = trace.stats.location
159
+ starttime_str = trace.stats.starttime.strftime("%Y%m%dT%H%M%SZ")
160
+ endtime_str = trace.stats.endtime.strftime("%Y%m%dT%H%M%SZ")
161
+ fname = (
162
+ f"{network}.{station}.{location}.{channel}__"
163
+ f"{starttime_str}__{endtime_str}.mseed"
164
+ )
165
+ filename = raw_path / fname
166
+ trace.write(str(filename), format="MSEED")
167
+ trace_count += 1
168
+ print(f"{len(stream)} channels written to {raw_path}.")
169
+
170
+ inventory = read_inventory(args.metadata)
171
+ network = inventory.networks[0]
172
+ netcode = network.code
173
+ for station in network.stations:
174
+ stacode = station.code
175
+ xml_name = f"{netcode}.{stacode}.xml"
176
+ sta_inv = inventory.select(netcode, stacode)
177
+ # Correct HL channel codes to be HN
178
+ for net in sta_inv.networks:
179
+ for sta in net.stations:
180
+ for chan in sta.channels:
181
+ if chan.code.startswith("HL"):
182
+ chan.code = chan.code[0] + "N" + chan.code[2]
183
+ sta_inv.write(raw_path / xml_name, "STATIONXML")
184
+ print(f"{len(network.stations)} StationXML files written to {raw_path}.")
185
+
186
+ event_info = download_utils.download_comcat_event(args.event_id)
187
+ scalar_event.write_geojson(event_info, event_path)
188
+ event_file = event_path / constants.EVENT_FILE
189
+ msg = f"Created event file at {event_file}."
190
+ if not event_file.is_file():
191
+ msg = f"Error: Failed to create {event_file}."
192
+ print(msg)
193
+ download_utils.download_rupture_file(args.event_id, event_path)
194
+ rupture_file = event_path / "rupture.json"
195
+ msg = f"Created rupture file at {rupture_file}."
196
+ if not rupture_file.is_file():
197
+ msg = f"Error: Failed to create {rupture_file}."
198
+ print(msg)
199
+
200
+ event = ScalarEvent.from_json(event_file)
201
+ download_utils.get_strec_results(event, event_path)
202
+ msg = "Downloaded STREC results."
203
+ strec_file = event_path / "strec_results.json"
204
+ if not strec_file.is_file():
205
+ msg = "Failed to download STREC results."
206
+ print(msg)
207
+
208
+
209
+ if __name__ == "__main__":
210
+ main()
@@ -112,7 +112,7 @@ class FixInventory:
112
112
  ds = pyasdf.ASDFDataSet(self.file)
113
113
  for i, waveform in enumerate(ds.waveforms):
114
114
  tags = waveform.get_waveform_tags()
115
- for tag in tags:
115
+ for _ in tags:
116
116
  for net in self.inventories[i]:
117
117
  for sta in net.stations:
118
118
  sta.description = ""
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env python
2
+
3
+ import argparse
4
+ from pathlib import Path
5
+
6
+ from ruamel.yaml import YAML
7
+
8
+ from gmprocess.io.asdf.stream_workspace import StreamWorkspace
9
+
10
+
11
+ def save_config(ws, out_file):
12
+ group_name = "config/config"
13
+ config_exists = group_name in ws.dataset._auxiliary_data_group
14
+ if config_exists:
15
+ fname = Path(out_file)
16
+ yaml = YAML()
17
+ yaml.indent(mapping=4)
18
+ yaml.preserve_quotes = True
19
+ with open(fname, "a", encoding="utf-8") as yf:
20
+ yaml.dump(ws.config, yf)
21
+ print("gmprocess_config:")
22
+ print(f" Input file: {ws.filename}")
23
+ print(f" Output file: {fname}")
24
+ else:
25
+ print("No config in workspace.")
26
+
27
+
28
+ def update_config(ws, in_file):
29
+ in_config_path = Path(in_file)
30
+ with open(in_config_path, "r", encoding="utf-8") as f:
31
+ yaml = YAML()
32
+ yaml.preserve_quotes = True
33
+ in_config = yaml.load(f)
34
+
35
+ ws.add_config(config=in_config, force=True)
36
+ print("gmprocess_config:")
37
+ print(f" Input file: {in_file}")
38
+ print(f" Updated config: {ws.filename}")
39
+
40
+
41
+ def main():
42
+ parser = argparse.ArgumentParser(
43
+ description="Help to fix confs in workspace files.",
44
+ formatter_class=argparse.RawDescriptionHelpFormatter,
45
+ )
46
+ parser.add_argument(
47
+ "--workspace",
48
+ required=True,
49
+ help="Path to workspace file.",
50
+ type=str,
51
+ )
52
+ io_group = parser.add_mutually_exclusive_group(required=True)
53
+ io_group.add_argument(
54
+ "--save",
55
+ help="Path to file to save contents of workspace config file.",
56
+ type=str,
57
+ )
58
+ io_group.add_argument(
59
+ "--update",
60
+ help="Path to config file to overwrite in workspace.",
61
+ type=str,
62
+ )
63
+ args = parser.parse_args()
64
+ ws = StreamWorkspace.open(args.workspace)
65
+ if args.save is not None:
66
+ save_config(ws, args.save)
67
+ if args.update is not None:
68
+ update_config(ws, args.update)
69
+ ws.close()
70
+
71
+
72
+ if __name__ == "__main__":
73
+ main()
@@ -0,0 +1,5 @@
1
+ #!/bin/bash
2
+
3
+ for efile in `find . -name event.json`; do
4
+ sed -e 's/"lat":/"latitude":/g; s/"lon":/"longitude":/g; s/"depth":/"depth_km":/g; s/"mag_type":/"magnitude_type":/g' $efile > tmp && mv tmp $efile
5
+ done
@@ -12,6 +12,7 @@ From SEIS-PROV docs regarding IDs:
12
12
  Note that it is important to recognize the difference between the above ID and the
13
13
  "prov:id" provenance property, which corresponds to the keys in Provenance.ACTIVITIES.
14
14
  """
15
+
15
16
  from abc import ABC, abstractmethod
16
17
  import logging
17
18
  from datetime import datetime
@@ -118,7 +119,7 @@ class LabelProvenance(Provenance):
118
119
  self.provenance_list.append(prov_dict)
119
120
 
120
121
  @classmethod
121
- def from_provenance_document(cls, provdoc, label):
122
+ def from_provenance_document(cls, provdoc, label, config):
122
123
  """Add provenance entires from a provenance document.
123
124
 
124
125
  Args:
@@ -126,8 +127,10 @@ class LabelProvenance(Provenance):
126
127
  Provenance document.
127
128
  label (str):
128
129
  Processing label.
130
+ config (dict):
131
+ Dictionary of config options.
129
132
  """
130
- prov_obj = cls(label)
133
+ prov_obj = cls(label, config=config)
131
134
  prov_obj._from_provenance_document(provdoc)
132
135
  return prov_obj
133
136