This documentation is for astroML version 0.2

This page


astroML Mailing List

GitHub Issue Tracker


Scipy 2012 (15 minute talk)

Scipy 2013 (20 minute talk)


If you use the software, please consider citing astroML.

11.10.3. astroML.fourier.PSD_continuous

astroML.fourier.PSD_continuous(t, h, axis=-1, method=1)[source]

Approximate a continuous 1D Power Spectral Density of sampled data.

This function uses the Fast Fourier Transform to approximate the continuous fourier transform of a sampled function, using the convention

H(f) = \int h(t) \exp(-2 \pi i f t) dt

It returns f and PSD, which approximate PSD(f) where

PSD(f) = |H(f)|^2 + |H(-f)|^2

Parameters :

t : array_like

regularly sampled array of times t is assumed to be regularly spaced, i.e. t = t0 + Dt * np.arange(N)

h : array_like

real or complex signal at each time

axis : int

axis along which to perform fourier transform. This axis must be the same length as t.

Returns :

f : ndarray

frequencies of result. Units are the same as 1/t

PSD : ndarray

Fourier coefficients at each frequency.