gmprocess 2.1.2__tar.gz → 2.2.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.2 → gmprocess-2.2.0}/.gitignore +1 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/.gitlab-ci.yml +13 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/CHANGELOG.md +21 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/CONTRIBUTING.md +5 -5
- gmprocess-2.2.0/DISCLAIMER.md +9 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/PKG-INFO +3 -1
- {gmprocess-2.1.2 → gmprocess-2.2.0}/code.json +41 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/pyproject.toml +2 -1
- {gmprocess-2.1.2 → gmprocess-2.2.0}/setup_env.sh +1 -1
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/bin/bundle_datarelease.py +36 -16
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/core/scalar_event.py +2 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/core/stationstream.py +1 -1
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/core/stationtrace.py +112 -18
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/config_production.yml +3 -2
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/asdf/core.py +1 -1
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/asdf/flatfile.py +15 -28
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/asdf/flatfile_constants.py +2 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/asdf/rupture.py +2 -1
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/asdf/waveform_metrics_xml.py +4 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/cosmos/cosmos_writer.py +185 -55
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/obspy/core.py +7 -7
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/obspy/fdsn_fetcher.py +42 -28
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/usc/core.py +3 -5
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/metrics/containers.py +14 -4
- gmprocess-2.2.0/src/gmprocess/metrics/reduce.py +362 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/metrics/transform.py +65 -29
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/metrics/waveform_metric_calculator.py +24 -8
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/metrics/waveform_metric_calculator_component_base.py +5 -3
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/metrics/waveform_metric_component.py +11 -2
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/metrics/waveform_metric_list.py +1 -1
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/metrics/waveform_metric_type.py +82 -0
- gmprocess-2.2.0/src/gmprocess/subcommands/download.py +139 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/subcommands/export_cosmos.py +2 -1
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/subcommands/generate_report.py +3 -2
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/utils/config.py +17 -13
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/utils/constants.py +3 -1
- gmprocess-2.2.0/src/gmprocess/utils/download_utils.py +74 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/utils/report_utils.py +1 -1
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/adjust_highpass.py +2 -1
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/adjust_highpass_ridder.py +1 -1
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/corner_frequencies.py +5 -5
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/detrend.py +2 -4
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/fft.py +1 -1
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/filtering.py +3 -3
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/instrument_response.py +51 -31
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/pretesting.py +5 -7
- gmprocess-2.2.0/src/gmprocess/waveform_processing/prism_adaptive_baseline.py +424 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/resample.py +2 -2
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/snr.py +12 -3
- gmprocess-2.2.0/src/gmprocess/waveform_processing/taper.py +31 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/windows.py +1 -8
- gmprocess-2.2.0/src/gmprocess/waveform_processing/zero_pad.py +27 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess.egg-info/PKG-INFO +3 -1
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess.egg-info/SOURCES.txt +2 -1
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess.egg-info/entry_points.txt +0 -1
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess.egg-info/requires.txt +2 -0
- gmprocess-2.1.2/DISCLAIMER.md +0 -1
- gmprocess-2.1.2/src/gmprocess/metrics/reduce.py +0 -185
- gmprocess-2.1.2/src/gmprocess/subcommands/download.py +0 -66
- gmprocess-2.1.2/src/gmprocess/utils/download_utils.py +0 -190
- gmprocess-2.1.2/src/gmprocess/utils/stderr.py +0 -83
- gmprocess-2.1.2/src/gmprocess/waveform_processing/taper.py +0 -57
- {gmprocess-2.1.2 → gmprocess-2.2.0}/.coveragerc +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/CODE_OF_CONDUCT.md +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/LICENSE.md +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/MANIFEST.in +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/README.md +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/pytest.ini +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/setup.cfg +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/setup.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/apps/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/apps/gmrecords.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/bin/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/bin/cwa_gather.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/bin/fetch_orfeus.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/bin/fix_inventory.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/bin/gmconvert.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/bin/gminfo.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/bin/gmprocess_config.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/bin/gmrecords.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/bin/gmworkspace.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/bin/update_event_json.sh +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/core/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/core/provenance.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/core/streamarray.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/core/streamcollection.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/CESMD_NGA_ids.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/config_production_v1.yml +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/config_test.yml +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/config_test_download.yml +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/cosmos_table10.xls +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/cosmos_table4.xls +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/demo/ci38457511/raw/CICCC.RAW +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/demo/ci38457511/raw/CICLC.v1 +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/demo/ci38457511/raw/CITOW2.RAW +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/demo/nc72282711/workspace.h5 +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/fdsn_codes.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/lme/SA_rotd50.0_2020.03.31.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/modules.yml +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nga_w2_selected.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_clipping/bias_1.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_clipping/bias_output.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_clipping/masterF.txt +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_clipping/weight_1.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_clipping/weight_output.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_qa/Cant/M.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_qa/Cant/bias_1.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_qa/Cant/bias_2.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_qa/Cant/bias_output.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_qa/Cant/final_training.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_qa/Cant/masterF.txt +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_qa/Cant/model_3.txt +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_qa/Cant/model_5.txt +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_qa/Cant/mu_sigma.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_qa/Cant/weight_1.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_qa/Cant/weight_2.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_qa/Cant/weight_output.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_qa/CantWell/M.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_qa/CantWell/bias_1.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_qa/CantWell/bias_2.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_qa/CantWell/bias_output.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_qa/CantWell/final_training.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_qa/CantWell/masterF.txt +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_qa/CantWell/model_0.txt +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_qa/CantWell/mu_sigma.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_qa/CantWell/weight_1.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_qa/CantWell/weight_2.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/nn_qa/CantWell/weight_output.csv +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/picker.yml +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/station_coordinates.xlsx +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/data/usgs_ids_nga_and_srcmod_cross_reference.xlsx +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/gui/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/gui/gui_ucla/Documentation.md +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/gui/gui_ucla/GUI_human_review.ipynb +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/gui/gui_ucla/HumanReviewGUI.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/gui/gui_ucla/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/asdf/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/asdf/base_metrics_xml.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/asdf/path_utils.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/asdf/station_metrics_xml.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/asdf/stream_workspace.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/asdf/utils.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/asdf/workspace_constants.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/bhrc/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/bhrc/core.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/cosmos/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/cosmos/cesmd_fetcher.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/cosmos/cesmd_search.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/cosmos/core.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/cosmos/data_structures.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/cwb/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/cwb/core.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/dmg/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/dmg/core.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/dynamic_search_parameters.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/esm/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/esm/core.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/fetcher.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/geonet/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/geonet/core.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/global_fetcher.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/knet/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/knet/core.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/knet/knet_fetcher.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/nga.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/nsmn/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/nsmn/core.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/obspy/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/read.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/read_directory.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/renadic/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/renadic/core.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/report.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/seedname.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/smc/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/smc/core.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/unam/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/unam/core.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/usc/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/io/utils.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/metrics/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/metrics/combine.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/metrics/metric_collection_base.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/metrics/oscillator.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/metrics/rotate.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/metrics/station_metric.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/metrics/station_metric_collection.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/metrics/utils.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/metrics/waveform_metric_collection.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/subcommands/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/subcommands/arg_dicts.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/subcommands/assemble.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/subcommands/autoprocess.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/subcommands/autoshakemap.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/subcommands/base.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/subcommands/clean.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/subcommands/compute_station_metrics.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/subcommands/compute_waveform_metrics.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/subcommands/export_failure_tables.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/subcommands/export_gmpacket.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/subcommands/export_metric_tables.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/subcommands/export_provenance_tables.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/subcommands/generate_regression_plot.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/subcommands/generate_station_maps.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/subcommands/import_data.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/subcommands/init.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/subcommands/lazy_loader.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/subcommands/process_waveforms.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/subcommands/processing_steps.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/subcommands/projects.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/utils/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/utils/args.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/utils/assemble_utils.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/utils/config_versioning.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/utils/export_gmpacket_utils.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/utils/ground_motion_models.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/utils/logging.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/utils/misc.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/utils/misc_plots.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/utils/prompt.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/utils/rupture_utils.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/utils/strec.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/utils/summary_plots.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/utils/tables.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/utils/tests_utils.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/__init__.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/baseline_correction.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/clipping/clip_detection.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/clipping/clipping_ann.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/clipping/clipping_check.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/clipping/histogram.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/clipping/jerk.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/clipping/max_amp.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/clipping/ping.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/clipping/std_dev.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/integrate.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/nn_quality_assurance.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/phase.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/processing.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/processing_step.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/sanity_checks.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/spectrum.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess/waveform_processing/zero_crossings.py +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess.egg-info/dependency_links.txt +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/src/gmprocess.egg-info/top_level.txt +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/tools/matlab/README.md +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/tools/matlab/get_all_waveforms.m +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/tools/matlab/get_events.m +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/tools/matlab/get_waveform_metrics.m +0 -0
- {gmprocess-2.1.2 → gmprocess-2.2.0}/tools/matlab/waveform_plot.png +0 -0
|
@@ -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,5 +1,26 @@
|
|
|
1
1
|
## main
|
|
2
2
|
|
|
3
|
+
## 2.2.0 / 2024-12-23
|
|
4
|
+
- Enhancements
|
|
5
|
+
- Add the PRISM/Jones et al. (doi: 10.1785/0220160200) adaptive baseline correction step.
|
|
6
|
+
- Add support for SV and SD metrics (for cosmos writer V3)
|
|
7
|
+
- Add support for V2 (processed acc, vel, disp) and V3 COSMOS writer
|
|
8
|
+
- Add number of threads configuration of FDSN clients to more reliably retrieve data from FDSN servers that may restrict the number of simultaneous downloads.
|
|
9
|
+
- Add QA check comparing the combined stage gains to the overall instrument sensitivity.
|
|
10
|
+
- Add QA step to check that the data type of miniseed raw data are integers.
|
|
11
|
+
- Add options for downloading origin/strec/rupture/waveform data individually to the download subcommand.
|
|
12
|
+
- StationTrace methods:
|
|
13
|
+
- Override the Trace taper method so that the provenance is set when this activity is performed.
|
|
14
|
+
- Ditto for detrend.
|
|
15
|
+
- Ditto for trim.
|
|
16
|
+
- Add a zero_pad method as a helper for zero padding.
|
|
17
|
+
- Add zero pad processing step.
|
|
18
|
+
- Add progress bar while creating diagnostic plots.
|
|
19
|
+
- Bug fixes
|
|
20
|
+
- Ensure that the FFT is taken for the length record as is used for normalizing the SNR.
|
|
21
|
+
- Other
|
|
22
|
+
- When trying to read the config file, allow for yaml read error to be raised rather than returning None.
|
|
23
|
+
- Increase tolerance for misaligned traces to be resampled.
|
|
3
24
|
|
|
4
25
|
## 2.1.2 / 2024-11-14
|
|
5
26
|
- Enhancements
|
|
@@ -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.
|
|
85
|
+
5. Push the branch to your origin.
|
|
86
86
|
```
|
|
87
87
|
git push origin v1.2.1.rc0
|
|
88
88
|
```
|
|
89
|
-
|
|
90
|
-
|
|
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
|
-
|
|
100
|
-
|
|
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
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: gmprocess
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.2.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,45 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"name": "groundmotion-processing",
|
|
4
|
+
"description": "Read and process ground motion waveform data",
|
|
5
|
+
"version": "v2.2.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.2.0/groundmotion-processing-v2.2.0.zip",
|
|
12
|
+
"disclaimerURL": "https://code.usgs.gov/ghsc/esi/groundmotion-processing/-/raw/v2.2.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.2.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": "2024-12-23"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
2
43
|
{
|
|
3
44
|
"name": "groundmotion-processing",
|
|
4
45
|
"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"
|
|
@@ -94,7 +94,7 @@ conda activate $VENV
|
|
|
94
94
|
|
|
95
95
|
# Do mac-specific conda installs
|
|
96
96
|
if [ "$unamestr" == 'FreeBSD' ] || [ "$unamestr" == 'Darwin' ]; then
|
|
97
|
-
# This is motivated by the
|
|
97
|
+
# This is motivated by the mysterious pyproj/rasterio error and incorrect results
|
|
98
98
|
# that only happen on ARM macs.
|
|
99
99
|
# https://github.com/conda-forge/pyproj-feedstock/issues/156
|
|
100
100
|
conda install -c conda-forge -y libgdal-netcdf
|
|
@@ -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
|
-
|
|
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
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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(
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
parser.add_argument(
|
|
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
|
|
|
@@ -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)
|
|
@@ -388,6 +388,117 @@ class StationTrace(Trace):
|
|
|
388
388
|
)
|
|
389
389
|
return self
|
|
390
390
|
|
|
391
|
+
def zero_pad(self, length):
|
|
392
|
+
"""Zero pad trace and add entry to provenance.
|
|
393
|
+
|
|
394
|
+
Zero pads are added at the beginning and end of the trace, EACH of which has
|
|
395
|
+
duration of `length` (in sec).
|
|
396
|
+
|
|
397
|
+
Args:
|
|
398
|
+
length (float):
|
|
399
|
+
The length (in sec) to padd with zeros before and after the trace.
|
|
400
|
+
"""
|
|
401
|
+
start_time = self.stats.starttime - length
|
|
402
|
+
end_time = self.stats.endtime + length
|
|
403
|
+
self.trim(starttime=start_time, endtime=end_time, pad=True, fill_value=0.0)
|
|
404
|
+
|
|
405
|
+
self.set_provenance(
|
|
406
|
+
"pad",
|
|
407
|
+
{
|
|
408
|
+
"fill_value": 0.0,
|
|
409
|
+
"new_start_time": start_time,
|
|
410
|
+
"new_end_time": end_time,
|
|
411
|
+
},
|
|
412
|
+
)
|
|
413
|
+
return self
|
|
414
|
+
|
|
415
|
+
def taper(self, max_percentage, type="hann", max_length=None, side="both"):
|
|
416
|
+
"""Taper trace and add entry to provenance.
|
|
417
|
+
|
|
418
|
+
This just overrides the ObsPy Trace method to append to the provenance for
|
|
419
|
+
tracking this operation.
|
|
420
|
+
|
|
421
|
+
Args:
|
|
422
|
+
max_percentage (float):
|
|
423
|
+
Decimal percentage of taper at one end (ranging from 0. to 0.5).
|
|
424
|
+
type (str):
|
|
425
|
+
Type of taper to use for detrending.
|
|
426
|
+
max_length (float):
|
|
427
|
+
Length of taper at one end in seconds.
|
|
428
|
+
side (str):
|
|
429
|
+
Specify if both sides should be tapered (default, “both”) or if only the
|
|
430
|
+
left half (“left”) or right half (“right”) should be tapered.
|
|
431
|
+
"""
|
|
432
|
+
|
|
433
|
+
self.set_provenance(
|
|
434
|
+
"taper",
|
|
435
|
+
{
|
|
436
|
+
"max_percentage": max_percentage,
|
|
437
|
+
"type": type,
|
|
438
|
+
"side": side,
|
|
439
|
+
"max_length": max_length,
|
|
440
|
+
},
|
|
441
|
+
)
|
|
442
|
+
return super().taper(
|
|
443
|
+
max_percentage=max_percentage,
|
|
444
|
+
type=type,
|
|
445
|
+
side=side,
|
|
446
|
+
max_length=max_length,
|
|
447
|
+
)
|
|
448
|
+
|
|
449
|
+
def detrend(self, type="simple"):
|
|
450
|
+
"""Detrend trace and add entry to provenance.
|
|
451
|
+
|
|
452
|
+
This just overrides the ObsPy Trace method to append to the provenance for
|
|
453
|
+
tracking this operation.
|
|
454
|
+
|
|
455
|
+
Args:
|
|
456
|
+
type (str):
|
|
457
|
+
Method to use for detrending.
|
|
458
|
+
"""
|
|
459
|
+
|
|
460
|
+
self.set_provenance(
|
|
461
|
+
"detrend",
|
|
462
|
+
{
|
|
463
|
+
"detrending_method": type,
|
|
464
|
+
},
|
|
465
|
+
)
|
|
466
|
+
return super().detrend(type=type)
|
|
467
|
+
|
|
468
|
+
def trim(
|
|
469
|
+
self,
|
|
470
|
+
starttime=None,
|
|
471
|
+
endtime=None,
|
|
472
|
+
pad=False,
|
|
473
|
+
nearest_sample=True,
|
|
474
|
+
fill_value=None,
|
|
475
|
+
):
|
|
476
|
+
"""Trim trace and add entry to provenance.
|
|
477
|
+
|
|
478
|
+
This just overrides the ObsPy Trace method to append to the provenance for
|
|
479
|
+
tracking this operation.
|
|
480
|
+
|
|
481
|
+
Args:
|
|
482
|
+
starttime (UTCDateTime):
|
|
483
|
+
Start time.
|
|
484
|
+
endtime (UTCDateTime):
|
|
485
|
+
End time.
|
|
486
|
+
pad (bool):
|
|
487
|
+
Trim at time points outside the time frame of the original trace?
|
|
488
|
+
nearest_sample (bool):
|
|
489
|
+
See obspy docs.
|
|
490
|
+
fill_value (int, float):
|
|
491
|
+
Fill value for gaps.
|
|
492
|
+
"""
|
|
493
|
+
self.set_provenance(
|
|
494
|
+
"cut",
|
|
495
|
+
{
|
|
496
|
+
"new_start_time": starttime,
|
|
497
|
+
"new_end_time": endtime,
|
|
498
|
+
},
|
|
499
|
+
)
|
|
500
|
+
return super().trim(starttime, endtime, pad, nearest_sample, fill_value)
|
|
501
|
+
|
|
391
502
|
def integrate(
|
|
392
503
|
self,
|
|
393
504
|
frequency=True,
|
|
@@ -422,27 +533,10 @@ class StationTrace(Trace):
|
|
|
422
533
|
"""
|
|
423
534
|
|
|
424
535
|
if demean:
|
|
425
|
-
self.
|
|
426
|
-
self.set_provenance(
|
|
427
|
-
"detrend",
|
|
428
|
-
{
|
|
429
|
-
"input_units": self.stats.standard.units,
|
|
430
|
-
"output_units": self.stats.standard.units,
|
|
431
|
-
},
|
|
432
|
-
)
|
|
536
|
+
self.detrend(type="demean")
|
|
433
537
|
|
|
434
538
|
if taper:
|
|
435
539
|
self.taper(max_percentage=taper_width, type=taper_type, side=taper_side)
|
|
436
|
-
self.set_provenance(
|
|
437
|
-
"taper",
|
|
438
|
-
{
|
|
439
|
-
"max_percentage": taper_width,
|
|
440
|
-
"type": taper_type,
|
|
441
|
-
"side": taper_side,
|
|
442
|
-
"input_units": self.stats.standard.units,
|
|
443
|
-
"output_units": self.stats.standard.units,
|
|
444
|
-
},
|
|
445
|
-
)
|
|
446
540
|
|
|
447
541
|
if frequency:
|
|
448
542
|
# integrating in frequency domain
|
|
@@ -263,6 +263,7 @@ fetchers:
|
|
|
263
263
|
- 74.7
|
|
264
264
|
- -35.5
|
|
265
265
|
- 60.4
|
|
266
|
+
threads: 1
|
|
266
267
|
url: http://service.scedc.caltech.edu
|
|
267
268
|
- TEXNET:
|
|
268
269
|
bounds:
|
|
@@ -586,9 +587,9 @@ integration:
|
|
|
586
587
|
# Assumption for the first value returned in the resulting trace.
|
|
587
588
|
initial: 0.0
|
|
588
589
|
# Remove the mean of the data prior to integration.
|
|
589
|
-
demean:
|
|
590
|
+
demean: False
|
|
590
591
|
# Taper the data prior to integration.
|
|
591
|
-
taper:
|
|
592
|
+
taper: False
|
|
592
593
|
taper_width: 0.05
|
|
593
594
|
taper_type: hann
|
|
594
595
|
taper_side: both
|
|
@@ -78,7 +78,7 @@ def write_asdf(filename, streams, event, label=None):
|
|
|
78
78
|
"""
|
|
79
79
|
workspace = StreamWorkspace(filename)
|
|
80
80
|
workspace.add_config()
|
|
81
|
-
if
|
|
81
|
+
if event.id not in workspace.get_event_ids():
|
|
82
82
|
workspace.add_event(event)
|
|
83
83
|
workspace.add_streams(event, streams, label=label, gmprocess_version=VERSION)
|
|
84
84
|
workspace.close()
|
|
@@ -74,9 +74,7 @@ class Flatfile(object):
|
|
|
74
74
|
"""
|
|
75
75
|
if hasattr(self.workspace, "config"):
|
|
76
76
|
config = self.workspace.config
|
|
77
|
-
default_config_file =
|
|
78
|
-
constants.DATA_DIR / constants.CONFIG_FILE_PRODUCTION
|
|
79
|
-
)
|
|
77
|
+
default_config_file = constants.DATA_DIR / constants.CONFIG_FILE_PRODUCTION
|
|
80
78
|
with open(default_config_file, "r", encoding="utf-8") as f:
|
|
81
79
|
yaml = YAML()
|
|
82
80
|
yaml.preserve_quotes = True
|
|
@@ -87,9 +85,7 @@ class Flatfile(object):
|
|
|
87
85
|
any_trace_failures = config["check_stream"]["any_trace_failures"]
|
|
88
86
|
use_array = not config["read"]["use_streamcollection"]
|
|
89
87
|
|
|
90
|
-
wmc = WaveformMetricCollection.from_workspace(
|
|
91
|
-
self.workspace, self.label
|
|
92
|
-
)
|
|
88
|
+
wmc = WaveformMetricCollection.from_workspace(self.workspace, self.label)
|
|
93
89
|
smc = StationMetricCollection.from_workspace(self.workspace)
|
|
94
90
|
for wml, stream_meta, station_metrics in zip(
|
|
95
91
|
wmc.waveform_metrics, wmc.stream_metadata, smc.station_metrics
|
|
@@ -98,9 +94,7 @@ class Flatfile(object):
|
|
|
98
94
|
continue
|
|
99
95
|
|
|
100
96
|
self._station_metrics = station_metrics
|
|
101
|
-
passed_traces = [
|
|
102
|
-
tr_met for tr_met in stream_meta if tr_met["passed"]
|
|
103
|
-
]
|
|
97
|
+
passed_traces = [tr_met for tr_met in stream_meta if tr_met["passed"]]
|
|
104
98
|
|
|
105
99
|
n_passed = len(passed_traces)
|
|
106
100
|
for tr in passed_traces:
|
|
@@ -286,9 +280,7 @@ class Flatfile(object):
|
|
|
286
280
|
imt_cols = [x for x in imt_cols if x not in fas_cols]
|
|
287
281
|
imt_cols.sort(key=_natural_keys)
|
|
288
282
|
|
|
289
|
-
non_imt_cols = [
|
|
290
|
-
col for col in table.columns if col not in self.imtlist
|
|
291
|
-
]
|
|
283
|
+
non_imt_cols = [col for col in table.columns if col not in self.imtlist]
|
|
292
284
|
table = table[non_imt_cols + imt_cols]
|
|
293
285
|
self.imc_tables[key] = table
|
|
294
286
|
readme_dict = {}
|
|
@@ -298,17 +290,19 @@ class Flatfile(object):
|
|
|
298
290
|
else:
|
|
299
291
|
imt = col.upper()
|
|
300
292
|
if imt.startswith("SA"):
|
|
301
|
-
readme_dict["SA(X)"] = flat_const.FLATFILE_IMT_COLUMNS[
|
|
302
|
-
|
|
303
|
-
]
|
|
293
|
+
readme_dict["SA(X)"] = flat_const.FLATFILE_IMT_COLUMNS["SA(X)"]
|
|
294
|
+
elif imt.startswith("SV"):
|
|
295
|
+
readme_dict["SV(X)"] = flat_const.FLATFILE_IMT_COLUMNS["SV(X)"]
|
|
296
|
+
elif imt.startswith("SD"):
|
|
297
|
+
readme_dict["SD(X)"] = flat_const.FLATFILE_IMT_COLUMNS["SD(X)"]
|
|
304
298
|
elif imt.startswith("FAS"):
|
|
305
299
|
readme_dict["FAS(X)"] = flat_const.FLATFILE_IMT_COLUMNS[
|
|
306
300
|
"FAS(X)"
|
|
307
301
|
]
|
|
308
302
|
elif imt.startswith("DURATION"):
|
|
309
|
-
readme_dict["DURATIONp-q"] =
|
|
310
|
-
|
|
311
|
-
|
|
303
|
+
readme_dict["DURATIONp-q"] = flat_const.FLATFILE_IMT_COLUMNS[
|
|
304
|
+
"DURATIONp-q"
|
|
305
|
+
]
|
|
312
306
|
else:
|
|
313
307
|
readme_dict[imt] = flat_const.FLATFILE_IMT_COLUMNS[imt]
|
|
314
308
|
df_readme = pd.DataFrame.from_dict(readme_dict, orient="index")
|
|
@@ -355,9 +349,7 @@ class Flatfile(object):
|
|
|
355
349
|
fit_dict["StationLongitude"] = coords.longitude
|
|
356
350
|
fit_dict["StationElevation"] = coords.elevation
|
|
357
351
|
if trace.has_parameter("corner_frequencies"):
|
|
358
|
-
freq_dict = trace.get_parameter(
|
|
359
|
-
"corner_frequencies"
|
|
360
|
-
)
|
|
352
|
+
freq_dict = trace.get_parameter("corner_frequencies")
|
|
361
353
|
fit_dict["fmin"] = freq_dict["highpass"]
|
|
362
354
|
fit_dict["fmax"] = freq_dict["lowpass"]
|
|
363
355
|
fit_table.append(fit_dict)
|
|
@@ -370,9 +362,7 @@ class Flatfile(object):
|
|
|
370
362
|
# Ensure that the DataFrame columns are ordered correctly
|
|
371
363
|
fit_df = fit_df[flat_const.FIT_SPECTRA_COLUMNS.keys()]
|
|
372
364
|
|
|
373
|
-
readme = pd.DataFrame.from_dict(
|
|
374
|
-
flat_const.FIT_SPECTRA_COLUMNS, orient="index"
|
|
375
|
-
)
|
|
365
|
+
readme = pd.DataFrame.from_dict(flat_const.FIT_SPECTRA_COLUMNS, orient="index")
|
|
376
366
|
readme.reset_index(level=0, inplace=True)
|
|
377
367
|
readme.columns = ["Column header", "Description"]
|
|
378
368
|
|
|
@@ -472,10 +462,7 @@ def _natural_keys(text):
|
|
|
472
462
|
Helper function for sorting IMT list. This is needed because using the
|
|
473
463
|
plain .sort() will put SA(10.0) before SA(2.0), for example.
|
|
474
464
|
"""
|
|
475
|
-
return [
|
|
476
|
-
_atof(c)
|
|
477
|
-
for c in re.split(r"[+-]?([0-9]+(?:[.][0-9]*)?|[.][0-9]+)", text)
|
|
478
|
-
]
|
|
465
|
+
return [_atof(c) for c in re.split(r"[+-]?([0-9]+(?:[.][0-9]*)?|[.][0-9]+)", text)]
|
|
479
466
|
|
|
480
467
|
|
|
481
468
|
def _atof(text):
|
|
@@ -72,6 +72,8 @@ FLATFILE_IMT_COLUMNS = {
|
|
|
72
72
|
"PGA": f"Peak ground acceleration ({constants.UNITS['pga']})",
|
|
73
73
|
"PGV": f"Peak ground velocity ({constants.UNITS['pgv']})",
|
|
74
74
|
"SA(X)": f"Pseudo-spectral acceleration ({constants.UNITS['sa']}) at X seconds",
|
|
75
|
+
"SV(X)": f"Sspectral velocity ({constants.UNITS['sv']}) at X seconds",
|
|
76
|
+
"SD(X)": f"Spectral displacmeent ({constants.UNITS['sd']}) at X seconds",
|
|
75
77
|
"FAS(X)": (
|
|
76
78
|
f"Fourier amplitude spectrum value ({constants.UNITS['fas']}) at X seconds"
|
|
77
79
|
),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Module for adding rupture to ASDF file."""
|
|
2
|
+
|
|
2
3
|
import json
|
|
3
4
|
|
|
4
5
|
from esi_utils_rupture.point_rupture import PointRupture
|
|
@@ -71,7 +72,7 @@ class Rupture(object):
|
|
|
71
72
|
try:
|
|
72
73
|
coordinate = coordinate[0]
|
|
73
74
|
coordinate = find_point_coordinate(coordinate)
|
|
74
|
-
except:
|
|
75
|
+
except BaseException:
|
|
75
76
|
raise Exception(
|
|
76
77
|
"Could not identify a list of [x, y, z] for point rupture coordinate in rupture.json"
|
|
77
78
|
)
|
|
@@ -160,6 +160,10 @@ def etag2type(etag):
|
|
|
160
160
|
etag = etag.lower()
|
|
161
161
|
if etag.startswith("sa"):
|
|
162
162
|
etag_type = "sa"
|
|
163
|
+
elif etag.startswith("sv"):
|
|
164
|
+
etag_type = "sv"
|
|
165
|
+
elif etag.startswith("sd"):
|
|
166
|
+
etag_type = "sd"
|
|
163
167
|
elif etag.startswith("fas"):
|
|
164
168
|
etag_type = "fas"
|
|
165
169
|
elif etag.startswith("duration"):
|