Coder Social home page Coder Social logo

libwavelet's Introduction

libwavelet

libwavelet is a very simple library for providing 1 and 2 dimensional wavelet transformation functions. Currently, only the Morlet mother wavelet function is provided. However, other wavelet types can be generated on their own and used with the transform function. Currently both the radix-2 and radix-4 algorithms are implemented. They can be selected with the wavelet_transform function.

Installation

libwavelet uses meson for easy building and installation. After checking out the source, navigate to the directory, and then simply run.

mkdir build
meson build
ninja -C build
sudo ninja -C build install

Usage

libwavelet can be incorporated into your code in the usual way (i.e. #include <wavelet.h> and gcc -lwavelet). The header shows available functions and brief descriptions. All fft, ifft, and wavelet_transform functions require the length of the array to be exactly equal to a power of two or four (or else an error is shown).

Consider creating a 1 dimensional Morlet transform with a bandwidth of 10 and a central frequency of 5 hz from a signal sampled at 2000 hz. First, create a double complex array, z (the imaginary part can be all zeros) that contains your signal. Then create a double array, time, containing the time values of the signal.

struct wavelet wave = init_wavelet("morlet", 10, 5, 2000);
double complex *mother = wavelet_mother1(wave, time);
double complex *transform = wavelet_transform1(wave, mother, z, 2);

Note that wavelet_transform1 and wavelet_transform2 will work with your own custom mother wavelet array. The value of 2 here uses the radix-2 algorithm as part of the transform. To use the radix-4 instead, simply put 4.

License

GPLv2 or later.

libwavelet's People

Contributors

dudemanguy 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.