Code Monkey home page Code Monkey logo

htov-toolbox's Introduction

H/V Toolbox

This is a toolbox to perform simple HVSR calculations. It has been written a while ago and will probably require some adjustments.

Installation

A Python environment that works can be created using Anaconda (install Anaconda first if not already present):

~$ conda config --add channels conda-forge
~$ conda create -n h-to-v python=2.7 obspy=1.1.0 pyqt=4 mtspec git
Fetching package metadata .............
Solving package specifications: .

Package plan for installation in environment /home/megies/anaconda/envs/h-to-v:

The following NEW packages will be INSTALLED:

    asn1crypto:         0.22.0-py27_0      conda-forge
    backports_abc:      0.5-py27_0         conda-forge
    [...]
    numpy:              1.13.1-py27_0
    obspy:              1.1.0-py27_1       conda-forge
    [...]
    wheel:              0.30.0-py_1        conda-forge
    xz:                 5.2.3-0            conda-forge
    zlib:               1.2.11-0           conda-forge

Proceed ([y]/n)?

mtspec-0.3.2-p 100% |##################################################################################| Time: 0:00:01 906.60 kB/s
#
# To activate this environment, use:
# > source activate h-to-v
#
# To deactivate an active environment, use:
# > source deactivate
#

~$ source activate h-to-v
(h-to-v) ~$ git clone https://github.com/krischer/htov-toolbox
Cloning into 'htov-toolbox'...
remote: Counting objects: 48, done.
remote: Total 48 (delta 0), reused 0 (delta 0), pack-reused 48
Receiving objects: 100% (48/48), 716.65 KiB | 673.00 KiB/s, done.
Resolving deltas: 100% (20/20), done.
(h-to-v) ~$ cd htov-toolbox
(h-to-v) ~/htov-toolbox$ python htov_toolbox.py  # run the GUI

Dependencies

Usage

Run python htov_toolbox.py to launch the graphical user interface.

Several scripts are able to run without graphical user interface:

  • htov.py: Contains for calculating HVSR
  • batch.py: Single routine that calls all many routines in htov.py in the correct order to produce an HVSR.
  • konno_ohmachi_smoothing.py: An implementation of the Konno-Ohmachi smoothing algorithm. (Better use the ObsPy implementation!)

Screenshots

Noise window selection Noise

Spectral calculations Spectrum

htov-toolbox's People

Contributors

krischer avatar megies avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

htov-toolbox's Issues

HtoV-Toolbox

Could you help me with this error. Thank you.

(obspy) farhad@farhad-K53E:~/Downloads/HtoV-Toolbox-master$ python htov_toolbox.py 
/home/farhad/anaconda3/envs/obspy/lib/python3.5/site-packages/obspy/core/util/deprecation_helpers.py:57: ObsPyDeprecationWarning: Function 'obspy.core.util.scoreatpercentile' is deprecated and will stop working with the next ObsPy version. Please use 'obspy.core.util.score_at_percentile' instead.
  warnings.warn(msg, ObsPyDeprecationWarning)
/home/farhad/anaconda3/envs/obspy/lib/python3.5/site-packages/obspy/core/util/deprecation_helpers.py:57: ObsPyDeprecationWarning: Function 'obspy.signal.trigger.zDetect' is deprecated and will stop working with the next ObsPy version. Please use 'obspy.signal.trigger.z_detect' instead.
  warnings.warn(msg, ObsPyDeprecationWarning)
GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.
Traceback (most recent call last):
  File "htov_toolbox.py", line 1709, in <module>
    w = HtoV(main_window)
  File "htov_toolbox.py", line 47, in __init__
    self.setupUi(MainWindow)
  File "/home/farhad/Downloads/HtoV-Toolbox-master/htov_design.py", line 209, in setupUi
    self.lowpassSlider.setProperty("value", QtCore.QVariant(99))
TypeError: PyQt4.QtCore.QVariant represents a mapped type and cannot be instantiated

A very simple question

I'm reading your code and try to do some work, but just a little question about how can I load my raw data?

Error opening toolbox

I use Python 3.7.1 and got the following eror message along with not opening the toolbox:

TypeError: PyQt4.QtCore.QVariant represents a mapped type and cannot be instantiated

single-component calculation of Mw is wrong

The formula used to calculate Mw from the spectral plateau has to be used on all three components simultaneously. The single component calculation currently done in the GUI is wrong.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.