diff --git a/docs/.buildinfo b/docs/.buildinfo index 52fb83e..f3f12a9 100644 --- a/docs/.buildinfo +++ b/docs/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 2f3f51ea76c87fa1efbf5ede4657fbc2 +config: f1f2807bceab1414663f8a948d77e91d tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..d4bb2cb --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/_build/doctrees/environment.pickle b/docs/_build/doctrees/environment.pickle new file mode 100644 index 0000000..4775f1a Binary files /dev/null and b/docs/_build/doctrees/environment.pickle differ diff --git a/docs/_build/doctrees/index.doctree b/docs/_build/doctrees/index.doctree new file mode 100644 index 0000000..191cb1b Binary files /dev/null and b/docs/_build/doctrees/index.doctree differ diff --git a/docs/_build/doctrees/sprit.doctree b/docs/_build/doctrees/sprit.doctree new file mode 100644 index 0000000..caff345 Binary files /dev/null and b/docs/_build/doctrees/sprit.doctree differ diff --git a/docs/_build/doctrees/sprit.sprit_cli.doctree b/docs/_build/doctrees/sprit.sprit_cli.doctree new file mode 100644 index 0000000..8667e63 Binary files /dev/null and b/docs/_build/doctrees/sprit.sprit_cli.doctree differ diff --git a/docs/_build/doctrees/sprit.sprit_hvsr.doctree b/docs/_build/doctrees/sprit.sprit_hvsr.doctree new file mode 100644 index 0000000..902ab74 Binary files /dev/null and b/docs/_build/doctrees/sprit.sprit_hvsr.doctree differ diff --git a/docs/_build/doctrees/sprit.sprit_jupyter_UI.doctree b/docs/_build/doctrees/sprit.sprit_jupyter_UI.doctree new file mode 100644 index 0000000..5d2f513 Binary files /dev/null and b/docs/_build/doctrees/sprit.sprit_jupyter_UI.doctree differ diff --git a/docs/_build/doctrees/sprit.sprit_plot.doctree b/docs/_build/doctrees/sprit.sprit_plot.doctree new file mode 100644 index 0000000..b50627c Binary files /dev/null and b/docs/_build/doctrees/sprit.sprit_plot.doctree differ diff --git a/docs/_build/doctrees/sprit.sprit_streamlit_ui.doctree b/docs/_build/doctrees/sprit.sprit_streamlit_ui.doctree new file mode 100644 index 0000000..80b5596 Binary files /dev/null and b/docs/_build/doctrees/sprit.sprit_streamlit_ui.doctree differ diff --git a/docs/_build/doctrees/sprit.sprit_tkinter_ui.doctree b/docs/_build/doctrees/sprit.sprit_tkinter_ui.doctree new file mode 100644 index 0000000..31da1a9 Binary files /dev/null and b/docs/_build/doctrees/sprit.sprit_tkinter_ui.doctree differ diff --git a/docs/_build/doctrees/sprit.sprit_utils.doctree b/docs/_build/doctrees/sprit.sprit_utils.doctree new file mode 100644 index 0000000..b5dd5eb Binary files /dev/null and b/docs/_build/doctrees/sprit.sprit_utils.doctree differ diff --git a/docs/_build/html/.buildinfo b/docs/_build/html/.buildinfo new file mode 100644 index 0000000..f3f12a9 --- /dev/null +++ b/docs/_build/html/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. +config: f1f2807bceab1414663f8a948d77e91d +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_build/html/_modules/index.html b/docs/_build/html/_modules/index.html index 154a31f..874797e 100644 --- a/docs/_build/html/_modules/index.html +++ b/docs/_build/html/_modules/index.html @@ -3,7 +3,7 @@ - Overview: module code — sprit 1.4 documentation + Overview: module code — sprit 1.4.1 documentation @@ -12,7 +12,7 @@ - + diff --git a/docs/_build/html/_modules/sprit/sprit_cli.html b/docs/_build/html/_modules/sprit/sprit_cli.html index 107d1af..e55246f 100644 --- a/docs/_build/html/_modules/sprit/sprit_cli.html +++ b/docs/_build/html/_modules/sprit/sprit_cli.html @@ -3,7 +3,7 @@ - sprit.sprit_cli — sprit 1.4 documentation + sprit.sprit_cli — sprit 1.4.1 documentation @@ -12,7 +12,7 @@ - + diff --git a/docs/_build/html/_modules/sprit/sprit_hvsr.html b/docs/_build/html/_modules/sprit/sprit_hvsr.html index f7b3a7f..2601b12 100644 --- a/docs/_build/html/_modules/sprit/sprit_hvsr.html +++ b/docs/_build/html/_modules/sprit/sprit_hvsr.html @@ -3,7 +3,7 @@ - sprit.sprit_hvsr — sprit 1.4 documentation + sprit.sprit_hvsr — sprit 1.4.1 documentation @@ -12,7 +12,7 @@ - + diff --git a/docs/_build/html/_modules/sprit/sprit_jupyter_UI.html b/docs/_build/html/_modules/sprit/sprit_jupyter_UI.html index f128dca..caa1176 100644 --- a/docs/_build/html/_modules/sprit/sprit_jupyter_UI.html +++ b/docs/_build/html/_modules/sprit/sprit_jupyter_UI.html @@ -3,7 +3,7 @@ - sprit.sprit_jupyter_UI — sprit 1.4 documentation + sprit.sprit_jupyter_UI — sprit 1.4.1 documentation @@ -12,7 +12,7 @@ - + diff --git a/docs/_build/html/_modules/sprit/sprit_plot.html b/docs/_build/html/_modules/sprit/sprit_plot.html index 24de8be..48f801c 100644 --- a/docs/_build/html/_modules/sprit/sprit_plot.html +++ b/docs/_build/html/_modules/sprit/sprit_plot.html @@ -3,7 +3,7 @@ - sprit.sprit_plot — sprit 1.4 documentation + sprit.sprit_plot — sprit 1.4.1 documentation @@ -12,7 +12,7 @@ - + diff --git a/docs/_build/html/_modules/sprit/sprit_streamlit_ui.html b/docs/_build/html/_modules/sprit/sprit_streamlit_ui.html index 8ac3d0b..35ee770 100644 --- a/docs/_build/html/_modules/sprit/sprit_streamlit_ui.html +++ b/docs/_build/html/_modules/sprit/sprit_streamlit_ui.html @@ -3,7 +3,7 @@ - sprit.sprit_streamlit_ui — sprit 1.4 documentation + sprit.sprit_streamlit_ui — sprit 1.4.1 documentation @@ -12,7 +12,7 @@ - + diff --git a/docs/_build/html/_modules/sprit/sprit_tkinter_ui.html b/docs/_build/html/_modules/sprit/sprit_tkinter_ui.html index fc57964..fc6bd78 100644 --- a/docs/_build/html/_modules/sprit/sprit_tkinter_ui.html +++ b/docs/_build/html/_modules/sprit/sprit_tkinter_ui.html @@ -3,7 +3,7 @@ - sprit.sprit_tkinter_ui — sprit 1.4 documentation + sprit.sprit_tkinter_ui — sprit 1.4.1 documentation @@ -12,7 +12,7 @@ - + diff --git a/docs/_build/html/_modules/sprit/sprit_utils.html b/docs/_build/html/_modules/sprit/sprit_utils.html index bca38c0..5371e85 100644 --- a/docs/_build/html/_modules/sprit/sprit_utils.html +++ b/docs/_build/html/_modules/sprit/sprit_utils.html @@ -3,7 +3,7 @@ - sprit.sprit_utils — sprit 1.4 documentation + sprit.sprit_utils — sprit 1.4.1 documentation @@ -12,7 +12,7 @@ - + diff --git a/docs/_build/html/_sources/index.rst.txt b/docs/_build/html/_sources/index.rst.txt index 52483bf..d6e0c07 100644 --- a/docs/_build/html/_sources/index.rst.txt +++ b/docs/_build/html/_sources/index.rst.txt @@ -1,11 +1,3 @@ -.. w4h documentation master file, created by - sphinx-quickstart on Mon Mar 11 15:35:33 2024. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Welcome to the documentation for SpRIT! -======================================= - .. toctree:: :maxdepth: 4 :caption: Contents: @@ -13,10 +5,3 @@ Welcome to the documentation for SpRIT! sprit sprit.sprit_hvsr sprit.sprit_utils - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` diff --git a/docs/_build/html/_static/documentation_options.js b/docs/_build/html/_static/documentation_options.js index 44634ab..dfba10e 100644 --- a/docs/_build/html/_static/documentation_options.js +++ b/docs/_build/html/_static/documentation_options.js @@ -1,5 +1,5 @@ const DOCUMENTATION_OPTIONS = { - VERSION: '1.4', + VERSION: '1.4.1', LANGUAGE: 'en', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/docs/_build/html/genindex.html b/docs/_build/html/genindex.html new file mode 100644 index 0000000..4a094ea --- /dev/null +++ b/docs/_build/html/genindex.html @@ -0,0 +1,759 @@ + + + + + + Index — sprit 1.4.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + +

Index

+ +
+ A + | B + | C + | D + | E + | F + | G + | H + | I + | K + | L + | M + | O + | P + | R + | S + | T + | W + | X + +
+

A

+ + +
+ +

B

+ + + +
+ +

C

+ + + +
+ +

D

+ + +
+ +

E

+ + + +
+ +

F

+ + + +
+ +

G

+ + + +
+ +

H

+ + + +
+ +

I

+ + + +
+ +

K

+ + +
+ +

L

+ + +
+ +

M

+ + +
+ +

O

+ + + +
+ +

P

+ + + +
+ +

R

+ + + +
+ +

S

+ + + +
+ +

T

+ + + +
+ +

W

+ + +
+ +

X

+ + +
+ + + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/index.html b/docs/_build/html/index.html new file mode 100644 index 0000000..7d040c9 --- /dev/null +++ b/docs/_build/html/index.html @@ -0,0 +1,345 @@ + + + + + + + <no title> — sprit 1.4.1 documentation + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Contents:

+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/objects.inv b/docs/_build/html/objects.inv new file mode 100644 index 0000000..b467615 Binary files /dev/null and b/docs/_build/html/objects.inv differ diff --git a/docs/_build/html/py-modindex.html b/docs/_build/html/py-modindex.html new file mode 100644 index 0000000..77cda8c --- /dev/null +++ b/docs/_build/html/py-modindex.html @@ -0,0 +1,157 @@ + + + + + + Python Module Index — sprit 1.4.1 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + +

Python Module Index

+ +
+ s +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
+ s
+ sprit +
    + sprit.sprit_cli +
    + sprit.sprit_hvsr +
    + sprit.sprit_jupyter_UI +
    + sprit.sprit_plot +
    + sprit.sprit_streamlit_ui +
    + sprit.sprit_tkinter_ui +
    + sprit.sprit_utils +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/search.html b/docs/_build/html/search.html new file mode 100644 index 0000000..db563e9 --- /dev/null +++ b/docs/_build/html/search.html @@ -0,0 +1,122 @@ + + + + + + Search — sprit 1.4.1 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + + + +
+ +
+ +
+
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/searchindex.js b/docs/_build/html/searchindex.js new file mode 100644 index 0000000..7aceac0 --- /dev/null +++ b/docs/_build/html/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({"alltitles": {"Contents:": [[0, null]], "Submodules": [[1, "submodules"]], "sprit package": [[1, null]], "sprit.sprit_cli module": [[2, null]], "sprit.sprit_hvsr module": [[3, null]], "sprit.sprit_jupyter_UI module": [[4, null]], "sprit.sprit_plot module": [[5, null]], "sprit.sprit_streamlit_ui module": [[6, null]], "sprit.sprit_tkinter_ui module": [[7, null]], "sprit.sprit_utils module": [[8, null]]}, "docnames": ["index", "sprit", "sprit.sprit_cli", "sprit.sprit_hvsr", "sprit.sprit_jupyter_UI", "sprit.sprit_plot", "sprit.sprit_streamlit_ui", "sprit.sprit_tkinter_ui", "sprit.sprit_utils"], "envversion": {"sphinx": 62, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.todo": 2, "sphinx.ext.viewcode": 1}, "filenames": ["index.rst", "sprit.rst", "sprit.sprit_cli.rst", "sprit.sprit_hvsr.rst", "sprit.sprit_jupyter_UI.rst", "sprit.sprit_plot.rst", "sprit.sprit_streamlit_ui.rst", "sprit.sprit_tkinter_ui.rst", "sprit.sprit_utils.rst"], "indexentries": {"assert_check() (in module sprit)": [[1, "sprit.assert_check", false]], "assert_check() (in module sprit.sprit_utils)": [[8, "sprit.sprit_utils.assert_check", false]], "batch (sprit.hvsrdata property)": [[1, "sprit.HVSRData.batch", false]], "batch (sprit.sprit_hvsr.hvsrdata property)": [[3, "sprit.sprit_hvsr.HVSRData.batch", false]], "batch_data_read() (in module sprit)": [[1, "sprit.batch_data_read", false]], "batch_data_read() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.batch_data_read", false]], "calculate_azimuth() (in module sprit)": [[1, "sprit.calculate_azimuth", false]], "calculate_azimuth() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.calculate_azimuth", false]], "catch_errors() (in module sprit)": [[1, "sprit.catch_errors", false]], "catch_errors() (in module sprit.sprit_tkinter_ui)": [[7, "sprit.sprit_tkinter_ui.catch_errors", false]], "check_gui_requirements() (in module sprit)": [[1, "sprit.check_gui_requirements", false]], "check_gui_requirements() (in module sprit.sprit_utils)": [[8, "sprit.sprit_utils.check_gui_requirements", false]], "check_if_default() (in module sprit.sprit_streamlit_ui)": [[6, "sprit.sprit_streamlit_ui.check_if_default", false]], "check_instance() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.check_instance", false]], "check_mark() (in module sprit)": [[1, "sprit.check_mark", false]], "check_mark() (in module sprit.sprit_utils)": [[8, "sprit.sprit_utils.check_mark", false]], "check_peaks() (in module sprit)": [[1, "sprit.check_peaks", false]], "check_peaks() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.check_peaks", false]], "check_tsteps() (in module sprit)": [[1, "sprit.check_tsteps", false]], "check_tsteps() (in module sprit.sprit_utils)": [[8, "sprit.sprit_utils.check_tsteps", false]], "check_xvalues() (in module sprit)": [[1, "sprit.check_xvalues", false]], "check_xvalues() (in module sprit.sprit_utils)": [[8, "sprit.sprit_utils.check_xvalues", false]], "checkifpath() (in module sprit)": [[1, "sprit.checkifpath", false]], "checkifpath() (in module sprit.sprit_utils)": [[8, "sprit.sprit_utils.checkifpath", false]], "copy() (sprit.hvsrbatch method)": [[1, "sprit.HVSRBatch.copy", false]], "copy() (sprit.hvsrdata method)": [[1, "sprit.HVSRData.copy", false]], "copy() (sprit.sprit_hvsr.hvsrbatch method)": [[3, "sprit.sprit_hvsr.HVSRBatch.copy", false]], "copy() (sprit.sprit_hvsr.hvsrdata method)": [[3, "sprit.sprit_hvsr.HVSRData.copy", false]], "create_jupyter_ui() (in module sprit)": [[1, "sprit.create_jupyter_ui", false]], "create_jupyter_ui() (in module sprit.sprit_jupyter_ui)": [[4, "sprit.sprit_jupyter_UI.create_jupyter_ui", false]], "create_menubar() (sprit.sprit_tkinter_ui.sprit_app method)": [[7, "sprit.sprit_tkinter_ui.SPRIT_App.create_menubar", false]], "create_tabs() (sprit.sprit_tkinter_ui.sprit_app method)": [[7, "sprit.sprit_tkinter_ui.SPRIT_App.create_tabs", false]], "datastream (sprit.hvsrdata property)": [[1, "sprit.HVSRData.datastream", false]], "datastream (sprit.sprit_hvsr.hvsrdata property)": [[3, "sprit.sprit_hvsr.HVSRData.datastream", false]], "export() (sprit.hvsrbatch method)": [[1, "sprit.HVSRBatch.export", false]], "export() (sprit.hvsrdata method)": [[1, "sprit.HVSRData.export", false]], "export() (sprit.sprit_hvsr.hvsrbatch method)": [[3, "sprit.sprit_hvsr.HVSRBatch.export", false]], "export() (sprit.sprit_hvsr.hvsrdata method)": [[3, "sprit.sprit_hvsr.HVSRData.export", false]], "export_data() (in module sprit)": [[1, "sprit.export_data", false]], "export_data() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.export_data", false]], "export_report() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.export_report", false]], "export_settings() (in module sprit)": [[1, "sprit.export_settings", false]], "export_settings() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.export_settings", false]], "export_settings() (sprit.hvsrbatch method)": [[1, "sprit.HVSRBatch.export_settings", false]], "export_settings() (sprit.hvsrdata method)": [[1, "sprit.HVSRData.export_settings", false]], "export_settings() (sprit.sprit_hvsr.hvsrbatch method)": [[3, "sprit.sprit_hvsr.HVSRBatch.export_settings", false]], "export_settings() (sprit.sprit_hvsr.hvsrdata method)": [[3, "sprit.sprit_hvsr.HVSRData.export_settings", false]], "fetch_data() (in module sprit)": [[1, "sprit.fetch_data", false]], "fetch_data() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.fetch_data", false]], "format_time() (in module sprit)": [[1, "sprit.format_time", false]], "format_time() (in module sprit.sprit_utils)": [[8, "sprit.sprit_utils.format_time", false]], "generate_ppsds() (in module sprit)": [[1, "sprit.generate_ppsds", false]], "generate_ppsds() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.generate_ppsds", false]], "get_char() (in module sprit)": [[1, "sprit.get_char", false]], "get_char() (in module sprit.sprit_utils)": [[8, "sprit.sprit_utils.get_char", false]], "get_check_peaks_kwargs() (in module sprit.sprit_plot)": [[5, "sprit.sprit_plot.get_check_peaks_kwargs", false]], "get_default() (in module sprit.sprit_jupyter_ui)": [[4, "sprit.sprit_jupyter_UI.get_default", false]], "get_generate_ppsd_kwargs() (in module sprit.sprit_plot)": [[5, "sprit.sprit_plot.get_generate_ppsd_kwargs", false]], "get_get_report_kwargs() (in module sprit.sprit_plot)": [[5, "sprit.sprit_plot.get_get_report_kwargs", false]], "get_metadata() (in module sprit)": [[1, "sprit.get_metadata", false]], "get_metadata() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.get_metadata", false]], "get_param_docstring() (in module sprit.sprit_cli)": [[2, "sprit.sprit_cli.get_param_docstring", false]], "get_process_hvsr_kwargs() (in module sprit.sprit_plot)": [[5, "sprit.sprit_plot.get_process_hvsr_kwargs", false]], "get_remove_noise_kwargs() (in module sprit.sprit_plot)": [[5, "sprit.sprit_plot.get_remove_noise_kwargs", false]], "get_remove_outlier_curve_kwargs() (in module sprit.sprit_plot)": [[5, "sprit.sprit_plot.get_remove_outlier_curve_kwargs", false]], "get_report() (in module sprit)": [[1, "sprit.get_report", false]], "get_report() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.get_report", false]], "get_report() (sprit.hvsrbatch method)": [[1, "sprit.HVSRBatch.get_report", false]], "get_report() (sprit.hvsrdata method)": [[1, "sprit.HVSRData.get_report", false]], "get_report() (sprit.sprit_hvsr.hvsrbatch method)": [[3, "sprit.sprit_hvsr.HVSRBatch.get_report", false]], "get_report() (sprit.sprit_hvsr.hvsrdata method)": [[3, "sprit.sprit_hvsr.HVSRData.get_report", false]], "gui() (in module sprit)": [[1, "sprit.gui", false]], "gui() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.gui", false]], "gui_test() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.gui_test", false]], "has_required_channels() (in module sprit)": [[1, "sprit.has_required_channels", false]], "has_required_channels() (in module sprit.sprit_utils)": [[8, "sprit.sprit_utils.has_required_channels", false]], "hvsrbatch (class in sprit)": [[1, "sprit.HVSRBatch", false]], "hvsrbatch (class in sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.HVSRBatch", false]], "hvsrdata (class in sprit)": [[1, "sprit.HVSRData", false]], "hvsrdata (class in sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.HVSRData", false]], "import_data() (in module sprit)": [[1, "sprit.import_data", false]], "import_data() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.import_data", false]], "import_settings() (in module sprit)": [[1, "sprit.import_settings", false]], "import_settings() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.import_settings", false]], "input_params() (in module sprit)": [[1, "sprit.input_params", false]], "input_params() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.input_params", false]], "items() (sprit.hvsrbatch method)": [[1, "sprit.HVSRBatch.items", false]], "items() (sprit.hvsrdata method)": [[1, "sprit.HVSRData.items", false]], "items() (sprit.sprit_hvsr.hvsrbatch method)": [[3, "sprit.sprit_hvsr.HVSRBatch.items", false]], "items() (sprit.sprit_hvsr.hvsrdata method)": [[3, "sprit.sprit_hvsr.HVSRData.items", false]], "keys() (sprit.hvsrbatch method)": [[1, "sprit.HVSRBatch.keys", false]], "keys() (sprit.hvsrdata method)": [[1, "sprit.HVSRData.keys", false]], "keys() (sprit.sprit_hvsr.hvsrbatch method)": [[3, "sprit.sprit_hvsr.HVSRBatch.keys", false]], "keys() (sprit.sprit_hvsr.hvsrdata method)": [[3, "sprit.sprit_hvsr.HVSRData.keys", false]], "log_errormsg() (sprit.sprit_tkinter_ui.sprit_app method)": [[7, "sprit.sprit_tkinter_ui.SPRIT_App.log_errorMsg", false]], "main() (in module sprit.sprit_cli)": [[2, "sprit.sprit_cli.main", false]], "make_it_classy() (in module sprit)": [[1, "sprit.make_it_classy", false]], "make_it_classy() (in module sprit.sprit_utils)": [[8, "sprit.sprit_utils.make_it_classy", false]], "manual_label_update() (sprit.sprit_tkinter_ui.sprit_app method)": [[7, "sprit.sprit_tkinter_ui.SPRIT_App.manual_label_update", false]], "module": [[1, "module-sprit", false], [2, "module-sprit.sprit_cli", false], [3, "module-sprit.sprit_hvsr", false], [4, "module-sprit.sprit_jupyter_UI", false], [5, "module-sprit.sprit_plot", false], [6, "module-sprit.sprit_streamlit_ui", false], [7, "module-sprit.sprit_tkinter_ui", false], [8, "module-sprit.sprit_utils", false]], "on_closing() (in module sprit.sprit_tkinter_ui)": [[7, "sprit.sprit_tkinter_ui.on_closing", false]], "on_file_upload() (in module sprit.sprit_streamlit_ui)": [[6, "sprit.sprit_streamlit_ui.on_file_upload", false]], "on_run_data() (in module sprit.sprit_streamlit_ui)": [[6, "sprit.sprit_streamlit_ui.on_run_data", false]], "params (sprit.hvsrdata property)": [[1, "sprit.HVSRData.params", false]], "params (sprit.sprit_hvsr.hvsrdata property)": [[3, "sprit.sprit_hvsr.HVSRData.params", false]], "parse_comp_plot_list() (in module sprit.sprit_plot)": [[5, "sprit.sprit_plot.parse_comp_plot_list", false]], "parse_hv_plot_list() (in module sprit.sprit_plot)": [[5, "sprit.sprit_plot.parse_hv_plot_list", false]], "parse_plot_string() (in module sprit)": [[1, "sprit.parse_plot_string", false]], "parse_plot_string() (in module sprit.sprit_plot)": [[5, "sprit.sprit_plot.parse_plot_string", false]], "parse_spec_plot_list() (in module sprit.sprit_plot)": [[5, "sprit.sprit_plot.parse_spec_plot_list", false]], "plot() (sprit.hvsrbatch method)": [[1, "sprit.HVSRBatch.plot", false]], "plot() (sprit.hvsrdata method)": [[1, "sprit.HVSRData.plot", false]], "plot() (sprit.sprit_hvsr.hvsrbatch method)": [[3, "sprit.sprit_hvsr.HVSRBatch.plot", false]], "plot() (sprit.sprit_hvsr.hvsrdata method)": [[3, "sprit.sprit_hvsr.HVSRData.plot", false]], "plot_azimuth() (in module sprit)": [[1, "sprit.plot_azimuth", false]], "plot_azimuth() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.plot_azimuth", false]], "plot_hvsr() (in module sprit)": [[1, "sprit.plot_hvsr", false]], "plot_hvsr() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.plot_hvsr", false]], "plot_outlier_curves() (in module sprit)": [[1, "sprit.plot_outlier_curves", false]], "plot_outlier_curves() (in module sprit.sprit_plot)": [[5, "sprit.sprit_plot.plot_outlier_curves", false]], "plot_preview() (in module sprit)": [[1, "sprit.plot_preview", false]], "plot_preview() (in module sprit.sprit_plot)": [[5, "sprit.sprit_plot.plot_preview", false]], "plot_results() (in module sprit)": [[1, "sprit.plot_results", false]], "plot_results() (in module sprit.sprit_plot)": [[5, "sprit.sprit_plot.plot_results", false]], "plot_stream() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.plot_stream", false]], "ppsds (sprit.hvsrdata property)": [[1, "sprit.HVSRData.ppsds", false]], "ppsds (sprit.sprit_hvsr.hvsrdata property)": [[3, "sprit.sprit_hvsr.HVSRData.ppsds", false]], "ppsds_obspy (sprit.hvsrdata property)": [[1, "sprit.HVSRData.ppsds_obspy", false]], "ppsds_obspy (sprit.sprit_hvsr.hvsrdata property)": [[3, "sprit.sprit_hvsr.HVSRData.ppsds_obspy", false]], "print_param() (in module sprit.sprit_streamlit_ui)": [[6, "sprit.sprit_streamlit_ui.print_param", false]], "process_data() (in module sprit.sprit_plot)": [[5, "sprit.sprit_plot.process_data", false]], "process_hvsr() (in module sprit)": [[1, "sprit.process_hvsr", false]], "process_hvsr() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.process_hvsr", false]], "read_data() (in module sprit.sprit_plot)": [[5, "sprit.sprit_plot.read_data", false]], "read_from_rs() (in module sprit)": [[1, "sprit.read_from_RS", false]], "read_from_rs() (in module sprit.sprit_utils)": [[8, "sprit.sprit_utils.read_from_RS", false]], "read_tromino_files() (in module sprit)": [[1, "sprit.read_tromino_files", false]], "read_tromino_files() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.read_tromino_files", false]], "reboot_app() (in module sprit.sprit_tkinter_ui)": [[7, "sprit.sprit_tkinter_ui.reboot_app", false]], "remove_noise() (in module sprit)": [[1, "sprit.remove_noise", false]], "remove_noise() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.remove_noise", false]], "remove_outlier_curves() (in module sprit)": [[1, "sprit.remove_outlier_curves", false]], "remove_outlier_curves() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.remove_outlier_curves", false]], "report() (sprit.hvsrbatch method)": [[1, "sprit.HVSRBatch.report", false]], "report() (sprit.hvsrdata method)": [[1, "sprit.HVSRData.report", false]], "report() (sprit.sprit_hvsr.hvsrbatch method)": [[3, "sprit.sprit_hvsr.HVSRBatch.report", false]], "report() (sprit.sprit_hvsr.hvsrdata method)": [[3, "sprit.sprit_hvsr.HVSRData.report", false]], "run() (in module sprit)": [[1, "sprit.run", false]], "run() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.run", false]], "setup_session_state() (in module sprit.sprit_streamlit_ui)": [[6, "sprit.sprit_streamlit_ui.setup_session_state", false]], "sprit": [[1, "module-sprit", false]], "sprit.sprit_cli": [[2, "module-sprit.sprit_cli", false]], "sprit.sprit_hvsr": [[3, "module-sprit.sprit_hvsr", false]], "sprit.sprit_jupyter_ui": [[4, "module-sprit.sprit_jupyter_UI", false]], "sprit.sprit_plot": [[5, "module-sprit.sprit_plot", false]], "sprit.sprit_streamlit_ui": [[6, "module-sprit.sprit_streamlit_ui", false]], "sprit.sprit_tkinter_ui": [[7, "module-sprit.sprit_tkinter_ui", false]], "sprit.sprit_utils": [[8, "module-sprit.sprit_utils", false]], "sprit_app (class in sprit.sprit_tkinter_ui)": [[7, "sprit.sprit_tkinter_ui.SPRIT_App", false]], "test_function() (in module sprit.sprit_hvsr)": [[3, "sprit.sprit_hvsr.test_function", false]], "text_change() (in module sprit.sprit_streamlit_ui)": [[6, "sprit.sprit_streamlit_ui.text_change", false]], "time_it() (in module sprit)": [[1, "sprit.time_it", false]], "time_it() (in module sprit.sprit_utils)": [[8, "sprit.sprit_utils.time_it", false]], "write_to_info_tab() (in module sprit.sprit_streamlit_ui)": [[6, "sprit.sprit_streamlit_ui.write_to_info_tab", false]], "x_mark() (in module sprit)": [[1, "sprit.x_mark", false]], "x_mark() (in module sprit.sprit_utils)": [[8, "sprit.sprit_utils.x_mark", false]]}, "objects": {"": [[1, 0, 0, "-", "sprit"]], "sprit": [[1, 1, 1, "", "HVSRBatch"], [1, 1, 1, "", "HVSRData"], [1, 4, 1, "", "assert_check"], [1, 4, 1, "", "batch_data_read"], [1, 4, 1, "", "calculate_azimuth"], [1, 4, 1, "", "catch_errors"], [1, 4, 1, "", "check_gui_requirements"], [1, 4, 1, "", "check_mark"], [1, 4, 1, "", "check_peaks"], [1, 4, 1, "", "check_tsteps"], [1, 4, 1, "", "check_xvalues"], [1, 4, 1, "", "checkifpath"], [1, 4, 1, "", "create_jupyter_ui"], [1, 4, 1, "", "export_data"], [1, 4, 1, "", "export_settings"], [1, 4, 1, "", "fetch_data"], [1, 4, 1, "", "format_time"], [1, 4, 1, "", "generate_ppsds"], [1, 4, 1, "", "get_char"], [1, 4, 1, "", "get_metadata"], [1, 4, 1, "", "get_report"], [1, 4, 1, "", "gui"], [1, 4, 1, "", "has_required_channels"], [1, 4, 1, "", "import_data"], [1, 4, 1, "", "import_settings"], [1, 4, 1, "", "input_params"], [1, 4, 1, "", "make_it_classy"], [1, 4, 1, "", "parse_plot_string"], [1, 4, 1, "", "plot_azimuth"], [1, 4, 1, "", "plot_hvsr"], [1, 4, 1, "", "plot_outlier_curves"], [1, 4, 1, "", "plot_preview"], [1, 4, 1, "", "plot_results"], [1, 4, 1, "", "process_hvsr"], [1, 4, 1, "", "read_from_RS"], [1, 4, 1, "", "read_tromino_files"], [1, 4, 1, "", "remove_noise"], [1, 4, 1, "", "remove_outlier_curves"], [1, 4, 1, "", "run"], [2, 0, 0, "-", "sprit_cli"], [3, 0, 0, "-", "sprit_hvsr"], [4, 0, 0, "-", "sprit_jupyter_UI"], [5, 0, 0, "-", "sprit_plot"], [6, 0, 0, "-", "sprit_streamlit_ui"], [7, 0, 0, "-", "sprit_tkinter_ui"], [8, 0, 0, "-", "sprit_utils"], [1, 4, 1, "", "time_it"], [1, 4, 1, "", "x_mark"]], "sprit.HVSRBatch": [[1, 2, 1, "", "copy"], [1, 2, 1, "", "export"], [1, 2, 1, "", "export_settings"], [1, 2, 1, "", "get_report"], [1, 2, 1, "", "items"], [1, 2, 1, "", "keys"], [1, 2, 1, "", "plot"], [1, 2, 1, "", "report"]], "sprit.HVSRData": [[1, 3, 1, "", "batch"], [1, 2, 1, "", "copy"], [1, 3, 1, "", "datastream"], [1, 2, 1, "", "export"], [1, 2, 1, "", "export_settings"], [1, 2, 1, "", "get_report"], [1, 2, 1, "", "items"], [1, 2, 1, "", "keys"], [1, 3, 1, "", "params"], [1, 2, 1, "", "plot"], [1, 3, 1, "", "ppsds"], [1, 3, 1, "", "ppsds_obspy"], [1, 2, 1, "", "report"]], "sprit.sprit_cli": [[2, 4, 1, "", "get_param_docstring"], [2, 4, 1, "", "main"]], "sprit.sprit_hvsr": [[3, 1, 1, "", "HVSRBatch"], [3, 1, 1, "", "HVSRData"], [3, 4, 1, "", "batch_data_read"], [3, 4, 1, "", "calculate_azimuth"], [3, 4, 1, "", "check_instance"], [3, 4, 1, "", "check_peaks"], [3, 4, 1, "", "export_data"], [3, 4, 1, "", "export_report"], [3, 4, 1, "", "export_settings"], [3, 4, 1, "", "fetch_data"], [3, 4, 1, "", "generate_ppsds"], [3, 4, 1, "", "get_metadata"], [3, 4, 1, "", "get_report"], [3, 4, 1, "", "gui"], [3, 4, 1, "", "gui_test"], [3, 4, 1, "", "import_data"], [3, 4, 1, "", "import_settings"], [3, 4, 1, "", "input_params"], [3, 4, 1, "", "plot_azimuth"], [3, 4, 1, "", "plot_hvsr"], [3, 4, 1, "", "plot_stream"], [3, 4, 1, "", "process_hvsr"], [3, 4, 1, "", "read_tromino_files"], [3, 4, 1, "", "remove_noise"], [3, 4, 1, "", "remove_outlier_curves"], [3, 4, 1, "", "run"], [3, 4, 1, "", "test_function"]], "sprit.sprit_hvsr.HVSRBatch": [[3, 2, 1, "", "copy"], [3, 2, 1, "", "export"], [3, 2, 1, "", "export_settings"], [3, 2, 1, "", "get_report"], [3, 2, 1, "", "items"], [3, 2, 1, "", "keys"], [3, 2, 1, "", "plot"], [3, 2, 1, "", "report"]], "sprit.sprit_hvsr.HVSRData": [[3, 3, 1, "", "batch"], [3, 2, 1, "", "copy"], [3, 3, 1, "", "datastream"], [3, 2, 1, "", "export"], [3, 2, 1, "", "export_settings"], [3, 2, 1, "", "get_report"], [3, 2, 1, "", "items"], [3, 2, 1, "", "keys"], [3, 3, 1, "", "params"], [3, 2, 1, "", "plot"], [3, 3, 1, "", "ppsds"], [3, 3, 1, "", "ppsds_obspy"], [3, 2, 1, "", "report"]], "sprit.sprit_jupyter_UI": [[4, 4, 1, "", "create_jupyter_ui"], [4, 4, 1, "", "get_default"]], "sprit.sprit_plot": [[5, 4, 1, "", "get_check_peaks_kwargs"], [5, 4, 1, "", "get_generate_ppsd_kwargs"], [5, 4, 1, "", "get_get_report_kwargs"], [5, 4, 1, "", "get_process_hvsr_kwargs"], [5, 4, 1, "", "get_remove_noise_kwargs"], [5, 4, 1, "", "get_remove_outlier_curve_kwargs"], [5, 4, 1, "", "parse_comp_plot_list"], [5, 4, 1, "", "parse_hv_plot_list"], [5, 4, 1, "", "parse_plot_string"], [5, 4, 1, "", "parse_spec_plot_list"], [5, 4, 1, "", "plot_outlier_curves"], [5, 4, 1, "", "plot_preview"], [5, 4, 1, "", "plot_results"], [5, 4, 1, "", "process_data"], [5, 4, 1, "", "read_data"]], "sprit.sprit_streamlit_ui": [[6, 4, 1, "", "check_if_default"], [6, 4, 1, "", "on_file_upload"], [6, 4, 1, "", "on_run_data"], [6, 4, 1, "", "print_param"], [6, 4, 1, "", "setup_session_state"], [6, 4, 1, "", "text_change"], [6, 4, 1, "", "write_to_info_tab"]], "sprit.sprit_tkinter_ui": [[7, 1, 1, "", "SPRIT_App"], [7, 4, 1, "", "catch_errors"], [7, 4, 1, "", "on_closing"], [7, 4, 1, "", "reboot_app"]], "sprit.sprit_tkinter_ui.SPRIT_App": [[7, 2, 1, "", "create_menubar"], [7, 2, 1, "", "create_tabs"], [7, 2, 1, "", "log_errorMsg"], [7, 2, 1, "", "manual_label_update"]], "sprit.sprit_utils": [[8, 4, 1, "", "assert_check"], [8, 4, 1, "", "check_gui_requirements"], [8, 4, 1, "", "check_mark"], [8, 4, 1, "", "check_tsteps"], [8, 4, 1, "", "check_xvalues"], [8, 4, 1, "", "checkifpath"], [8, 4, 1, "", "format_time"], [8, 4, 1, "", "get_char"], [8, 4, 1, "", "has_required_channels"], [8, 4, 1, "", "make_it_classy"], [8, 4, 1, "", "read_from_RS"], [8, 4, 1, "", "time_it"], [8, 4, 1, "", "x_mark"]]}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "property", "Python property"], "4": ["py", "function", "Python function"]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:property", "4": "py:function"}, "terms": {"": [1, 2, 3], "0": [1, 3, 5, 8], "00": [1, 3, 8], "000000z": [1, 3], "03125": [1, 3], "05": [1, 3], "1": [1, 3, 8], "10": [1, 3], "100": [1, 3], "1000": [1, 3], "1012122": [1, 3], "125": [1, 3], "128": [1, 3], "13": [1, 3], "16": [1, 3], "2": [1, 3], "2004": [1, 3], "2023": [1, 8], "2024": [1, 3], "2290526": [1, 3], "23": [1, 3], "24576": [1, 3], "3": [1, 3], "30": [1, 3], "30t00": [1, 3], "30t23": [1, 3], "33": [1, 3], "3600": [1, 3], "3g": [1, 3], "4": [1, 3], "40": [1, 3], "400": [1, 3], "4326": [1, 3], "5": [1, 3, 8], "51": [1, 3], "59": [1, 3], "6": [1, 3, 8], "75": 3, "755": [1, 3], "8": [1, 3], "80": [1, 3], "88": [1, 3], "98": [1, 3, 5], "98th": [1, 3], "99": [1, 3], "995": [1, 3], "999999": [1, 3], "999999z": [1, 3], "A": [1, 3], "By": [1, 3], "For": [1, 2, 3], "If": [1, 3, 8], "In": [1, 2, 3], "It": [1, 3], "No": [1, 3], "Not": [1, 3], "The": [1, 2, 3, 8], "These": [1, 3], "_": [1, 3], "_datapath_": [1, 3], "_description_": [1, 3], "_read_rs_metadata": [1, 3], "_t": [1, 8], "_type_": [1, 3], "a4": [1, 3], "abber": [1, 3], "abl": [1, 3, 8], "about": [1, 3], "abov": [1, 3], "accept": [1, 3], "access": [1, 3], "accessor": [1, 3], "account": [1, 3], "acq_dat": [1, 3], "acquir": [1, 3], "action": 7, "actual": [1, 3], "ad": [1, 3], "add": [1, 3], "addit": [1, 3], "addition": 3, "adjust": 3, "affect": [1, 3], "after": [1, 3], "again": [1, 3], "against": [1, 3], "algorithm": [1, 3], "all": [1, 2, 3, 7, 8], "allow": [1, 3], "alreadi": [1, 3], "also": [1, 2, 3], "am": [1, 3, 8], "amateur": [1, 3], "ambient": [1, 3], "amend": [1, 3], "american": [1, 3], "amplitud": [1, 3], "an": [1, 3], "analysi": [1, 3], "analyz": [1, 3], "angl": [1, 3], "angular": [1, 3], "ani": [1, 2, 3, 7], "ann": [1, 3, 5], "annot": [1, 3], "anoth": [1, 8], "antitrigg": [1, 3], "anyth": [1, 3, 8], "api": [1, 3], "app": 7, "appear": [1, 3], "append": [1, 3], "appli": [1, 3], "appropri": [1, 3], "ar": [1, 2, 3, 8], "archiv": [1, 8], "arg": [1, 3], "argument": [1, 2, 3], "arithmet": [1, 3], "arrang": [1, 3], "asid": [1, 3], "assert_check": [0, 1, 8], "assign": [1, 3], "assum": [1, 8], "assumpt": [1, 3], "attribut": [1, 3], "auto": [1, 3], "autogen": [1, 3], "automat": [1, 3], "avail": [1, 3], "averag": [1, 3], "ax": [1, 3], "axi": [1, 3], "az": [1, 3, 8], "azimuth": [1, 3, 5], "azimuth_angl": [1, 3], "azimuth_calcul": [1, 3], "azimuth_typ": [1, 3], "azimuth_unit": [1, 3], "azimuthal_ppsd": [1, 3], "back": [1, 3], "bandwidth": [1, 3], "base": [1, 3, 7], "basic": [1, 3], "batch": [0, 1, 3], "batch_data": [1, 3], "batch_data_read": [0, 1, 3], "batch_param": [1, 3], "batch_typ": [1, 3], "been": [1, 3], "befor": [1, 3, 7], "being": [1, 3], "below": [1, 3], "besid": [1, 3], "best": [1, 3], "between": [1, 3], "bin": [1, 3], "bool": [1, 3], "both": [1, 3], "bracket": [1, 3], "broader": [1, 3], "browser": [1, 3], "buffer": [1, 3], "bulk": [1, 3], "button": 5, "c": [1, 3, 5], "calcul": [1, 3], "calculate_azimuth": [0, 1, 3], "call": [1, 3, 7, 8], "can": [1, 2, 3, 8], "cannot": [1, 3], "carri": [1, 3], "case": [1, 2, 3], "catch_error": [0, 1, 7], "caught": [1, 3], "cdt": [1, 8], "chang": [1, 3], "channel": [1, 3], "charact": [1, 8], "chart": [1, 3], "check": [1, 3, 8], "check_gui_requir": [0, 1, 8], "check_if_default": [0, 1, 6], "check_inst": [0, 1, 3], "check_mark": [0, 1, 8], "check_peak": [0, 1, 3], "check_tstep": [0, 1, 8], "check_xvalu": [0, 1, 8], "checkifpath": [0, 1, 8], "chosen": [1, 3], "circular": [1, 3], "class": [1, 3, 7], "cleanup": 7, "clear": [1, 3], "clear_fig": [1, 3], "click": [1, 3], "clip": 3, "close": [1, 3], "close_fig": [1, 3], "co": [1, 3], "code": [1, 3], "column": [1, 3], "combin": [1, 3], "command": [2, 3], "commonli": [1, 3], "comp": [1, 3], "comp_plot_list": 5, "compon": [1, 3], "componen": 3, "comput": [1, 8], "cond": [1, 8], "constant": [1, 3], "contain": [1, 3, 7], "convert": [1, 3, 8], "cooldown": [1, 3], "cooldown_tim": [1, 3], "coordin": [1, 3], "copi": [0, 1, 3], "core": [1, 3], "corner": [1, 3], "correct": [1, 3], "correctli": [1, 2, 3, 8], "correspond": 2, "cr": [1, 3], "creat": [1, 3, 4, 7], "create_jupyter_ui": [0, 1, 4], "create_menubar": [1, 7], "create_tab": [1, 7], "creation": [1, 3], "criteria": [1, 3], "cst": [1, 8], "csv": [1, 2, 3], "csv_handl": [1, 3], "current": [1, 3, 7], "curv": [1, 3], "customiz": 3, "cut": [1, 3], "cutoff": [1, 3], "d": [1, 3], "dai": [1, 3], "data": [1, 2, 3, 7, 8], "data_export_format": [1, 3], "data_export_path": [1, 3], "data_format": [1, 3], "databas": [1, 3], "datafram": [1, 3], "dataset": [1, 3], "datastream": [0, 1, 3], "date": [1, 3, 8], "datetim": [1, 3, 8], "dd": [1, 3], "decim": [1, 3], "decod": [1, 8], "deep": [1, 3], "deepcopi": [1, 3], "default": [1, 3, 8], "defin": [1, 3], "defualt": [1, 3], "deg": [1, 3], "degre": [1, 3], "deliv": [1, 3], "densiti": [1, 3], "depend": [1, 3], "depth": [1, 3], "descript": [1, 3], "design": [1, 3], "dest": [1, 8], "detail": [1, 3], "determin": [1, 3], "detrend": [1, 3], "detrend_ord": [1, 3], "deviat": [1, 3], "dict": [1, 3], "dict_item": [1, 3], "dict_kei": [1, 3], "dictionari": [1, 3], "differ": [1, 3], "diffus": [1, 3], "digit": [1, 3], "dir": [1, 3], "direct": [1, 3], "directli": [1, 3], "directori": [1, 3], "disk": [1, 3], "displai": [1, 3, 8], "display": [1, 8], "divid": [1, 3], "do": [1, 3], "doc": [1, 3], "document": [1, 2, 3], "doe": [1, 3, 7], "done": [1, 3, 7], "dot": [1, 3], "due": [1, 3], "dure": [1, 3], "e": [1, 2, 3, 8], "e0": [1, 3], "e1": [1, 3], "each": [1, 3], "eas": [1, 3], "easili": [1, 3], "east": [1, 3], "eastern": [1, 3], "eh": [1, 3], "ehn": [1, 3], "ehr": [1, 3], "ehz": [1, 3], "eie": [1, 3], "eie_": [1, 3], "eie_n": [1, 3], "eie_z": [1, 3], "either": [1, 3], "elaps": [1, 8], "element": [1, 3], "elev": [1, 3], "elev_unit": [1, 3], "els": [1, 3], "en": [1, 3], "encod": [1, 8], "end": [1, 3], "endtim": [1, 3], "energi": [1, 3], "engin": [1, 3], "enhanc": [1, 3], "ensur": [1, 3], "entir": [1, 3], "entri": [1, 3, 8], "epsg": [1, 3], "equal": [1, 3], "equival": [1, 3], "error": [1, 3, 8], "error_messag": [1, 8], "essenti": [1, 3], "etc": [1, 3, 7], "even": [1, 3], "eventu": [1, 3], "everyth": [1, 3], "exampl": [1, 3], "except": [1, 3], "exclud": [1, 3], "excpet": [1, 3], "exist": [1, 3], "expect": [1, 3], "experiment": [1, 3], "explicit": [1, 3], "export": [0, 1, 3], "export_data": [0, 1, 3], "export_report": [0, 1, 3], "export_set": [0, 1, 3], "export_settings_path": [1, 3], "export_settings_typ": [1, 3], "ext": [1, 3], "extens": [1, 3], "extra": [1, 3], "f": [1, 3], "f_smooth_width": [1, 3], "fail": [1, 3], "fairli": [1, 3], "fals": [1, 3, 5, 6, 8], "fast": [1, 3], "feb": [1, 3], "fetch": [1, 3], "fetch_data": [0, 1, 3], "field": [1, 3], "fig": [1, 3], "figur": [1, 3], "file": [1, 3], "filelist": [1, 3], "filenam": [1, 3], "filepath": [1, 3, 8], "filter": [1, 3], "final": [1, 3], "find": [1, 3], "first": [1, 3], "fit": [1, 3], "float": [1, 3], "folder": [1, 3], "follow": [1, 3], "form": [1, 3], "format": [1, 2, 3, 8], "format_tim": [0, 1, 8], "fr": [1, 3], "freq_smooth": [1, 3], "frequenc": [1, 3], "frequnci": [1, 3], "from": [1, 2, 3, 8], "from_roc": [1, 5], "from_user_input": [1, 3], "full": [1, 3], "func": [1, 2, 4, 7], "function": [1, 2, 3, 4, 7, 8], "futur": [1, 3], "g": [1, 2, 3, 8], "gener": [1, 3], "generate_ppsd": [0, 1, 3], "geometr": [1, 3], "geopsi": [1, 3], "get": [1, 2, 3], "get_char": [0, 1, 8], "get_check_peaks_kwarg": [0, 1, 5], "get_default": [0, 1, 4], "get_generate_ppsd_kwarg": [0, 1, 5], "get_get_report_kwarg": [0, 1, 5], "get_metadata": [0, 1, 3], "get_param_docstr": [0, 1, 2], "get_process_hvsr_kwarg": [0, 1, 5], "get_remove_noise_kwarg": [0, 1, 5], "get_remove_outlier_curve_kwarg": [0, 1, 5], "get_report": [0, 1, 3], "gone": [1, 3], "graphic": [1, 3, 7], "greater": [1, 3], "grid": [1, 3], "gui": [0, 1, 3], "gui_test": [0, 1, 3], "h": [1, 3], "h1": [1, 3], "h2": [1, 3], "ha": [1, 3], "handl": [1, 3], "happen": [1, 3], "has_required_channel": [0, 1, 8], "have": [1, 3], "he": [1, 3], "help": [1, 3], "here": [1, 2, 3], "hh": [1, 3], "high": [1, 3], "highest": [1, 3], "hn": [1, 3], "home": [1, 3], "horizont": [1, 3], "horizontal_method": [1, 3], "hostnam": [1, 8], "how": [1, 3], "html": [1, 3], "html_report": [1, 3], "http": [1, 3], "hv": [1, 3, 5], "hv_data": [1, 5], "hv_plot": [1, 3], "hvsr": [1, 3, 5], "hvsr_band": [1, 3], "hvsr_data": [1, 3, 5, 8], "hvsr_export_path": [1, 3], "hvsr_id": [1, 3], "hvsr_out": [1, 3], "hvsr_plot_list": 5, "hvsr_result": [1, 3], "hvsrbatch": [0, 1, 3], "hvsrbatchvari": [1, 3], "hvsrdata": [0, 1, 3], "hz": [1, 3], "i": [1, 2, 3, 8], "iana": [1, 3], "id_prefix": [1, 3], "identifi": [1, 3], "ie": [1, 3], "imag": 3, "immedi": [1, 3], "import": [1, 3], "import_data": [0, 1, 3], "import_filepath": [1, 3], "import_set": [0, 1, 3], "in_char": [1, 8], "includ": [1, 3, 8], "include_loc": [1, 3], "inclus": [1, 3], "incolor": [1, 8], "indep": [1, 3], "index": [1, 3], "indexerror": [1, 3], "indic": [1, 3], "indivdu": [1, 3], "individu": [1, 2, 3], "infer": [1, 8], "info": [1, 3], "info_tab": 6, "inform": [1, 2, 3], "init": 3, "input": [1, 2, 3, 8], "input_cr": [1, 3], "input_data": [1, 2, 3, 8], "input_param": [0, 1, 2, 3], "input_stream": [1, 3], "inputdt": [1, 8], "insert": [1, 3], "instanc": [1, 3], "instead": [1, 3], "instrument": [1, 3], "int": [1, 3, 8], "integ": [1, 3], "interepret": [1, 3], "interest": [1, 3], "interfac": [1, 3, 7], "intermin": [1, 8], "interpol": [1, 3], "interpolate_azimuth": [1, 3], "interpret": [1, 3], "interv": [1, 3], "inventori": [1, 3], "io": [1, 3], "item": [0, 1, 3], "iter": [1, 3], "its": [1, 3], "itself": [1, 3], "json": [1, 3], "jupyt": [1, 3, 4], "just": [1, 2, 3, 8], "keep": [1, 3], "kei": [0, 1, 3, 6], "keyword": [1, 2, 3], "kind": [1, 3], "konno": [1, 3], "konno_ohmachi_smooth": [1, 3], "konnoohmachismooth": [1, 3], "kwarg": [1, 3], "kwargskei": [1, 3], "kwargsvalu": [1, 3], "larger": [1, 3], "last": [1, 3, 8], "later": [1, 3], "latest": [1, 3], "latitut": [1, 3], "least": [1, 3], "left": [1, 3], "legend": [1, 3], "length": [1, 3, 8], "librari": [1, 3], "lightli": [1, 3], "like": [1, 3, 7], "limit": [1, 3], "line": [1, 2, 3], "link": [1, 3], "list": [1, 2, 3], "list_of_tz_database_time_zon": [1, 3], "lite": [1, 3], "littl": [1, 3], "load": [1, 3], "loc": [1, 3], "local": [1, 8], "locat": [1, 3], "log_errormsg": [1, 7], "logmsg": 7, "long": [1, 3], "longer": [1, 3], "longitud": [1, 3], "lot": [1, 3], "low": [1, 3], "lower": [1, 3], "lta": [1, 3], "m": [1, 3], "machin": [1, 3], "mai": [1, 2, 3], "main": [0, 1, 2, 3], "make": [1, 3, 8], "make_it_classi": [0, 1, 8], "manipul": [1, 3], "manual": [1, 3], "manual_label_upd": [1, 7], "map": [1, 3], "mark": [1, 8], "master": 7, "match": [1, 3], "matplotlib": [1, 3], "max": [1, 3], "maximum": [1, 3], "mean": [1, 3], "measruement": [1, 3], "measur": [1, 3], "median": [1, 3], "metadata": [1, 3], "metapath": [1, 3], "meter": [1, 3], "method": [1, 3, 7, 8], "micro": [1, 3], "min": [1, 3], "min_win_s": [1, 3], "minimum": [1, 3], "minumum": [1, 3], "mm": [1, 3], "modifi": [1, 3], "modul": [0, 1], "monospac": [1, 3], "more": [1, 2, 3], "most": [1, 3], "mpl": [1, 3], "mseed": [1, 3], "much": [1, 3], "mult": [1, 3], "multi": [1, 3], "multipl": [1, 2, 3], "must": [1, 3, 7], "myshak": [1, 8], "n": [1, 3], "name": [1, 3], "nearing": [1, 3], "necessari": [1, 3], "need": [1, 2, 3], "nest": [1, 3], "network": [1, 3], "new": [1, 3], "nois": [1, 3], "noise_perc": [1, 3], "noise_remov": [1, 3], "noisi": [1, 3], "none": [1, 3, 5, 6, 8], "normal": [1, 3], "north": [1, 3], "note": [1, 3, 7], "notebook": 4, "noth": [1, 3], "now": [1, 3, 8], "number": [1, 3], "numer": [1, 3], "obejct": [1, 3], "obj": [1, 3, 8], "object": [1, 3, 7, 8], "obpsi": 3, "obspi": [1, 3], "obtain": [1, 3], "occur": [1, 3], "off": [1, 3], "offset": [1, 3, 8], "often": [1, 3], "ohmachi": [1, 3], "on_clos": [0, 1, 7], "on_file_upload": [0, 1, 6], "on_run_data": [0, 1, 6], "one": [1, 3], "onli": [1, 2, 3], "open": [1, 3], "oper": [1, 3], "opt": [1, 8], "option": [1, 3], "order": [1, 3], "org": [1, 3], "origin": [1, 3], "other": [1, 2, 3, 8], "other_kwarg": [1, 3], "otherwis": [1, 3], "ouput": [1, 3], "out": [1, 3], "outlier": [1, 3], "outlier_curve_rmse_percentil": [1, 3], "outlier_curves_remov": [1, 3], "output": [1, 3, 8], "output_cr": [1, 3], "outputtimeobj": [1, 8], "outsid": [1, 3], "over": [1, 3], "overwrit": [1, 3], "p": [1, 3, 5], "packag": [0, 3], "pad": [1, 3], "page": [1, 3], "pair": [1, 3], "panda": [1, 3], "param": [0, 1, 3, 4], "param_col": [1, 3], "param_nam": 2, "paramet": [1, 2, 3, 8], "parametersin": [1, 3], "pars": [1, 3], "parse_comp_plot_list": [0, 1, 5], "parse_hv_plot_list": [0, 1, 5], "parse_plot_str": [0, 1, 5], "parse_spec_plot_list": [0, 1, 5], "part": [1, 3], "pass": [1, 2, 3], "password": [1, 8], "past": [1, 3], "path": [1, 3, 8], "pathlib": [1, 3, 8], "paz": [1, 3], "pdf": [1, 3], "peak": [1, 3], "peak_freq_rang": [1, 3], "peak_select": [1, 3], "pend": [1, 3], "per": [1, 3], "percentag": [1, 3], "percentil": [1, 3], "perform": [1, 3], "period_step_octav": [1, 3], "persist": [1, 3], "pick": [1, 3], "pickl": [1, 3], "pipelin": [1, 3], "platform": [1, 8], "plot": [0, 1, 2, 3], "plot_azimuth": [0, 1, 3], "plot_azimuth_kwarg": [1, 3], "plot_engin": [1, 3, 5], "plot_hvsr": [0, 1, 3], "plot_input_stream": [1, 3], "plot_outlier_curv": [0, 1, 5], "plot_preview": [0, 1, 5], "plot_report": [1, 3], "plot_result": [0, 1, 5], "plot_str": [1, 5], "plot_stream": [0, 1, 3], "plot_typ": [1, 3], "plot_with_hv": 5, "plotli": [1, 3, 5], "plty": [1, 3], "plu": [1, 3], "png": [1, 3], "point": [1, 3], "polynomi": [1, 3], "possibl": [1, 3], "potenti": [1, 3], "power": [1, 3], "ppsd": [0, 1, 3, 8], "ppsd_kwarg": [1, 3], "ppsd_length": [1, 3], "ppsds_obspi": [0, 1, 3], "precis": [1, 3], "prefer": [1, 3], "prefix": [1, 3], "present": [1, 3], "prevent": 3, "preview_fig": [1, 5], "previou": [1, 3], "primarili": [1, 3], "print": [1, 2, 3], "print_param": [0, 1, 6], "print_report": [1, 3], "privat": [1, 3, 8], "probabilist": [1, 3], "proc": [1, 3], "proc_nam": [1, 8], "process": [1, 2, 3, 8], "process_data": [0, 1, 5], "process_hvsr": [0, 1, 3], "processing_paramet": [1, 3], "processing_window": [1, 3], "profil": [1, 3], "program": 7, "progress": 3, "prohibit": [1, 3], "project": [1, 3], "proper": [1, 3, 8], "properti": [1, 3], "proport": [1, 3], "provid": [1, 3], "psd": [1, 3], "pt": [1, 3], "purpos": [1, 3], "pylot": 3, "pyplot": [1, 3], "pyproj": [1, 3], "python": [1, 3], "quadrat": [1, 3], "qualiti": [1, 3], "r": [1, 3, 8], "rac84": [1, 3, 8], "rad": [1, 3], "radial": [1, 3], "radian": [1, 3], "rais": [1, 3, 8], "raise_error": [1, 8], "rang": [1, 3], "rasp": [1, 3], "raspberri": [1, 3], "rather": [1, 3], "ratio": 1, "raw": [1, 3], "read": [1, 3], "read_csv": [1, 3], "read_data": [0, 1, 5], "read_from_r": [0, 1, 8], "read_inventori": [1, 3], "read_inventory_kwarg": [1, 3], "read_tromino_fil": [0, 1, 3], "readabl": [1, 3], "readcsv_getmeta_fetch_kwarg": [1, 3], "readthedoc": [1, 3], "reboot_app": [0, 1, 7], "recommend": [1, 3], "refer": [1, 3], "regular": [1, 3], "relev": 3, "remov": [1, 3], "remove_method": [1, 3], "remove_nois": [0, 1, 3], "remove_outlier_curv": [0, 1, 3], "remove_raw_nois": [1, 3], "renam": [1, 3], "renov": [1, 3], "repeat": [1, 3], "report": [0, 1, 2, 3], "report_export_format": [1, 3], "report_export_path": [1, 3], "report_format": [1, 2, 3], "repositori": [1, 3], "repres": [1, 3], "reprocess": [1, 3], "requir": [1, 2, 3], "resampl": [1, 3], "resourc": [1, 3], "respect": [1, 3], "rest": [1, 3], "restart": 7, "result": [1, 3], "results_fig": [1, 5], "results_graph_widget": [1, 5], "retain": [1, 3], "return": [1, 3, 7, 8], "return_fig": [1, 3, 5], "rmse": [1, 3], "rmse_thresh": [1, 3, 5], "root": [1, 3], "row": [1, 3], "run": [0, 1, 2, 3, 8], "runtimeerror": [1, 3], "s0": [1, 3], "s1": [1, 3], "same": [1, 3, 8], "sampl": [1, 3], "sample1": [1, 3], "sample_list": [1, 8], "sampling_r": [1, 3], "sat_perc": [1, 3], "satur": [1, 3], "save": [1, 3, 7], "save_dir": [1, 3], "save_progress": [1, 8], "save_suffix": [1, 3], "savgoi": [1, 3], "score": [1, 3], "scp": [1, 3, 8], "script": [2, 7], "search": [1, 3], "second": [1, 3], "see": [1, 2, 3], "seismic": [1, 3], "seismomet": [1, 3], "select": [1, 3], "sensit": [1, 3], "separ": [1, 3], "sequenc": [1, 3], "sesam": [1, 3], "set": [1, 3, 8], "settings_import_path": [1, 3], "settings_import_typ": [1, 3], "setup_session_st": [0, 1, 6], "sever": [1, 3], "shake": [1, 3], "shakem": [1, 8], "shakenam": [1, 8], "shallow": [1, 3], "short": [1, 3], "shorthand": [1, 3], "should": [1, 2, 3], "show": [1, 3], "show_az_plot": [1, 3], "show_azimuth_grid": [1, 3], "show_azimuth_peak": [1, 3], "show_html_report": [1, 3], "show_legend": [1, 3], "show_pdf_report": [1, 3], "show_plot": [1, 3, 5], "show_plot_report": [1, 3], "show_print_report": [1, 3], "show_report": 3, "show_report_output": [1, 3], "show_results_plot": [1, 5], "show_stalta_plot": [1, 3], "show_table_report": [1, 3], "show_typ": 6, "shown": [1, 3], "signal": [1, 3], "similar": [1, 3], "simpl": [1, 3], "simpli": [1, 3], "sin": [1, 3], "sinc": [1, 3, 8], "sing": [1, 3], "singl": [1, 3], "site": [1, 3], "site_nam": [1, 3], "sitenam": [1, 3], "size": [1, 3], "skip_on_gap": [1, 3], "sleep_tim": [1, 8], "smooth": [1, 3], "smoother": [1, 3], "sn": [1, 3], "so": [1, 3, 8], "some": [1, 3], "sourc": [1, 2, 3, 4, 5, 6, 7, 8], "south": [1, 3], "space": [1, 3], "spec": [1, 3, 5], "spec_plot_list": 5, "specif": [1, 3], "specifi": [1, 3], "spectral": [1, 3], "spectral_estim": [1, 3], "spectrogram": [1, 3], "spectrogram_compon": [1, 5], "spectrum": [1, 3], "speed": [1, 3], "spline": [1, 3], "sprit": 0, "sprit_app": [0, 1, 7], "sprit_cli": [0, 1], "sprit_hvsr": [0, 1, 2], "sprit_jupyter_ui": [0, 1], "sprit_plot": [0, 1], "sprit_streamlit_ui": [0, 1], "sprit_tkinter_ui": [0, 1], "sprit_util": [0, 1], "squar": [1, 3], "src": [1, 8], "ss": [1, 3], "sta": [1, 3, 8], "stalta": [1, 3], "stalta_thresh": [1, 3], "standard": [1, 3], "start": [1, 3], "start_byt": [1, 3], "starttim": [1, 3], "state": [1, 8], "statement": [1, 3], "station": [1, 3, 8], "statist": [1, 3], "statu": [1, 3], "step": [1, 3, 8], "still": [1, 3], "str": [1, 3, 8], "stream": [1, 3, 5, 8], "strftime": [1, 3], "string": [1, 3, 8], "struct_format": [1, 3], "style": [1, 3], "subfold": [1, 3], "submodul": 0, "subplot": [1, 3], "subplot_num": 5, "suffix": [1, 3], "summari": [1, 3], "summat": [1, 3], "suppli": [1, 3], "support": [1, 3, 8], "suppress_report_output": [1, 3], "sure": [1, 3, 8], "surfac": [1, 3], "system": [1, 3], "t": [1, 3], "tabl": [1, 3], "table_report": [1, 3], "tabular": [1, 3], "take": [1, 3], "techniqu": 1, "term": [1, 3], "termin": [1, 3, 8], "test": [1, 3], "test12": [1, 3], "test_funct": [0, 1, 3], "text": [1, 3], "text_chang": [0, 1, 6], "than": [1, 3], "thei": [1, 3, 8], "themselv": [1, 3], "thi": [1, 2, 3, 7, 8], "though": [1, 2, 3], "three": [1, 3], "threshold": [1, 3], "through": [1, 3], "throughout": [1, 3], "tigher": [1, 3], "time": [1, 2, 3, 8], "time_int": [1, 3], "time_it": [0, 1, 8], "timezon": [1, 3, 8], "titl": [1, 3], "tkinter": 7, "todai": [1, 8], "too": [1, 3], "tp": [1, 3], "trace": [1, 3], "transform": [1, 3], "tri": [1, 8], "triangular": [1, 3], "trigger": [1, 3], "trim": [1, 3], "tromino": [1, 3], "true": [1, 3, 5, 6, 8], "try": [1, 3], "tupl": [1, 3], "two": [1, 3], "txt": [1, 3], "type": [1, 2, 3], "tz": [1, 3], "tzone": [1, 3, 8], "ui": 4, "underli": [1, 3], "uniqu": [1, 3], "unit": [1, 3, 8], "updat": [1, 3], "update_metadata": [1, 3], "upper": [1, 3], "us": [1, 2, 3, 8], "use_hv_curv": [1, 3, 5], "use_percentil": [1, 3, 5], "use_subplot": [1, 3], "user": [1, 3, 7], "usernam": [1, 8], "usual": [1, 3], "utc": [1, 3, 8], "utcdatetim": [1, 3], "v": [1, 3], "valei": [1, 3], "valid": [1, 3, 8], "valu": [1, 3], "var": [1, 8], "var_typ": [1, 8], "variabl": [1, 3], "varieti": [1, 3], "variou": [1, 3], "vector": [1, 3], "verbos": [1, 3, 5, 6, 8], "veri": [1, 3], "vertic": [1, 3], "via": [1, 3], "visual": [1, 3], "vizual": [1, 3], "wa": [1, 3], "warm_cool": [1, 3], "warmup": [1, 3], "warmup_tim": [1, 3], "wb": [1, 3], "well": [1, 2, 3], "were": 3, "west": [1, 3], "what": [1, 3], "when": [1, 3], "where": [1, 3], "wherea": [1, 3], "whether": [1, 3], "which": [1, 3], "while": [1, 3], "whose": [1, 3], "wide": [1, 3], "widget": [1, 3, 4], "width": [1, 3], "wiki": [1, 3], "wikipedia": [1, 3], "window": [1, 3, 8], "within": [1, 2, 3], "without": [1, 3], "word": [1, 3], "work": [1, 2, 3], "workflow": [1, 3], "worksheet": [1, 3], "would": [1, 3], "wrapper": [1, 3], "write": [1, 3], "write_path": [1, 3], "write_to_info_tab": [0, 1, 6], "written": 3, "www": [1, 3], "x": [1, 3], "x_mark": [0, 1, 8], "x_valu": [1, 8], "xcoord": [1, 3], "y": [1, 3], "ycoord": [1, 3], "year": [1, 3, 8], "ylim_std": 3, "you": [1, 2, 3], "your": [1, 2, 3], "yyyi": [1, 3], "z": [1, 3, 5], "zero": [1, 3]}, "titles": ["<no title>", "sprit package", "sprit.sprit_cli module", "sprit.sprit_hvsr module", "sprit.sprit_jupyter_UI module", "sprit.sprit_plot module", "sprit.sprit_streamlit_ui module", "sprit.sprit_tkinter_ui module", "sprit.sprit_utils module"], "titleterms": {"content": 0, "modul": [2, 3, 4, 5, 6, 7, 8], "packag": 1, "sprit": [1, 2, 3, 4, 5, 6, 7, 8], "sprit_cli": 2, "sprit_hvsr": 3, "sprit_jupyter_ui": 4, "sprit_plot": 5, "sprit_streamlit_ui": 6, "sprit_tkinter_ui": 7, "sprit_util": 8, "submodul": 1}}) \ No newline at end of file diff --git a/docs/_build/html/sprit.html b/docs/_build/html/sprit.html new file mode 100644 index 0000000..c9519c4 --- /dev/null +++ b/docs/_build/html/sprit.html @@ -0,0 +1,1986 @@ + + + + + + + sprit package — sprit 1.4.1 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

sprit package

+

This module analysis ambient seismic data using the Horizontal to Vertical Spectral Ratio (HVSR) technique

+
+
+class sprit.HVSRBatch(*args, **kwargs)[source]
+

Bases: object

+

HVSRBatch is the data container used for batch processing. +It contains several HVSRData objects (one for each site). +These can be accessed using their site name, +either square brackets (HVSRBatchVariable[“SiteName”]) or the dot (HVSRBatchVariable.SiteName) accessor.

+

The dot accessor may not work if there is a space in the site name.

+

All of the functions in the sprit package are designed to perform the bulk of their operations iteratively +on the individual HVSRData objects contained in the HVSRBatch object, and do little with the HVSRBatch object itself, +besides using it determine which sites are contained within it.

+

Methods

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

copy([type])

Make a copy of the HVSRBatch object.

export([hvsr_export_path, ext])

Method to export HVSRData objects in HVSRBatch container to indivdual .hvsr pickle files.

export_settings([site_name, ...])

Method to export settings from HVSRData object in HVSRBatch object.

get_report(**kwargs)

Method to get report from processed data, in print, graphical, or tabular format.

items()

Method to return both the site names and the HVSRData object as a set of dict_items tuples.

keys()

Method to return the "keys" of the HVSRBatch object.

plot(**kwargs)

Method to plot data, based on the sprit.plot_hvsr() function.

report(**kwargs)

Wrapper of get_report()

+
+
+copy(type='shallow')[source]
+

Make a copy of the HVSRBatch object. Uses python copy module.

+
+
Parameters:
+
+
typestr {‘shallow’, ‘deep’}

Based on input, creates either a shallow or deep copy of the HVSRBatch object. Shallow is equivalent of copy.copy(). Input of ‘deep’ is equivalent of copy.deepcopy() (still experimental). Defaults to shallow.

+
+
+
+
+
+ +
+
+export(hvsr_export_path=True, ext='hvsr')[source]
+

Method to export HVSRData objects in HVSRBatch container to indivdual .hvsr pickle files.

+
+
Parameters:
+
+
hvsr_export_pathfilepath, default=True

Filepath to save file. Can be either directory (which will assign a filename based on the HVSRData attributes). By default True. If True, it will first try to save each file to the same directory as input_data, then if that does not work, to the current working directory, then to the user’s home directory, by default True

+
+
extstr, optional

The extension to use for the output, by default ‘hvsr’. This is still a pickle file that can be read with pickle.load(), but will have .hvsr extension.

+
+
+
+
+
+ +
+
+export_settings(site_name=None, export_settings_path='default', export_settings_type='all', include_location=False, verbose=True)[source]
+

Method to export settings from HVSRData object in HVSRBatch object.

+

Simply calls sprit.export_settings() from specified HVSRData object in the HVSRBatch object. +See sprit.export_settings() for more details.

+
+
Parameters:
+
+
site_namestr, default=None

The name of the site whose settings should be exported. If None, will default to the first site, by default None.

+
+
export_settings_pathstr, optional

Filepath to output file. If left as ‘default’, will save as the default value in the resources directory. If that is not possible, will save to home directory, by default ‘default’

+
+
export_settings_typestr, {‘all’, ‘instrument’, ‘processing’}, optional

They type of settings to save, by default ‘all’

+
+
include_locationbool, optional

Whether to include the location information in the instrument settings, if that settings type is selected, by default False

+
+
verbosebool, optional

Whether to print output (filepath and settings) to terminal, by default True

+
+
+
+
+
+

See also

+
+
export_settings
+
+
+
+ +
+
+get_report(**kwargs)[source]
+

Method to get report from processed data, in print, graphical, or tabular format.

+
+
Returns:
+
+
Variable

May return nothing, pandas.Dataframe, or pyplot Figure, depending on input.

+
+
+
+
+
+

See also

+
+
get_report
+
+
+
+ +
+
+items()[source]
+

Method to return both the site names and the HVSRData object as a set of dict_items tuples. Functions similar to dict.items().

+
+
Returns:
+
+
_type_

_description_

+
+
+
+
+
+ +
+
+keys()[source]
+

Method to return the “keys” of the HVSRBatch object. For HVSRBatch objects, these are the site names. Functions similar to dict.keys().

+
+
Returns:
+
+
dict_keys

A dict_keys object listing the site names of each of the HVSRData objects contained in the HVSRBatch object

+
+
+
+
+
+ +
+
+plot(**kwargs)[source]
+

Method to plot data, based on the sprit.plot_hvsr() function.

+

All the same kwargs and default values apply as plot_hvsr(). +For return_fig, returns it to the ‘Plot_Report’ attribute of each HVSRData object

+
+
Returns:
+
+
_type_

_description_

+
+
+
+
+
+

See also

+
+
plot_hvsr
+
+
+
+ +
+
+report(**kwargs)[source]
+

Wrapper of get_report()

+
+

See also

+
+
get_report
+
+
+
+ +
+ +
+
+class sprit.HVSRData(*args, **kwargs)[source]
+

Bases: object

+

HVSRData is the basic data class of the sprit package. +It contains all the processed data, input parameters, and reports.

+

These attributes and objects can be accessed using square brackets or the dot accessor. For example, to access the site name, HVSRData[‘site’] and HVSRData.site will both return the site name.

+

Some of the methods that work on the HVSRData object (e.g., .plot() and .get_report()) are essentially wrappers for some of the main sprit package functions (sprit.plot_hvsr() and sprit.get_report(), respectively)

+
+
Attributes:
+
+
batch

Whether this HVSRData object is part of an HVSRBatch object.

+
+
datastream

A copy of the original obspy datastream read in.

+
+
params

Dictionary containing the parameters used to process the data

+
+
ppsds

Dictionary copy of the class object obspy.signal.spectral_estimation.PPSD().

+
+
ppsds_obspy

The original ppsd information from the obspy.signal.spectral_estimation.PPSD(), so as to keep original if copy is manipulated/changed.

+
+
+
+
+

Methods

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

copy([type])

Make a copy of the HVSRData object.

export([hvsr_export_path, ext])

Method to export HVSRData objects to .hvsr pickle files.

export_settings([export_settings_path, ...])

Method to export settings from HVSRData object.

get_report(**kwargs)

Method to get report from processed data, in print, graphical, or tabular format.

items()

Method to return the "items" of the HVSRData object.

keys()

Method to return the "keys" of the HVSRData object.

plot(**kwargs)

Method to plot data, wrapper of sprit.plot_hvsr()

report(**kwargs)

Wrapper of get_report()

+
+
+property batch
+

Whether this HVSRData object is part of an HVSRBatch object. This is used throughout the code to help direct the object into the proper processing pipeline.

+
+
Returns:
+
+
bool

True if HVSRData object is part of HVSRBatch object, otherwise, False

+
+
+
+
+
+ +
+
+copy(type='shallow')[source]
+

Make a copy of the HVSRData object. Uses python copy module.

+
+
Parameters:
+
+
typestr {‘shallow’, ‘deep’}

Based on input, creates either a shallow or deep copy of the HVSRData object. Shallow is equivalent of copy.copy(). Input of type=’deep’ is equivalent of copy.deepcopy() (still experimental). Defaults to shallow.

+
+
+
+
+
+ +
+
+property datastream
+

A copy of the original obspy datastream read in. This helps to retain the original data even after processing is carried out.

+
+
Returns:
+
+
obspy.core.Stream.stream

Obspy stream

+
+
+
+
+
+ +
+
+export(hvsr_export_path=None, ext='hvsr')[source]
+

Method to export HVSRData objects to .hvsr pickle files.

+
+
Parameters:
+
+
hvsr_export_pathfilepath, default=True

Filepath to save file. Can be either directory (which will assign a filename based on the HVSRData attributes). +By default True. +If True, it will first try to save each file to the same directory as input_data, then if that does not work, to the current working directory, then to the user’s home directory, by default True

+
+
extstr, optional

The extension to use for the output, by default ‘hvsr’. This is still a pickle file that can be read with pickle.load(), but will have .hvsr extension.

+
+
+
+
+
+ +
+
+export_settings(export_settings_path='default', export_settings_type='all', include_location=False, verbose=True)[source]
+

Method to export settings from HVSRData object. Simply calls sprit.export_settings() from the HVSRData object. See sprit.export_settings() for more details.

+
+
Parameters:
+
+
export_settings_pathstr, optional

Filepath to output file. If left as ‘default’, will save as the default value in the resources directory. If that is not possible, will save to home directory, by default ‘default’

+
+
export_settings_typestr, {‘all’, ‘instrument’, ‘processing’}, optional

They type of settings to save, by default ‘all’

+
+
include_locationbool, optional

Whether to include the location information in the instrument settings, if that settings type is selected, by default False

+
+
verbosebool, optional

Whether to print output (filepath and settings) to terminal, by default True

+
+
+
+
+
+ +
+
+get_report(**kwargs)[source]
+

Method to get report from processed data, in print, graphical, or tabular format.

+
+
Returns:
+
+
Variable

May return nothing, pandas.Dataframe, or pyplot Figure, depending on input.

+
+
+
+
+
+

See also

+
+
get_report
+
+
+
+ +
+
+items()[source]
+

Method to return the “items” of the HVSRData object. For HVSRData objects, this is a dict_items object with the keys and values in tuples. Functions similar to dict.items().

+
+
Returns:
+
+
dict_items

A dict_items object of the HVSRData objects attributes, parameters, etc.

+
+
+
+
+
+ +
+
+keys()[source]
+

Method to return the “keys” of the HVSRData object. For HVSRData objects, these are the attributes and parameters of the object. Functions similar to dict.keys().

+
+
Returns:
+
+
dict_keys

A dict_keys object of the HVSRData objects attributes, parameters, etc.

+
+
+
+
+
+ +
+
+property params
+

Dictionary containing the parameters used to process the data

+
+
Returns:
+
+
dict

Dictionary containing the process parameters

+
+
+
+
+
+ +
+
+plot(**kwargs)[source]
+

Method to plot data, wrapper of sprit.plot_hvsr()

+
+
Returns:
+
+
matplotlib.Figure, matplotlib.Axis (if return_fig=True)
+
+
+
+
+

See also

+
+
plot_hvsr
+
plot_azimuth
+
+
+
+ +
+
+property ppsds
+

Dictionary copy of the class object obspy.signal.spectral_estimation.PPSD(). The dictionary copy allows manipulation of the data in PPSD, whereas that data cannot be easily manipulated in the original Obspy object.

+
+
Returns:
+
+
dict

Dictionary copy of the PPSD information from generate_ppsds()

+
+
+
+
+
+ +
+
+property ppsds_obspy
+

The original ppsd information from the obspy.signal.spectral_estimation.PPSD(), so as to keep original if copy is manipulated/changed.

+
+ +
+
+report(**kwargs)[source]
+

Wrapper of get_report()

+
+

See also

+
+
get_report
+
+
+
+ +
+ +
+
+sprit.assert_check(var, cond=None, var_type=None, error_message='Output not valid', verbose=False)[source]
+
+ +
+
+sprit.batch_data_read(batch_data, batch_type='table', param_col=None, batch_params=None, verbose=False, **readcsv_getMeta_fetch_kwargs)[source]
+

Function to read data in data as a batch of multiple data files. This is best used through sprit.fetch_data(*args, source=’batch’, **other_kwargs).

+
+
Parameters:
+
+
batch_datafilepath or list

Input data information for how to read in data as batch. Can be filepath or list of filepaths/stream objects. +If filepath, should point to .csv (or similar that can be read by pandas.read_csv()) with batch data information.

+
+
batch_typestr, optional

Type of batch read, only ‘table’ and ‘filelist’ accepted. +If ‘table’, will read data from a file read in using pandas.read_csv(), by default ‘table’

+
+
param_colNone or str, optional

Name of parameter column from batch information file. Only used if a batch_type=’table’ and single parameter column is used, rather than one column per parameter (for single parameter column, parameters are formatted with = between keys/values and , between item pairs), by default None

+
+
batch_paramslist, dict, or None, default = None

Parameters to be used if batch_type=’filelist’. If it is a list, needs to be the same length as batch_data. If it is a dict, will be applied to all files in batch_data and will combined with extra keyword arguments caught by **readcsv_getMeta_fetch_kwargs.

+
+
verbosebool, optional

Whether to print information to terminal during batch read, by default False

+
+
**readcsv_getMeta_fetch_kwargs

Keyword arguments that will be read into pandas.read_csv(), sprit.input_params, sprit.get_metadata(), and/or sprit.fetch_data()

+
+
+
+
Returns:
+
+
hvsrBatch

HVSRBatch object with each item representing a different HVSRData object

+
+
+
+
Raises:
+
+
IndexError

_description_

+
+
+
+
+
+ +
+
+sprit.calculate_azimuth(hvsr_data, azimuth_angle=30, azimuth_type='multiple', azimuth_unit='degrees', show_az_plot=False, verbose=False, **plot_azimuth_kwargs)[source]
+

Function to calculate azimuthal horizontal component at specified angle(s). Adds each new horizontal component as a radial component to obspy.Stream object at hvsr_data[‘stream’]

+
+
Parameters:
+
+
hvsr_dataHVSRData

Input HVSR data

+
+
azimuth_angleint, default=10

If azimuth_type=’multiple’, this is the angular step (in unit azimuth_unit) of each of the azimuthal measurements. +If azimuth_type=’single’ this is the angle (in unit azimuth_unit) of the single calculated azimuthal measruement. By default 10.

+
+
azimuth_typestr, default=’multiple’

What type of azimuthal measurement to make, by default ‘multiple’. +If ‘multiple’ (or {‘multi’, ‘mult’, ‘m’}), will take a measurement at each angular step of azimuth_angle of unit azimuth_unit. +If ‘single’ (or {‘sing’, ‘s’}), will take a single azimuthal measurement at angle specified in azimuth_angle.

+
+
azimuth_unitstr, default=’degrees’

Angular unit used to specify azimuth_angle parameter. By default ‘degrees’. +If ‘degrees’ (or {‘deg’, ‘d’}), will use degrees. +If ‘radians’ (or {‘rad’, ‘r’}), will use radians.

+
+
show_az_plotbool, default=False

Whether to show azimuthal plot, by default False.

+
+
verbosebool, default=False

Whether to print terminal output, by default False

+
+
+
+
Returns:
+
+
HVSRData

Updated HVSRData object specified in hvsr_data with hvsr_data[‘stream’] attribute containing additional components (EHR-*), +with * being zero-padded (3 digits) azimuth angle in degrees.

+
+
+
+
+
+ +
+
+sprit.catch_errors(func)[source]
+
+ +
+
+sprit.check_gui_requirements()[source]
+
+ +
+
+sprit.check_mark(incolor=False, interminal=False)[source]
+

The default Windows terminal is not able to display the check mark character correctly. +This function returns another displayable character if platform is Windows

+
+ +
+
+sprit.check_peaks(hvsr_data, hvsr_band=[0.4, 40], peak_selection='max', peak_freq_range=[0.4, 40], azimuth='HV', verbose=False)[source]
+

Function to run tests on HVSR peaks to find best one and see if it passes quality checks

+
+
Parameters:
+
+
hvsr_datadict

Dictionary containing all the calculated information about the HVSR data (i.e., hvsr_out returned from process_hvsr)

+
+
hvsr_bandtuple or list, default=[0.4, 40]

2-item tuple or list with lower and upper limit of frequencies to analyze

+
+
peak_selectionstr or numeric, default=’max’

How to select the “best” peak used in the analysis. For peak_selection=”max” (default value), the highest peak within peak_freq_range is used. +For peak_selection=’scored’, an algorithm is used to select the peak based in part on which peak passes the most SESAME criteria. +If a numeric value is used (e.g., int or float), this should be a frequency value to manually select as the peak of interest.

+
+
peak_freq_rangetuple or list, default=[0.4, 40];

The frequency range within which to check for peaks. If there is an HVSR curve with multiple peaks, this allows the full range of data to be processed while limiting peak picks to likely range.

+
+
verbosebool, default=False

Whether to print results and inputs to terminal.

+
+
+
+
Returns:
+
+
hvsr_dataHVSRData or HVSRBatch object

Object containing previous input data, plus information about peak tests

+
+
+
+
+
+ +
+
+sprit.check_tsteps(hvsr_data)[source]
+

Check time steps of PPSDS to make sure they are all the same length

+
+ +
+
+sprit.check_xvalues(ppsds)[source]
+

Check x_values of PPSDS to make sure they are all the same length

+
+ +
+
+sprit.checkifpath(filepath, sample_list='', verbose=False, raise_error=False)[source]
+

Support function to check if a filepath is a pathlib.Path object and tries to convert if not

+
+
Parameters:
+
+
filepathstr or pathlib.Path, or anything

Filepath to check. If not a valid filepath, will not convert and raises error

+
+
+
+
Returns:
+
+
filepathpathlib.Path

pathlib.Path of filepath

+
+
+
+
+
+ +
+
+sprit.create_jupyter_ui()[source]
+
+ +
+
+sprit.export_data(hvsr_data, hvsr_export_path=None, ext='hvsr', verbose=False)[source]
+

Export data into pickle format that can be read back in using import_data() so data does not need to be processed each time. +Default extension is .hvsr but it is still a pickled file that can be read in using pickle.load().

+
+
Parameters:
+
+
hvsr_dataHVSRData or HVSRBatch

Data to be exported

+
+
hvsr_export_pathstr or filepath object, default = None

String or filepath object to be read by pathlib.Path() and/or a with open(hvsr_export_path, ‘wb’) statement. If None, defaults to input input_data directory, by default None

+
+
extstr, default = ‘hvsr’

Filepath extension to use for data file, by default ‘hvsr’

+
+
+
+
+
+ +
+
+sprit.export_settings(hvsr_data, export_settings_path='default', export_settings_type='all', include_location=False, verbose=True)[source]
+

Save settings to json file

+
+
Parameters:
+
+
export_settings_pathstr, default=”default”

Where to save the json file(s) containing the settings, by default ‘default’. +If “default,” will save to sprit package resources. Otherwise, set a filepath location you would like for it to be saved to. +If ‘all’ is selected, a directory should be supplied. +Otherwise, it will save in the directory of the provided file, if it exists. Otherwise, defaults to the home directory.

+
+
export_settings_typestr, {‘all’, ‘instrument’, ‘processing’}

What kind of settings to save. +If ‘all’, saves all possible types in their respective json files. +If ‘instrument’, save the instrument settings to their respective file. +If ‘processing’, saves the processing settings to their respective file. By default ‘all’

+
+
include_locationbool, default=False, input CRS

Whether to include the location parametersin the exported settings document.This includes xcoord, ycoord, elevation, elev_unit, and input_crs

+
+
verbosebool, default=True

Whether to print outputs and information to the terminal

+
+
+
+
+
+ +
+
+sprit.fetch_data(params, source='file', data_export_path=None, data_export_format='mseed', detrend='spline', detrend_order=2, update_metadata=True, plot_input_stream=False, plot_engine='matplotlib', show_plot=True, verbose=False, **kwargs)[source]
+

Fetch ambient seismic data from a source to read into obspy stream

+
+
Parameters:
+
+
paramsdict
+
Dictionary containing all the necessary params to get data.

Parameters defined using input_params() function.

+
+
+
+
sourcestr, {‘raw’, ‘dir’, ‘file’, ‘batch’}
+
String indicating where/how data file was created. For example, if raw data, will need to find correct channels.

‘raw’ finds raspberry shake data, from raw output copied using scp directly from Raspberry Shake, either in folder or subfolders; +‘dir’ is used if the day’s 3 component files (currently Raspberry Shake supported only) are all 3 contained in a directory by themselves. +‘file’ is used if the params[‘input_data’] specified in input_params() is the direct filepath to a single file to be read directly into an obspy stream. +‘batch’ is used to read a list or specified set of seismic files.

+
+

Most commonly, a csv file can be read in with all the parameters. Each row in the csv is a separate file. Columns can be arranged by parameter.

+
+
+
+
+
data_export_pathNone or str or pathlib obj, default=None

If None (or False), data is not trimmed in this function. +Otherwise, this is the directory to save trimmed and exported data.

+
+
data_export_format: str=’mseed’

If data_export_path is not None, this is the format in which to save the data

+
+
detrendstr or bool, default=’spline’

If False, data is not detrended. +Otherwise, this should be a string accepted by the type parameter of the obspy.core.trace.Trace.detrend method: https://docs.obspy.org/packages/autogen/obspy.core.trace.Trace.detrend.html

+
+
detrend_orderint, default=2

If detrend parameter is ‘spline’ or ‘polynomial’, this is passed directly to the order parameter of obspy.core.trace.Trace.detrend method.

+
+
update_metadatabool, default=True

Whether to update the metadata file, used primarily with Raspberry Shake data which uses a generic inventory file.

+
+
plot_input_streambool, default=False

Whether to plot the raw input stream. This plot includes a spectrogram (Z component) and the raw (with decimation for speed) plots of each component signal.

+
+
plot_enginestr, default=’matplotlib’

Which plotting library/engine to use for plotting the Input stream. Options are ‘matplotlib’, ‘plotly’, or ‘obspy’ (not case sensitive).

+
+
verbosebool, default=False

Whether to print outputs and inputs to the terminal

+
+
**kwargs

Keywords arguments, primarily for ‘batch’ and ‘dir’ sources

+
+
+
+
Returns:
+
+
paramsHVSRData or HVSRBatch object

Same as params parameter, but with an additional “stream” attribute with an obspy data stream with 3 traces: Z (vertical), N (North-south), and E (East-west)

+
+
+
+
+
+ +
+
+sprit.format_time(inputDT, tzone='UTC')[source]
+

Private function to format time, used in other functions

+

Formats input time to datetime objects in utc

+
+
Parameters:
+
+
inputDTstr or datetime obj

Input datetime. Can include date and time, just date (time inferred to be 00:00:00.00) or just time (if so, date is set as today)

+
+
tzonestr=’utc’ or int {‘utc’, ‘local’}
+
Timezone of data entry.

If string and not utc, assumed to be timezone of computer running the process. +If int, assumed to be offset from UTC (e.g., CST in the United States is -6; CDT in the United States is -5)

+
+
+
+
+
+
Returns:
+
+
outputTimeObjdatetime object in UTC

Output datetime.datetime object, now in UTC time.

+
+
+
+
+
+ +
+
+sprit.generate_ppsds(hvsr_data, azimuthal_ppsds=False, verbose=False, **ppsd_kwargs)[source]
+

Generates PPSDs for each channel

+

Channels need to be in Z, N, E order +Info on PPSD creation here: https://docs.obspy.org/packages/autogen/obspy.signal.spectral_estimation.PPSD.html

+
+
Parameters:
+
+
hvsr_datadict, HVSRData object, or HVSRBatch object

Data object containing all the parameters and other data of interest (stream and paz, for example)

+
+
azimuthal_ppsdsbool, default=False

Whether to generate PPSDs for azimuthal data

+
+
verbosebool, default=True

Whether to print inputs and results to terminal

+
+
**ppsd_kwargsdict

Dictionary with keyword arguments that are passed directly to obspy.signal.PPSD. +If the following keywords are not specified, their defaults are amended in this function from the obspy defaults for its PPSD function. Specifically:

+
+
    +
  • ppsd_length defaults to 30 (seconds) here instead of 3600

  • +
  • skip_on_gaps defaults to True instead of False

  • +
  • period_step_octaves defaults to 0.03125 instead of 0.125

  • +
+
+
+
+
+
Returns:
+
+
ppsdsHVSRData object

Dictionary containing entries with ppsds for each channel

+
+
+
+
+
+ +
+
+sprit.get_char(in_char)[source]
+

Outputs character with proper encoding/decoding

+
+ +
+
+sprit.get_metadata(params, write_path='', update_metadata=True, source=None, **read_inventory_kwargs)[source]
+

Get metadata and calculate or get paz parameter needed for PPSD

+
+
Parameters:
+
+
paramsdict
+
Dictionary containing all the input and other parameters needed for processing

Ouput from input_params() function

+
+
+
+
write_pathstr
+
String with output filepath of where to write updated inventory or metadata file

If not specified, does not write file

+
+
+
+
update_metadatabool

Whether to update the metadata file itself, or just read as-is. If using provided raspberry shake metadata file, select True.

+
+
sourcestr, default=None

This passes the source variable value to _read_RS_metadata. It is expected that this is passed directly from the source parameter of sprit.fetch_data()

+
+
+
+
Returns:
+
+
paramsdict

Modified input dictionary with additional key:value pair containing paz dictionary (key = “paz”)

+
+
+
+
+
+ +
+
+sprit.get_report(hvsr_results, report_formats=['print', 'table', 'plot', 'html', 'pdf'], azimuth='HV', plot_type='HVSR p ann C+ p ann Spec p ann', plot_engine='matplotlib', show_print_report=True, show_table_report=False, show_plot_report=True, show_html_report=False, show_pdf_report=True, suppress_report_outputs=False, show_report_outputs=False, csv_handling='append', report_export_format=None, report_export_path=None, verbose=False, **kwargs)[source]
+

Generate and/or print and/or export a report of the HVSR analysis in a variety of formats.

+

Formats include: +* ‘print’: A (monospace) text summary of the HVSR results +* ‘table’: A pandas.DataFrame summary of the HVSR Results.

+
+

This is useful for copy/pasting directly into a larger worksheet.

+
+
    +
  • ‘plot’: A plot summary of the HVSR results, generated using the plot_hvsr() function.

  • +
  • ‘html’: An HTML document/text of the HVSR results. This includes the table, print, and plot reports in one document.

  • +
  • +
    ‘pdf’: A PDF document showing the summary of the HVSR Results.

    The PDF report is simply the HTML report saved to an A4-sized PDF document.

    +
    +
    +
  • +
+
+
Parameters:
+
+
hvsr_resultsdict

Dictionary containing all the information about the processed hvsr data

+
+
report_formats{‘table’, ‘print’, plot}

Format in which to print or export the report. +The following report_formats return the following items in the following attributes:

+
+
    +
  • ‘plot’: hvsr_results[‘Print_Report’] as a str

  • +
  • ‘print’: hvsr_results[‘HV_Plot’] - matplotlib.Figure object

  • +
  • +
    ‘table’: hvsr_results[‘Table_Report’]- pandas.DataFrame object
      +
    • list/tuple - a list or tuple of the above objects, in the same order they are in the report_formats list

    • +
    +
    +
    +
  • +
  • ‘html’: hvsr_results[‘HTML_Report’] - a string containing the text for an HTML document

  • +
  • ‘pdf’: currently does not save to the HVSRData object itself, can only be saved to the disk directly

  • +
+
+
+
plot_typestr, default = ‘HVSR p ann C+ p ann Spec

What type of plot to plot, if ‘plot’ part of report_formats input

+
+
azimuthstr, default = ‘HV’

Which azimuth to plot, by default “HV” which is the main “azimuth” combining the E and N components

+
+
csv_handlingstr, {‘append’, ‘overwrite’, ‘keep/rename’}

How to handle table report outputs if the designated csv output file already exists. By default, appends the new information to the end of the existing file.

+
+
suppress_report_outputsbool, default=False

If True, only reads output to appropriate attribute of data class (ie, print does not print, only reads text into variable). If False, performs as normal.

+
+
report_export_formatlist or str, default=[‘pdf’]

A string or list of strings indicating which report formats should be exported to disk.

+
+
report_export_pathNone, bool, or filepath, default = None

If None or False, does not export; if True, will export to same directory as the input_data parameter in the input_params() function. +Otherwise, it should be a string or path object indicating where to export results. May be a file or directory. +If a directory is specified, the filename will be “<site_name>_<acq_date>_<UTC start time>-<UTC end time>”. +The extension/suffix defaults to png for report_formats=”plot”, csv for ‘table’, txt for ‘print’, html for ‘html’, and pdf for ‘pdf.’

+
+
verbosebool, default=True

Whether to print the results to terminal. This is the same output as report_formats=’print’, and will not repeat if that is already selected

+
+
+
+
Returns:
+
+
sprit.HVSRData
+
+
+
+
+ +
+
+sprit.gui(kind='browser')[source]
+

Function to open a graphical user interface (gui)

+
+
Parameters:
+
+
kindstr, optional

What type of gui to open. “default” opens regular windowed interface, +“widget” opens jupyter widget’ +“lite” open lite (pending update), by default ‘default’

+
+
+
+
+
+ +
+
+sprit.has_required_channels(stream)[source]
+
+ +
+
+sprit.import_data(import_filepath, data_format='pickle')[source]
+

Function to import .hvsr (or other extension) data exported using export_data() function

+
+
Parameters:
+
+
import_filepathstr or path object

Filepath of file created using export_data() function. This is usually a pickle file with a .hvsr extension

+
+
data_formatstr, default=’pickle’

Type of format data is in. Currently, only ‘pickle’ supported. Eventually, json or other type may be supported, by default ‘pickle’.

+
+
+
+
Returns:
+
+
HVSRData or HVSRBatch object
+
+
+
+
+ +
+
+sprit.import_settings(settings_import_path, settings_import_type='instrument', verbose=False)[source]
+
+ +
+
+sprit.input_params(input_data, site='HVSR Site', id_prefix=None, network='AM', station='RAC84', loc='00', channels=['EHZ', 'EHN', 'EHE'], acq_date='2024-10-30', starttime=UTCDateTime(2024, 10, 30, 0, 0), endtime=UTCDateTime(2024, 10, 30, 23, 59, 59, 999999), tzone='UTC', xcoord=-88.2290526, ycoord=40.1012122, elevation=755, input_crs=None, output_crs=None, elev_unit='meters', depth=0, instrument='Raspberry Shake', metapath=None, hvsr_band=[0.4, 40], peak_freq_range=[0.4, 40], processing_parameters={}, verbose=False)[source]
+

Function for designating input parameters for reading in and processing data

+
+
Parameters:
+
+
input_datastr or pathlib.Path object

Filepath of data. This can be a directory or file, but will need to match with what is chosen later as the source parameter in fetch_data()

+
+
sitestr, default=”HVSR Site”

Site name as designated by user for ease of reference. Used for plotting titles, filenames, etc.

+
+
id_prefixstr, default=None

A prefix that may be used to create unique identifiers for each site. +The identifier created is saved as the [‘HVSR_ID’] attribute of the HVSRData object, +and is equivalent to the following formatted string: +f”{id_prefix}-{acq_date.strftime(“%Y%m%d”)}-{starttime.strftime(“%H%M”)}-{station}”.

+
+
networkstr, default=’AM’

The network designation of the seismometer. This is necessary for data from Raspberry Shakes. ‘AM’ is for Amateur network, which fits Raspberry Shakes.

+
+
stationstr, default=’RAC84’

The station name of the seismometer. This is necessary for data from Raspberry Shakes.

+
+
locstr, default=’00’

Location information of the seismometer.

+
+
channelslist, default=[‘EHZ’, ‘EHN’, ‘EHE’]

The three channels used in this analysis, as a list of strings. Preferred that Z component is first, but not necessary

+
+
acq_datestr, int, date object, or datetime object

If string, preferred format is ‘YYYY-MM-DD’. +If int, this will be interpreted as the time_int of year of current year (e.g., 33 would be Feb 2 of current year) +If date or datetime object, this will be the date. Make sure to account for time change when converting to UTC (if UTC is the following time_int, use the UTC time_int).

+
+
starttimestr, time object, or datetime object, default=’00:00:00.00’

Start time of data stream. This is necessary for Raspberry Shake data in ‘raw’ form, or for trimming data. Format can be either ‘HH:MM:SS.micros’ or ‘HH:MM’ at minimum.

+
+
endtimestr, time obejct, or datetime object, default=’23:59:99.99’

End time of data stream. This is necessary for Raspberry Shake data in ‘raw’ form, or for trimming data. Same format as starttime.

+
+
tzonestr or int, default = ‘UTC’

Timezone of input data. If string, ‘UTC’ will use the time as input directly. Any other string value needs to be a TZ identifier in the IANA database, a wikipedia page of these is available here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. +If int, should be the int value of the UTC offset (e.g., for American Eastern Standard Time: -5). +This is necessary for Raspberry Shake data in ‘raw’ format.

+
+
xcoordfloat, default=-88.2290526

Longitude (or easting, or, generally, X coordinate) of data point, in Coordinate Reference System (CRS) designated by input_crs. Currently only used in table output, but will likely be used in future for mapping/profile purposes.

+
+
ycoordfloat, default=40.1012122

Latitute (or northing, or, generally, X coordinate) of data point, in Coordinate Reference System (CRS) designated by input_crs. Currently only used in table output, but will likely be used in future for mapping/profile purposes.

+
+
input_crsstr or other format read by pyproj, default=’EPSG:4326’

Coordinate reference system of input data, as used by pyproj.CRS.from_user_input()

+
+
output_crsstr or other format read by pyproj, default=’EPSG:4326’

Coordinate reference system to which input data will be transformed, as used by pyproj.CRS.from_user_input()

+
+
elevationfloat, default=755

Surface elevation of data point. Not currently used (except in table output), but will likely be used in the future.

+
+
depthfloat, default=0

Depth of seismometer. Not currently used, but will likely be used in the future.

+
+
instrumentstr {‘Raspberry Shake’, “Tromino”}

Instrument from which the data was acquired.

+
+
metapathstr or pathlib.Path object, default=None

Filepath of metadata, in format supported by obspy.read_inventory. If default value of None, will read from resources folder of repository (only supported for Raspberry Shake).

+
+
hvsr_bandlist, default=[0.4, 40]

Two-element list containing low and high “corner” frequencies (in Hz) for processing. This can specified again later.

+
+
peak_freq_rangelist or tuple, default=[0.4, 40]

Two-element list or tuple containing low and high frequencies (in Hz) that are used to check for HVSR Peaks. This can be a tigher range than hvsr_band, but if larger, it will still only use the hvsr_band range.

+
+
processing_parameters={}dict or filepath, default={}

If filepath, should point to a .proc json file with processing parameters (i.e, an output from sprit.export_settings()). +Note that this only applies to parameters for the functions: ‘fetch_data’, ‘remove_noise’, ‘generate_ppsds’, ‘process_hvsr’, ‘check_peaks’, and ‘get_report.’ +If dictionary, dictionary containing nested dictionaries of function names as they key, and the parameter names/values as key/value pairs for each key. +If a function name is not present, or if a parameter name is not present, default values will be used. +For example:

+
+

{ ‘fetch_data’ : {‘source’:’batch’, ‘data_export_path’:”/path/to/trimmed/data”, ‘data_export_format’:’mseed’, ‘detrend’:’spline’, ‘plot_input_stream’:True, ‘verbose’:False, kwargs:{‘kwargskey’:’kwargsvalue’}} }

+
+
+
verbosebool, default=False

Whether to print output and results to terminal

+
+
+
+
Returns:
+
+
paramssprit.HVSRData

sprit.HVSRData class containing input parameters, including data file path and metadata path. This will be used as an input to other functions. If batch processing, params will be converted to batch type in fetch_data() step.

+
+
+
+
+
+ +
+
+sprit.make_it_classy(input_data, verbose=False)[source]
+
+ +
+
+sprit.parse_plot_string(plot_string)[source]
+
+ +
+
+sprit.plot_azimuth(hvsr_data, fig=None, ax=None, show_azimuth_peaks=False, interpolate_azimuths=True, show_azimuth_grid=False, show_plot=True, **plot_azimuth_kwargs)[source]
+

Function to plot azimuths when azimuths are calculated

+
+
Parameters:
+
+
hvsr_dataHVSRData or HVSRBatch

HVSRData that has gone through at least the sprit.fetch_data() step, and before sprit.generate_ppsds()

+
+
show_azimuth_peaksbool, optional

Whether to display the peak value at each azimuth calculated on the chart, by default False

+
+
interpolate_azimuthsbool, optional

Whether to interpolate the azimuth data to get a smoother plot. +This is just for visualization, does not change underlying data. +It takes a lot of time to process the data, but interpolation for vizualization can happen fairly fast. By default True.

+
+
show_azimuth_gridbool, optional

Whether to display the grid on the chart, by default False

+
+
+
+
Returns:
+
+
matplotlib.Figure, matplotlib.Axis

Figure and axis of resulting azimuth plot

+
+
+
+
+
+ +
+
+sprit.plot_hvsr(hvsr_data, plot_type='HVSR ann p C+ ann p SPEC ann p', azimuth='HV', use_subplots=True, fig=None, ax=None, return_fig=False, plot_engine='matplotlib', save_dir=None, save_suffix='', show_legend=False, show_plot=True, close_figs=False, clear_fig=True, **kwargs)[source]
+

Function to plot HVSR data

+
+
Parameters:
+
+
hvsr_datadict

Dictionary containing output from process_hvsr function

+
+
plot_typestr or list, default = ‘HVSR ann p C+ ann p SPEC ann p’

The plot_type of plot(s) to plot. If list, will plot all plots listed +- ‘HVSR’ - Standard HVSR plot, including standard deviation. Options are included below:

+
+
    +
  • ‘p’ shows a vertical dotted line at frequency of the “best” peak

  • +
  • ‘ann’ annotates the frequency value of of the “best” peak

  • +
  • ‘all’ shows all the peaks identified in check_peaks() (by default, only the max is identified)

  • +
  • ‘t’ shows the H/V curve for all time windows

  • +
  • ‘tp’ shows all the peaks from the H/V curves of all the time windows

  • +
  • ‘fr’ shows the window within which SpRIT will search for peak frequencies, as set by peak_freq_range

  • +
  • +
    ‘test’ shows a visualization of the results of the peak validity test(s). Examples:
      +
    • ‘tests’ visualizes the results of all the peak tests (not the curve tests)

    • +
    • +
      ‘test12’ shows the results of tests 1 and 2.
        +
      • Append any number 1-6 after ‘test’ to show a specific test result visualized

      • +
      +
      +
      +
    • +
    +
    +
    +
  • +
+
+
    +
  • +
    ‘COMP’ - plot of the PPSD curves for each individual component (“C” also works)
      +
    • ‘+’ (as a suffix in ‘C+’ or ‘COMP+’) plots C on a plot separate from HVSR (C+ is default, but without + will plot on the same plot as HVSR)

    • +
    • ‘p’ shows a vertical dotted line at frequency of the “best” peak

    • +
    • ‘ann’ annotates the frequency value of of the “best” peak

    • +
    • ‘all’ shows all the peaks identified in check_peaks() (by default, only the max is identified)

    • +
    • ‘t’ shows the H/V curve for all time windows

    • +
    +
    +
    +
  • +
  • +
    ‘SPEC’ - spectrogram style plot of the H/V curve over time
      +
    • ‘p’ shows a horizontal dotted line at the frequency of the “best” peak

    • +
    • ‘ann’ annotates the frequency value of the “best” peak

    • +
    • ‘all’ shows all the peaks identified in check_peaks()

    • +
    • ‘tp’ shows all the peaks of the H/V curve at all time windows

    • +
    +
    +
    +
  • +
  • +
    ‘AZ’ - circular plot of calculated azimuthal HV curves, similar in style to SPEC plot.
      +
    • ‘p’ shows a point at each calculated (not interpolated) azimuth peak

    • +
    • ‘g’ shows grid lines at various angles

    • +
    • +
      ‘i’ interpolates so that there is an interpolated azimuth at each degree interval (1 degree step)

      This is the default, so usually ‘i’ is not needed.

      +
      +
      +
    • +
    • ‘-i’ prohibits interpolation (only shows the calculated azimuths, as determined by azimuth_angle (default = 30))

    • +
    +
    +
    +
  • +
+
+
azimuthstr, default = ‘HV’

What ‘azimuth’ to plot, default being standard N E components combined

+
+
use_subplotsbool, default = True

Whether to output the plots as subplots (True) or as separate plots (False)

+
+
figmatplotlib.Figure, default = None

If not None, matplotlib figure on which plot is plotted

+
+
axmatplotlib.Axis, default = None

If not None, matplotlib axis on which plot is plotted

+
+
return_figbool

Whether to return figure and axis objects

+
+
plot_enginestr, default=’Matplotlib’

Which engine to use for plotting. Both “matplotlib” and “plotly” are acceptable. For shorthand, ‘mpl’, ‘m’ also work for matplotlib; ‘plty’ or ‘p’ also work for plotly. Not case sensitive.

+
+
save_dirstr or None

Directory in which to save figures

+
+
save_suffixstr

Suffix to add to end of figure filename(s), if save_dir is used

+
+
show_legendbool, default=False

Whether to show legend in plot

+
+
show_plotbool

Whether to show plot

+
+
close_figsbool, default=False

Whether to close figures before plotting

+
+
clear_figbool, default=True

Whether to clear figures before plotting

+
+
**kwargskeyword arguments

Keyword arguments for matplotlib.pyplot

+
+
+
+
Returns:
+
+
fig, axmatplotlib figure and axis objects

Returns figure and axis matplotlib.pyplot objects if return_fig=True, otherwise, simply plots the figures

+
+
+
+
+
+ +
+
+sprit.plot_outlier_curves(hvsr_data, plot_engine='plotly', rmse_thresh=0.98, use_percentile=True, use_hv_curve=False, from_roc=False, show_plot=True, verbose=False)[source]
+
+ +
+
+sprit.plot_preview(hv_data, stream=None, preview_fig=None, spectrogram_component='Z', show_plot=True, return_fig=False)[source]
+
+ +
+
+sprit.plot_results(hv_data, plot_string='HVSR p ann C+ p SPEC ann', results_fig=None, results_graph_widget=None, return_fig=False, show_results_plot=True)[source]
+
+ +
+
+sprit.process_hvsr(hvsr_data, horizontal_method=None, smooth=True, freq_smooth='konno ohmachi', f_smooth_width=40, resample=True, outlier_curve_rmse_percentile=False, azimuth=None, verbose=False)[source]
+

Process the input data and get HVSR data

+

This is the main function that uses other (private) functions to do +the bulk of processing of the HVSR data and the data quality checks.

+
+
Parameters:
+
+
hvsr_dataHVSRData or HVSRBatch

Data object containing all the parameters input and generated by the user (usually, during sprit.input_params(), sprit.fetch_data(), sprit.generate_ppsds() and/or sprit.remove_noise()).

+
+
horizontal_methodint or str, default=3
+
Method to use for combining the horizontal components. Default is 3) Geometric Mean
    +
  1. (not used)

  2. +
  3. ‘Diffuse field assumption’ H = √( (eie_E + eie_N) / eie_Z), eie = equal interval energy

  4. +
  5. ‘Arithmetic Mean’ H ≡ (HN + HE)/2

  6. +
  7. ‘Geometric Mean’ H ≡ √(HN · HE), recommended by the SESAME project (2004)

  8. +
  9. ‘Vector Summation’ H ≡ √(HN^2 + HE^2)

  10. +
  11. ‘Quadratic Mean’ H ≡ √(HN^2 + HE^2)/2

  12. +
  13. ‘Maximum Horizontal Value’ H ≡ max {HN, HE}

  14. +
  15. ‘Minimum Horizontal Valey’ H ≡ min {HN, HE}

  16. +
  17. ‘Single Azimuth’ H = H2·cos(az) + H1·sin(az)

  18. +
+
+
+
+
smoothbool, default=True
+
bool or int may be used.

If True, default to smooth H/V curve to using savgoy filter with window length of 51 (works well with default resample of 1000 pts) +If int, the length of the window in the savgoy filter.

+
+
+
+
freq_smoothstr {‘konno ohmachi’, ‘constant’, ‘proportional’}
+
Which frequency smoothing method to use. By default, uses the ‘konno ohmachi’ method.
+
+
+

See here for more information: https://www.geopsy.org/documentation/geopsy/hv-processing.html

+
+
f_smooth_widthint, default = 40
    +
  • For ‘konno ohmachi’: passed directly to the bandwidth parameter of the konno_ohmachi_smoothing() function, determines the width of the smoothing peak, with lower values resulting in broader peak. Must be > 0.

  • +
  • For ‘constant’: the size of a triangular smoothing window in the number of frequency steps

  • +
  • For ‘proportional’: the size of a triangular smoothing window in percentage of the number of frequency steps (e.g., if 1000 frequency steps/bins and f_smooth_width=40, window would be 400 steps wide)

  • +
+
+
resamplebool, default = True
+
bool or int.

If True, default to resample H/V data to include 1000 frequency values for the rest of the analysis +If int, the number of data points to interpolate/resample/smooth the component psd/HV curve data to.

+
+
+
+
outlier_curve_rmse_percentilebool, float, default = False

If False, outlier curve removal is not carried out here. +If True, defaults to 98 (98th percentile). +Otherwise, float of percentile used as rmse_thresh of remove_outlier_curve().

+
+
azimuthfloat, default = None

The azimuth angle to use when method is single azimuth.

+
+
verbosebool, defualt=False

Whether to print output to terminal

+
+
+
+
Returns:
+
+
hvsr_outdict

Dictionary containing all the information about the data, including input parameters

+
+
+
+
+
+ +
+
+sprit.read_from_RS(dest, src='SHAKENAME@HOSTNAME:/opt/data/archive/YEAR/AM/STATION/', opts='az', username='myshake', password='shakeme', hostname='rs.local', year='2023', sta='RAC84', sleep_time=0.1, verbose=True, save_progress=True, method='scp')[source]
+
+ +
+
+sprit.read_tromino_files(input_data, params, struct_format='H', sampling_rate=128, start_byte=24576, verbose=False, **kwargs)[source]
+

Function to read data from tromino. Specifically, this has been lightly tested on Tromino 3G+ machines

+
+
Parameters:
+
+
input_datastr, pathlib.Path()

The input parameter _datapath_ from sprit.input_params()

+
+
paramsHVSRData or HVSRBatch

The parameters as read in from input_params() and and fetch_data()

+
+
verbosebool, optional

Whether to print results to terminal, by default False

+
+
+
+
Returns:
+
+
obspy.Stream

An obspy.Stream object containing the trace data from the Tromino instrument

+
+
+
+
+
+ +
+
+sprit.remove_noise(hvsr_data, remove_method=None, processing_window=None, sat_percent=0.995, noise_percent=0.8, sta=2, lta=30, stalta_thresh=[8, 16], warmup_time=0, cooldown_time=0, min_win_size=1, remove_raw_noise=False, show_stalta_plot=False, verbose=False)[source]
+

Function to remove noisy windows from data, using various methods.

+

Methods include +- Manual window selection (by clicking on a chart with spectrogram and stream data), +- Auto window selection, which does the following two in sequence (these can also be done indepently):

+
+
    +
  • A sta/lta “antitrigger” method (using stalta values to automatically remove triggered windows where there appears to be too much noise)

  • +
  • A noise threshold method, that cuts off all times where the noise threshold equals more than (by default) 80% of the highest amplitude noise sample for the length specified by lta (in seconds)

  • +
  • A saturation threshold method, that cuts off all times where the noise threshold equals more than (by default) 99.5% of the highest amplitude noise sample.

  • +
+
+
+
Parameters:
+
+
hvsr_datadict, obspy.Stream, or obspy.Trace

Dictionary containing all the data and parameters for the HVSR analysis

+
+
remove_methodstr, {‘auto’, ‘manual’, ‘stalta’/’antitrigger’, ‘saturation threshold’, ‘noise threshold’, ‘warmup’/’cooldown’/’buffer’/’warm_cool’}

The different methods for removing noise from the dataset. A list of strings will also work, in which case, it should be a list of the above strings. See descriptions above for what how each method works. By default ‘auto.’ +If remove_method=’auto’, this is the equivalent of remove_method=[‘noise threshold’, ‘antitrigger’, ‘saturation threshold’, ‘warm_cool’]

+
+
processing_windowlist, tuple, or None

A list/tuple of two items [s, e] or a list/tuple of two-item lists/tuples [[s0, e0], [s1,e1],…[sn, en]] with start and end time(s) for windows to keep for processing. +Data outside of these times will be excluded from processing. +Times should be obspy.UTCDateTime objects to ensure precision, but time strings (“13:05”) will also work in most cases (excpetions may be when the data stream starts/ends on different UTC days)

+
+
sat_percentfloat, default=0.995

Percentage (between 0 and 1), to use as the threshold at which to remove data. This is used in the saturation method. By default 0.995. +If a value is passed that is greater than 1, it will be divided by 100 to obtain the percentage.

+
+
noise_percentfloat, default = 0.8

Percentage (between 0 and 1), to use as the threshold at which to remove data, if it persists for longer than time (in seconds (specified by min_win_size)). This is used in the noise threshold method. By default 0.8. +If a value is passed that is greater than 1, it will be divided by 100 to obtain the percentage.

+
+
staint, optional

Short term average (STA) window (in seconds), by default 2. For use with sta/lta antitrigger method.

+
+
ltaint, optional

Long term average (STA) window (in seconds), by default 30. For use with sta/lta antitrigger method.

+
+
stalta_threshlist, default=[0.5,5]

Two-item list or tuple with the thresholds for the stalta antitrigger. The first value (index [0]) is the lower threshold, the second value (index [1] is the upper threshold), by default [0.5,5]

+
+
warmup_timeint, default=0

Time in seconds to allow for warmup of the instrument (or while operator is still near instrument). This will renove any data before this time, by default 0.

+
+
cooldown_timeint, default=0

Time in seconds to allow for cooldown of the instrument (or for when operator is nearing instrument). This will renove any data before this time, by default 0.

+
+
min_win_sizefloat, default=1

The minumum size a window must be over specified threshold (in seconds) for it to be removed

+
+
remove_raw_noisebool, default=False

If remove_raw_noise=True, will perform operation on raw data (‘input_stream’), rather than potentially already-modified data (‘stream’).

+
+
verbosebool, default=False

Whether to print status of remove_noise

+
+
+
+
Returns:
+
+
outputdict

Dictionary similar to hvsr_data, but containing modified data with ‘noise’ removed

+
+
+
+
+
+ +
+
+sprit.remove_outlier_curves(hvsr_data, rmse_thresh=98, use_percentile=True, use_hv_curve=False, plot_engine='matplotlib', show_plot=False, verbose=False)[source]
+

Function used to remove outliers curves using Root Mean Square Error to calculate the error of each windowed +Probabilistic Power Spectral Density (PPSD) curve against the median PPSD value at each frequency step for all times. +It calculates the RMSE for the PPSD curves of each component individually. All curves are removed from analysis.

+

Some abberant curves often occur due to the remove_noise() function, so this should be run some time after remove_noise(). +In general, the recommended workflow is to run this immediately following the generate_ppsds() function.

+
+
Parameters:
+
+
hvsr_datadict

Input dictionary containing all the values and parameters of interest

+
+
rmse_threshfloat or int, default=98

The Root Mean Square Error value to use as a threshold for determining whether a curve is an outlier. +This averages over each individual entire curve so that curves with very abberant data (often occurs when using the remove_noise() method), can be identified. +Otherwise, specify a float or integer to use as the cutoff RMSE value (all curves with RMSE above will be removed)

+
+
use_percentilefloat, default=True

Whether rmse_thresh should be interepreted as a raw RMSE value or as a percentile of the RMSE values.

+
+
use_hv_curvebool, default=False

Whether to use the calculated HV Curve or the individual components. This can only be True after process_hvsr() has been run.

+
+
show_plotbool, default=False

Whether to show a plot of the removed data

+
+
verbosebool, default=False

Whether to print output of function to terminal

+
+
+
+
Returns:
+
+
hvsr_datadict

Input dictionary with values modified based on work of function.

+
+
+
+
+
+ +
+
+sprit.run(input_data, source='file', azimuth_calculation=False, noise_removal=False, outlier_curves_removal=False, verbose=False, **kwargs)[source]
+

The sprit.run() is the main function that allows you to do all your HVSR processing in one simple step (sprit.run() is how you would call it in your code, but it may also be called using sprit.sprit_hvsr.run())

+

The input_data parameter of sprit.run() is the only required parameter. This can be either a single file, a list of files (one for each component, for example), a directory (in which case, all obspy-readable files will be added to an HVSRBatch instance), a Rasp. Shake raw data directory, or sample data.

+
+
Parameters:
+
+
input_datastr or filepath object that can be read by obspy

Filepath to data to be processed. This may be a file or directory, depending on what kind of data is being processed (this can be specified with the source parameter). +For sample data, The following can be specified as the input_data parameter:

+
+
    +
  • Any integer 1-6 (inclusive), or the string (e.g., input_data=”1” or input_data=1 will work)

  • +
  • The word “sample” before any integer (e.g., input_data=”sample1”)

  • +
  • The word “sample” will default to “sample1” if source=’file’.

  • +
  • If source=’batch’, input_data should be input_data=’sample’ or input_data=’batch’. In this case, it will read and process all the sample files using the HVSRBatch class. Set verbose=True to see all the information in the sample batch csv file.

  • +
+
+
+
sourcestr, optional

_description_, by default ‘file’

+
+
azimuth_calculationbool, optional

Whether to perform azimuthal analysis, by default False.

+
+
noise_removalbool, default=False

Whether to remove noise (before processing PPSDs)

+
+
outlier_curves_removalbool, default=False

Whether to remove outlier curves from HVSR time windows

+
+
show_plotbool, default=True

Whether to show plots. This does not affect whether the plots are created (and then inserted as an attribute of HVSRData), only whether they are shown.

+
+
verbosebool, optional

_description_, by default False

+
+
**kwargs

Keyword arguments for the functions listed above. The keyword arguments are unique, so they will get parsed out and passed into the appropriate function.

+
+
input_paramsfunction name (not an actual parameter)

Function for designating input parameters for reading in and processing data +See API documentation: [input_params()](https://sprit.readthedocs.io/en/latest/sprit.html#sprit.input_params)

+
+
input_data: any, default = ‘<no default>’

See API documentation at link above or at help(sprit.input_params) for specifics.

+
+
site: any, default = ‘HVSR Site’

See API documentation at link above or at help(sprit.input_params) for specifics.

+
+
id_prefix: any, default = None

See API documentation at link above or at help(input_params) for specifics.

+
+
network: any, default = ‘AM’

See API documentation at link above or at help(sprit.input_params) for specifics.

+
+
station: any, default = ‘RAC84’

See API documentation at link above or at help(sprit.input_params) for specifics.

+
+
loc: any, default = ‘00’

See API documentation at link above or at help(sprit.input_params) for specifics.

+
+
channels: any, default = [‘EHZ’, ‘EHN’, ‘EHE’]

See API documentation at link above or at help(input_params) for specifics.

+
+
acq_date: any, default = ‘2024-10-30’

See API documentation at link above or at help(sprit.input_params) for specifics.

+
+
starttime: any, default = 2024-10-30T00:00:00.000000Z

See API documentation at link above or at help(input_params) for specifics.

+
+
endtime: any, default = 2024-10-30T23:59:59.999999Z

See API documentation at link above or at help(input_params) for specifics.

+
+
tzone: any, default = ‘UTC’

See API documentation at link above or at help(sprit.input_params) for specifics.

+
+
xcoord: any, default = -88.2290526

See API documentation at link above or at help(input_params) for specifics.

+
+
ycoord: any, default = 40.1012122

See API documentation at link above or at help(input_params) for specifics.

+
+
elevation: any, default = 755

See API documentation at link above or at help(input_params) for specifics.

+
+
input_crs: any, default = None

See API documentation at link above or at help(input_params) for specifics.

+
+
output_crs: any, default = None

See API documentation at link above or at help(input_params) for specifics.

+
+
elev_unit: any, default = ‘meters’

See API documentation at link above or at help(sprit.input_params) for specifics.

+
+
depth: any, default = 0

See API documentation at link above or at help(input_params) for specifics.

+
+
instrument: any, default = ‘Raspberry Shake’

See API documentation at link above or at help(sprit.input_params) for specifics.

+
+
metapath: any, default = None

See API documentation at link above or at help(input_params) for specifics.

+
+
hvsr_band: any, default = [0.4, 40]

See API documentation at link above or at help(input_params) for specifics.

+
+
peak_freq_range: any, default = [0.4, 40]

See API documentation at link above or at help(input_params) for specifics.

+
+
processing_parameters: any, default = {}

See API documentation at link above or at help(input_params) for specifics.

+
+
verbose: any, default = False

See API documentation at link above or at help(input_params) for specifics.

+
+
fetch_datafunction name (not an actual parameter)

Fetch ambient seismic data from a source to read into obspy stream +See API documentation: [fetch_data()](https://sprit.readthedocs.io/en/latest/sprit.html#sprit.fetch_data)

+
+
params: any, default = ‘<output of previous function>’

See API documentation at link above or at help(sprit.fetch_data) for specifics.

+
+
source: any, default = ‘file’

See API documentation at link above or at help(sprit.fetch_data) for specifics.

+
+
data_export_path: any, default = None

See API documentation at link above or at help(fetch_data) for specifics.

+
+
data_export_format: any, default = ‘mseed’

See API documentation at link above or at help(sprit.fetch_data) for specifics.

+
+
detrend: any, default = ‘spline’

See API documentation at link above or at help(sprit.fetch_data) for specifics.

+
+
detrend_order: any, default = 2

See API documentation at link above or at help(fetch_data) for specifics.

+
+
update_metadata: any, default = True

See API documentation at link above or at help(fetch_data) for specifics.

+
+
plot_input_stream: any, default = False

See API documentation at link above or at help(fetch_data) for specifics.

+
+
plot_engine: any, default = ‘matplotlib’

See API documentation at link above or at help(sprit.fetch_data) for specifics.

+
+
show_plot: any, default = True

See API documentation at link above or at help(fetch_data) for specifics.

+
+
verbose: any, default = False

See API documentation at link above or at help(fetch_data) for specifics.

+
+
kwargs: any, default = {}

See API documentation at link above or at help(fetch_data) for specifics.

+
+
calculate_azimuthfunction name (not an actual parameter)

Function to calculate azimuthal horizontal component at specified angle(s). Adds each new horizontal +See API documentation: [calculate_azimuth()](https://sprit.readthedocs.io/en/latest/sprit.html#sprit.calculate_azimuth)

+
+
hvsr_data: any, default = ‘<output of previous function>’

See API documentation at link above or at help(sprit.calculate_azimuth) for specifics.

+
+
azimuth_angle: any, default = 30

See API documentation at link above or at help(calculate_azimuth) for specifics.

+
+
azimuth_type: any, default = ‘multiple’

See API documentation at link above or at help(sprit.calculate_azimuth) for specifics.

+
+
azimuth_unit: any, default = ‘degrees’

See API documentation at link above or at help(sprit.calculate_azimuth) for specifics.

+
+
show_az_plot: any, default = False

See API documentation at link above or at help(calculate_azimuth) for specifics.

+
+
verbose: any, default = False

See API documentation at link above or at help(calculate_azimuth) for specifics.

+
+
plot_azimuth_kwargs: any, default = {}

See API documentation at link above or at help(calculate_azimuth) for specifics.

+
+
remove_noisefunction name (not an actual parameter)

Function to remove noisy windows from data, using various methods. +See API documentation: [remove_noise()](https://sprit.readthedocs.io/en/latest/sprit.html#sprit.remove_noise)

+
+
hvsr_data: any, default = ‘<output of previous function>’

See API documentation at link above or at help(sprit.remove_noise) for specifics.

+
+
remove_method: any, default = None

See API documentation at link above or at help(remove_noise) for specifics.

+
+
processing_window: any, default = None

See API documentation at link above or at help(remove_noise) for specifics.

+
+
sat_percent: any, default = 0.995

See API documentation at link above or at help(remove_noise) for specifics.

+
+
noise_percent: any, default = 0.8

See API documentation at link above or at help(remove_noise) for specifics.

+
+
sta: any, default = 2

See API documentation at link above or at help(remove_noise) for specifics.

+
+
lta: any, default = 30

See API documentation at link above or at help(remove_noise) for specifics.

+
+
stalta_thresh: any, default = [8, 16]

See API documentation at link above or at help(remove_noise) for specifics.

+
+
warmup_time: any, default = 0

See API documentation at link above or at help(remove_noise) for specifics.

+
+
cooldown_time: any, default = 0

See API documentation at link above or at help(remove_noise) for specifics.

+
+
min_win_size: any, default = 1

See API documentation at link above or at help(remove_noise) for specifics.

+
+
remove_raw_noise: any, default = False

See API documentation at link above or at help(remove_noise) for specifics.

+
+
show_stalta_plot: any, default = False

See API documentation at link above or at help(remove_noise) for specifics.

+
+
verbose: any, default = False

See API documentation at link above or at help(remove_noise) for specifics.

+
+
generate_ppsdsfunction name (not an actual parameter)

Generates PPSDs for each channel +See API documentation: [generate_ppsds()](https://sprit.readthedocs.io/en/latest/sprit.html#sprit.generate_ppsds)

+
+
hvsr_data: any, default = ‘<output of previous function>’

See API documentation at link above or at help(sprit.generate_ppsds) for specifics.

+
+
azimuthal_ppsds: any, default = False

See API documentation at link above or at help(generate_ppsds) for specifics.

+
+
verbose: any, default = False

See API documentation at link above or at help(generate_ppsds) for specifics.

+
+
ppsd_kwargs: any, default = {}

See API documentation at link above or at help(generate_ppsds) for specifics.

+
+
process_hvsrfunction name (not an actual parameter)

Process the input data and get HVSR data +See API documentation: [process_hvsr()](https://sprit.readthedocs.io/en/latest/sprit.html#sprit.process_hvsr)

+
+
hvsr_data: any, default = ‘<output of previous function>’

See API documentation at link above or at help(sprit.process_hvsr) for specifics.

+
+
horizontal_method: any, default = None

See API documentation at link above or at help(process_hvsr) for specifics.

+
+
smooth: any, default = True

See API documentation at link above or at help(process_hvsr) for specifics.

+
+
freq_smooth: any, default = ‘konno ohmachi’

See API documentation at link above or at help(sprit.process_hvsr) for specifics.

+
+
f_smooth_width: any, default = 40

See API documentation at link above or at help(process_hvsr) for specifics.

+
+
resample: any, default = True

See API documentation at link above or at help(process_hvsr) for specifics.

+
+
outlier_curve_rmse_percentile: any, default = False

See API documentation at link above or at help(process_hvsr) for specifics.

+
+
azimuth: any, default = None

See API documentation at link above or at help(process_hvsr) for specifics.

+
+
verbose: any, default = False

See API documentation at link above or at help(process_hvsr) for specifics.

+
+
remove_outlier_curvesfunction name (not an actual parameter)

Function used to remove outliers curves using Root Mean Square Error to calculate the error of each +See API documentation: [remove_outlier_curves()](https://sprit.readthedocs.io/en/latest/sprit.html#sprit.remove_outlier_curves)

+
+
hvsr_data: any, default = ‘<output of previous function>’

See API documentation at link above or at help(sprit.remove_outlier_curves) for specifics.

+
+
rmse_thresh: any, default = 98

See API documentation at link above or at help(remove_outlier_curves) for specifics.

+
+
use_percentile: any, default = True

See API documentation at link above or at help(remove_outlier_curves) for specifics.

+
+
use_hv_curve: any, default = False

See API documentation at link above or at help(remove_outlier_curves) for specifics.

+
+
plot_engine: any, default = ‘matplotlib’

See API documentation at link above or at help(sprit.remove_outlier_curves) for specifics.

+
+
show_plot: any, default = False

See API documentation at link above or at help(remove_outlier_curves) for specifics.

+
+
verbose: any, default = False

See API documentation at link above or at help(remove_outlier_curves) for specifics.

+
+
check_peaksfunction name (not an actual parameter)

Function to run tests on HVSR peaks to find best one and see if it passes quality checks +See API documentation: [check_peaks()](https://sprit.readthedocs.io/en/latest/sprit.html#sprit.check_peaks)

+
+
hvsr_data: any, default = ‘<output of previous function>’

See API documentation at link above or at help(sprit.check_peaks) for specifics.

+
+
hvsr_band: any, default = [0.4, 40]

See API documentation at link above or at help(check_peaks) for specifics.

+
+
peak_selection: any, default = ‘max’

See API documentation at link above or at help(sprit.check_peaks) for specifics.

+
+
peak_freq_range: any, default = [0.4, 40]

See API documentation at link above or at help(check_peaks) for specifics.

+
+
azimuth: any, default = ‘HV’

See API documentation at link above or at help(sprit.check_peaks) for specifics.

+
+
verbose: any, default = False

See API documentation at link above or at help(check_peaks) for specifics.

+
+
get_reportfunction name (not an actual parameter)

Generate and/or print and/or export a report of the HVSR analysis in a variety of formats. +See API documentation: [get_report()](https://sprit.readthedocs.io/en/latest/sprit.html#sprit.get_report)

+
+
hvsr_results: any, default = ‘<output of previous function>’

See API documentation at link above or at help(sprit.get_report) for specifics.

+
+
report_formats: any, default = [‘print’, ‘table’, ‘plot’, ‘html’, ‘pdf’]

See API documentation at link above or at help(get_report) for specifics.

+
+
azimuth: any, default = ‘HV’

See API documentation at link above or at help(sprit.get_report) for specifics.

+
+
plot_type: any, default = ‘HVSR p ann C+ p ann Spec p ann’

See API documentation at link above or at help(sprit.get_report) for specifics.

+
+
plot_engine: any, default = ‘matplotlib’

See API documentation at link above or at help(sprit.get_report) for specifics.

+
+
show_print_report: any, default = True

See API documentation at link above or at help(get_report) for specifics.

+
+
show_table_report: any, default = False

See API documentation at link above or at help(get_report) for specifics.

+
+
show_plot_report: any, default = True

See API documentation at link above or at help(get_report) for specifics.

+
+
show_html_report: any, default = False

See API documentation at link above or at help(get_report) for specifics.

+
+
show_pdf_report: any, default = True

See API documentation at link above or at help(get_report) for specifics.

+
+
suppress_report_outputs: any, default = False

See API documentation at link above or at help(get_report) for specifics.

+
+
show_report_outputs: any, default = False

See API documentation at link above or at help(get_report) for specifics.

+
+
csv_handling: any, default = ‘append’

See API documentation at link above or at help(sprit.get_report) for specifics.

+
+
report_export_format: any, default = None

See API documentation at link above or at help(get_report) for specifics.

+
+
report_export_path: any, default = None

See API documentation at link above or at help(get_report) for specifics.

+
+
verbose: any, default = False

See API documentation at link above or at help(get_report) for specifics.

+
+
kwargs: any, default = {}

See API documentation at link above or at help(get_report) for specifics.

+
+
export_datafunction name (not an actual parameter)

Export data into pickle format that can be read back in using import_data() so data does not need to +See API documentation: [export_data()](https://sprit.readthedocs.io/en/latest/sprit.html#sprit.export_data)

+
+
hvsr_data: any, default = ‘<output of previous function>’

See API documentation at link above or at help(sprit.export_data) for specifics.

+
+
hvsr_export_path: any, default = None

See API documentation at link above or at help(export_data) for specifics.

+
+
ext: any, default = ‘hvsr’

See API documentation at link above or at help(sprit.export_data) for specifics.

+
+
verbose: any, default = False

See API documentation at link above or at help(export_data) for specifics.

+
+
+
+
Returns:
+
+
hvsr_resultssprit.HVSRData or sprit.HVSRBatch object

If a single file/data point is being processed, a HVSRData object will be returned. Otherwise, it will be a HVSRBatch object. See their documention for more information.

+
+
+
+
Raises:
+
+
RuntimeError

If the input parameter may not be read correctly. This is raised if the input_params() function fails. This raises an error since no other data processing or reading steps will be able to carried out correctly.

+
+
RuntimeError

If the data is not read/fetched correctly using fetch_data(), an error will be raised. This is raised if the fetch_data() function fails. This raises an error since no other data processing steps will be able to carried out correctly.

+
+
RuntimeError

If the data being processed is a single file, an error will be raised if generate_ppsds() does not work correctly. No errors are raised for remove_noise() errors (since that is an optional step) and the process_hvsr() step (since that is the last processing step) .

+
+
+
+
+

Notes

+

The sprit.run() function calls the following functions. This is the recommended order/set of functions to run to process HVSR using SpRIT. See the API documentation for these functions for more information: +- input_params(): The input_data parameter of input_params() is the only required variable, though others may also need to be called for your data to process correctly. +- fetch_data(): the source parameter of fetch_data() is the only explicit variable in the sprit.run() function aside from input_data and verbose. Everything else gets delivered to the correct function via the kwargs dictionary +- remove_noise(): by default, the kind of noise removal is remove_method=’auto’. See the remove_noise() documentation for more information. If remove_method is set to anything other than one of the explicit options in remove_noise, noise removal will not be carried out. +- generate_ppsds(): generates ppsds for each component, which will be combined/used later. Any parameter of obspy.signal.spectral_estimation.PPSD() may also be read into this function. +- remove_outlier_curves(): removes any outlier ppsd curves so that the data quality for when curves are combined will be enhanced. See the remove_outlier_curves() documentation for more information. +- process_hvsr(): this is the main function processing the hvsr curve and statistics. See process_hvsr() documentation for more details. The hvsr_band parameter sets the frequency spectrum over which these calculations occur. +- check_peaks(): this is the main function that will find and ‘score’ peaks to get a best peak. The parameter peak_freq_range can be set to limit the frequencies within which peaks are checked and scored. +- get_report(): this is the main function that will print, plot, and/or save the results of the data. See the get_report() API documentation for more information. +- export_data(): this function exports the final data output as a pickle file (by default, this pickle object has a .hvsr extension). This can be used to read data back into SpRIT without having to reprocess data.

+
+ +
+
+sprit.time_it(_t, proc_name='', verbose=True)[source]
+

Computes elapsed time since the last call.

+
+ +
+
+sprit.x_mark(incolor=False, inTerminal=False)[source]
+

The default Windows terminal is not able to display the check mark character correctly. +This function returns another displayable character if platform is Windows

+
+ +
+

Submodules

+
+ +
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/sprit.sprit_cli.html b/docs/_build/html/sprit.sprit_cli.html new file mode 100644 index 0000000..c4b9acb --- /dev/null +++ b/docs/_build/html/sprit.sprit_cli.html @@ -0,0 +1,183 @@ + + + + + + + sprit.sprit_cli module — sprit 1.4.1 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

sprit.sprit_cli module

+

This module/script is used to run sprit from the command line.

+

The arguments here should correspond to any of the keyword arguments that can be used with sprit.run() (or sprit_hvsr.run()). See the run() function’s documentation for more information, or the individual functions that are run within it.

+

For list inputs, you should pass the argument multiple times(e.g., –report_format “csv” –report_format “print” –report_format “plot”). (In the case of –report_format, you can also just use “all” to get csv, print, and plot report types)

+

The input_data parameter of input_params() is the only required argument, though for your data processing to work correctly and to be formatted correctly, you may need to pass others as well.

+
+
+sprit.sprit_cli.get_param_docstring(func, param_name)[source]
+
+ +
+
+sprit.sprit_cli.main()[source]
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/sprit.sprit_hvsr.html b/docs/_build/html/sprit.sprit_hvsr.html new file mode 100644 index 0000000..db438c9 --- /dev/null +++ b/docs/_build/html/sprit.sprit_hvsr.html @@ -0,0 +1,1869 @@ + + + + + + + sprit.sprit_hvsr module — sprit 1.4.1 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

sprit.sprit_hvsr module

+

This module is the main SpRIT module that contains all the functions needed to run HVSR analysis.

+

The functions defined here are read both by the SpRIT graphical user interface and by the command-line interface to run HVSR analysis on input data.

+

See documentation for individual functions for more information.

+
+
+class sprit.sprit_hvsr.HVSRBatch(*args, **kwargs)[source]
+

Bases: object

+

HVSRBatch is the data container used for batch processing. +It contains several HVSRData objects (one for each site). +These can be accessed using their site name, +either square brackets (HVSRBatchVariable[“SiteName”]) or the dot (HVSRBatchVariable.SiteName) accessor.

+

The dot accessor may not work if there is a space in the site name.

+

All of the functions in the sprit package are designed to perform the bulk of their operations iteratively +on the individual HVSRData objects contained in the HVSRBatch object, and do little with the HVSRBatch object itself, +besides using it determine which sites are contained within it.

+

Methods

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

copy([type])

Make a copy of the HVSRBatch object.

export([hvsr_export_path, ext])

Method to export HVSRData objects in HVSRBatch container to indivdual .hvsr pickle files.

export_settings([site_name, ...])

Method to export settings from HVSRData object in HVSRBatch object.

get_report(**kwargs)

Method to get report from processed data, in print, graphical, or tabular format.

items()

Method to return both the site names and the HVSRData object as a set of dict_items tuples.

keys()

Method to return the "keys" of the HVSRBatch object.

plot(**kwargs)

Method to plot data, based on the sprit.plot_hvsr() function.

report(**kwargs)

Wrapper of get_report()

+
+
+copy(type='shallow')[source]
+

Make a copy of the HVSRBatch object. Uses python copy module.

+
+
Parameters:
+
+
typestr {‘shallow’, ‘deep’}

Based on input, creates either a shallow or deep copy of the HVSRBatch object. Shallow is equivalent of copy.copy(). Input of ‘deep’ is equivalent of copy.deepcopy() (still experimental). Defaults to shallow.

+
+
+
+
+
+ +
+
+export(hvsr_export_path=True, ext='hvsr')[source]
+

Method to export HVSRData objects in HVSRBatch container to indivdual .hvsr pickle files.

+
+
Parameters:
+
+
hvsr_export_pathfilepath, default=True

Filepath to save file. Can be either directory (which will assign a filename based on the HVSRData attributes). By default True. If True, it will first try to save each file to the same directory as input_data, then if that does not work, to the current working directory, then to the user’s home directory, by default True

+
+
extstr, optional

The extension to use for the output, by default ‘hvsr’. This is still a pickle file that can be read with pickle.load(), but will have .hvsr extension.

+
+
+
+
+
+ +
+
+export_settings(site_name=None, export_settings_path='default', export_settings_type='all', include_location=False, verbose=True)[source]
+

Method to export settings from HVSRData object in HVSRBatch object.

+

Simply calls sprit.export_settings() from specified HVSRData object in the HVSRBatch object. +See sprit.export_settings() for more details.

+
+
Parameters:
+
+
site_namestr, default=None

The name of the site whose settings should be exported. If None, will default to the first site, by default None.

+
+
export_settings_pathstr, optional

Filepath to output file. If left as ‘default’, will save as the default value in the resources directory. If that is not possible, will save to home directory, by default ‘default’

+
+
export_settings_typestr, {‘all’, ‘instrument’, ‘processing’}, optional

They type of settings to save, by default ‘all’

+
+
include_locationbool, optional

Whether to include the location information in the instrument settings, if that settings type is selected, by default False

+
+
verbosebool, optional

Whether to print output (filepath and settings) to terminal, by default True

+
+
+
+
+
+

See also

+
+
export_settings
+
+
+
+ +
+
+get_report(**kwargs)[source]
+

Method to get report from processed data, in print, graphical, or tabular format.

+
+
Returns:
+
+
Variable

May return nothing, pandas.Dataframe, or pyplot Figure, depending on input.

+
+
+
+
+
+

See also

+
+
get_report
+
+
+
+ +
+
+items()[source]
+

Method to return both the site names and the HVSRData object as a set of dict_items tuples. Functions similar to dict.items().

+
+
Returns:
+
+
_type_

_description_

+
+
+
+
+
+ +
+
+keys()[source]
+

Method to return the “keys” of the HVSRBatch object. For HVSRBatch objects, these are the site names. Functions similar to dict.keys().

+
+
Returns:
+
+
dict_keys

A dict_keys object listing the site names of each of the HVSRData objects contained in the HVSRBatch object

+
+
+
+
+
+ +
+
+plot(**kwargs)[source]
+

Method to plot data, based on the sprit.plot_hvsr() function.

+

All the same kwargs and default values apply as plot_hvsr(). +For return_fig, returns it to the ‘Plot_Report’ attribute of each HVSRData object

+
+
Returns:
+
+
_type_

_description_

+
+
+
+
+
+

See also

+
+
plot_hvsr
+
+
+
+ +
+
+report(**kwargs)[source]
+

Wrapper of get_report()

+
+

See also

+
+
get_report
+
+
+
+ +
+ +
+
+class sprit.sprit_hvsr.HVSRData(*args, **kwargs)[source]
+

Bases: object

+

HVSRData is the basic data class of the sprit package. +It contains all the processed data, input parameters, and reports.

+

These attributes and objects can be accessed using square brackets or the dot accessor. For example, to access the site name, HVSRData[‘site’] and HVSRData.site will both return the site name.

+

Some of the methods that work on the HVSRData object (e.g., .plot() and .get_report()) are essentially wrappers for some of the main sprit package functions (sprit.plot_hvsr() and sprit.get_report(), respectively)

+
+
Attributes:
+
+
batch

Whether this HVSRData object is part of an HVSRBatch object.

+
+
datastream

A copy of the original obspy datastream read in.

+
+
params

Dictionary containing the parameters used to process the data

+
+
ppsds

Dictionary copy of the class object obspy.signal.spectral_estimation.PPSD().

+
+
ppsds_obspy

The original ppsd information from the obspy.signal.spectral_estimation.PPSD(), so as to keep original if copy is manipulated/changed.

+
+
+
+
+

Methods

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

copy([type])

Make a copy of the HVSRData object.

export([hvsr_export_path, ext])

Method to export HVSRData objects to .hvsr pickle files.

export_settings([export_settings_path, ...])

Method to export settings from HVSRData object.

get_report(**kwargs)

Method to get report from processed data, in print, graphical, or tabular format.

items()

Method to return the "items" of the HVSRData object.

keys()

Method to return the "keys" of the HVSRData object.

plot(**kwargs)

Method to plot data, wrapper of sprit.plot_hvsr()

report(**kwargs)

Wrapper of get_report()

+
+
+property batch
+

Whether this HVSRData object is part of an HVSRBatch object. This is used throughout the code to help direct the object into the proper processing pipeline.

+
+
Returns:
+
+
bool

True if HVSRData object is part of HVSRBatch object, otherwise, False

+
+
+
+
+
+ +
+
+copy(type='shallow')[source]
+

Make a copy of the HVSRData object. Uses python copy module.

+
+
Parameters:
+
+
typestr {‘shallow’, ‘deep’}

Based on input, creates either a shallow or deep copy of the HVSRData object. Shallow is equivalent of copy.copy(). Input of type=’deep’ is equivalent of copy.deepcopy() (still experimental). Defaults to shallow.

+
+
+
+
+
+ +
+
+property datastream
+

A copy of the original obspy datastream read in. This helps to retain the original data even after processing is carried out.

+
+
Returns:
+
+
obspy.core.Stream.stream

Obspy stream

+
+
+
+
+
+ +
+
+export(hvsr_export_path=None, ext='hvsr')[source]
+

Method to export HVSRData objects to .hvsr pickle files.

+
+
Parameters:
+
+
hvsr_export_pathfilepath, default=True

Filepath to save file. Can be either directory (which will assign a filename based on the HVSRData attributes). +By default True. +If True, it will first try to save each file to the same directory as input_data, then if that does not work, to the current working directory, then to the user’s home directory, by default True

+
+
extstr, optional

The extension to use for the output, by default ‘hvsr’. This is still a pickle file that can be read with pickle.load(), but will have .hvsr extension.

+
+
+
+
+
+ +
+
+export_settings(export_settings_path='default', export_settings_type='all', include_location=False, verbose=True)[source]
+

Method to export settings from HVSRData object. Simply calls sprit.export_settings() from the HVSRData object. See sprit.export_settings() for more details.

+
+
Parameters:
+
+
export_settings_pathstr, optional

Filepath to output file. If left as ‘default’, will save as the default value in the resources directory. If that is not possible, will save to home directory, by default ‘default’

+
+
export_settings_typestr, {‘all’, ‘instrument’, ‘processing’}, optional

They type of settings to save, by default ‘all’

+
+
include_locationbool, optional

Whether to include the location information in the instrument settings, if that settings type is selected, by default False

+
+
verbosebool, optional

Whether to print output (filepath and settings) to terminal, by default True

+
+
+
+
+
+ +
+
+get_report(**kwargs)[source]
+

Method to get report from processed data, in print, graphical, or tabular format.

+
+
Returns:
+
+
Variable

May return nothing, pandas.Dataframe, or pyplot Figure, depending on input.

+
+
+
+
+
+

See also

+
+
get_report
+
+
+
+ +
+
+items()[source]
+

Method to return the “items” of the HVSRData object. For HVSRData objects, this is a dict_items object with the keys and values in tuples. Functions similar to dict.items().

+
+
Returns:
+
+
dict_items

A dict_items object of the HVSRData objects attributes, parameters, etc.

+
+
+
+
+
+ +
+
+keys()[source]
+

Method to return the “keys” of the HVSRData object. For HVSRData objects, these are the attributes and parameters of the object. Functions similar to dict.keys().

+
+
Returns:
+
+
dict_keys

A dict_keys object of the HVSRData objects attributes, parameters, etc.

+
+
+
+
+
+ +
+
+property params
+

Dictionary containing the parameters used to process the data

+
+
Returns:
+
+
dict

Dictionary containing the process parameters

+
+
+
+
+
+ +
+
+plot(**kwargs)[source]
+

Method to plot data, wrapper of sprit.plot_hvsr()

+
+
Returns:
+
+
matplotlib.Figure, matplotlib.Axis (if return_fig=True)
+
+
+
+
+

See also

+
+
plot_hvsr
+
plot_azimuth
+
+
+
+ +
+
+property ppsds
+

Dictionary copy of the class object obspy.signal.spectral_estimation.PPSD(). The dictionary copy allows manipulation of the data in PPSD, whereas that data cannot be easily manipulated in the original Obspy object.

+
+
Returns:
+
+
dict

Dictionary copy of the PPSD information from generate_ppsds()

+
+
+
+
+
+ +
+
+property ppsds_obspy
+

The original ppsd information from the obspy.signal.spectral_estimation.PPSD(), so as to keep original if copy is manipulated/changed.

+
+ +
+
+report(**kwargs)[source]
+

Wrapper of get_report()

+
+

See also

+
+
get_report
+
+
+
+ +
+ +
+
+sprit.sprit_hvsr.batch_data_read(batch_data, batch_type='table', param_col=None, batch_params=None, verbose=False, **readcsv_getMeta_fetch_kwargs)[source]
+

Function to read data in data as a batch of multiple data files. This is best used through sprit.fetch_data(*args, source=’batch’, **other_kwargs).

+
+
Parameters:
+
+
batch_datafilepath or list

Input data information for how to read in data as batch. Can be filepath or list of filepaths/stream objects. +If filepath, should point to .csv (or similar that can be read by pandas.read_csv()) with batch data information.

+
+
batch_typestr, optional

Type of batch read, only ‘table’ and ‘filelist’ accepted. +If ‘table’, will read data from a file read in using pandas.read_csv(), by default ‘table’

+
+
param_colNone or str, optional

Name of parameter column from batch information file. Only used if a batch_type=’table’ and single parameter column is used, rather than one column per parameter (for single parameter column, parameters are formatted with = between keys/values and , between item pairs), by default None

+
+
batch_paramslist, dict, or None, default = None

Parameters to be used if batch_type=’filelist’. If it is a list, needs to be the same length as batch_data. If it is a dict, will be applied to all files in batch_data and will combined with extra keyword arguments caught by **readcsv_getMeta_fetch_kwargs.

+
+
verbosebool, optional

Whether to print information to terminal during batch read, by default False

+
+
**readcsv_getMeta_fetch_kwargs

Keyword arguments that will be read into pandas.read_csv(), sprit.input_params, sprit.get_metadata(), and/or sprit.fetch_data()

+
+
+
+
Returns:
+
+
hvsrBatch

HVSRBatch object with each item representing a different HVSRData object

+
+
+
+
Raises:
+
+
IndexError

_description_

+
+
+
+
+
+ +
+
+sprit.sprit_hvsr.calculate_azimuth(hvsr_data, azimuth_angle=30, azimuth_type='multiple', azimuth_unit='degrees', show_az_plot=False, verbose=False, **plot_azimuth_kwargs)[source]
+

Function to calculate azimuthal horizontal component at specified angle(s). Adds each new horizontal component as a radial component to obspy.Stream object at hvsr_data[‘stream’]

+
+
Parameters:
+
+
hvsr_dataHVSRData

Input HVSR data

+
+
azimuth_angleint, default=10

If azimuth_type=’multiple’, this is the angular step (in unit azimuth_unit) of each of the azimuthal measurements. +If azimuth_type=’single’ this is the angle (in unit azimuth_unit) of the single calculated azimuthal measruement. By default 10.

+
+
azimuth_typestr, default=’multiple’

What type of azimuthal measurement to make, by default ‘multiple’. +If ‘multiple’ (or {‘multi’, ‘mult’, ‘m’}), will take a measurement at each angular step of azimuth_angle of unit azimuth_unit. +If ‘single’ (or {‘sing’, ‘s’}), will take a single azimuthal measurement at angle specified in azimuth_angle.

+
+
azimuth_unitstr, default=’degrees’

Angular unit used to specify azimuth_angle parameter. By default ‘degrees’. +If ‘degrees’ (or {‘deg’, ‘d’}), will use degrees. +If ‘radians’ (or {‘rad’, ‘r’}), will use radians.

+
+
show_az_plotbool, default=False

Whether to show azimuthal plot, by default False.

+
+
verbosebool, default=False

Whether to print terminal output, by default False

+
+
+
+
Returns:
+
+
HVSRData

Updated HVSRData object specified in hvsr_data with hvsr_data[‘stream’] attribute containing additional components (EHR-*), +with * being zero-padded (3 digits) azimuth angle in degrees.

+
+
+
+
+
+ +
+
+sprit.sprit_hvsr.check_instance(init)[source]
+
+ +
+
+sprit.sprit_hvsr.check_peaks(hvsr_data, hvsr_band=[0.4, 40], peak_selection='max', peak_freq_range=[0.4, 40], azimuth='HV', verbose=False)[source]
+

Function to run tests on HVSR peaks to find best one and see if it passes quality checks

+
+
Parameters:
+
+
hvsr_datadict

Dictionary containing all the calculated information about the HVSR data (i.e., hvsr_out returned from process_hvsr)

+
+
hvsr_bandtuple or list, default=[0.4, 40]

2-item tuple or list with lower and upper limit of frequencies to analyze

+
+
peak_selectionstr or numeric, default=’max’

How to select the “best” peak used in the analysis. For peak_selection=”max” (default value), the highest peak within peak_freq_range is used. +For peak_selection=’scored’, an algorithm is used to select the peak based in part on which peak passes the most SESAME criteria. +If a numeric value is used (e.g., int or float), this should be a frequency value to manually select as the peak of interest.

+
+
peak_freq_rangetuple or list, default=[0.4, 40];

The frequency range within which to check for peaks. If there is an HVSR curve with multiple peaks, this allows the full range of data to be processed while limiting peak picks to likely range.

+
+
verbosebool, default=False

Whether to print results and inputs to terminal.

+
+
+
+
Returns:
+
+
hvsr_dataHVSRData or HVSRBatch object

Object containing previous input data, plus information about peak tests

+
+
+
+
+
+ +
+
+sprit.sprit_hvsr.export_data(hvsr_data, hvsr_export_path=None, ext='hvsr', verbose=False)[source]
+

Export data into pickle format that can be read back in using import_data() so data does not need to be processed each time. +Default extension is .hvsr but it is still a pickled file that can be read in using pickle.load().

+
+
Parameters:
+
+
hvsr_dataHVSRData or HVSRBatch

Data to be exported

+
+
hvsr_export_pathstr or filepath object, default = None

String or filepath object to be read by pathlib.Path() and/or a with open(hvsr_export_path, ‘wb’) statement. If None, defaults to input input_data directory, by default None

+
+
extstr, default = ‘hvsr’

Filepath extension to use for data file, by default ‘hvsr’

+
+
+
+
+
+ +
+
+sprit.sprit_hvsr.export_report(hvsr_results, report_export_path=None, report_export_format=['pdf'], azimuth='HV', csv_handling='rename', show_report=True, verbose=False)[source]
+

Function to export reports to disk. Exportable formats include: +* ‘table’: saves a pandas DataFrame as a csv) +* ‘plot’: saves the matplotlib or plotly plot figure (depending on what is designated via plot_engine) as an image (png by default) +* ‘print’: saves the print report as a .txt file +* ‘html’: saves the html report as a .html file +* ‘pdf’: saves the pdf report as a .pdf file

+
+
Parameters:
+
+
hvsr_resultsHVSRData object

HVSRData object containing the HVSR data

+
+
report_export_pathpath-like object, optional

The path to where the report should be exported. +If this is None (default), this is written to the home directory. +If this is a True, uses the same directory as the input data, but generates a filename. +If this is a directory, generates a filename. +If filename is specified and the extension does not match the report type, the extension is adjusted. +Otherwise, this is the output file or , by default None

+
+
csv_handling{‘rename’, ‘append’, ‘overwrite’, ‘keep’}, optional

If table is the report type, this can prevent overwriting data, by default ‘rename’. +* “rename” (or “keep”): renames the new file to prevent overwrite, appends a digit to the end of filename +* “append”: appends the new data to the existing file +* “overwrite”: overwrites the existing file

+
+
report_export_formatstr or list, optional

The format (or a list of formats) to export the report, by default [‘pdf’].

+
+
show_reportbool, optional

Whether to show the designated reports that were chosen for export, by default True

+
+
verbosebool, optional

Whether to print progress and other information to terminal, by default False

+
+
+
+
Returns:
+
+
HVSRData

An HVSRData object that is the same as hvsr_results, but with any additionally generated reports.

+
+
+
+
+
+ +
+
+sprit.sprit_hvsr.export_settings(hvsr_data, export_settings_path='default', export_settings_type='all', include_location=False, verbose=True)[source]
+

Save settings to json file

+
+
Parameters:
+
+
export_settings_pathstr, default=”default”

Where to save the json file(s) containing the settings, by default ‘default’. +If “default,” will save to sprit package resources. Otherwise, set a filepath location you would like for it to be saved to. +If ‘all’ is selected, a directory should be supplied. +Otherwise, it will save in the directory of the provided file, if it exists. Otherwise, defaults to the home directory.

+
+
export_settings_typestr, {‘all’, ‘instrument’, ‘processing’}

What kind of settings to save. +If ‘all’, saves all possible types in their respective json files. +If ‘instrument’, save the instrument settings to their respective file. +If ‘processing’, saves the processing settings to their respective file. By default ‘all’

+
+
include_locationbool, default=False, input CRS

Whether to include the location parametersin the exported settings document.This includes xcoord, ycoord, elevation, elev_unit, and input_crs

+
+
verbosebool, default=True

Whether to print outputs and information to the terminal

+
+
+
+
+
+ +
+
+sprit.sprit_hvsr.fetch_data(params, source='file', data_export_path=None, data_export_format='mseed', detrend='spline', detrend_order=2, update_metadata=True, plot_input_stream=False, plot_engine='matplotlib', show_plot=True, verbose=False, **kwargs)[source]
+

Fetch ambient seismic data from a source to read into obspy stream

+
+
Parameters:
+
+
paramsdict
+
Dictionary containing all the necessary params to get data.

Parameters defined using input_params() function.

+
+
+
+
sourcestr, {‘raw’, ‘dir’, ‘file’, ‘batch’}
+
String indicating where/how data file was created. For example, if raw data, will need to find correct channels.

‘raw’ finds raspberry shake data, from raw output copied using scp directly from Raspberry Shake, either in folder or subfolders; +‘dir’ is used if the day’s 3 component files (currently Raspberry Shake supported only) are all 3 contained in a directory by themselves. +‘file’ is used if the params[‘input_data’] specified in input_params() is the direct filepath to a single file to be read directly into an obspy stream. +‘batch’ is used to read a list or specified set of seismic files.

+
+

Most commonly, a csv file can be read in with all the parameters. Each row in the csv is a separate file. Columns can be arranged by parameter.

+
+
+
+
+
data_export_pathNone or str or pathlib obj, default=None

If None (or False), data is not trimmed in this function. +Otherwise, this is the directory to save trimmed and exported data.

+
+
data_export_format: str=’mseed’

If data_export_path is not None, this is the format in which to save the data

+
+
detrendstr or bool, default=’spline’

If False, data is not detrended. +Otherwise, this should be a string accepted by the type parameter of the obspy.core.trace.Trace.detrend method: https://docs.obspy.org/packages/autogen/obspy.core.trace.Trace.detrend.html

+
+
detrend_orderint, default=2

If detrend parameter is ‘spline’ or ‘polynomial’, this is passed directly to the order parameter of obspy.core.trace.Trace.detrend method.

+
+
update_metadatabool, default=True

Whether to update the metadata file, used primarily with Raspberry Shake data which uses a generic inventory file.

+
+
plot_input_streambool, default=False

Whether to plot the raw input stream. This plot includes a spectrogram (Z component) and the raw (with decimation for speed) plots of each component signal.

+
+
plot_enginestr, default=’matplotlib’

Which plotting library/engine to use for plotting the Input stream. Options are ‘matplotlib’, ‘plotly’, or ‘obspy’ (not case sensitive).

+
+
verbosebool, default=False

Whether to print outputs and inputs to the terminal

+
+
**kwargs

Keywords arguments, primarily for ‘batch’ and ‘dir’ sources

+
+
+
+
Returns:
+
+
paramsHVSRData or HVSRBatch object

Same as params parameter, but with an additional “stream” attribute with an obspy data stream with 3 traces: Z (vertical), N (North-south), and E (East-west)

+
+
+
+
+
+ +
+
+sprit.sprit_hvsr.generate_ppsds(hvsr_data, azimuthal_ppsds=False, verbose=False, **ppsd_kwargs)[source]
+

Generates PPSDs for each channel

+

Channels need to be in Z, N, E order +Info on PPSD creation here: https://docs.obspy.org/packages/autogen/obspy.signal.spectral_estimation.PPSD.html

+
+
Parameters:
+
+
hvsr_datadict, HVSRData object, or HVSRBatch object

Data object containing all the parameters and other data of interest (stream and paz, for example)

+
+
azimuthal_ppsdsbool, default=False

Whether to generate PPSDs for azimuthal data

+
+
verbosebool, default=True

Whether to print inputs and results to terminal

+
+
**ppsd_kwargsdict

Dictionary with keyword arguments that are passed directly to obspy.signal.PPSD. +If the following keywords are not specified, their defaults are amended in this function from the obspy defaults for its PPSD function. Specifically:

+
+
    +
  • ppsd_length defaults to 30 (seconds) here instead of 3600

  • +
  • skip_on_gaps defaults to True instead of False

  • +
  • period_step_octaves defaults to 0.03125 instead of 0.125

  • +
+
+
+
+
+
Returns:
+
+
ppsdsHVSRData object

Dictionary containing entries with ppsds for each channel

+
+
+
+
+
+ +
+
+sprit.sprit_hvsr.get_metadata(params, write_path='', update_metadata=True, source=None, **read_inventory_kwargs)[source]
+

Get metadata and calculate or get paz parameter needed for PPSD

+
+
Parameters:
+
+
paramsdict
+
Dictionary containing all the input and other parameters needed for processing

Ouput from input_params() function

+
+
+
+
write_pathstr
+
String with output filepath of where to write updated inventory or metadata file

If not specified, does not write file

+
+
+
+
update_metadatabool

Whether to update the metadata file itself, or just read as-is. If using provided raspberry shake metadata file, select True.

+
+
sourcestr, default=None

This passes the source variable value to _read_RS_metadata. It is expected that this is passed directly from the source parameter of sprit.fetch_data()

+
+
+
+
Returns:
+
+
paramsdict

Modified input dictionary with additional key:value pair containing paz dictionary (key = “paz”)

+
+
+
+
+
+ +
+
+sprit.sprit_hvsr.get_report(hvsr_results, report_formats=['print', 'table', 'plot', 'html', 'pdf'], azimuth='HV', plot_type='HVSR p ann C+ p ann Spec p ann', plot_engine='matplotlib', show_print_report=True, show_table_report=False, show_plot_report=True, show_html_report=False, show_pdf_report=True, suppress_report_outputs=False, show_report_outputs=False, csv_handling='append', report_export_format=None, report_export_path=None, verbose=False, **kwargs)[source]
+

Generate and/or print and/or export a report of the HVSR analysis in a variety of formats.

+

Formats include: +* ‘print’: A (monospace) text summary of the HVSR results +* ‘table’: A pandas.DataFrame summary of the HVSR Results.

+
+

This is useful for copy/pasting directly into a larger worksheet.

+
+
    +
  • ‘plot’: A plot summary of the HVSR results, generated using the plot_hvsr() function.

  • +
  • ‘html’: An HTML document/text of the HVSR results. This includes the table, print, and plot reports in one document.

  • +
  • +
    ‘pdf’: A PDF document showing the summary of the HVSR Results.

    The PDF report is simply the HTML report saved to an A4-sized PDF document.

    +
    +
    +
  • +
+
+
Parameters:
+
+
hvsr_resultsdict

Dictionary containing all the information about the processed hvsr data

+
+
report_formats{‘table’, ‘print’, plot}

Format in which to print or export the report. +The following report_formats return the following items in the following attributes:

+
+
    +
  • ‘plot’: hvsr_results[‘Print_Report’] as a str

  • +
  • ‘print’: hvsr_results[‘HV_Plot’] - matplotlib.Figure object

  • +
  • +
    ‘table’: hvsr_results[‘Table_Report’]- pandas.DataFrame object
      +
    • list/tuple - a list or tuple of the above objects, in the same order they are in the report_formats list

    • +
    +
    +
    +
  • +
  • ‘html’: hvsr_results[‘HTML_Report’] - a string containing the text for an HTML document

  • +
  • ‘pdf’: currently does not save to the HVSRData object itself, can only be saved to the disk directly

  • +
+
+
+
plot_typestr, default = ‘HVSR p ann C+ p ann Spec

What type of plot to plot, if ‘plot’ part of report_formats input

+
+
azimuthstr, default = ‘HV’

Which azimuth to plot, by default “HV” which is the main “azimuth” combining the E and N components

+
+
csv_handlingstr, {‘append’, ‘overwrite’, ‘keep/rename’}

How to handle table report outputs if the designated csv output file already exists. By default, appends the new information to the end of the existing file.

+
+
suppress_report_outputsbool, default=False

If True, only reads output to appropriate attribute of data class (ie, print does not print, only reads text into variable). If False, performs as normal.

+
+
report_export_formatlist or str, default=[‘pdf’]

A string or list of strings indicating which report formats should be exported to disk.

+
+
report_export_pathNone, bool, or filepath, default = None

If None or False, does not export; if True, will export to same directory as the input_data parameter in the input_params() function. +Otherwise, it should be a string or path object indicating where to export results. May be a file or directory. +If a directory is specified, the filename will be “<site_name>_<acq_date>_<UTC start time>-<UTC end time>”. +The extension/suffix defaults to png for report_formats=”plot”, csv for ‘table’, txt for ‘print’, html for ‘html’, and pdf for ‘pdf.’

+
+
verbosebool, default=True

Whether to print the results to terminal. This is the same output as report_formats=’print’, and will not repeat if that is already selected

+
+
+
+
Returns:
+
+
sprit.HVSRData
+
+
+
+
+ +
+
+sprit.sprit_hvsr.gui(kind='browser')[source]
+

Function to open a graphical user interface (gui)

+
+
Parameters:
+
+
kindstr, optional

What type of gui to open. “default” opens regular windowed interface, +“widget” opens jupyter widget’ +“lite” open lite (pending update), by default ‘default’

+
+
+
+
+
+ +
+
+sprit.sprit_hvsr.gui_test()[source]
+
+ +
+
+sprit.sprit_hvsr.import_data(import_filepath, data_format='pickle')[source]
+

Function to import .hvsr (or other extension) data exported using export_data() function

+
+
Parameters:
+
+
import_filepathstr or path object

Filepath of file created using export_data() function. This is usually a pickle file with a .hvsr extension

+
+
data_formatstr, default=’pickle’

Type of format data is in. Currently, only ‘pickle’ supported. Eventually, json or other type may be supported, by default ‘pickle’.

+
+
+
+
Returns:
+
+
HVSRData or HVSRBatch object
+
+
+
+
+ +
+
+sprit.sprit_hvsr.import_settings(settings_import_path, settings_import_type='instrument', verbose=False)[source]
+
+ +
+
+sprit.sprit_hvsr.input_params(input_data, site='HVSR Site', id_prefix=None, network='AM', station='RAC84', loc='00', channels=['EHZ', 'EHN', 'EHE'], acq_date='2024-10-30', starttime=UTCDateTime(2024, 10, 30, 0, 0), endtime=UTCDateTime(2024, 10, 30, 23, 59, 59, 999999), tzone='UTC', xcoord=-88.2290526, ycoord=40.1012122, elevation=755, input_crs=None, output_crs=None, elev_unit='meters', depth=0, instrument='Raspberry Shake', metapath=None, hvsr_band=[0.4, 40], peak_freq_range=[0.4, 40], processing_parameters={}, verbose=False)[source]
+

Function for designating input parameters for reading in and processing data

+
+
Parameters:
+
+
input_datastr or pathlib.Path object

Filepath of data. This can be a directory or file, but will need to match with what is chosen later as the source parameter in fetch_data()

+
+
sitestr, default=”HVSR Site”

Site name as designated by user for ease of reference. Used for plotting titles, filenames, etc.

+
+
id_prefixstr, default=None

A prefix that may be used to create unique identifiers for each site. +The identifier created is saved as the [‘HVSR_ID’] attribute of the HVSRData object, +and is equivalent to the following formatted string: +f”{id_prefix}-{acq_date.strftime(“%Y%m%d”)}-{starttime.strftime(“%H%M”)}-{station}”.

+
+
networkstr, default=’AM’

The network designation of the seismometer. This is necessary for data from Raspberry Shakes. ‘AM’ is for Amateur network, which fits Raspberry Shakes.

+
+
stationstr, default=’RAC84’

The station name of the seismometer. This is necessary for data from Raspberry Shakes.

+
+
locstr, default=’00’

Location information of the seismometer.

+
+
channelslist, default=[‘EHZ’, ‘EHN’, ‘EHE’]

The three channels used in this analysis, as a list of strings. Preferred that Z component is first, but not necessary

+
+
acq_datestr, int, date object, or datetime object

If string, preferred format is ‘YYYY-MM-DD’. +If int, this will be interpreted as the time_int of year of current year (e.g., 33 would be Feb 2 of current year) +If date or datetime object, this will be the date. Make sure to account for time change when converting to UTC (if UTC is the following time_int, use the UTC time_int).

+
+
starttimestr, time object, or datetime object, default=’00:00:00.00’

Start time of data stream. This is necessary for Raspberry Shake data in ‘raw’ form, or for trimming data. Format can be either ‘HH:MM:SS.micros’ or ‘HH:MM’ at minimum.

+
+
endtimestr, time obejct, or datetime object, default=’23:59:99.99’

End time of data stream. This is necessary for Raspberry Shake data in ‘raw’ form, or for trimming data. Same format as starttime.

+
+
tzonestr or int, default = ‘UTC’

Timezone of input data. If string, ‘UTC’ will use the time as input directly. Any other string value needs to be a TZ identifier in the IANA database, a wikipedia page of these is available here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. +If int, should be the int value of the UTC offset (e.g., for American Eastern Standard Time: -5). +This is necessary for Raspberry Shake data in ‘raw’ format.

+
+
xcoordfloat, default=-88.2290526

Longitude (or easting, or, generally, X coordinate) of data point, in Coordinate Reference System (CRS) designated by input_crs. Currently only used in table output, but will likely be used in future for mapping/profile purposes.

+
+
ycoordfloat, default=40.1012122

Latitute (or northing, or, generally, X coordinate) of data point, in Coordinate Reference System (CRS) designated by input_crs. Currently only used in table output, but will likely be used in future for mapping/profile purposes.

+
+
input_crsstr or other format read by pyproj, default=’EPSG:4326’

Coordinate reference system of input data, as used by pyproj.CRS.from_user_input()

+
+
output_crsstr or other format read by pyproj, default=’EPSG:4326’

Coordinate reference system to which input data will be transformed, as used by pyproj.CRS.from_user_input()

+
+
elevationfloat, default=755

Surface elevation of data point. Not currently used (except in table output), but will likely be used in the future.

+
+
depthfloat, default=0

Depth of seismometer. Not currently used, but will likely be used in the future.

+
+
instrumentstr {‘Raspberry Shake’, “Tromino”}

Instrument from which the data was acquired.

+
+
metapathstr or pathlib.Path object, default=None

Filepath of metadata, in format supported by obspy.read_inventory. If default value of None, will read from resources folder of repository (only supported for Raspberry Shake).

+
+
hvsr_bandlist, default=[0.4, 40]

Two-element list containing low and high “corner” frequencies (in Hz) for processing. This can specified again later.

+
+
peak_freq_rangelist or tuple, default=[0.4, 40]

Two-element list or tuple containing low and high frequencies (in Hz) that are used to check for HVSR Peaks. This can be a tigher range than hvsr_band, but if larger, it will still only use the hvsr_band range.

+
+
processing_parameters={}dict or filepath, default={}

If filepath, should point to a .proc json file with processing parameters (i.e, an output from sprit.export_settings()). +Note that this only applies to parameters for the functions: ‘fetch_data’, ‘remove_noise’, ‘generate_ppsds’, ‘process_hvsr’, ‘check_peaks’, and ‘get_report.’ +If dictionary, dictionary containing nested dictionaries of function names as they key, and the parameter names/values as key/value pairs for each key. +If a function name is not present, or if a parameter name is not present, default values will be used. +For example:

+
+

{ ‘fetch_data’ : {‘source’:’batch’, ‘data_export_path’:”/path/to/trimmed/data”, ‘data_export_format’:’mseed’, ‘detrend’:’spline’, ‘plot_input_stream’:True, ‘verbose’:False, kwargs:{‘kwargskey’:’kwargsvalue’}} }

+
+
+
verbosebool, default=False

Whether to print output and results to terminal

+
+
+
+
Returns:
+
+
paramssprit.HVSRData

sprit.HVSRData class containing input parameters, including data file path and metadata path. This will be used as an input to other functions. If batch processing, params will be converted to batch type in fetch_data() step.

+
+
+
+
+
+ +
+
+sprit.sprit_hvsr.plot_azimuth(hvsr_data, fig=None, ax=None, show_azimuth_peaks=False, interpolate_azimuths=True, show_azimuth_grid=False, show_plot=True, **plot_azimuth_kwargs)[source]
+

Function to plot azimuths when azimuths are calculated

+
+
Parameters:
+
+
hvsr_dataHVSRData or HVSRBatch

HVSRData that has gone through at least the sprit.fetch_data() step, and before sprit.generate_ppsds()

+
+
show_azimuth_peaksbool, optional

Whether to display the peak value at each azimuth calculated on the chart, by default False

+
+
interpolate_azimuthsbool, optional

Whether to interpolate the azimuth data to get a smoother plot. +This is just for visualization, does not change underlying data. +It takes a lot of time to process the data, but interpolation for vizualization can happen fairly fast. By default True.

+
+
show_azimuth_gridbool, optional

Whether to display the grid on the chart, by default False

+
+
+
+
Returns:
+
+
matplotlib.Figure, matplotlib.Axis

Figure and axis of resulting azimuth plot

+
+
+
+
+
+ +
+
+sprit.sprit_hvsr.plot_hvsr(hvsr_data, plot_type='HVSR ann p C+ ann p SPEC ann p', azimuth='HV', use_subplots=True, fig=None, ax=None, return_fig=False, plot_engine='matplotlib', save_dir=None, save_suffix='', show_legend=False, show_plot=True, close_figs=False, clear_fig=True, **kwargs)[source]
+

Function to plot HVSR data

+
+
Parameters:
+
+
hvsr_datadict

Dictionary containing output from process_hvsr function

+
+
plot_typestr or list, default = ‘HVSR ann p C+ ann p SPEC ann p’

The plot_type of plot(s) to plot. If list, will plot all plots listed +- ‘HVSR’ - Standard HVSR plot, including standard deviation. Options are included below:

+
+
    +
  • ‘p’ shows a vertical dotted line at frequency of the “best” peak

  • +
  • ‘ann’ annotates the frequency value of of the “best” peak

  • +
  • ‘all’ shows all the peaks identified in check_peaks() (by default, only the max is identified)

  • +
  • ‘t’ shows the H/V curve for all time windows

  • +
  • ‘tp’ shows all the peaks from the H/V curves of all the time windows

  • +
  • ‘fr’ shows the window within which SpRIT will search for peak frequencies, as set by peak_freq_range

  • +
  • +
    ‘test’ shows a visualization of the results of the peak validity test(s). Examples:
      +
    • ‘tests’ visualizes the results of all the peak tests (not the curve tests)

    • +
    • +
      ‘test12’ shows the results of tests 1 and 2.
        +
      • Append any number 1-6 after ‘test’ to show a specific test result visualized

      • +
      +
      +
      +
    • +
    +
    +
    +
  • +
+
+
    +
  • +
    ‘COMP’ - plot of the PPSD curves for each individual component (“C” also works)
      +
    • ‘+’ (as a suffix in ‘C+’ or ‘COMP+’) plots C on a plot separate from HVSR (C+ is default, but without + will plot on the same plot as HVSR)

    • +
    • ‘p’ shows a vertical dotted line at frequency of the “best” peak

    • +
    • ‘ann’ annotates the frequency value of of the “best” peak

    • +
    • ‘all’ shows all the peaks identified in check_peaks() (by default, only the max is identified)

    • +
    • ‘t’ shows the H/V curve for all time windows

    • +
    +
    +
    +
  • +
  • +
    ‘SPEC’ - spectrogram style plot of the H/V curve over time
      +
    • ‘p’ shows a horizontal dotted line at the frequency of the “best” peak

    • +
    • ‘ann’ annotates the frequency value of the “best” peak

    • +
    • ‘all’ shows all the peaks identified in check_peaks()

    • +
    • ‘tp’ shows all the peaks of the H/V curve at all time windows

    • +
    +
    +
    +
  • +
  • +
    ‘AZ’ - circular plot of calculated azimuthal HV curves, similar in style to SPEC plot.
      +
    • ‘p’ shows a point at each calculated (not interpolated) azimuth peak

    • +
    • ‘g’ shows grid lines at various angles

    • +
    • +
      ‘i’ interpolates so that there is an interpolated azimuth at each degree interval (1 degree step)

      This is the default, so usually ‘i’ is not needed.

      +
      +
      +
    • +
    • ‘-i’ prohibits interpolation (only shows the calculated azimuths, as determined by azimuth_angle (default = 30))

    • +
    +
    +
    +
  • +
+
+
azimuthstr, default = ‘HV’

What ‘azimuth’ to plot, default being standard N E components combined

+
+
use_subplotsbool, default = True

Whether to output the plots as subplots (True) or as separate plots (False)

+
+
figmatplotlib.Figure, default = None

If not None, matplotlib figure on which plot is plotted

+
+
axmatplotlib.Axis, default = None

If not None, matplotlib axis on which plot is plotted

+
+
return_figbool

Whether to return figure and axis objects

+
+
plot_enginestr, default=’Matplotlib’

Which engine to use for plotting. Both “matplotlib” and “plotly” are acceptable. For shorthand, ‘mpl’, ‘m’ also work for matplotlib; ‘plty’ or ‘p’ also work for plotly. Not case sensitive.

+
+
save_dirstr or None

Directory in which to save figures

+
+
save_suffixstr

Suffix to add to end of figure filename(s), if save_dir is used

+
+
show_legendbool, default=False

Whether to show legend in plot

+
+
show_plotbool

Whether to show plot

+
+
close_figsbool, default=False

Whether to close figures before plotting

+
+
clear_figbool, default=True

Whether to clear figures before plotting

+
+
**kwargskeyword arguments

Keyword arguments for matplotlib.pyplot

+
+
+
+
Returns:
+
+
fig, axmatplotlib figure and axis objects

Returns figure and axis matplotlib.pyplot objects if return_fig=True, otherwise, simply plots the figures

+
+
+
+
+
+ +
+
+sprit.sprit_hvsr.plot_stream(stream, params, fig=None, axes=None, show_plot=False, ylim_std=0.75, return_fig=True)[source]
+

Function to plot a stream of data with Z, E, N components using matplotlib. Similar to obspy.Stream.Plot(), but will be formatted differently and eventually more customizable. +This is also used in various functions throughout the package.

+
+
Parameters:
+
+
streamobspy.core.Stream.stream

Obpsy stream of data with Z, E, N componenents

+
+
paramsHVSRData or HVSRBatch

Data object with parameters relevant for creating plot

+
+
figmatplotlib.Figure, default=None

Optional: if not None, matplotlib.Figure in which to plot the resulting figure (i.e., can be plotted in existing figure)

+
+
axesmatplotlib.Axis, default=None

Optional: if not None, matplotlib.Axis in which to plot the resulting figure (i.e., can be plotted in existing axis)

+
+
show_plotbool, default=False

Whether to do matplotlib.pylot.show(), by default False

+
+
ylim_stdfloat, default = 0.75

Optional: the standard deviation of the data at which to clip the chart, by default 0.75

+
+
return_figbool, default=True

Optional: whether to return the figure, by default True

+
+
+
+
Returns:
+
+
(matplotlib.Figure, matplotlib.Axes)

Tuple containing the figure and axes of the resulting plot, only returned if return_fig = True

+
+
+
+
+
+ +
+
+sprit.sprit_hvsr.process_hvsr(hvsr_data, horizontal_method=None, smooth=True, freq_smooth='konno ohmachi', f_smooth_width=40, resample=True, outlier_curve_rmse_percentile=False, azimuth=None, verbose=False)[source]
+

Process the input data and get HVSR data

+

This is the main function that uses other (private) functions to do +the bulk of processing of the HVSR data and the data quality checks.

+
+
Parameters:
+
+
hvsr_dataHVSRData or HVSRBatch

Data object containing all the parameters input and generated by the user (usually, during sprit.input_params(), sprit.fetch_data(), sprit.generate_ppsds() and/or sprit.remove_noise()).

+
+
horizontal_methodint or str, default=3
+
Method to use for combining the horizontal components. Default is 3) Geometric Mean
    +
  1. (not used)

  2. +
  3. ‘Diffuse field assumption’ H = √( (eie_E + eie_N) / eie_Z), eie = equal interval energy

  4. +
  5. ‘Arithmetic Mean’ H ≡ (HN + HE)/2

  6. +
  7. ‘Geometric Mean’ H ≡ √(HN · HE), recommended by the SESAME project (2004)

  8. +
  9. ‘Vector Summation’ H ≡ √(HN^2 + HE^2)

  10. +
  11. ‘Quadratic Mean’ H ≡ √(HN^2 + HE^2)/2

  12. +
  13. ‘Maximum Horizontal Value’ H ≡ max {HN, HE}

  14. +
  15. ‘Minimum Horizontal Valey’ H ≡ min {HN, HE}

  16. +
  17. ‘Single Azimuth’ H = H2·cos(az) + H1·sin(az)

  18. +
+
+
+
+
smoothbool, default=True
+
bool or int may be used.

If True, default to smooth H/V curve to using savgoy filter with window length of 51 (works well with default resample of 1000 pts) +If int, the length of the window in the savgoy filter.

+
+
+
+
freq_smoothstr {‘konno ohmachi’, ‘constant’, ‘proportional’}
+
Which frequency smoothing method to use. By default, uses the ‘konno ohmachi’ method.
+
+
+

See here for more information: https://www.geopsy.org/documentation/geopsy/hv-processing.html

+
+
f_smooth_widthint, default = 40
    +
  • For ‘konno ohmachi’: passed directly to the bandwidth parameter of the konno_ohmachi_smoothing() function, determines the width of the smoothing peak, with lower values resulting in broader peak. Must be > 0.

  • +
  • For ‘constant’: the size of a triangular smoothing window in the number of frequency steps

  • +
  • For ‘proportional’: the size of a triangular smoothing window in percentage of the number of frequency steps (e.g., if 1000 frequency steps/bins and f_smooth_width=40, window would be 400 steps wide)

  • +
+
+
resamplebool, default = True
+
bool or int.

If True, default to resample H/V data to include 1000 frequency values for the rest of the analysis +If int, the number of data points to interpolate/resample/smooth the component psd/HV curve data to.

+
+
+
+
outlier_curve_rmse_percentilebool, float, default = False

If False, outlier curve removal is not carried out here. +If True, defaults to 98 (98th percentile). +Otherwise, float of percentile used as rmse_thresh of remove_outlier_curve().

+
+
azimuthfloat, default = None

The azimuth angle to use when method is single azimuth.

+
+
verbosebool, defualt=False

Whether to print output to terminal

+
+
+
+
Returns:
+
+
hvsr_outdict

Dictionary containing all the information about the data, including input parameters

+
+
+
+
+
+ +
+
+sprit.sprit_hvsr.read_tromino_files(input_data, params, struct_format='H', sampling_rate=128, start_byte=24576, verbose=False, **kwargs)[source]
+

Function to read data from tromino. Specifically, this has been lightly tested on Tromino 3G+ machines

+
+
Parameters:
+
+
input_datastr, pathlib.Path()

The input parameter _datapath_ from sprit.input_params()

+
+
paramsHVSRData or HVSRBatch

The parameters as read in from input_params() and and fetch_data()

+
+
verbosebool, optional

Whether to print results to terminal, by default False

+
+
+
+
Returns:
+
+
obspy.Stream

An obspy.Stream object containing the trace data from the Tromino instrument

+
+
+
+
+
+ +
+
+sprit.sprit_hvsr.remove_noise(hvsr_data, remove_method=None, processing_window=None, sat_percent=0.995, noise_percent=0.8, sta=2, lta=30, stalta_thresh=[8, 16], warmup_time=0, cooldown_time=0, min_win_size=1, remove_raw_noise=False, show_stalta_plot=False, verbose=False)[source]
+

Function to remove noisy windows from data, using various methods.

+

Methods include +- Manual window selection (by clicking on a chart with spectrogram and stream data), +- Auto window selection, which does the following two in sequence (these can also be done indepently):

+
+
    +
  • A sta/lta “antitrigger” method (using stalta values to automatically remove triggered windows where there appears to be too much noise)

  • +
  • A noise threshold method, that cuts off all times where the noise threshold equals more than (by default) 80% of the highest amplitude noise sample for the length specified by lta (in seconds)

  • +
  • A saturation threshold method, that cuts off all times where the noise threshold equals more than (by default) 99.5% of the highest amplitude noise sample.

  • +
+
+
+
Parameters:
+
+
hvsr_datadict, obspy.Stream, or obspy.Trace

Dictionary containing all the data and parameters for the HVSR analysis

+
+
remove_methodstr, {‘auto’, ‘manual’, ‘stalta’/’antitrigger’, ‘saturation threshold’, ‘noise threshold’, ‘warmup’/’cooldown’/’buffer’/’warm_cool’}

The different methods for removing noise from the dataset. A list of strings will also work, in which case, it should be a list of the above strings. See descriptions above for what how each method works. By default ‘auto.’ +If remove_method=’auto’, this is the equivalent of remove_method=[‘noise threshold’, ‘antitrigger’, ‘saturation threshold’, ‘warm_cool’]

+
+
processing_windowlist, tuple, or None

A list/tuple of two items [s, e] or a list/tuple of two-item lists/tuples [[s0, e0], [s1,e1],…[sn, en]] with start and end time(s) for windows to keep for processing. +Data outside of these times will be excluded from processing. +Times should be obspy.UTCDateTime objects to ensure precision, but time strings (“13:05”) will also work in most cases (excpetions may be when the data stream starts/ends on different UTC days)

+
+
sat_percentfloat, default=0.995

Percentage (between 0 and 1), to use as the threshold at which to remove data. This is used in the saturation method. By default 0.995. +If a value is passed that is greater than 1, it will be divided by 100 to obtain the percentage.

+
+
noise_percentfloat, default = 0.8

Percentage (between 0 and 1), to use as the threshold at which to remove data, if it persists for longer than time (in seconds (specified by min_win_size)). This is used in the noise threshold method. By default 0.8. +If a value is passed that is greater than 1, it will be divided by 100 to obtain the percentage.

+
+
staint, optional

Short term average (STA) window (in seconds), by default 2. For use with sta/lta antitrigger method.

+
+
ltaint, optional

Long term average (STA) window (in seconds), by default 30. For use with sta/lta antitrigger method.

+
+
stalta_threshlist, default=[0.5,5]

Two-item list or tuple with the thresholds for the stalta antitrigger. The first value (index [0]) is the lower threshold, the second value (index [1] is the upper threshold), by default [0.5,5]

+
+
warmup_timeint, default=0

Time in seconds to allow for warmup of the instrument (or while operator is still near instrument). This will renove any data before this time, by default 0.

+
+
cooldown_timeint, default=0

Time in seconds to allow for cooldown of the instrument (or for when operator is nearing instrument). This will renove any data before this time, by default 0.

+
+
min_win_sizefloat, default=1

The minumum size a window must be over specified threshold (in seconds) for it to be removed

+
+
remove_raw_noisebool, default=False

If remove_raw_noise=True, will perform operation on raw data (‘input_stream’), rather than potentially already-modified data (‘stream’).

+
+
verbosebool, default=False

Whether to print status of remove_noise

+
+
+
+
Returns:
+
+
outputdict

Dictionary similar to hvsr_data, but containing modified data with ‘noise’ removed

+
+
+
+
+
+ +
+
+sprit.sprit_hvsr.remove_outlier_curves(hvsr_data, rmse_thresh=98, use_percentile=True, use_hv_curve=False, plot_engine='matplotlib', show_plot=False, verbose=False)[source]
+

Function used to remove outliers curves using Root Mean Square Error to calculate the error of each windowed +Probabilistic Power Spectral Density (PPSD) curve against the median PPSD value at each frequency step for all times. +It calculates the RMSE for the PPSD curves of each component individually. All curves are removed from analysis.

+

Some abberant curves often occur due to the remove_noise() function, so this should be run some time after remove_noise(). +In general, the recommended workflow is to run this immediately following the generate_ppsds() function.

+
+
Parameters:
+
+
hvsr_datadict

Input dictionary containing all the values and parameters of interest

+
+
rmse_threshfloat or int, default=98

The Root Mean Square Error value to use as a threshold for determining whether a curve is an outlier. +This averages over each individual entire curve so that curves with very abberant data (often occurs when using the remove_noise() method), can be identified. +Otherwise, specify a float or integer to use as the cutoff RMSE value (all curves with RMSE above will be removed)

+
+
use_percentilefloat, default=True

Whether rmse_thresh should be interepreted as a raw RMSE value or as a percentile of the RMSE values.

+
+
use_hv_curvebool, default=False

Whether to use the calculated HV Curve or the individual components. This can only be True after process_hvsr() has been run.

+
+
show_plotbool, default=False

Whether to show a plot of the removed data

+
+
verbosebool, default=False

Whether to print output of function to terminal

+
+
+
+
Returns:
+
+
hvsr_datadict

Input dictionary with values modified based on work of function.

+
+
+
+
+
+ +
+
+sprit.sprit_hvsr.run(input_data, source='file', azimuth_calculation=False, noise_removal=False, outlier_curves_removal=False, verbose=False, **kwargs)[source]
+

The sprit.run() is the main function that allows you to do all your HVSR processing in one simple step (sprit.run() is how you would call it in your code, but it may also be called using sprit.sprit_hvsr.run())

+

The input_data parameter of sprit.run() is the only required parameter. This can be either a single file, a list of files (one for each component, for example), a directory (in which case, all obspy-readable files will be added to an HVSRBatch instance), a Rasp. Shake raw data directory, or sample data.

+
+
Parameters:
+
+
input_datastr or filepath object that can be read by obspy

Filepath to data to be processed. This may be a file or directory, depending on what kind of data is being processed (this can be specified with the source parameter). +For sample data, The following can be specified as the input_data parameter:

+
+
    +
  • Any integer 1-6 (inclusive), or the string (e.g., input_data=”1” or input_data=1 will work)

  • +
  • The word “sample” before any integer (e.g., input_data=”sample1”)

  • +
  • The word “sample” will default to “sample1” if source=’file’.

  • +
  • If source=’batch’, input_data should be input_data=’sample’ or input_data=’batch’. In this case, it will read and process all the sample files using the HVSRBatch class. Set verbose=True to see all the information in the sample batch csv file.

  • +
+
+
+
sourcestr, optional

_description_, by default ‘file’

+
+
azimuth_calculationbool, optional

Whether to perform azimuthal analysis, by default False.

+
+
noise_removalbool, default=False

Whether to remove noise (before processing PPSDs)

+
+
outlier_curves_removalbool, default=False

Whether to remove outlier curves from HVSR time windows

+
+
show_plotbool, default=True

Whether to show plots. This does not affect whether the plots are created (and then inserted as an attribute of HVSRData), only whether they are shown.

+
+
verbosebool, optional

_description_, by default False

+
+
**kwargs

Keyword arguments for the functions listed above. The keyword arguments are unique, so they will get parsed out and passed into the appropriate function.

+
+
input_paramsfunction name (not an actual parameter)

Function for designating input parameters for reading in and processing data +See API documentation: [input_params()](https://sprit.readthedocs.io/en/latest/sprit.html#sprit.input_params)

+
+
input_data: any, default = ‘<no default>’

See API documentation at link above or at help(sprit.input_params) for specifics.

+
+
site: any, default = ‘HVSR Site’

See API documentation at link above or at help(sprit.input_params) for specifics.

+
+
id_prefix: any, default = None

See API documentation at link above or at help(input_params) for specifics.

+
+
network: any, default = ‘AM’

See API documentation at link above or at help(sprit.input_params) for specifics.

+
+
station: any, default = ‘RAC84’

See API documentation at link above or at help(sprit.input_params) for specifics.

+
+
loc: any, default = ‘00’

See API documentation at link above or at help(sprit.input_params) for specifics.

+
+
channels: any, default = [‘EHZ’, ‘EHN’, ‘EHE’]

See API documentation at link above or at help(input_params) for specifics.

+
+
acq_date: any, default = ‘2024-10-30’

See API documentation at link above or at help(sprit.input_params) for specifics.

+
+
starttime: any, default = 2024-10-30T00:00:00.000000Z

See API documentation at link above or at help(input_params) for specifics.

+
+
endtime: any, default = 2024-10-30T23:59:59.999999Z

See API documentation at link above or at help(input_params) for specifics.

+
+
tzone: any, default = ‘UTC’

See API documentation at link above or at help(sprit.input_params) for specifics.

+
+
xcoord: any, default = -88.2290526

See API documentation at link above or at help(input_params) for specifics.

+
+
ycoord: any, default = 40.1012122

See API documentation at link above or at help(input_params) for specifics.

+
+
elevation: any, default = 755

See API documentation at link above or at help(input_params) for specifics.

+
+
input_crs: any, default = None

See API documentation at link above or at help(input_params) for specifics.

+
+
output_crs: any, default = None

See API documentation at link above or at help(input_params) for specifics.

+
+
elev_unit: any, default = ‘meters’

See API documentation at link above or at help(sprit.input_params) for specifics.

+
+
depth: any, default = 0

See API documentation at link above or at help(input_params) for specifics.

+
+
instrument: any, default = ‘Raspberry Shake’

See API documentation at link above or at help(sprit.input_params) for specifics.

+
+
metapath: any, default = None

See API documentation at link above or at help(input_params) for specifics.

+
+
hvsr_band: any, default = [0.4, 40]

See API documentation at link above or at help(input_params) for specifics.

+
+
peak_freq_range: any, default = [0.4, 40]

See API documentation at link above or at help(input_params) for specifics.

+
+
processing_parameters: any, default = {}

See API documentation at link above or at help(input_params) for specifics.

+
+
verbose: any, default = False

See API documentation at link above or at help(input_params) for specifics.

+
+
fetch_datafunction name (not an actual parameter)

Fetch ambient seismic data from a source to read into obspy stream +See API documentation: [fetch_data()](https://sprit.readthedocs.io/en/latest/sprit.html#sprit.fetch_data)

+
+
params: any, default = ‘<output of previous function>’

See API documentation at link above or at help(sprit.fetch_data) for specifics.

+
+
source: any, default = ‘file’

See API documentation at link above or at help(sprit.fetch_data) for specifics.

+
+
data_export_path: any, default = None

See API documentation at link above or at help(fetch_data) for specifics.

+
+
data_export_format: any, default = ‘mseed’

See API documentation at link above or at help(sprit.fetch_data) for specifics.

+
+
detrend: any, default = ‘spline’

See API documentation at link above or at help(sprit.fetch_data) for specifics.

+
+
detrend_order: any, default = 2

See API documentation at link above or at help(fetch_data) for specifics.

+
+
update_metadata: any, default = True

See API documentation at link above or at help(fetch_data) for specifics.

+
+
plot_input_stream: any, default = False

See API documentation at link above or at help(fetch_data) for specifics.

+
+
plot_engine: any, default = ‘matplotlib’

See API documentation at link above or at help(sprit.fetch_data) for specifics.

+
+
show_plot: any, default = True

See API documentation at link above or at help(fetch_data) for specifics.

+
+
verbose: any, default = False

See API documentation at link above or at help(fetch_data) for specifics.

+
+
kwargs: any, default = {}

See API documentation at link above or at help(fetch_data) for specifics.

+
+
calculate_azimuthfunction name (not an actual parameter)

Function to calculate azimuthal horizontal component at specified angle(s). Adds each new horizontal +See API documentation: [calculate_azimuth()](https://sprit.readthedocs.io/en/latest/sprit.html#sprit.calculate_azimuth)

+
+
hvsr_data: any, default = ‘<output of previous function>’

See API documentation at link above or at help(sprit.calculate_azimuth) for specifics.

+
+
azimuth_angle: any, default = 30

See API documentation at link above or at help(calculate_azimuth) for specifics.

+
+
azimuth_type: any, default = ‘multiple’

See API documentation at link above or at help(sprit.calculate_azimuth) for specifics.

+
+
azimuth_unit: any, default = ‘degrees’

See API documentation at link above or at help(sprit.calculate_azimuth) for specifics.

+
+
show_az_plot: any, default = False

See API documentation at link above or at help(calculate_azimuth) for specifics.

+
+
verbose: any, default = False

See API documentation at link above or at help(calculate_azimuth) for specifics.

+
+
plot_azimuth_kwargs: any, default = {}

See API documentation at link above or at help(calculate_azimuth) for specifics.

+
+
remove_noisefunction name (not an actual parameter)

Function to remove noisy windows from data, using various methods. +See API documentation: [remove_noise()](https://sprit.readthedocs.io/en/latest/sprit.html#sprit.remove_noise)

+
+
hvsr_data: any, default = ‘<output of previous function>’

See API documentation at link above or at help(sprit.remove_noise) for specifics.

+
+
remove_method: any, default = None

See API documentation at link above or at help(remove_noise) for specifics.

+
+
processing_window: any, default = None

See API documentation at link above or at help(remove_noise) for specifics.

+
+
sat_percent: any, default = 0.995

See API documentation at link above or at help(remove_noise) for specifics.

+
+
noise_percent: any, default = 0.8

See API documentation at link above or at help(remove_noise) for specifics.

+
+
sta: any, default = 2

See API documentation at link above or at help(remove_noise) for specifics.

+
+
lta: any, default = 30

See API documentation at link above or at help(remove_noise) for specifics.

+
+
stalta_thresh: any, default = [8, 16]

See API documentation at link above or at help(remove_noise) for specifics.

+
+
warmup_time: any, default = 0

See API documentation at link above or at help(remove_noise) for specifics.

+
+
cooldown_time: any, default = 0

See API documentation at link above or at help(remove_noise) for specifics.

+
+
min_win_size: any, default = 1

See API documentation at link above or at help(remove_noise) for specifics.

+
+
remove_raw_noise: any, default = False

See API documentation at link above or at help(remove_noise) for specifics.

+
+
show_stalta_plot: any, default = False

See API documentation at link above or at help(remove_noise) for specifics.

+
+
verbose: any, default = False

See API documentation at link above or at help(remove_noise) for specifics.

+
+
generate_ppsdsfunction name (not an actual parameter)

Generates PPSDs for each channel +See API documentation: [generate_ppsds()](https://sprit.readthedocs.io/en/latest/sprit.html#sprit.generate_ppsds)

+
+
hvsr_data: any, default = ‘<output of previous function>’

See API documentation at link above or at help(sprit.generate_ppsds) for specifics.

+
+
azimuthal_ppsds: any, default = False

See API documentation at link above or at help(generate_ppsds) for specifics.

+
+
verbose: any, default = False

See API documentation at link above or at help(generate_ppsds) for specifics.

+
+
ppsd_kwargs: any, default = {}

See API documentation at link above or at help(generate_ppsds) for specifics.

+
+
process_hvsrfunction name (not an actual parameter)

Process the input data and get HVSR data +See API documentation: [process_hvsr()](https://sprit.readthedocs.io/en/latest/sprit.html#sprit.process_hvsr)

+
+
hvsr_data: any, default = ‘<output of previous function>’

See API documentation at link above or at help(sprit.process_hvsr) for specifics.

+
+
horizontal_method: any, default = None

See API documentation at link above or at help(process_hvsr) for specifics.

+
+
smooth: any, default = True

See API documentation at link above or at help(process_hvsr) for specifics.

+
+
freq_smooth: any, default = ‘konno ohmachi’

See API documentation at link above or at help(sprit.process_hvsr) for specifics.

+
+
f_smooth_width: any, default = 40

See API documentation at link above or at help(process_hvsr) for specifics.

+
+
resample: any, default = True

See API documentation at link above or at help(process_hvsr) for specifics.

+
+
outlier_curve_rmse_percentile: any, default = False

See API documentation at link above or at help(process_hvsr) for specifics.

+
+
azimuth: any, default = None

See API documentation at link above or at help(process_hvsr) for specifics.

+
+
verbose: any, default = False

See API documentation at link above or at help(process_hvsr) for specifics.

+
+
remove_outlier_curvesfunction name (not an actual parameter)

Function used to remove outliers curves using Root Mean Square Error to calculate the error of each +See API documentation: [remove_outlier_curves()](https://sprit.readthedocs.io/en/latest/sprit.html#sprit.remove_outlier_curves)

+
+
hvsr_data: any, default = ‘<output of previous function>’

See API documentation at link above or at help(sprit.remove_outlier_curves) for specifics.

+
+
rmse_thresh: any, default = 98

See API documentation at link above or at help(remove_outlier_curves) for specifics.

+
+
use_percentile: any, default = True

See API documentation at link above or at help(remove_outlier_curves) for specifics.

+
+
use_hv_curve: any, default = False

See API documentation at link above or at help(remove_outlier_curves) for specifics.

+
+
plot_engine: any, default = ‘matplotlib’

See API documentation at link above or at help(sprit.remove_outlier_curves) for specifics.

+
+
show_plot: any, default = False

See API documentation at link above or at help(remove_outlier_curves) for specifics.

+
+
verbose: any, default = False

See API documentation at link above or at help(remove_outlier_curves) for specifics.

+
+
check_peaksfunction name (not an actual parameter)

Function to run tests on HVSR peaks to find best one and see if it passes quality checks +See API documentation: [check_peaks()](https://sprit.readthedocs.io/en/latest/sprit.html#sprit.check_peaks)

+
+
hvsr_data: any, default = ‘<output of previous function>’

See API documentation at link above or at help(sprit.check_peaks) for specifics.

+
+
hvsr_band: any, default = [0.4, 40]

See API documentation at link above or at help(check_peaks) for specifics.

+
+
peak_selection: any, default = ‘max’

See API documentation at link above or at help(sprit.check_peaks) for specifics.

+
+
peak_freq_range: any, default = [0.4, 40]

See API documentation at link above or at help(check_peaks) for specifics.

+
+
azimuth: any, default = ‘HV’

See API documentation at link above or at help(sprit.check_peaks) for specifics.

+
+
verbose: any, default = False

See API documentation at link above or at help(check_peaks) for specifics.

+
+
get_reportfunction name (not an actual parameter)

Generate and/or print and/or export a report of the HVSR analysis in a variety of formats. +See API documentation: [get_report()](https://sprit.readthedocs.io/en/latest/sprit.html#sprit.get_report)

+
+
hvsr_results: any, default = ‘<output of previous function>’

See API documentation at link above or at help(sprit.get_report) for specifics.

+
+
report_formats: any, default = [‘print’, ‘table’, ‘plot’, ‘html’, ‘pdf’]

See API documentation at link above or at help(get_report) for specifics.

+
+
azimuth: any, default = ‘HV’

See API documentation at link above or at help(sprit.get_report) for specifics.

+
+
plot_type: any, default = ‘HVSR p ann C+ p ann Spec p ann’

See API documentation at link above or at help(sprit.get_report) for specifics.

+
+
plot_engine: any, default = ‘matplotlib’

See API documentation at link above or at help(sprit.get_report) for specifics.

+
+
show_print_report: any, default = True

See API documentation at link above or at help(get_report) for specifics.

+
+
show_table_report: any, default = False

See API documentation at link above or at help(get_report) for specifics.

+
+
show_plot_report: any, default = True

See API documentation at link above or at help(get_report) for specifics.

+
+
show_html_report: any, default = False

See API documentation at link above or at help(get_report) for specifics.

+
+
show_pdf_report: any, default = True

See API documentation at link above or at help(get_report) for specifics.

+
+
suppress_report_outputs: any, default = False

See API documentation at link above or at help(get_report) for specifics.

+
+
show_report_outputs: any, default = False

See API documentation at link above or at help(get_report) for specifics.

+
+
csv_handling: any, default = ‘append’

See API documentation at link above or at help(sprit.get_report) for specifics.

+
+
report_export_format: any, default = None

See API documentation at link above or at help(get_report) for specifics.

+
+
report_export_path: any, default = None

See API documentation at link above or at help(get_report) for specifics.

+
+
verbose: any, default = False

See API documentation at link above or at help(get_report) for specifics.

+
+
kwargs: any, default = {}

See API documentation at link above or at help(get_report) for specifics.

+
+
export_datafunction name (not an actual parameter)

Export data into pickle format that can be read back in using import_data() so data does not need to +See API documentation: [export_data()](https://sprit.readthedocs.io/en/latest/sprit.html#sprit.export_data)

+
+
hvsr_data: any, default = ‘<output of previous function>’

See API documentation at link above or at help(sprit.export_data) for specifics.

+
+
hvsr_export_path: any, default = None

See API documentation at link above or at help(export_data) for specifics.

+
+
ext: any, default = ‘hvsr’

See API documentation at link above or at help(sprit.export_data) for specifics.

+
+
verbose: any, default = False

See API documentation at link above or at help(export_data) for specifics.

+
+
+
+
Returns:
+
+
hvsr_resultssprit.HVSRData or sprit.HVSRBatch object

If a single file/data point is being processed, a HVSRData object will be returned. Otherwise, it will be a HVSRBatch object. See their documention for more information.

+
+
+
+
Raises:
+
+
RuntimeError

If the input parameter may not be read correctly. This is raised if the input_params() function fails. This raises an error since no other data processing or reading steps will be able to carried out correctly.

+
+
RuntimeError

If the data is not read/fetched correctly using fetch_data(), an error will be raised. This is raised if the fetch_data() function fails. This raises an error since no other data processing steps will be able to carried out correctly.

+
+
RuntimeError

If the data being processed is a single file, an error will be raised if generate_ppsds() does not work correctly. No errors are raised for remove_noise() errors (since that is an optional step) and the process_hvsr() step (since that is the last processing step) .

+
+
+
+
+

Notes

+

The sprit.run() function calls the following functions. This is the recommended order/set of functions to run to process HVSR using SpRIT. See the API documentation for these functions for more information: +- input_params(): The input_data parameter of input_params() is the only required variable, though others may also need to be called for your data to process correctly. +- fetch_data(): the source parameter of fetch_data() is the only explicit variable in the sprit.run() function aside from input_data and verbose. Everything else gets delivered to the correct function via the kwargs dictionary +- remove_noise(): by default, the kind of noise removal is remove_method=’auto’. See the remove_noise() documentation for more information. If remove_method is set to anything other than one of the explicit options in remove_noise, noise removal will not be carried out. +- generate_ppsds(): generates ppsds for each component, which will be combined/used later. Any parameter of obspy.signal.spectral_estimation.PPSD() may also be read into this function. +- remove_outlier_curves(): removes any outlier ppsd curves so that the data quality for when curves are combined will be enhanced. See the remove_outlier_curves() documentation for more information. +- process_hvsr(): this is the main function processing the hvsr curve and statistics. See process_hvsr() documentation for more details. The hvsr_band parameter sets the frequency spectrum over which these calculations occur. +- check_peaks(): this is the main function that will find and ‘score’ peaks to get a best peak. The parameter peak_freq_range can be set to limit the frequencies within which peaks are checked and scored. +- get_report(): this is the main function that will print, plot, and/or save the results of the data. See the get_report() API documentation for more information. +- export_data(): this function exports the final data output as a pickle file (by default, this pickle object has a .hvsr extension). This can be used to read data back into SpRIT without having to reprocess data.

+
+ +
+
+sprit.sprit_hvsr.test_function()[source]
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/sprit.sprit_jupyter_UI.html b/docs/_build/html/sprit.sprit_jupyter_UI.html new file mode 100644 index 0000000..d481b09 --- /dev/null +++ b/docs/_build/html/sprit.sprit_jupyter_UI.html @@ -0,0 +1,180 @@ + + + + + + + sprit.sprit_jupyter_UI module — sprit 1.4.1 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

sprit.sprit_jupyter_UI module

+

Functions to create jupyter notebook widget UI

+
+
+sprit.sprit_jupyter_UI.create_jupyter_ui()[source]
+
+ +
+
+sprit.sprit_jupyter_UI.get_default(func, param)[source]
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/sprit.sprit_plot.html b/docs/_build/html/sprit.sprit_plot.html new file mode 100644 index 0000000..caecb42 --- /dev/null +++ b/docs/_build/html/sprit.sprit_plot.html @@ -0,0 +1,257 @@ + + + + + + + sprit.sprit_plot module — sprit 1.4.1 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

sprit.sprit_plot module

+
+
+sprit.sprit_plot.get_check_peaks_kwargs()[source]
+
+ +
+
+sprit.sprit_plot.get_generate_ppsd_kwargs()[source]
+
+ +
+
+sprit.sprit_plot.get_get_report_kwargs()[source]
+
+ +
+
+sprit.sprit_plot.get_process_hvsr_kwargs()[source]
+
+ +
+
+sprit.sprit_plot.get_remove_noise_kwargs()[source]
+
+ +
+
+sprit.sprit_plot.get_remove_outlier_curve_kwargs()[source]
+
+ +
+
+sprit.sprit_plot.parse_comp_plot_list(hv_data, comp_plot_list, plot_with_hv=False, results_fig=None, azimuth='HV')[source]
+
+ +
+
+sprit.sprit_plot.parse_hv_plot_list(hv_data, hvsr_plot_list, results_fig=None, azimuth='HV')[source]
+
+ +
+
+sprit.sprit_plot.parse_plot_string(plot_string)[source]
+
+ +
+
+sprit.sprit_plot.parse_spec_plot_list(hv_data, spec_plot_list, subplot_num, results_fig=None, azimuth='HV')[source]
+
+ +
+
+sprit.sprit_plot.plot_outlier_curves(hvsr_data, plot_engine='plotly', rmse_thresh=0.98, use_percentile=True, use_hv_curve=False, from_roc=False, show_plot=True, verbose=False)[source]
+
+ +
+
+sprit.sprit_plot.plot_preview(hv_data, stream=None, preview_fig=None, spectrogram_component='Z', show_plot=True, return_fig=False)[source]
+
+ +
+
+sprit.sprit_plot.plot_results(hv_data, plot_string='HVSR p ann C+ p SPEC ann', results_fig=None, results_graph_widget=None, return_fig=False, show_results_plot=True)[source]
+
+ +
+
+sprit.sprit_plot.process_data(button)[source]
+
+ +
+
+sprit.sprit_plot.read_data(button)[source]
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/sprit.sprit_streamlit_ui.html b/docs/_build/html/sprit.sprit_streamlit_ui.html new file mode 100644 index 0000000..d4f40ce --- /dev/null +++ b/docs/_build/html/sprit.sprit_streamlit_ui.html @@ -0,0 +1,209 @@ + + + + + + + sprit.sprit_streamlit_ui module — sprit 1.4.1 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

sprit.sprit_streamlit_ui module

+
+
+sprit.sprit_streamlit_ui.check_if_default()[source]
+
+ +
+
+sprit.sprit_streamlit_ui.on_file_upload()[source]
+
+ +
+
+sprit.sprit_streamlit_ui.on_run_data()[source]
+
+ +
+
+sprit.sprit_streamlit_ui.print_param(key=None, show_type=True)[source]
+
+ +
+
+sprit.sprit_streamlit_ui.setup_session_state()[source]
+
+ +
+
+sprit.sprit_streamlit_ui.text_change(verbose=False)[source]
+
+ +
+
+sprit.sprit_streamlit_ui.write_to_info_tab(info_tab)[source]
+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/sprit.sprit_tkinter_ui.html b/docs/_build/html/sprit.sprit_tkinter_ui.html new file mode 100644 index 0000000..a04a69c --- /dev/null +++ b/docs/_build/html/sprit.sprit_tkinter_ui.html @@ -0,0 +1,237 @@ + + + + + + + sprit.sprit_tkinter_ui module — sprit 1.4.1 documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

sprit.sprit_tkinter_ui module

+

This script contains all the functions, classes, etc. to create a tkinter app for graphical user interface.

+
+
+class sprit.sprit_tkinter_ui.SPRIT_App(master)[source]
+

Bases: object

+

Methods

+ + + + + + + + + +

log_errorMsg(logMsg)

manual_label_update()

+ + + + + + + + + +

create_menubar

create_tabs

+
+
+create_menubar()[source]
+
+ +
+
+create_tabs()[source]
+
+ +
+
+log_errorMsg(logMsg)[source]
+
+ +
+
+manual_label_update()[source]
+
+ +
+ +
+
+sprit.sprit_tkinter_ui.catch_errors(func)[source]
+
+ +
+
+sprit.sprit_tkinter_ui.on_closing()[source]
+
+ +
+
+sprit.sprit_tkinter_ui.reboot_app()[source]
+

Restarts the current program. +Note: this function does not return. Any cleanup action (like +saving data) must be done before calling this function.

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/sprit.sprit_utils.html b/docs/_build/html/sprit.sprit_utils.html new file mode 100644 index 0000000..a0183d8 --- /dev/null +++ b/docs/_build/html/sprit.sprit_utils.html @@ -0,0 +1,303 @@ + + + + + + + sprit.sprit_utils module — sprit 1.4.1 documentation + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

sprit.sprit_utils module

+
+
+sprit.sprit_utils.assert_check(var, cond=None, var_type=None, error_message='Output not valid', verbose=False)[source]
+
+ +
+
+sprit.sprit_utils.check_gui_requirements()[source]
+
+ +
+
+sprit.sprit_utils.check_mark(incolor=False, interminal=False)[source]
+

The default Windows terminal is not able to display the check mark character correctly. +This function returns another displayable character if platform is Windows

+
+ +
+
+sprit.sprit_utils.check_tsteps(hvsr_data)[source]
+

Check time steps of PPSDS to make sure they are all the same length

+
+ +
+
+sprit.sprit_utils.check_xvalues(ppsds)[source]
+

Check x_values of PPSDS to make sure they are all the same length

+
+ +
+
+sprit.sprit_utils.checkifpath(filepath, sample_list='', verbose=False, raise_error=False)[source]
+

Support function to check if a filepath is a pathlib.Path object and tries to convert if not

+
+
Parameters:
+
+
filepathstr or pathlib.Path, or anything

Filepath to check. If not a valid filepath, will not convert and raises error

+
+
+
+
Returns:
+
+
filepathpathlib.Path

pathlib.Path of filepath

+
+
+
+
+
+ +
+
+sprit.sprit_utils.format_time(inputDT, tzone='UTC')[source]
+

Private function to format time, used in other functions

+

Formats input time to datetime objects in utc

+
+
Parameters:
+
+
inputDTstr or datetime obj

Input datetime. Can include date and time, just date (time inferred to be 00:00:00.00) or just time (if so, date is set as today)

+
+
tzonestr=’utc’ or int {‘utc’, ‘local’}
+
Timezone of data entry.

If string and not utc, assumed to be timezone of computer running the process. +If int, assumed to be offset from UTC (e.g., CST in the United States is -6; CDT in the United States is -5)

+
+
+
+
+
+
Returns:
+
+
outputTimeObjdatetime object in UTC

Output datetime.datetime object, now in UTC time.

+
+
+
+
+
+ +
+
+sprit.sprit_utils.get_char(in_char)[source]
+

Outputs character with proper encoding/decoding

+
+ +
+
+sprit.sprit_utils.has_required_channels(stream)[source]
+
+ +
+
+sprit.sprit_utils.make_it_classy(input_data, verbose=False)[source]
+
+ +
+
+sprit.sprit_utils.read_from_RS(dest, src='SHAKENAME@HOSTNAME:/opt/data/archive/YEAR/AM/STATION/', opts='az', username='myshake', password='shakeme', hostname='rs.local', year='2023', sta='RAC84', sleep_time=0.1, verbose=True, save_progress=True, method='scp')[source]
+
+ +
+
+sprit.sprit_utils.time_it(_t, proc_name='', verbose=True)[source]
+

Computes elapsed time since the last call.

+
+ +
+
+sprit.sprit_utils.x_mark(incolor=False, inTerminal=False)[source]
+

The default Windows terminal is not able to display the check mark character correctly. +This function returns another displayable character if platform is Windows

+
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_generate_docs.py b/docs/_generate_docs.py index 4153617..76f7fbd 100644 --- a/docs/_generate_docs.py +++ b/docs/_generate_docs.py @@ -10,7 +10,7 @@ import markdown -RELEASE_VERSION = "1.4" +RELEASE_VERSION = "1.4.1" VERBOSE = True diff --git a/docs/_static/documentation_options.js b/docs/_static/documentation_options.js index 44634ab..dfba10e 100644 --- a/docs/_static/documentation_options.js +++ b/docs/_static/documentation_options.js @@ -1,5 +1,5 @@ const DOCUMENTATION_OPTIONS = { - VERSION: '1.4', + VERSION: '1.4.1', LANGUAGE: 'en', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/docs/conf.py b/docs/conf.py index 3c4c673..9ab15a4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -26,7 +26,7 @@ project = 'sprit' copyright = '2024, Author' author = 'Riley Balikian' -release = '1.4' +release = '1.4.1' # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration diff --git a/docs/genindex.html b/docs/genindex.html index 23c7f33..6ba30da 100644 --- a/docs/genindex.html +++ b/docs/genindex.html @@ -3,19 +3,19 @@ - Index — sprit 1.4 documentation - - + Index — sprit 1.4.1 documentation + + - - - - + + + + diff --git a/docs/index.html b/docs/index.html index b13233c..797ffdf 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,19 +4,19 @@ - Welcome to the documentation for SpRIT! — sprit 1.4 documentation - - + <no title> — sprit 1.4.1 documentation + + - - - - + + + + @@ -62,7 +62,7 @@