fftw

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: MIT Imports: 8 Imported by: 2

README

hz.tools/fftw

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// OptNoScale if passed via `opts`, will leave the values unscaled by the
	// length of the vector. This means values returned will *not* be between
	// the range of -1 to +1.
	OptNoScale opt = 1
)

Functions

func Plan

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

Plan will create a hz.tools/sdr/fft.Plan to be used to preform 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 concurency 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,
	opts interface{},
) (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