Giter Site home page Giter Site logo

crs3s / pyfk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ziyixi/pyfk

0.0 0.0 0.0 3.64 MB

PyFK is the python implementation of FK used to calculate the Green's function and the synthetic waveforms for the 1D Earth model.

Home Page: https://ziyixi.github.io/pyfk

License: MIT License

Python 99.82% Cython 0.16% Shell 0.02%

pyfk's Introduction

PyFK

https://codecov.io/gh/ziyixi/pyfk/branch/master/graph/badge.svg?token=5EL7IDTYLJ

About

PyFK is the python port of FK used to calculate the Green's function and the synthetic waveforms for the 1D Earth model.

The main features of this package are:

  • Compute the Green's function for the explosion, single force, and double couple source using the frequency-wavenumber method.
  • Compute the static displacements and corresponding Green's function.
  • Compute the synthetic waveforms by convolving Green's function with the seismic source.
  • Use the seismic data format of Obspy, which is easy to perform the signal processing.

And the package is unique as:

  • all the code is written in pure python, and it's compatible with Unix-like systems including Mac and Linux. The Windows is not supported, as the package uses the complex number in Cython, which uses the C99 standard of "complex.h" that has not been supported by the Visual Studio compiler.

  • it uses Cython to speed up the computationally expensive part (mainly the wavenumber integration).

  • The package has also provided three modes:

    • Serial mode: the serial version implements the FK algorithm in Python.
    • Parallel mode on CPU: the wavenumber integration can be paralleled by MPI.
    • Parallel mode on GPU: the wavenumber integration can also be paralleled by CUDA on GPU.

Installation

The serial version and the parallel version on GPU can be simply installed using pip:

pip install pyfk

Or conda:

conda install -c ziyixi pyfk

Extra packages will be required to enable the GPU mode. For the MPI mode, it's suggested to directly compile from the source. For more details about the Installation, you can refer to the Installing part of the document.

Todo

The current bugs to fix or features to provide are listed in TODO.

License

PyFK is a free software: you can redistribute it and modify it under the terms of the MIT License. A copy of this license is provided in LICENSE.

pyfk's People

Contributors

ziyixi avatar

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.