Giter VIP home page Giter VIP logo

aimbat's Introduction

AIMBAT

Automated and Interactive Measurement of Body wave Arrival Times

Documentation: https://aimbat.readthedocs.io

Source Code: https://github.com/pysmo/aimbat


AIMBAT (Automated and Interactive Measurement of Body wave Arrival Times) is an open-source software package for efficiently measuring teleseismic body wave arrival times for large seismic arrays [1]. It is based on a widely used method called MCCC (Multi-Channel Cross-Correlation) [2]. The package is automated in the sense of initially aligning seismograms for MCCC, which is achieved by an ICCS (Iterative Cross Correlation and Stack) algorithm. Meanwhile, a GUI (graphical user interface) is built to perform seismogram quality control interactively. Therefore, user processing time is reduced while valuable input from a user's expertise is retained. As a byproduct, SAC [3] plotting and phase picking functionalities are replicated and enhanced.

Modules and scripts included in the AIMBAT package were developed using Python and its open-source modules on the Mac OS X platform since 2009. The original MCCC [2] code was transcribed into Python. The GUI of AIMBAT was inspired and initiated at the 2009 EarthScope USArray Data Processing and Analysis Short Course. AIMBAT runs on Mac OS X, Linux/Unix and Windows thanks to the platform-independent feature of Python.

For more information visit the project website or the pysmo repositories.

Authors' Contacts

References

[1] Xiaoting Lou, Suzan van der Lee, and Simon Lloyd (2013), AIMBAT: A Python/Matplotlib Tool for Measuring Teleseismic Arrival Times. Seismol. Res. Lett., 84(1), 85-93, doi:10.1785/0220120033.

[2] VanDecar, J. C., and R. S. Crosson (1990), Determination of teleseismic relative phase arrival times using multi-channel cross-correlation and least squares. Bulletin of the Seismological Society of America, 80(1), 150โ€“169.

[3] Goldstein, P., D. Dodge, M. Firpo, and L. Minner (2003), SAC2000: Signal processing and analysis tools for seismologists and engineers, International Geophysics, 81, 1613โ€“1614.

aimbat's People

Contributors

asankaran avatar dependabot[bot] avatar ewolin avatar lkloh avatar smlloyd avatar suzanvdl avatar xlougeo avatar xstargate 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aimbat's Issues

tkinter name change

The module is called Tkinter in python2 and tkinter in python 3.

Perhaps import it like this?

try:
    import tkinter.messagebox
except ImportError:
    import Tkinter.messagebox

SacDataHdrs should be a subclass of SacIO

SacDataHdrs seems to do mostly the same as SacIO, so perhaps we should either try to replace the SacDataHdrs bits with SacIO or SacDataHdrs should be a subclass of SacIO to prevent code duplication?

New release?

The last release was 2.5 years ago and there have been almost 400 commits since then. Surely there must be enough to produce a new release at this point?

Also, 0.1.2 (or any version) is not tagged in git.

Bug about "aimbat-sac2pkl -p"

line 81 in sacpickle.py:
' with open(zfile(picklefile+'.'+zipmode, 'rb')) as f:'
Since this variable 'picklefile' containing suffix about zipmode (bz2 or gz), so I think there should be:
' with open(zfile(picklefile, 'rb')) as f:'

Add tutorial

Would be nice to have a tutorial for new users. If it's in the form of a notebook it could be hosted on mybinder.org

[Bug]: Error using aimbat-ttpick -p P

Is there an existing issue for this?

  • I have searched the existing issues

Contact Details

[email protected]

Current Behavior

i'm trying to use aimbat-ttpick in order to pick de P-waves and i had an error with Numpy
i tried to install another version of numpy and it happened the same error

Expected Behavior

Screenshot from 2023-09-07 06-45-42

Steps To Reproduce

with conda
install py 3.9
matplotlib 3.5.3
numpy 1.24-1.25
try to use 'aimbat-ttpick -p P sac.pkl'

AIMBAT version

1.0.5

Environment

- OS:Zorin os 16.3 - ubuntu 22.04
- Python: 3.9.17

Anything else?

No response

Last release of version 1

  • Cleanup code
  • Update 3rd party packages to address vulnerabilities
  • Update readme to notify users on pypi that the namespace has changed

Add requirements to setup.py

Might be a good idea to put dependencies in setup.py so that they are pulled in when installing e.g. via pip. Perhaps via a requirements.txt file which is then read by setup.py?

Issues usign pkl to sac files convert

Hello AIMBAT and PYSMO team,

I hope you are safe.

I have some problems when I try to convert my final pkl to sac files using the command: aimbat-sac2pkl --p2s sac.pkl.

The error in the code shown:

aimbat-sac2pkl --p2s sac.pkl
File conversion: pkl --> sac
Traceback (most recent call last):
File "/home/gustavo/.local/bin/aimbat-sac2pkl", line 8, in
sys.exit(main())
File "/home/gustavo/.local/lib/python3.8/site-packages/pysmo/aimbat/sacpickle.py", line 600, in main
pkl2sac(pkfile, zipmode)
File "/home/gustavo/.local/lib/python3.8/site-packages/pysmo/aimbat/sacpickle.py", line 333, in pkl2sac
obj2sac(gsac)
File "/home/gustavo/.local/lib/python3.8/site-packages/pysmo/aimbat/sacpickle.py", line 305, in obj2sac
sacdh.savesac()
File "/home/gustavo/.local/lib/python3.8/site-packages/pysmo/aimbat/sacpickle.py", line 224, in savesac
self.sethdrs(sacobj)
File "/home/gustavo/.local/lib/python3.8/site-packages/pysmo/aimbat/sacpickle.py", line 201, in sethdrs
setattr(sacobj, 'kuser'+str(i), kusers[i])
File "/home/gustavo/.local/lib/python3.8/site-packages/pysmo/core/sac/sacheader.py", line 278, in set
raise ValueError('%s is too long - maximum length is %s' %
ValueError: b'False ' is too long - maximum length is 8

Are there some ways to solve these problems?

thanks.

scrollarea display

Need to do better control in setting X and Y limits of the scroll area for traces. sizeHint() and setMinimumSize() did not work as I want.

Python 3 compatibility

AIMBAT does not appear to support Python 3. That is unfortunate, considering almost all scientific libraries are supporting it now.

Sac error message

Hi AIMBAT and PYSMO team,

I created a new conda environment for aimbat, but I'm not able to run aimbat. Here's the error message I received when I was trying to plot my sac files downloaded using Obspy:

% /Users/angelling/anaconda3/envs/aimbat/bin/aimbat-sacplot -d *.HHZ       
Read configuration file: /Users/angelling/anaconda3/envs/aimbat/lib/python3.7/site-packages/pysmo/aimbat/ttdefaults.conf
Traceback (most recent call last):
  File "/Users/angelling/anaconda3/envs/aimbat/bin/aimbat-sacplot", line 8, in <module>
    sys.exit(sacplot_standalone())
  File "/Users/angelling/anaconda3/envs/aimbat/lib/python3.7/site-packages/pysmo/aimbat/plotphase.py", line 611, in sacplot_standalone
    gsac, opts = getDataOpts()
  File "/Users/angelling/anaconda3/envs/aimbat/lib/python3.7/site-packages/pysmo/aimbat/plotphase.py", line 582, in getDataOpts
    gsac = sacpkl.loadData(ifiles, opts, pppara)
  File "/Users/angelling/anaconda3/envs/aimbat/lib/python3.7/site-packages/pysmo/aimbat/sacpickle.py", line 500, in loadData
    isac = SacIO.from_file(ifile0)
  File "/Users/angelling/anaconda3/envs/aimbat/lib/python3.7/site-packages/pysmo/core/sac/sacio.py", line 305, in from_file
    newinstance.read(filename)
  File "/Users/angelling/anaconda3/envs/aimbat/lib/python3.7/site-packages/pysmo/core/sac/sacio.py", line 270, in read
    setattr(self, header_field, value)
  File "/Users/angelling/anaconda3/envs/aimbat/lib/python3.7/site-packages/pysmo/core/sac/sacheader.py", line 237, in __set__
    raise ValueError('%s not a valid value for %s' % (value, self.name))
ValueError: 9 not a valid value for iztype

Looks like it's related to the sac attribute, but I can't figure out why. Any ideas on this? Thanks in advance!

Versions:
Python version: 3.7.10
Obspy: 1.2.2
pyqtgraph: 0.12.1
pyyaml: 5.4.1
pysmo-aimbat: 1.0.5 (via pip)
Operating System name/version: macOS Catalina

Add CLI interface

Doesn't need to actually do everything at first, but it should have all the subcommands and options for aimbat

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.