MAOS
Multithreaded Adaptive Optics Simulator
Loading...
Searching...
No Matches
psd.h File Reference

Functions

dmat * psd1d (const dmat *v, long nseg)
dmat * psd1dt (const dmat *v, long nseg, real dt)
dmat * psd_interp1 (const dmat *psdin, const dmat *fnew, int uselog)
dmat * psd_vibid (const dmat *psdin)
dmat * psd_t2s (const dmat *psdt, real vmean)
dmat * psd_s2t (const dmat *psdt, real vmean)
real psd_inte (const real *nu, const real *psd, long n)
real psd_inte2 (const dmat *psdin)
dmat * psd_reverse_cumu (const dmat *psdin, real scale)
 Reverse cumulative sum of PSD.
dmat * psd2ts (const dmat *psdin, rand_t *rstat, real dt, int nstep)
dmat * psd2ts2 (const dmat *psdin, int seed, real dt, int nstep)
dmat * add_psd (const dmat *psd1, const dmat *psd2, real scale2)
void add_psd2 (dmat **out, const dmat *in, real scale)
dmat * psd_select (const dmat *psd, int im, int jm, int keepdc, real scale)
 Choose a mode from the PSD. The first column is frequency.
dmat * psd2d_aniso (const dmat *screen, real dx)
dmat * psd2d (dmat **extra, const_anyarray screen, real dx)

Detailed Description

Compute the PSD from a sequence.

Function Documentation

◆ psd1d()

dmat * psd1d ( const dmat * v,
long nseg )

Compute the 1-d PSD from a 1-d sequence.

Parameters
[in]vThe data sequence
[in]nsegNumber of overlapping segments

◆ psd1dt()

dmat * psd1dt ( const dmat * v,
long nseg,
real dt )

Wrap of psd1d to put the frequency along the first column.

◆ psd_interp1()

dmat * psd_interp1 ( const dmat * psdin,
const dmat * fnew,
int uselog )

Interpolate psd onto new f. We interpolate in log space which is usually more linear.

◆ psd_vibid()

dmat * psd_vibid ( const dmat * psdin)

Find vibration peaks in the PSD by comparing the PSD against a LPF version plus noise.

◆ psd_t2s()

dmat * psd_t2s ( const dmat * psdt,
real vmean )

Convert temporal PSD to spatial

◆ psd_s2t()

dmat * psd_s2t ( const dmat * psds,
real vmean )

Convert spatial PSD to temporal

◆ psd_inte()

real psd_inte ( const real * nu,
const real * psd,
long n )

Integrated a PSF that defines on linear or logrithmically spaced grid nu.

◆ psd_inte2()

real psd_inte2 ( const dmat * psdin)

wraps psd_inte with a single input variable containing both frequency and psd.

◆ psd_reverse_cumu()

dmat * psd_reverse_cumu ( const dmat * psdin,
real scale )

Reverse cumulative sum of PSD.

Parameters
psdinthe input PSD
scaleoptional scaling
Returns
dmat* sqrt of the reverse integration of PSD

◆ psd2ts()

dmat * psd2ts ( const dmat * psdin,
rand_t * rstat,
real dt,
int nstepin )

Convert PSD into time series.

◆ psd2ts2()

dmat * psd2ts2 ( const dmat * psdin,
int seed,
real dt,
int nstepin )

Convert PSD into time series. wraps psd2ts with a seed instead of rand_t as input.

◆ add_psd()

dmat * add_psd ( const dmat * psd1,
const dmat * psd2,
real scale2 )

Add two PSDs. The first column of each dmat is the frequency nu, and the second column is PSD

◆ add_psd2()

void add_psd2 ( dmat ** pout,
const dmat * in,
real scale )

Add a PSD scaled by scale to another. The first column of each dmat is the frequency nu, and the second column is PSD.

◆ psd_select()

dmat * psd_select ( const dmat * psd,
int im,
int nm,
int keepdc,
real scale )

Choose a mode from the PSD. The first column is frequency.

Parameters
psdthe input PSD
imindex of the first mode. -1: sum all modes. 0 to ny(psd)-1.
nmnumber of modes.
keepdcDo not remove DC component (f=0)
scalescaling fctor

◆ psd2d()

dmat * psd2d ( dmat ** extra,
const_anyarray screen,
real dx )
Parameters
[out]extraextra output
[in]screen2-d screen or cell of 2-d screens
[in]dxSampling