Rust-lang Continuous Wavelet Transform(CWT) library inspired by fCWT.

Overview

fastcwt

Rust-lang Continuous Wavelet Transform(CWT) library inspired by fCWT.

This crate is a direct translation of fCWT Library written in C++ by Arts, L.P.A. and van den Broek, E.L. (https://github.com/fastlib/fCWT)

I changed certain functions that I cannot translate, it seems like it could be eliminated, or the difference between fftw Library and rustfft crate. (fCWT used fftw, and fastcwt used rustfft.)

Usage

use fastcwt::*;
use rand::prelude::*;

let wavelet = Wavelet::create(1.0); //Create a Morlet wavelet.
let scale = Scales::create(ScaleTypes::LinFreq, 48000, 20.0, 20000.0, 1000); //Create a scale factor.

let mut transform = FastCWT::create(wavelet, true); // Create a fCWT instance.

let mut input = vec![];
for _ in 0 .. 48000
{
    input.push(thread_rng().gen_range(-1.0 .. 1.0))
};

let result = transform.cwt(1000, input.as_slice(), scale); //Store the result.

Changelog

0.1.5 - Parallelized FFT using rayon crate.

0.1.4 - Added error messages in assert!() and #![forbid(unsafe_code)] macro.

0.1.3 - Get rid of unsafe codes and fn find2power().

0.1.1, 0.1.2 - Minor fixes.

0.1.0 - Initial release.

Citation

Arts, L.P.A., van den Broek, E.L. The fast continuous wavelet transformation (fCWT) for real-time, high-quality, noise-resistant time–frequency analysis. Nat Comput Sci 2, 47–58 (2022). https://doi.org/10.1038/s43588-021-00183-z

You might also like...
Motion graphics creation tool in Bevy. (Highly inspired by Motion Canvas and Manim)
Motion graphics creation tool in Bevy. (Highly inspired by Motion Canvas and Manim)

Bevy MotionGfx Bevy Motiongfx is a motion graphics creation tool in Bevy. It is highly inspired by Motion Canvas & Manim. Goal The goal of this tool i

An extendable system made up of autonomous execution services known as nodes organized in a tree of processes. Inspired by Godot!

NodeTree NodeTree is a framework to create large scalable programs and games through a tree of processes. Each process is fully autonomous and is capa

A Rust wrapper and bindings of Allegro 5 game programming library

RustAllegro A thin Rust wrapper of Allegro 5. Game loop example extern crate allegro; extern crate allegro_font; use allegro::*; use allegro_font::*;

High performance Rust ECS library
High performance Rust ECS library

Legion aims to be a feature rich high performance Entity component system (ECS) library for Rust game projects with minimal boilerplate. Getting Start

Rust library to create a Good Game Easily

ggez What is this? ggez is a Rust library to create a Good Game Easily. The current version is 0.6.0-rc0. This is a RELEASE CANDIDATE version, which m

Rust bindings for libtcod 1.6.3 (the Doryen library/roguelike toolkit)

Warning: Not Maintained This project is no longer actively developed or maintained. Please accept our apologies. Open pull requests may still get merg

a rust library to find near-duplicate video files

Video Duplicate Finder vid_dup_finder finds near-duplicate video files on disk. It detects videos whose frames look similar, and where the videos are

A Rust library for blitting 2D sprites
A Rust library for blitting 2D sprites

blit A Rust library for blitting 2D sprites Documentation Usage Add this to your Cargo.toml:

FPS library for gdnative written in Rust.

gd_rusty_fps FPS library for gdnative written in Rust. This projects aims to create easy to use .dll library to be used with godot engine for FPS game

Owner
null
Transform your terminal into an art canvas where you can draw stuff!

Termdraw Turn your terminal into the drawing cavnas of your dream... or not! Installation To install this dream-come-true of a tool simply run cargo i

Enoki 5 Nov 23, 2022
Transform tagged Markdown string to HTML during build time.

tagged-md Transform tagged Markdown string to HTML! Check out the examples! Motivation Have you ever written HTML strings in your JavaScript code? It'

PortOne 23 May 30, 2023
Fish Fight is a tactical 2D shooter. Made with Rust-lang and Macroquad 🦀🌶

Fish Fight Introduction Fish Fight is a tactical 2D shooter, played by up to 4 players online or on a shared screen. Aim either left or right; the res

Fish Fight 732 Jan 1, 2023
rpg-cli is a bare-bones JRPG-inspired terminal game written in Rust

rpg-cli is a bare-bones JRPG-inspired terminal game written in Rust. It can work as an alternative to cd where you randomly encounter enemies as you change directories.

Facundo Olano 660 May 27, 2021
Dwarf Fortress inspired frontend to Veloren, the multiplayer RPG voxel game written in Rust

velobracket ('veloren' + 'bracket-lib') velobracket is Dwarf Fortress inspired frontend to Veloren, the multiplayer RPG voxel game written in Rust. Us

Rodion Martynov 13 Dec 25, 2022
Examples inspired by 'Nature of Code' in Bevy 3D and Rust

rust-bevy and the Nature of Code The book The Nature of Code from Daniel Shiffman is a wonderful book about programming. https://natureofcode.com/book

Rust-Ninja-Sabi 17 Dec 22, 2022
Singleplayer game inspired by agar.io written in Rust

Cells Cells is a singleplayer game inspired by agar.io written in Rust. Every cell/entity can have a mix of differents capabilities. It's been optimiz

null 25 Jun 15, 2023
An online judge sandbox server in Rust, inspired by go-judge, for SAST OJ.

RsJudge An online judge sandbox server in Rust, inspired by go-judge, for SAST OJ. Table of Contents Features Build from source Prerequisites Build Fe

NJUPT SAST 4 Dec 10, 2023
a prototype crate for creating modular and performant 3D CPU particle systems, inspired by Unity's Shuriken Particle System.

bevy_prototype_particles This is a prototype crate for creating modular and performant 3D CPU particle systems, inspired by Unity's Shuriken Particle

James Liu 28 Sep 12, 2022
Sandbox is a pixel physics simulator inspired by other such like Sandspiel and Noita

Sandbox Sandbox is a pixel physics simulator inspired by other such like Sandspiel and Noita. It's also a precursor for an ongoing game project. Sandb

Okko Hakola 76 Nov 3, 2022