Giter Club home page Giter Club logo

aimbat's Introduction

pysmo

Documentation: https://docs.pysmo.org

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


Pysmo offers simple data types for seismologists to write code with. Instead of working with one big class containing all kinds of data, psymo uses separate, narrowly defined classes that are more meaningful when describing things that exist in the real world. The type definitions are not tied to any particular file format, and thus free users from needing to adhere to Python data structures often dictated by a rigid underlying file format.

Together with these data types, pysmo provides a growing library of essential functions that benefit from using these types. Programming with pysmo results in code that is:

  • using modern Python concepts.
  • easy to write and understand.
  • both portable and future proof.

Pysmo itself is designed to be modular and easy to expand without interfering with the existing code base, making it straightforward to incorporate user contributions.

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aimbat's Issues

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:'

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?

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.

Add CLI interface

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

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

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

[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

Python 3 compatibility

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

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

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.

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

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.

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?

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.