MAOS
Multithreaded Adaptive Optics Simulator
psd.h File Reference

Functions

dmatpsd1d (const dmat *v, long nseg)
 
dmatpsd1dt (const dmat *v, long nseg, real dt)
 
dmatpsd_interp1 (const dmat *psdin, const dmat *fnew, int uselog)
 
dmatpsd_vibid (const dmat *psdin)
 
dmatpsd_t2s (const dmat *psdt, real vmean)
 
dmatpsd_s2t (const dmat *psdt, real vmean)
 
real psd_inte (const real *nu, const real *psd, long n)
 
real psd_inte2 (const dmat *psdin)
 
dmatpsd2ts (const dmat *psdin, rand_t *rstat, real dt, int nstep)
 
dmatpsd2ts2 (const dmat *psdin, int seed, real dt, int nstep)
 
dmatadd_psd (const dmat *psd1, const dmat *psd2, real scale2)
 
void add_psd2 (dmat **out, const dmat *in, real scale)
 
void psd_sum (dmat *psd, real scale)
 
dmatpsd2d_aniso (const dmat *screen, real dx)
 
dmatpsd2d (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 special 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.

◆ 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_sum()

void psd_sum ( dmat psd,
real  scale 
)

Sum all the columns of PSDs (excluding first column), scaled by scale

◆ 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