fftw

package module
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2023 License: MIT Imports: 8 Imported by: 2

README

hz.tools/fftw

⚠ Please read Expectations within this Organization before using it.

Go Reference Go Report Card

This only supports single-precision floating point math for now.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Plan

func Plan(
	iq sdr.SamplesC64,
	frequency []complex64,
	direction fft.Direction,
) (fft.Plan, error)

Plan will create a hz.tools/sdr/fft.Plan to be used to perform frequency-to-time or time-to-frequency conversions of complex data.

func ThreadsafePlanner added in v0.0.2

func ThreadsafePlanner(ctx context.Context) fft.Planner

ThreadsafePlanner will span a goroutine, lock to a single thread, and conduct all FFT planning on that thread. This must be used in places where concurrency is a requirement.

Types

type RealPlan

type RealPlan interface {
	Transform() error
	Close() error
}

RealPlan is the same thing to an fft.Plan, but I also don't want to have anyone confuse this for an fft.Plan once returned. As such I'm making a new type to make it less confusing in docstrings, even though this is the same type interface. D'oh.

func PlanReal

func PlanReal(
	samples []float32,
	frequency []complex64,
	direction fft.Direction,
) (RealPlan, error)

PlanReal will create an interface similar to a hz.tools/sdr/fft.Plan to except it's used for real-data to frequency conversions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL