gmprocess 2.1.2__tar.gz → 2.3.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 (255) hide show
  1. {gmprocess-2.1.2 → gmprocess-2.3.0}/.gitignore +1 -0
  2. {gmprocess-2.1.2 → gmprocess-2.3.0}/.gitlab-ci.yml +13 -0
  3. {gmprocess-2.1.2 → gmprocess-2.3.0}/CHANGELOG.md +53 -0
  4. {gmprocess-2.1.2 → gmprocess-2.3.0}/CONTRIBUTING.md +5 -5
  5. gmprocess-2.3.0/DISCLAIMER.md +9 -0
  6. {gmprocess-2.1.2 → gmprocess-2.3.0}/PKG-INFO +4 -2
  7. {gmprocess-2.1.2 → gmprocess-2.3.0}/code.json +82 -0
  8. {gmprocess-2.1.2 → gmprocess-2.3.0}/pyproject.toml +2 -1
  9. {gmprocess-2.1.2 → gmprocess-2.3.0}/setup_env.sh +34 -12
  10. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/apps/gmrecords.py +2 -1
  11. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/bin/bundle_datarelease.py +36 -16
  12. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/core/scalar_event.py +3 -1
  13. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/core/stationstream.py +1 -4
  14. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/core/stationtrace.py +141 -25
  15. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/core/streamcollection.py +1 -2
  16. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/config_production.yml +54 -30
  17. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/config_test.yml +14 -209
  18. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/asdf/core.py +1 -1
  19. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/asdf/flatfile.py +22 -27
  20. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/asdf/flatfile_constants.py +5 -1
  21. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/asdf/rupture.py +2 -1
  22. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/asdf/stream_workspace.py +0 -2
  23. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/asdf/waveform_metrics_xml.py +4 -0
  24. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/cosmos/cesmd_search.py +0 -2
  25. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/cosmos/cosmos_writer.py +185 -55
  26. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/cwb/core.py +0 -4
  27. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/dmg/core.py +0 -12
  28. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/dynamic_search_parameters.py +9 -2
  29. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/esm/core.py +0 -2
  30. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/geonet/core.py +0 -7
  31. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/knet/core.py +0 -4
  32. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/knet/knet_fetcher.py +0 -4
  33. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/obspy/core.py +28 -12
  34. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/obspy/fdsn_fetcher.py +42 -28
  35. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/read_directory.py +0 -1
  36. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/report.py +12 -3
  37. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/smc/core.py +0 -5
  38. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/usc/core.py +3 -12
  39. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/metrics/containers.py +21 -4
  40. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/metrics/oscillator.py +2 -1
  41. gmprocess-2.3.0/src/gmprocess/metrics/reduce.py +449 -0
  42. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/metrics/transform.py +78 -29
  43. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/metrics/waveform_metric_calculator.py +40 -8
  44. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/metrics/waveform_metric_calculator_component_base.py +5 -3
  45. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/metrics/waveform_metric_component.py +11 -2
  46. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/metrics/waveform_metric_list.py +1 -1
  47. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/metrics/waveform_metric_type.py +164 -0
  48. gmprocess-2.3.0/src/gmprocess/subcommands/download.py +139 -0
  49. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/subcommands/export_cosmos.py +2 -1
  50. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/subcommands/generate_report.py +3 -2
  51. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/subcommands/process_waveforms.py +3 -3
  52. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/utils/assemble_utils.py +0 -9
  53. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/utils/config.py +89 -16
  54. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/utils/constants.py +5 -1
  55. gmprocess-2.3.0/src/gmprocess/utils/download_utils.py +80 -0
  56. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/utils/export_gmpacket_utils.py +1 -0
  57. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/utils/report_utils.py +1 -1
  58. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/utils/summary_plots.py +11 -5
  59. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/adjust_highpass.py +22 -12
  60. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/adjust_highpass_ridder.py +5 -1
  61. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/clipping/clipping_check.py +0 -4
  62. gmprocess-2.3.0/src/gmprocess/waveform_processing/convert_units.py +30 -0
  63. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/corner_frequencies.py +5 -6
  64. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/detrend.py +8 -4
  65. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/fft.py +9 -9
  66. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/filtering.py +97 -3
  67. gmprocess-2.3.0/src/gmprocess/waveform_processing/instrument_response.py +499 -0
  68. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/nn_quality_assurance.py +0 -3
  69. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/pretesting.py +6 -13
  70. gmprocess-2.3.0/src/gmprocess/waveform_processing/prism_adaptive_baseline.py +424 -0
  71. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/processing.py +19 -9
  72. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/resample.py +2 -2
  73. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/snr.py +28 -15
  74. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/spectrum.py +4 -0
  75. gmprocess-2.3.0/src/gmprocess/waveform_processing/taper.py +31 -0
  76. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/windows.py +40 -29
  77. gmprocess-2.3.0/src/gmprocess/waveform_processing/zero_pad.py +90 -0
  78. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess.egg-info/PKG-INFO +4 -2
  79. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess.egg-info/SOURCES.txt +3 -1
  80. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess.egg-info/entry_points.txt +0 -1
  81. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess.egg-info/requires.txt +2 -0
  82. gmprocess-2.1.2/DISCLAIMER.md +0 -1
  83. gmprocess-2.1.2/src/gmprocess/metrics/reduce.py +0 -185
  84. gmprocess-2.1.2/src/gmprocess/subcommands/download.py +0 -66
  85. gmprocess-2.1.2/src/gmprocess/utils/download_utils.py +0 -190
  86. gmprocess-2.1.2/src/gmprocess/utils/stderr.py +0 -83
  87. gmprocess-2.1.2/src/gmprocess/waveform_processing/instrument_response.py +0 -233
  88. gmprocess-2.1.2/src/gmprocess/waveform_processing/taper.py +0 -57
  89. {gmprocess-2.1.2 → gmprocess-2.3.0}/.coveragerc +0 -0
  90. {gmprocess-2.1.2 → gmprocess-2.3.0}/CODE_OF_CONDUCT.md +0 -0
  91. {gmprocess-2.1.2 → gmprocess-2.3.0}/LICENSE.md +0 -0
  92. {gmprocess-2.1.2 → gmprocess-2.3.0}/MANIFEST.in +0 -0
  93. {gmprocess-2.1.2 → gmprocess-2.3.0}/README.md +0 -0
  94. {gmprocess-2.1.2 → gmprocess-2.3.0}/pytest.ini +0 -0
  95. {gmprocess-2.1.2 → gmprocess-2.3.0}/setup.cfg +0 -0
  96. {gmprocess-2.1.2 → gmprocess-2.3.0}/setup.py +0 -0
  97. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/__init__.py +0 -0
  98. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/apps/__init__.py +0 -0
  99. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/bin/__init__.py +0 -0
  100. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/bin/cwa_gather.py +0 -0
  101. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/bin/fetch_orfeus.py +0 -0
  102. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/bin/fix_inventory.py +0 -0
  103. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/bin/gmconvert.py +0 -0
  104. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/bin/gminfo.py +0 -0
  105. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/bin/gmprocess_config.py +0 -0
  106. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/bin/gmrecords.py +0 -0
  107. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/bin/gmworkspace.py +0 -0
  108. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/bin/update_event_json.sh +0 -0
  109. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/core/__init__.py +0 -0
  110. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/core/provenance.py +0 -0
  111. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/core/streamarray.py +0 -0
  112. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/CESMD_NGA_ids.csv +0 -0
  113. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/__init__.py +0 -0
  114. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/config_production_v1.yml +0 -0
  115. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/config_test_download.yml +0 -0
  116. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/cosmos_table10.xls +0 -0
  117. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/cosmos_table4.xls +0 -0
  118. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/demo/ci38457511/raw/CICCC.RAW +0 -0
  119. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/demo/ci38457511/raw/CICLC.v1 +0 -0
  120. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/demo/ci38457511/raw/CITOW2.RAW +0 -0
  121. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/demo/nc72282711/workspace.h5 +0 -0
  122. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/fdsn_codes.csv +0 -0
  123. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/lme/SA_rotd50.0_2020.03.31.csv +0 -0
  124. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/modules.yml +0 -0
  125. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nga_w2_selected.csv +0 -0
  126. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_clipping/bias_1.csv +0 -0
  127. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_clipping/bias_output.csv +0 -0
  128. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_clipping/masterF.txt +0 -0
  129. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_clipping/weight_1.csv +0 -0
  130. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_clipping/weight_output.csv +0 -0
  131. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_qa/Cant/M.csv +0 -0
  132. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_qa/Cant/bias_1.csv +0 -0
  133. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_qa/Cant/bias_2.csv +0 -0
  134. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_qa/Cant/bias_output.csv +0 -0
  135. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_qa/Cant/final_training.csv +0 -0
  136. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_qa/Cant/masterF.txt +0 -0
  137. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_qa/Cant/model_3.txt +0 -0
  138. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_qa/Cant/model_5.txt +0 -0
  139. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_qa/Cant/mu_sigma.csv +0 -0
  140. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_qa/Cant/weight_1.csv +0 -0
  141. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_qa/Cant/weight_2.csv +0 -0
  142. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_qa/Cant/weight_output.csv +0 -0
  143. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_qa/CantWell/M.csv +0 -0
  144. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_qa/CantWell/bias_1.csv +0 -0
  145. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_qa/CantWell/bias_2.csv +0 -0
  146. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_qa/CantWell/bias_output.csv +0 -0
  147. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_qa/CantWell/final_training.csv +0 -0
  148. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_qa/CantWell/masterF.txt +0 -0
  149. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_qa/CantWell/model_0.txt +0 -0
  150. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_qa/CantWell/mu_sigma.csv +0 -0
  151. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_qa/CantWell/weight_1.csv +0 -0
  152. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_qa/CantWell/weight_2.csv +0 -0
  153. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/nn_qa/CantWell/weight_output.csv +0 -0
  154. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/picker.yml +0 -0
  155. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/station_coordinates.xlsx +0 -0
  156. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/data/usgs_ids_nga_and_srcmod_cross_reference.xlsx +0 -0
  157. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/gui/__init__.py +0 -0
  158. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/gui/gui_ucla/Documentation.md +0 -0
  159. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/gui/gui_ucla/GUI_human_review.ipynb +0 -0
  160. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/gui/gui_ucla/HumanReviewGUI.py +0 -0
  161. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/gui/gui_ucla/__init__.py +0 -0
  162. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/__init__.py +0 -0
  163. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/asdf/__init__.py +0 -0
  164. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/asdf/base_metrics_xml.py +0 -0
  165. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/asdf/path_utils.py +0 -0
  166. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/asdf/station_metrics_xml.py +0 -0
  167. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/asdf/utils.py +0 -0
  168. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/asdf/workspace_constants.py +0 -0
  169. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/bhrc/__init__.py +0 -0
  170. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/bhrc/core.py +0 -0
  171. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/cosmos/__init__.py +0 -0
  172. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/cosmos/cesmd_fetcher.py +0 -0
  173. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/cosmos/core.py +0 -0
  174. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/cosmos/data_structures.py +0 -0
  175. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/cwb/__init__.py +0 -0
  176. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/dmg/__init__.py +0 -0
  177. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/esm/__init__.py +0 -0
  178. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/fetcher.py +0 -0
  179. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/geonet/__init__.py +0 -0
  180. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/global_fetcher.py +0 -0
  181. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/knet/__init__.py +0 -0
  182. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/nga.py +0 -0
  183. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/nsmn/__init__.py +0 -0
  184. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/nsmn/core.py +0 -0
  185. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/obspy/__init__.py +0 -0
  186. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/read.py +0 -0
  187. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/renadic/__init__.py +0 -0
  188. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/renadic/core.py +0 -0
  189. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/seedname.py +0 -0
  190. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/smc/__init__.py +0 -0
  191. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/unam/__init__.py +0 -0
  192. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/unam/core.py +0 -0
  193. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/usc/__init__.py +0 -0
  194. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/io/utils.py +0 -0
  195. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/metrics/__init__.py +0 -0
  196. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/metrics/combine.py +0 -0
  197. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/metrics/metric_collection_base.py +0 -0
  198. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/metrics/rotate.py +0 -0
  199. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/metrics/station_metric.py +0 -0
  200. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/metrics/station_metric_collection.py +0 -0
  201. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/metrics/utils.py +0 -0
  202. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/metrics/waveform_metric_collection.py +0 -0
  203. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/subcommands/__init__.py +0 -0
  204. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/subcommands/arg_dicts.py +0 -0
  205. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/subcommands/assemble.py +0 -0
  206. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/subcommands/autoprocess.py +0 -0
  207. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/subcommands/autoshakemap.py +0 -0
  208. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/subcommands/base.py +0 -0
  209. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/subcommands/clean.py +0 -0
  210. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/subcommands/compute_station_metrics.py +0 -0
  211. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/subcommands/compute_waveform_metrics.py +0 -0
  212. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/subcommands/export_failure_tables.py +0 -0
  213. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/subcommands/export_gmpacket.py +0 -0
  214. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/subcommands/export_metric_tables.py +0 -0
  215. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/subcommands/export_provenance_tables.py +0 -0
  216. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/subcommands/generate_regression_plot.py +0 -0
  217. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/subcommands/generate_station_maps.py +0 -0
  218. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/subcommands/import_data.py +0 -0
  219. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/subcommands/init.py +0 -0
  220. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/subcommands/lazy_loader.py +0 -0
  221. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/subcommands/processing_steps.py +0 -0
  222. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/subcommands/projects.py +0 -0
  223. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/utils/__init__.py +0 -0
  224. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/utils/args.py +0 -0
  225. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/utils/config_versioning.py +0 -0
  226. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/utils/ground_motion_models.py +0 -0
  227. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/utils/logging.py +0 -0
  228. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/utils/misc.py +0 -0
  229. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/utils/misc_plots.py +0 -0
  230. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/utils/prompt.py +0 -0
  231. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/utils/rupture_utils.py +0 -0
  232. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/utils/strec.py +0 -0
  233. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/utils/tables.py +0 -0
  234. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/utils/tests_utils.py +0 -0
  235. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/__init__.py +0 -0
  236. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/baseline_correction.py +0 -0
  237. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/clipping/clip_detection.py +0 -0
  238. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/clipping/clipping_ann.py +0 -0
  239. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/clipping/histogram.py +0 -0
  240. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/clipping/jerk.py +0 -0
  241. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/clipping/max_amp.py +0 -0
  242. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/clipping/ping.py +0 -0
  243. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/clipping/std_dev.py +0 -0
  244. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/integrate.py +0 -0
  245. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/phase.py +0 -0
  246. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/processing_step.py +0 -0
  247. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/sanity_checks.py +0 -0
  248. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess/waveform_processing/zero_crossings.py +0 -0
  249. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess.egg-info/dependency_links.txt +0 -0
  250. {gmprocess-2.1.2 → gmprocess-2.3.0}/src/gmprocess.egg-info/top_level.txt +0 -0
  251. {gmprocess-2.1.2 → gmprocess-2.3.0}/tools/matlab/README.md +0 -0
  252. {gmprocess-2.1.2 → gmprocess-2.3.0}/tools/matlab/get_all_waveforms.m +0 -0
  253. {gmprocess-2.1.2 → gmprocess-2.3.0}/tools/matlab/get_events.m +0 -0
  254. {gmprocess-2.1.2 → gmprocess-2.3.0}/tools/matlab/get_waveform_metrics.m +0 -0
  255. {gmprocess-2.1.2 → gmprocess-2.3.0}/tools/matlab/waveform_plot.png +0 -0
@@ -9,6 +9,7 @@ build
9
9
  .coverage.*
10
10
  coverage.xml
11
11
  htmlcov
12
+ .pymon
12
13
  **/gmprocess.egg-info/
13
14
  .pytest_cache
14
15
  *.so
@@ -23,6 +23,12 @@ default:
23
23
  variables:
24
24
  ENVIRONMENT: staging
25
25
 
26
+ .parallel:
27
+ parallel:
28
+ matrix:
29
+ - PYVER: [3.10-build, 3.11-build, 3.12-build]
30
+ DIST: [linux]
31
+
26
32
  stages:
27
33
  - test
28
34
  - build
@@ -47,6 +53,8 @@ run tests and coverage:
47
53
  - pytest -x --cov=src/gmprocess/ --cov-report xml:coverage.xml --cov-report term --junitxml junit.xml
48
54
  - coverage xml
49
55
  stage: test
56
+ # parallel: !reference [.parallel,parallel]
57
+
50
58
 
51
59
  run upload pypi:
52
60
  rules:
@@ -67,6 +75,11 @@ run upload pypi:
67
75
  stage: build
68
76
 
69
77
  pages:
78
+ image: code.usgs.gov:5001/devops/images/usgs/python:3.12-build
79
+ before_script:
80
+ - python --version
81
+ - export PATH="/home/usgs-user/.local/bin:$PATH"
82
+ - apt-get install tree
70
83
  artifacts:
71
84
  paths:
72
85
  # The folder that contains the files to be exposed at the Page URL
@@ -1,6 +1,59 @@
1
1
  ## main
2
2
 
3
3
 
4
+ ## 2.3.0 / 2025-01-23
5
+
6
+ - Enhancements
7
+ - Substantial changes to the default processing steps.
8
+ - Add support for psudo-response spectra (PSA and PSV) and change default metrics to use PSA rather than SA.
9
+ - Allow for user to set a different query window duration for different tectonic envirnments.
10
+ - Increase default query window duraiton.
11
+ - Add a new "source_path" method to compute the signal end that uses 1/fc as the source duration, which is then added to a path duration that is parameterized with coefficients for an intercept and distance term.
12
+ - Exclude network 7D, which is for ocean bottom stations.
13
+ - Apply clipping check to strong motion instruments. In the past, we thought it was safe to assume strong motion instruments did not clip but we have found exceptions to this.
14
+ - Update summary plots so that the time axis is the same across raw, accel, vel, and disp plots.
15
+ - Update report to plot stations in order of epicentral distance.
16
+ - Update setup_env.sh to use miniforge rather than miniconda and renamed to install.sh to be consistent with other repos.
17
+ - Add taper before differentiation for velocity instruments.
18
+ - Expand instrument response QA to include consistency of units with instrument type.
19
+ - Set unit registry to treat "counts" as having a unique dimension, rather than being dimensionless.
20
+ - Simplify SNR failure message.
21
+ - Allow water_level to be specified as "None" for the instrument response in config file.
22
+ - Add QA check for inconsistency in sample rate reported in data and metadata.
23
+ - Increase `sec_before_split` default value for trimming the record.
24
+ - Add config options to allow for using a Butterworth filter for filtering prior to instrument response removal, rather than the default options that ObsPy uses with their `remove_response` method.
25
+ - Add `bandpass` processing step.
26
+ - Documentation
27
+ - Fix the description of the --textfile option for gmrecords.
28
+ - Bugfix
29
+ - Do not exit when event id not found in comcat while looking for a rupture file.
30
+ - Ensure fill value matches the data type of the trace.
31
+ - Add provenance entry for when the detrend method is "pre".
32
+ - Fix errors in some filtering provenance entries.
33
+ - Bugfix in normalizing pre-event noise spectra.
34
+
35
+ ## 2.2.0 / 2024-12-23
36
+ - Enhancements
37
+ - Add the PRISM/Jones et al. (doi: 10.1785/0220160200) adaptive baseline correction step.
38
+ - Add support for SV and SD metrics (for cosmos writer V3)
39
+ - Add support for V2 (processed acc, vel, disp) and V3 COSMOS writer
40
+ - Add number of threads configuration of FDSN clients to more reliably retrieve data from FDSN servers that may restrict the number of simultaneous downloads.
41
+ - Add QA check comparing the combined stage gains to the overall instrument sensitivity.
42
+ - Add QA step to check that the data type of miniseed raw data are integers.
43
+ - Add options for downloading origin/strec/rupture/waveform data individually to the download subcommand.
44
+ - StationTrace methods:
45
+ - Override the Trace taper method so that the provenance is set when this activity is performed.
46
+ - Ditto for detrend.
47
+ - Ditto for trim.
48
+ - Add a zero_pad method as a helper for zero padding.
49
+ - Add zero pad processing step.
50
+ - Add progress bar while creating diagnostic plots.
51
+ - Bug fixes
52
+ - Ensure that the FFT is taken for the length record as is used for normalizing the SNR.
53
+ - Other
54
+ - When trying to read the config file, allow for yaml read error to be raised rather than returning None.
55
+ - Increase tolerance for misaligned traces to be resampled.
56
+
4
57
  ## 2.1.2 / 2024-11-14
5
58
  - Enhancements
6
59
  - Station distance (epicentral distance) added to the reports
@@ -82,12 +82,12 @@ Common reasons to rebase include:
82
82
  ```
83
83
  3. Update `CHANGELOG.md` to include the changes for this version. The goal is for the changelog to be kept up to date with each merge request, so this step should largely consist of creating a new section for this release and moving content into it from "main".
84
84
  4. Commit changes to the `v1.2.1.rc0` branch.
85
- 5. Merge the release candidate back into main.
85
+ 5. Push the branch to your origin.
86
86
  ```
87
87
  git push origin v1.2.1.rc0
88
88
  ```
89
- Then create a merge request in to upstream main.
90
- 6. Create an annotated tag **from main** and push the tag upstream
89
+ 6. Create a merge request in to upstream main, merge it, and rebase locally.
90
+ 7. Create an annotated tag **from main** and push the tag upstream
91
91
  ```
92
92
  git tag -a v1.2.1 -m "Version 1.2.1"
93
93
  git push upstream v1.2.1
@@ -96,8 +96,8 @@ Common reasons to rebase include:
96
96
  - *Note that we cannot have a hyphen in the tag name.*
97
97
  - Also, if we end the tag name with "dev" then it will be build and uploaded to pypi as a pre-release version, which means that it will never be pip installed unless the user specifies the exact version of the pre-release.
98
98
  - Maintainence note: the PYPI tokens are maintained in gitlab for the ESI group, under Settings then CI/CD, then Variables. These tokens are associated with the "pager_cicd" pypi service account.
99
- 7. Create release from tag in gitlab. Give it a release title like `v1.2.1`.
100
- 8. Copy/paste the relevant part of the changelog into the "describe this release" section.
99
+ 8. Create release from tag in gitlab. Give it a release title like `v1.2.1`.
100
+ 9. Copy/paste the relevant part of the changelog into the "describe this release" section.
101
101
 
102
102
 
103
103
  ## Build Documentation
@@ -0,0 +1,9 @@
1
+ This software is preliminary or provisional and is subject to revision.
2
+ It is being provided to meet the need for timely best science.
3
+ The software has not received final approval by the U.S. Geological Survey (USGS).
4
+ No warranty, expressed or implied, is made by the USGS or the U.S. Government
5
+ as to the functionality of the software and related material
6
+ nor shall the fact of release constitute any such warranty.
7
+ The software is provided on the condition that neither the USGS nor the U.S. Government
8
+ shall be held liable for any damages resulting from the authorized or unauthorized
9
+ use of the software.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: gmprocess
3
- Version: 2.1.2
3
+ Version: 2.3.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
@@ -68,6 +68,7 @@ Requires-Dist: obspy>=1.4.1
68
68
  Requires-Dist: openpyxl>=3.0.8
69
69
  Requires-Dist: openquake.engine>=3.18
70
70
  Requires-Dist: pandas>=1.0
71
+ Requires-Dist: Pint>0.24.3
71
72
  Requires-Dist: ps2ff>=1.5.2
72
73
  Requires-Dist: pyasdf>=0.7
73
74
  Requires-Dist: pydantic>=2.0
@@ -77,6 +78,7 @@ Requires-Dist: schema>=0.7
77
78
  Requires-Dist: scipy>=1.7
78
79
  Requires-Dist: setuptools-scm>=6.3.2
79
80
  Requires-Dist: statsmodels>=0.12.2
81
+ Requires-Dist: tqdm>4.67
80
82
  Requires-Dist: usgs-strec>=2.3.2
81
83
  Requires-Dist: xlrd>=2.0
82
84
  Provides-Extra: dev
@@ -1,4 +1,86 @@
1
1
  [
2
+ {
3
+ "name": "groundmotion-processing",
4
+ "description": "Read and process ground motion waveform data",
5
+ "version": "v2.3.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.3.0/groundmotion-processing-v2.3.0.zip",
12
+ "disclaimerURL": "https://code.usgs.gov/ghsc/esi/groundmotion-processing/-/raw/v2.3.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.3.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-01-23"
41
+ }
42
+ },
43
+ {
44
+ "name": "groundmotion-processing",
45
+ "description": "Read and process ground motion waveform data",
46
+ "version": "v2.2.0",
47
+ "status": "Production",
48
+ "organization": "U.S. Geological Survey",
49
+ "vcs": "git",
50
+ "repositoryURL": "https://code.usgs.gov/ghsc/esi/groundmotion-processing.git",
51
+ "homepageURL": "https://code.usgs.gov/ghsc/esi/groundmotion-processing",
52
+ "downloadURL": "https://code.usgs.gov/ghsc/esi/groundmotion-processing/-/archive/v2.2.0/groundmotion-processing-v2.2.0.zip",
53
+ "disclaimerURL": "https://code.usgs.gov/ghsc/esi/groundmotion-processing/-/raw/v2.2.0/DISCLAIMER.md",
54
+ "permissions": {
55
+ "licenses": [
56
+ {
57
+ "name": "Public Domain, CC0-1.0",
58
+ "URL": "https://code.usgs.gov/ghsc/esi/groundmotion-processing/-/raw/v2.2.0/LICENSE.md"
59
+ }
60
+ ],
61
+ "usageType": "openSource",
62
+ "exemptionText": null
63
+ },
64
+ "laborHours": 1,
65
+ "languages": [
66
+ "python"
67
+ ],
68
+ "tags": [
69
+ "earthquake",
70
+ "impact",
71
+ "strong motion",
72
+ "amplitudes",
73
+ "ground motion",
74
+ "usg-artificial-intelligence"
75
+ ],
76
+ "contact": {
77
+ "name": "Eric Thompson",
78
+ "email": "emthompson@usgs.gov"
79
+ },
80
+ "date": {
81
+ "metadataLastUpdated": "2024-12-23"
82
+ }
83
+ },
2
84
  {
3
85
  "name": "groundmotion-processing",
4
86
  "description": "Read and process ground motion waveform data",
@@ -34,6 +34,7 @@ dependencies = [
34
34
  "openpyxl>=3.0.8",
35
35
  "openquake.engine>=3.18",
36
36
  "pandas>=1.0",
37
+ "Pint>0.24.3",
37
38
  "ps2ff>=1.5.2",
38
39
  "pyasdf>=0.7",
39
40
  "pydantic>=2.0",
@@ -43,6 +44,7 @@ dependencies = [
43
44
  "scipy>=1.7",
44
45
  "setuptools-scm>=6.3.2",
45
46
  "statsmodels>=0.12.2",
47
+ "tqdm>4.67",
46
48
  "usgs-strec>=2.3.2",
47
49
  "xlrd>=2.0",
48
50
  ]
@@ -88,7 +90,6 @@ gminfo = "gmprocess.bin.gminfo:cli"
88
90
  gmrecords = "gmprocess.bin.gmrecords:main"
89
91
  gmworkspace = "gmprocess.bin.gmworkspace:main"
90
92
  gmprocess_config = "gmprocess.bin.gmprocess_config:main"
91
- list_metrics = "gmprocess.bin.list_metrics:main"
92
93
  cwa_gather = "gmprocess.bin.cwa_gather:cli"
93
94
  fix_inventory = "gmprocess.bin.fix_inventory:main"
94
95
  fetch_orfeus = "gmprocess.bin.fetch_orfeus:cli"
@@ -8,11 +8,9 @@ echo "Installing ${VENV}...${cwd}"
8
8
  unamestr=`uname`
9
9
  if [ "$unamestr" == 'Linux' ]; then
10
10
  prof=~/.bashrc
11
- mini_conda_url=https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
12
11
  matplotlibdir=~/.config/matplotlib
13
12
  elif [ "$unamestr" == 'FreeBSD' ] || [ "$unamestr" == 'Darwin' ]; then
14
13
  prof=~/.bash_profile
15
- mini_conda_url=https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
16
14
  matplotlibdir=~/.matplotlib
17
15
  else
18
16
  echo "Unsupported environment. Exiting."
@@ -39,9 +37,7 @@ elif [ ! grep -Fxq "backend" $matplotlibrc ]; then
39
37
  echo "NOTE: A non-interactive matplotlib backend (Agg) has been set for this user."
40
38
  else
41
39
  sed -i '' 's/backend.*/backend : Agg/' $matplotlibrc
42
- echo "###############"
43
40
  echo "NOTE: $matplotlibrc has been changed to set 'backend : Agg'"
44
- echo "###############"
45
41
  fi
46
42
 
47
43
 
@@ -50,21 +46,45 @@ conda --version
50
46
  if [ $? -ne 0 ]; then
51
47
  echo "No conda detected, installing miniconda..."
52
48
 
53
- curl -L $mini_conda_url -o miniconda.sh;
49
+ command -v curl >/dev/null 2>&1 || { echo >&2 "Script requires curl but it's not installed. Aborting."; exit 1; }
50
+
51
+ miniforge_url="https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
52
+ curl -L $miniforge_url -o miniforge.sh &>/dev/null
53
+
54
+ # if miniforge.sh fails, bow out gracefully
55
+ if [ $? -ne 0 ];then
56
+ echo "Failed to run miniconda installer shell script. Exiting."
57
+ exit 1
58
+ fi
59
+
54
60
  echo "Install directory: $HOME/miniconda"
55
61
 
56
- bash miniconda.sh -f -b -p $HOME/miniconda
62
+ bash miniforge.sh -f -b -p $HOME/miniconda
57
63
 
58
64
  # Need this to get conda into path
59
65
  . $HOME/miniconda/etc/profile.d/conda.sh
66
+
67
+ rm miniforge.sh
60
68
  else
61
69
  echo "conda detected, installing $VENV environment..."
62
70
  fi
63
71
 
64
- echo "PATH:"
65
- echo $PATH
66
- echo ""
67
-
72
+ # Update the conda tool
73
+ CVNUM=`conda -V | cut -f2 -d' '`
74
+ LATEST=`conda search conda | tail -1 | tr -s ' ' | cut -f2 -d" "`
75
+ echo "${CVNUM}"
76
+ echo "${LATEST}"
77
+ if [ ${LATEST} != ${CVNUM} ]; then
78
+ echo "##################Updating conda tool..."
79
+ CVERSION=`conda -V`
80
+ echo "Current conda version: ${CVERSION}"
81
+ conda update -n base -c defaults conda -y
82
+ CVERSION=`conda -V`
83
+ echo "New conda version: ${CVERSION}"
84
+ echo "##################Done updating conda tool..."
85
+ else
86
+ echo "conda ${CVNUM} already matches latest version ${LATEST}. No update required."
87
+ fi
68
88
 
69
89
  # only add this line if it does not already exist
70
90
  grep "/etc/profile.d/conda.sh" $prof
@@ -72,6 +92,9 @@ if [ $? -ne 0 ]; then
72
92
  echo ". $_CONDA_ROOT/etc/profile.d/conda.sh" >> $prof
73
93
  fi
74
94
 
95
+ # Set libmamba as solver
96
+ conda config --set solver libmamba &>/dev/null
97
+
75
98
  # Start in conda base environment
76
99
  echo "Activate base virtual environment"
77
100
  conda activate base
@@ -87,14 +110,13 @@ if [ $? -ne 0 ]; then
87
110
  exit
88
111
  fi
89
112
 
90
-
91
113
  # Activate the new environment
92
114
  echo "Activating the $VENV virtual environment"
93
115
  conda activate $VENV
94
116
 
95
117
  # Do mac-specific conda installs
96
118
  if [ "$unamestr" == 'FreeBSD' ] || [ "$unamestr" == 'Darwin' ]; then
97
- # This is motivated by the mysterios pyproj/rasterio error and incorrect results
119
+ # This is motivated by the mysterious pyproj/rasterio error and incorrect results
98
120
  # that only happen on ARM macs.
99
121
  # https://github.com/conda-forge/pyproj-feedstock/issues/156
100
122
  conda install -c conda-forge -y libgdal-netcdf
@@ -358,7 +358,8 @@ class GMrecordsApp(object):
358
358
  "(2) six columns in which those columns are: "
359
359
  "event_id (string, no spaces), time (any ISO standard for date/time), "
360
360
  "latitutde (float, decimal degrees), longitude (float, decimal "
361
- "degrees), depth (float, km), magnitude (float)."
361
+ "degrees), depth (float, km), magnitude (float), and magnitude type "
362
+ "(string)."
362
363
  ),
363
364
  )
364
365
 
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env python3
2
2
  """Utility script for bundling workspace files for archiving a data release as a special project at CESMD."""
3
3
 
4
- GMPROCESS_ASDF_URL = "https://gmprocess.readthedocs.io/en/latest/contents/manual/workspace.html"
5
4
 
6
5
  import pathlib
7
6
  import shutil
@@ -11,7 +10,12 @@ import io
11
10
  import h5py
12
11
  import obspy
13
12
 
14
- class HtmlIndex():
13
+ GMPROCESS_ASDF_URL = (
14
+ "https://gmprocess.readthedocs.io/en/latest/contents/manual/workspace.html"
15
+ )
16
+
17
+
18
+ class HtmlIndex:
15
19
 
16
20
  def __init__(self, project_name):
17
21
  self.project_name = project_name
@@ -66,11 +70,11 @@ class HtmlIndex():
66
70
  lines = (
67
71
  """<p>Earthquake are ordered by origin time.</p>""",
68
72
  """<table style = "width: 30%">""",
69
- """\t<tr>""",
70
- """\t\t<th style = "width: 20%">Filename</th>""",
71
- """\t\t<th style = "width: 12.5%">Event ID</th>""",
72
- """\t\t<th style = "width: 12.5%">Filesize</th>""",
73
- """\t</tr>""",
73
+ """\t<tr>""",
74
+ """\t\t<th style = "width: 20%">Filename</th>""",
75
+ """\t\t<th style = "width: 12.5%">Event ID</th>""",
76
+ """\t\t<th style = "width: 12.5%">Filesize</th>""",
77
+ """\t</tr>""",
74
78
  )
75
79
  for eq_id, file_size in event_info:
76
80
  lines += (
@@ -84,8 +88,8 @@ class HtmlIndex():
84
88
  self.fout.write(line + "\n")
85
89
 
86
90
 
87
- class DataReleaseApp():
88
-
91
+ class DataReleaseApp:
92
+
89
93
  def main(self, project_name: str, project_title: str, data_dir: pathlib.Path):
90
94
  self.project_name = project_name
91
95
  self.project_title = project_title
@@ -136,9 +140,9 @@ class DataReleaseApp():
136
140
  filename = self.data_dir / event_id / "workspace.h5"
137
141
  nbytes = os.path.getsize(filename)
138
142
  if nbytes >= 2**30:
139
- size = f"{nbytes / 2**30:.2f} GB"
143
+ size = f"{nbytes / 2**30:.2f} GB"
140
144
  elif nbytes >= 2**20:
141
- size = f"{nbytes / 2**20:.2f} MB"
145
+ size = f"{nbytes / 2**20:.2f} MB"
142
146
  else:
143
147
  size = f"{nbytes // 2**10:.2f} KB"
144
148
  return size
@@ -150,10 +154,26 @@ def cli():
150
154
 
151
155
  import argparse
152
156
 
153
- parser = argparse.ArgumentParser(description=DESCRIPTION, formatter_class=argparse.ArgumentDefaultsHelpFormatter)
154
- parser.add_argument("--project", action="store", dest="project", required=True, help="CESMD project identifier")
155
- parser.add_argument("--title", action="store", dest="title", required=True, help="Title of project")
156
- parser.add_argument("--data-dir", action="store", dest="data_dir", required=True, help="Data directory containing events.")
157
+ parser = argparse.ArgumentParser(
158
+ description=DESCRIPTION, formatter_class=argparse.ArgumentDefaultsHelpFormatter
159
+ )
160
+ parser.add_argument(
161
+ "--project",
162
+ action="store",
163
+ dest="project",
164
+ required=True,
165
+ help="CESMD project identifier",
166
+ )
167
+ parser.add_argument(
168
+ "--title", action="store", dest="title", required=True, help="Title of project"
169
+ )
170
+ parser.add_argument(
171
+ "--data-dir",
172
+ action="store",
173
+ dest="data_dir",
174
+ required=True,
175
+ help="Data directory containing events.",
176
+ )
157
177
  args = parser.parse_args()
158
178
 
159
179
  app = DataReleaseApp()
@@ -162,8 +182,8 @@ def cli():
162
182
  "project_title": args.title,
163
183
  "data_dir": pathlib.Path(args.data_dir).expanduser(),
164
184
  }
165
- import pdb; pdb.set_trace()
166
185
  app.main(**kwds)
167
186
 
187
+
168
188
  if __name__ == "__main__":
169
189
  cli()
@@ -241,6 +241,7 @@ class ScalarEvent(Event):
241
241
  "magnitude": self.magnitude,
242
242
  "magnitude_type": self.magnitude_type,
243
243
  }
244
+ logging.info(f"Creating event file: {filename}")
244
245
  with open(filename, "w", encoding="utf-8") as f:
245
246
  json.dump(data, f)
246
247
 
@@ -275,7 +276,7 @@ def get_events_from_file(filename=None):
275
276
  fields = line.split(",")
276
277
  if len(fields) != 7:
277
278
  raise IOError(
278
- f"Expected 6 columns in events file '{filename}'. Error parsing line '{line}'."
279
+ f"Expected 7 columns in events file '{filename}'. Error parsing line '{line}'."
279
280
  )
280
281
  event_values = {
281
282
  "id": fields[0].strip(),
@@ -348,5 +349,6 @@ def write_geojson(data, event_dir):
348
349
  Event directory.
349
350
  """
350
351
  filename = event_dir / constants.EVENT_FILE
352
+ logging.info(f"Creating event file: {filename}")
351
353
  with open(filename, "w", encoding="utf-8") as fout:
352
354
  json.dump(data, fout)
@@ -39,7 +39,7 @@ UNUSED_STANDARD_PARAMS = [
39
39
  "source_format",
40
40
  ]
41
41
 
42
- TIME_TOL = 1e-6
42
+ TIME_TOL = 1e-5
43
43
 
44
44
 
45
45
  class StationStream(Stream):
@@ -184,8 +184,6 @@ class StationStream(Stream):
184
184
 
185
185
  def validate(self):
186
186
  """Validation checks for Traces within a StationStream."""
187
- logging.debug(self)
188
-
189
187
  # Check that channel codes are unique_npts
190
188
  self.__check_channels()
191
189
 
@@ -520,7 +518,6 @@ def _channel_from_stats(stats):
520
518
  response = Response(instrument_sensitivity=sensitivity)
521
519
 
522
520
  comments = Comment(stats.standard.comments)
523
- logging.debug("channel: %s", stats.channel)
524
521
  channel = Channel(
525
522
  stats.channel,
526
523
  stats.location,