gmprocess 1.3.2__tar.gz → 2.1.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.
- gmprocess-2.1.0/MANIFEST.in +7 -0
- {gmprocess-1.3.2/src/gmprocess.egg-info → gmprocess-2.1.0}/PKG-INFO +16 -10
- {gmprocess-1.3.2 → gmprocess-2.1.0}/README.md +10 -5
- {gmprocess-1.3.2 → gmprocess-2.1.0}/pyproject.toml +8 -6
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/apps/gmrecords.py +72 -11
- gmprocess-2.1.0/src/gmprocess/bin/cwa_gather.py +210 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/bin/fix_inventory.py +1 -1
- gmprocess-2.1.0/src/gmprocess/bin/gmprocess_config.py +73 -0
- gmprocess-2.1.0/src/gmprocess/bin/update_event_json.sh +5 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/core/provenance.py +5 -2
- gmprocess-2.1.0/src/gmprocess/core/scalar_event.py +352 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/core/stationstream.py +3 -5
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/core/stationtrace.py +19 -23
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/core/streamarray.py +1 -1
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/core/streamcollection.py +28 -14
- gmprocess-2.1.0/src/gmprocess/data/config_production.yml +709 -0
- gmprocess-1.3.2/src/gmprocess/data/config_production.yml → gmprocess-2.1.0/src/gmprocess/data/config_production_v1.yml +94 -95
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/config_test.yml +44 -72
- gmprocess-2.1.0/src/gmprocess/data/demo/nc72282711/workspace.h5 +0 -0
- gmprocess-2.1.0/src/gmprocess/gui/gui_ucla/Documentation.md +88 -0
- gmprocess-2.1.0/src/gmprocess/gui/gui_ucla/GUI_human_review.ipynb +39 -0
- gmprocess-2.1.0/src/gmprocess/gui/gui_ucla/HumanReviewGUI.py +905 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/asdf/core.py +4 -2
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/asdf/flatfile.py +34 -77
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/asdf/flatfile_constants.py +2 -1
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/asdf/rupture.py +2 -2
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/asdf/stream_workspace.py +140 -163
- gmprocess-2.1.0/src/gmprocess/io/asdf/waveform_metrics_xml.py +175 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/cosmos/cesmd_search.py +1 -1
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/cosmos/core.py +211 -134
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/cosmos/cosmos_writer.py +288 -155
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/obspy/fdsn_fetcher.py +8 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/read.py +1 -1
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/report.py +4 -2
- gmprocess-2.1.0/src/gmprocess/metrics/combine.py +63 -0
- gmprocess-2.1.0/src/gmprocess/metrics/containers.py +201 -0
- gmprocess-2.1.0/src/gmprocess/metrics/oscillator.py +44 -0
- gmprocess-2.1.0/src/gmprocess/metrics/reduce.py +185 -0
- gmprocess-2.1.0/src/gmprocess/metrics/rotate.py +37 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/metrics/station_metric_collection.py +5 -5
- gmprocess-2.1.0/src/gmprocess/metrics/transform.py +229 -0
- gmprocess-2.1.0/src/gmprocess/metrics/waveform_metric_calculator.py +301 -0
- gmprocess-2.1.0/src/gmprocess/metrics/waveform_metric_calculator_component_base.py +146 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/metrics/waveform_metric_collection.py +8 -24
- gmprocess-2.1.0/src/gmprocess/metrics/waveform_metric_component.py +166 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/metrics/waveform_metric_list.py +52 -17
- gmprocess-1.3.2/src/gmprocess/metrics/waveform_metric.py → gmprocess-2.1.0/src/gmprocess/metrics/waveform_metric_type.py +98 -43
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/subcommands/assemble.py +24 -14
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/subcommands/autoprocess.py +12 -6
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/subcommands/autoshakemap.py +31 -18
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/subcommands/base.py +24 -60
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/subcommands/clean.py +5 -4
- gmprocess-2.1.0/src/gmprocess/subcommands/compute_station_metrics.py +101 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/subcommands/compute_waveform_metrics.py +14 -24
- gmprocess-2.1.0/src/gmprocess/subcommands/download.py +66 -0
- gmprocess-2.1.0/src/gmprocess/subcommands/export_cosmos.py +137 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/subcommands/export_failure_tables.py +13 -19
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/subcommands/export_gmpacket.py +9 -12
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/subcommands/export_metric_tables.py +17 -29
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/subcommands/export_provenance_tables.py +13 -21
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/subcommands/generate_regression_plot.py +42 -43
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/subcommands/generate_report.py +18 -27
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/subcommands/generate_station_maps.py +16 -19
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/subcommands/import_data.py +28 -30
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/subcommands/process_waveforms.py +16 -14
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/subcommands/processing_steps.py +31 -10
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/subcommands/projects.py +15 -10
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/utils/assemble_utils.py +52 -12
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/utils/config.py +21 -75
- gmprocess-2.1.0/src/gmprocess/utils/config_versioning.py +222 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/utils/constants.py +19 -13
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/utils/download_utils.py +43 -72
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/utils/export_gmpacket_utils.py +12 -12
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/utils/export_shakemap_utils.py +40 -34
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/utils/misc_plots.py +21 -17
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/utils/rupture_utils.py +6 -9
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/utils/strec.py +0 -4
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/utils/summary_plots.py +16 -16
- gmprocess-1.3.2/src/gmprocess/utils/test_utils.py → gmprocess-2.1.0/src/gmprocess/utils/tests_utils.py +32 -13
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/clipping/clipping_check.py +2 -2
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/corner_frequencies.py +5 -9
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/fft.py +10 -6
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/instrument_response.py +27 -14
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/integrate.py +2 -2
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/phase.py +25 -38
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/sanity_checks.py +1 -1
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/snr.py +14 -12
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/spectrum.py +1 -1
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/windows.py +38 -53
- {gmprocess-1.3.2 → gmprocess-2.1.0/src/gmprocess.egg-info}/PKG-INFO +16 -10
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess.egg-info/SOURCES.txt +25 -61
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess.egg-info/entry_points.txt +2 -1
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess.egg-info/requires.txt +5 -4
- gmprocess-1.3.2/MANIFEST.in +0 -5
- gmprocess-1.3.2/src/gmprocess/bin/cwb_gather.py +0 -210
- gmprocess-1.3.2/src/gmprocess/bin/list_metrics.py +0 -74
- gmprocess-1.3.2/src/gmprocess/data/GDMSstations.json +0 -1
- gmprocess-1.3.2/src/gmprocess/io/asdf/waveform_metrics_xml.py +0 -123
- gmprocess-1.3.2/src/gmprocess/metrics/combination/arithmetic_mean.py +0 -47
- gmprocess-1.3.2/src/gmprocess/metrics/combination/combination.py +0 -63
- gmprocess-1.3.2/src/gmprocess/metrics/combination/geometric_mean.py +0 -48
- gmprocess-1.3.2/src/gmprocess/metrics/combination/greater_of_two_horizontals.py +0 -29
- gmprocess-1.3.2/src/gmprocess/metrics/combination/null_combination.py +0 -26
- gmprocess-1.3.2/src/gmprocess/metrics/combination/quadratic_mean.py +0 -48
- gmprocess-1.3.2/src/gmprocess/metrics/exception.py +0 -9
- gmprocess-1.3.2/src/gmprocess/metrics/gather.py +0 -21
- gmprocess-1.3.2/src/gmprocess/metrics/imc/arithmetic_mean.py +0 -36
- gmprocess-1.3.2/src/gmprocess/metrics/imc/channels.py +0 -35
- gmprocess-1.3.2/src/gmprocess/metrics/imc/geometric_mean.py +0 -36
- gmprocess-1.3.2/src/gmprocess/metrics/imc/gmrotd.py +0 -34
- gmprocess-1.3.2/src/gmprocess/metrics/imc/greater_of_two_horizontals.py +0 -35
- gmprocess-1.3.2/src/gmprocess/metrics/imc/imc.py +0 -53
- gmprocess-1.3.2/src/gmprocess/metrics/imc/quadratic_mean.py +0 -39
- gmprocess-1.3.2/src/gmprocess/metrics/imc/radial_transverse.py +0 -35
- gmprocess-1.3.2/src/gmprocess/metrics/imc/rotd.py +0 -40
- gmprocess-1.3.2/src/gmprocess/metrics/imt/arias.py +0 -35
- gmprocess-1.3.2/src/gmprocess/metrics/imt/duration.py +0 -39
- gmprocess-1.3.2/src/gmprocess/metrics/imt/fas.py +0 -35
- gmprocess-1.3.2/src/gmprocess/metrics/imt/imt.py +0 -52
- gmprocess-1.3.2/src/gmprocess/metrics/imt/pga.py +0 -33
- gmprocess-1.3.2/src/gmprocess/metrics/imt/pgv.py +0 -33
- gmprocess-1.3.2/src/gmprocess/metrics/imt/sa.py +0 -32
- gmprocess-1.3.2/src/gmprocess/metrics/imt/sorted_duration.py +0 -39
- gmprocess-1.3.2/src/gmprocess/metrics/metrics_controller.py +0 -860
- gmprocess-1.3.2/src/gmprocess/metrics/reduction/arias.py +0 -91
- gmprocess-1.3.2/src/gmprocess/metrics/reduction/duration.py +0 -87
- gmprocess-1.3.2/src/gmprocess/metrics/reduction/max.py +0 -87
- gmprocess-1.3.2/src/gmprocess/metrics/reduction/null_reduction.py +0 -56
- gmprocess-1.3.2/src/gmprocess/metrics/reduction/percentile.py +0 -92
- gmprocess-1.3.2/src/gmprocess/metrics/reduction/reduction.py +0 -40
- gmprocess-1.3.2/src/gmprocess/metrics/reduction/smooth_select.py +0 -106
- gmprocess-1.3.2/src/gmprocess/metrics/reduction/sorted_duration.py +0 -93
- gmprocess-1.3.2/src/gmprocess/metrics/rotation/gmrotd.py +0 -38
- gmprocess-1.3.2/src/gmprocess/metrics/rotation/null_rotation.py +0 -20
- gmprocess-1.3.2/src/gmprocess/metrics/rotation/radial_transverse.py +0 -93
- gmprocess-1.3.2/src/gmprocess/metrics/rotation/rotation.py +0 -213
- gmprocess-1.3.2/src/gmprocess/metrics/rotation/rotd.py +0 -40
- gmprocess-1.3.2/src/gmprocess/metrics/transform/__init__.py +0 -0
- gmprocess-1.3.2/src/gmprocess/metrics/transform/differentiate.py +0 -77
- gmprocess-1.3.2/src/gmprocess/metrics/transform/fft.py +0 -107
- gmprocess-1.3.2/src/gmprocess/metrics/transform/integrate.py +0 -62
- gmprocess-1.3.2/src/gmprocess/metrics/transform/null_transform.py +0 -39
- gmprocess-1.3.2/src/gmprocess/metrics/transform/oscillator.py +0 -195
- gmprocess-1.3.2/src/gmprocess/metrics/transform/transform.py +0 -67
- gmprocess-1.3.2/src/gmprocess/subcommands/__init__.py +0 -0
- gmprocess-1.3.2/src/gmprocess/subcommands/compute_station_metrics.py +0 -140
- gmprocess-1.3.2/src/gmprocess/subcommands/config.py +0 -125
- gmprocess-1.3.2/src/gmprocess/subcommands/download.py +0 -43
- gmprocess-1.3.2/src/gmprocess/subcommands/export_shakemap.py +0 -85
- gmprocess-1.3.2/src/gmprocess/utils/__init__.py +0 -0
- gmprocess-1.3.2/src/gmprocess/utils/base_utils.py +0 -210
- gmprocess-1.3.2/src/gmprocess/utils/event.py +0 -243
- gmprocess-1.3.2/src/gmprocess/waveform_processing/__init__.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/LICENSE.md +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/setup.cfg +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/setup.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/__init__.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/apps/__init__.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/bin/__init__.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/bin/bundle_datarelease.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/bin/gmconvert.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/bin/gminfo.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/bin/gmrecords.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/bin/gmworkspace.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/core/__init__.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/CESMD_NGA_ids.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/__init__.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/cosmos_table10.xls +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/cosmos_table4.xls +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/demo/ci38457511/raw/CICCC.RAW +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/demo/ci38457511/raw/CICLC.v1 +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/demo/ci38457511/raw/CITOW2.RAW +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/fdsn_codes.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/lme/SA_rotd50.0_2020.03.31.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/modules.yml +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nga_w2_selected.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_clipping/bias_1.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_clipping/bias_output.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_clipping/masterF.txt +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_clipping/weight_1.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_clipping/weight_output.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_qa/Cant/M.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_qa/Cant/bias_1.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_qa/Cant/bias_2.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_qa/Cant/bias_output.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_qa/Cant/final_training.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_qa/Cant/masterF.txt +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_qa/Cant/model_3.txt +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_qa/Cant/model_5.txt +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_qa/Cant/mu_sigma.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_qa/Cant/weight_1.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_qa/Cant/weight_2.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_qa/Cant/weight_output.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_qa/CantWell/M.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_qa/CantWell/bias_1.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_qa/CantWell/bias_2.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_qa/CantWell/bias_output.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_qa/CantWell/final_training.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_qa/CantWell/masterF.txt +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_qa/CantWell/model_0.txt +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_qa/CantWell/mu_sigma.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_qa/CantWell/weight_1.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_qa/CantWell/weight_2.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/nn_qa/CantWell/weight_output.csv +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/picker.yml +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/station_coordinates.xlsx +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/data/usgs_ids_nga_and_srcmod_cross_reference.xlsx +0 -0
- {gmprocess-1.3.2/src/gmprocess/io → gmprocess-2.1.0/src/gmprocess/gui}/__init__.py +0 -0
- {gmprocess-1.3.2/src/gmprocess/io/asdf → gmprocess-2.1.0/src/gmprocess/gui/gui_ucla}/__init__.py +0 -0
- {gmprocess-1.3.2/src/gmprocess/io/bhrc → gmprocess-2.1.0/src/gmprocess/io}/__init__.py +0 -0
- {gmprocess-1.3.2/src/gmprocess/io/cosmos → gmprocess-2.1.0/src/gmprocess/io/asdf}/__init__.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/asdf/base_metrics_xml.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/asdf/path_utils.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/asdf/station_metrics_xml.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/asdf/utils.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/asdf/workspace_constants.py +0 -0
- {gmprocess-1.3.2/src/gmprocess/io/cwb → gmprocess-2.1.0/src/gmprocess/io/bhrc}/__init__.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/bhrc/core.py +0 -0
- {gmprocess-1.3.2/src/gmprocess/io/dmg → gmprocess-2.1.0/src/gmprocess/io/cosmos}/__init__.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/cosmos/cesmd_fetcher.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/cosmos/data_structures.py +0 -0
- {gmprocess-1.3.2/src/gmprocess/io/esm → gmprocess-2.1.0/src/gmprocess/io/cwb}/__init__.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/cwb/core.py +0 -0
- {gmprocess-1.3.2/src/gmprocess/io/geonet → gmprocess-2.1.0/src/gmprocess/io/dmg}/__init__.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/dmg/core.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/dynamic_search_parameters.py +0 -0
- {gmprocess-1.3.2/src/gmprocess/io/knet → gmprocess-2.1.0/src/gmprocess/io/esm}/__init__.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/esm/core.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/fetcher.py +0 -0
- {gmprocess-1.3.2/src/gmprocess/io/nsmn → gmprocess-2.1.0/src/gmprocess/io/geonet}/__init__.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/geonet/core.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/global_fetcher.py +0 -0
- {gmprocess-1.3.2/src/gmprocess/io/obspy → gmprocess-2.1.0/src/gmprocess/io/knet}/__init__.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/knet/core.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/knet/knet_fetcher.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/nga.py +0 -0
- {gmprocess-1.3.2/src/gmprocess/io/renadic → gmprocess-2.1.0/src/gmprocess/io/nsmn}/__init__.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/nsmn/core.py +0 -0
- {gmprocess-1.3.2/src/gmprocess/io/smc → gmprocess-2.1.0/src/gmprocess/io/obspy}/__init__.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/obspy/core.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/read_directory.py +0 -0
- {gmprocess-1.3.2/src/gmprocess/io/unam → gmprocess-2.1.0/src/gmprocess/io/renadic}/__init__.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/renadic/core.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/seedname.py +0 -0
- {gmprocess-1.3.2/src/gmprocess/io/usc → gmprocess-2.1.0/src/gmprocess/io/smc}/__init__.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/smc/core.py +0 -0
- {gmprocess-1.3.2/src/gmprocess/metrics → gmprocess-2.1.0/src/gmprocess/io/unam}/__init__.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/unam/core.py +0 -0
- {gmprocess-1.3.2/src/gmprocess/metrics/combination → gmprocess-2.1.0/src/gmprocess/io/usc}/__init__.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/usc/core.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/io/utils.py +0 -0
- {gmprocess-1.3.2/src/gmprocess/metrics/imc → gmprocess-2.1.0/src/gmprocess/metrics}/__init__.py +0 -0
- /gmprocess-1.3.2/src/gmprocess/metrics/base_metric_collection.py → /gmprocess-2.1.0/src/gmprocess/metrics/metric_collection_base.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/metrics/station_metric.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/metrics/utils.py +0 -0
- {gmprocess-1.3.2/src/gmprocess/metrics/imt → gmprocess-2.1.0/src/gmprocess/subcommands}/__init__.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/subcommands/arg_dicts.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/subcommands/init.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/subcommands/lazy_loader.py +0 -0
- {gmprocess-1.3.2/src/gmprocess/metrics/reduction → gmprocess-2.1.0/src/gmprocess/utils}/__init__.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/utils/args.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/utils/ground_motion_models.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/utils/logging.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/utils/misc.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/utils/prompt.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/utils/report_utils.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/utils/stderr.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/utils/tables.py +0 -0
- {gmprocess-1.3.2/src/gmprocess/metrics/rotation → gmprocess-2.1.0/src/gmprocess/waveform_processing}/__init__.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/adjust_highpass.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/adjust_highpass_ridder.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/baseline_correction.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/clipping/clip_detection.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/clipping/clipping_ann.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/clipping/histogram.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/clipping/jerk.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/clipping/max_amp.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/clipping/ping.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/clipping/std_dev.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/detrend.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/filtering.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/nn_quality_assurance.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/pretesting.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/processing.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/processing_step.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/resample.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/taper.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess/waveform_processing/zero_crossings.py +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess.egg-info/dependency_links.txt +0 -0
- {gmprocess-1.3.2 → gmprocess-2.1.0}/src/gmprocess.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: gmprocess
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 2.1.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:
|
|
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
|
-
Requires-Dist: obspy>=1.4.
|
|
67
|
+
Requires-Dist: obspy>=1.4.1
|
|
67
68
|
Requires-Dist: openpyxl>=3.0.8
|
|
68
|
-
Requires-Dist: openquake.engine>=3.
|
|
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
|
|
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
|
|
@@ -88,7 +89,7 @@ Requires-Dist: pylint>=2.17; extra == "dev"
|
|
|
88
89
|
Provides-Extra: test
|
|
89
90
|
Requires-Dist: pytest>=6.2; extra == "test"
|
|
90
91
|
Requires-Dist: pytest-cov>=2.12; extra == "test"
|
|
91
|
-
Requires-Dist: pytest-console-scripts>=1.
|
|
92
|
+
Requires-Dist: pytest-console-scripts>=1.4; extra == "test"
|
|
92
93
|
Requires-Dist: vcrpy>=4.1; extra == "test"
|
|
93
94
|
Provides-Extra: doc
|
|
94
95
|
Requires-Dist: altair>=4.2.2; extra == "doc"
|
|
@@ -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 `
|
|
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
|
-
#
|
|
129
|
-
If you wish to cite this software
|
|
130
|
+
# Suggested Citation
|
|
131
|
+
If you wish to cite this software please cite:
|
|
130
132
|
|
|
131
|
-
-
|
|
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 `
|
|
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
|
-
#
|
|
20
|
-
If you wish to cite this software
|
|
20
|
+
# Suggested Citation
|
|
21
|
+
If you wish to cite this software please cite:
|
|
21
22
|
|
|
22
|
-
-
|
|
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.
|
|
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
|
-
"obspy>=1.4.
|
|
33
|
+
"obspy>=1.4.1",
|
|
33
34
|
"openpyxl>=3.0.8",
|
|
34
|
-
"openquake.engine>=3.
|
|
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",
|
|
@@ -58,7 +59,7 @@ dev = [
|
|
|
58
59
|
test = [
|
|
59
60
|
"pytest>=6.2",
|
|
60
61
|
"pytest-cov>=2.12",
|
|
61
|
-
"pytest-console-scripts>=1.
|
|
62
|
+
"pytest-console-scripts>=1.4",
|
|
62
63
|
"vcrpy>=4.1",
|
|
63
64
|
]
|
|
64
65
|
doc = [
|
|
@@ -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
|
-
|
|
93
|
+
cwa_gather = "gmprocess.bin.cwa_gather:main"
|
|
92
94
|
fix_inventory = "gmprocess.bin.fix_inventory:main"
|
|
93
95
|
|
|
94
96
|
[build-system]
|
|
@@ -84,17 +84,36 @@ class GMrecordsApp(object):
|
|
|
84
84
|
self.parser.print_help()
|
|
85
85
|
sys.exit()
|
|
86
86
|
else:
|
|
87
|
+
if self.args.datadir is None and self.args.confdir is None:
|
|
88
|
+
self.use_projects = True
|
|
89
|
+
elif self.args.datadir is not None and self.args.confdir is not None:
|
|
90
|
+
self.use_projects = False
|
|
91
|
+
else:
|
|
92
|
+
raise ValueError(
|
|
93
|
+
"Arguments --datadir and --confdir both must be set or both must "
|
|
94
|
+
"not be set (and thus these paths will be taken from the "
|
|
95
|
+
"configured project)."
|
|
96
|
+
)
|
|
97
|
+
|
|
87
98
|
subcmds_noinit = ["init", "processing_steps"]
|
|
88
99
|
if self.args.subcommand not in subcmds_noinit:
|
|
89
100
|
self._initialize()
|
|
90
101
|
|
|
91
102
|
subcmds_quiet = ["init", "projects", "proj", "processing_steps"]
|
|
92
103
|
if self.args.subcommand not in subcmds_quiet and not self.args.quiet:
|
|
93
|
-
|
|
94
|
-
|
|
104
|
+
if self.use_projects:
|
|
105
|
+
# Print the current project information to avoid confusion
|
|
106
|
+
proj = Project.from_config(self.projects_conf, self.project_name)
|
|
107
|
+
else:
|
|
108
|
+
proj_paths = {
|
|
109
|
+
"conf_path": self.args.confdir,
|
|
110
|
+
"data_path": self.args.datadir,
|
|
111
|
+
}
|
|
112
|
+
proj = Project("None", proj_paths, "None", True)
|
|
95
113
|
print("-" * 80)
|
|
96
114
|
print(proj)
|
|
97
115
|
print("-" * 80)
|
|
116
|
+
|
|
98
117
|
# -----------------------------------------------------------------
|
|
99
118
|
# This calls the init method of the subcommand that was specified
|
|
100
119
|
# at the command line and hands off the GmpApp object ("self") as
|
|
@@ -157,11 +176,17 @@ class GMrecordsApp(object):
|
|
|
157
176
|
|
|
158
177
|
@property
|
|
159
178
|
def conf_path(self):
|
|
160
|
-
|
|
179
|
+
if self.projects_path:
|
|
180
|
+
return (self.projects_path / self.current_project["conf_path"]).resolve()
|
|
181
|
+
else:
|
|
182
|
+
return Path(self.current_project["conf_path"]).resolve()
|
|
161
183
|
|
|
162
184
|
@property
|
|
163
185
|
def data_path(self):
|
|
164
|
-
|
|
186
|
+
if self.projects_path:
|
|
187
|
+
return (self.projects_path / self.current_project["data_path"]).resolve()
|
|
188
|
+
else:
|
|
189
|
+
return Path(self.current_project["data_path"]).resolve()
|
|
165
190
|
|
|
166
191
|
def _initialize(self):
|
|
167
192
|
require_config = self.args.subcommand not in ["projects", "proj"]
|
|
@@ -183,7 +208,7 @@ class GMrecordsApp(object):
|
|
|
183
208
|
|
|
184
209
|
def _load_config(self, require_config=True):
|
|
185
210
|
self.projects_conf = None
|
|
186
|
-
if not self.projects_file.is_file():
|
|
211
|
+
if (not self.projects_file.is_file()) and self.use_projects:
|
|
187
212
|
if not require_config:
|
|
188
213
|
return
|
|
189
214
|
|
|
@@ -211,9 +236,23 @@ class GMrecordsApp(object):
|
|
|
211
236
|
else:
|
|
212
237
|
sys.exit(0)
|
|
213
238
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
239
|
+
if not self.use_projects:
|
|
240
|
+
self.projects_path = None
|
|
241
|
+
self.projects_file = None
|
|
242
|
+
self.projects_conf = {
|
|
243
|
+
"project": "None",
|
|
244
|
+
"projects": {
|
|
245
|
+
"None": {
|
|
246
|
+
"conf_path": self.args.confdir,
|
|
247
|
+
"data_path": self.args.datadir,
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
}
|
|
251
|
+
else:
|
|
252
|
+
self.projects_conf = configobj.ConfigObj(
|
|
253
|
+
str(self.projects_file), encoding="utf-8"
|
|
254
|
+
)
|
|
255
|
+
|
|
217
256
|
projmod.validate_projects_config(self.projects_conf, self.projects_path)
|
|
218
257
|
|
|
219
258
|
if "CALLED_FROM_PYTEST" in os.environ:
|
|
@@ -279,16 +318,17 @@ class GMrecordsApp(object):
|
|
|
279
318
|
"--log",
|
|
280
319
|
type=str,
|
|
281
320
|
default=None,
|
|
282
|
-
help="Path to log file; if provided,
|
|
321
|
+
help="Path to log file; if provided, logging is directed to this file.",
|
|
283
322
|
)
|
|
284
323
|
|
|
285
324
|
parser.add_argument(
|
|
286
325
|
"-e",
|
|
287
326
|
"--eventid",
|
|
288
327
|
type=str,
|
|
328
|
+
dest="event_id",
|
|
289
329
|
default=None,
|
|
290
330
|
help=(
|
|
291
|
-
"
|
|
331
|
+
"ComCat event ID. If None (default) all events in project data "
|
|
292
332
|
"directory will be used. To specify multiple eventids, use a comma "
|
|
293
333
|
"separated list like "
|
|
294
334
|
'`gmrecords -e "nc73799091, nc73774300" autoprocess`'
|
|
@@ -304,7 +344,7 @@ class GMrecordsApp(object):
|
|
|
304
344
|
"A CSV file without column headers. The columns can be either: "
|
|
305
345
|
"(1) a single column with ComCat event IDs, or "
|
|
306
346
|
"(2) six columns in which those columns are: "
|
|
307
|
-
"
|
|
347
|
+
"event_id (string, no spaces), time (any ISO standard for date/time), "
|
|
308
348
|
"latitutde (float, decimal degrees), longitude (float, decimal "
|
|
309
349
|
"degrees), depth (float, km), magnitude (float)."
|
|
310
350
|
),
|
|
@@ -337,6 +377,27 @@ class GMrecordsApp(object):
|
|
|
337
377
|
action="store_true",
|
|
338
378
|
)
|
|
339
379
|
|
|
380
|
+
parser.add_argument(
|
|
381
|
+
"--datadir",
|
|
382
|
+
type=str,
|
|
383
|
+
default=None,
|
|
384
|
+
help=(
|
|
385
|
+
"Path to data directory. "
|
|
386
|
+
"Setting this disables the use of projects. "
|
|
387
|
+
"Setting this also requires --confdir to be set. "
|
|
388
|
+
),
|
|
389
|
+
)
|
|
390
|
+
parser.add_argument(
|
|
391
|
+
"--confdir",
|
|
392
|
+
type=str,
|
|
393
|
+
default=None,
|
|
394
|
+
help=(
|
|
395
|
+
"Path to directly containing config files. "
|
|
396
|
+
"Setting this disables the use of projects. "
|
|
397
|
+
"Setting this also requires --datadir to be set."
|
|
398
|
+
),
|
|
399
|
+
)
|
|
400
|
+
|
|
340
401
|
# Parsers for subcommands
|
|
341
402
|
subparsers = parser.add_subparsers(
|
|
342
403
|
title="Subcommands", dest="subcommand", metavar="<command> (<aliases>)"
|
|
@@ -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
|
|
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()
|
|
@@ -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
|
|