czt

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package czt implements the chirp-z transform.

From "Chirp Z Transform, Laurence R Rabiner, Ronald W. Schafer, Charles M. Rader Nov 21 1968, Bell System Technical Journal, May-June 1969

Package czt is part of http://zikichombo.org

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type T

type T struct {
	// contains filtered or unexported fields
}

func New

func New(nS, nB int, start, end float64) *T

New creates a new chirp-z transformer object.

The transformer takes as input nS samples and returns a freqrency domain picture of those samples with nB bins, focusing on frequencies from start to end. Start and end are in radians per sample.

func (*T) BinRange

func (t *T) BinRange(sf freq.T, i int) (l freq.T, u freq.T)

BinRange returns the frequency range of a given frequency bin for which a coefficient can be computed.

func (*T) Do

func (t *T) Do(src []complex128) []complex128

Do performs the transform as configured in the call to New() which created t.

func (*T) FreqRange

func (t *T) FreqRange(sf freq.T) (l freq.T, u freq.T)

FreqRange returns the range of frequencies for which coefficients are computed.

func (*T) FreqStep

func (t *T) FreqStep(sf freq.T) freq.T

FreqStep returns the difference between the center frequencies of any two adjacent frequency bins.

func (*T) NB

func (t *T) NB() int

NB returns the number of frequency bins produced by the transform

func (*T) NS

func (t *T) NS() int

NS returns the number of samples expected by the transform.

func (*T) PadN

func (t *T) PadN() int

PadN returns the underlying fft pad size.

func (*T) Win

func (t *T) Win(c []complex128) []complex128

Win returns a window with appropriate capacity and length with the contents of c.

Jump to

Keyboard shortcuts

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