cfitsTK
linARfilterPred.h File Reference

Function prototypes for linear autoregressive prediction. More...

Go to the source code of this file.

Functions

int_fast8_t init_linARfilterPred ()
 
2. I/O TOOLS
int NBwords (const char sentence[])
 
long LINARFILTERPRED_LoadASCIIfiles (double tstart, double dt, long NBpt, long NBfr, const char *IDoutname)
 load ascii file(s) into image cube More...
 
long LINARFILTERPRED_SelectBlock (const char *IDin_name, const char *IDblknb_name, long blkNB, const char *IDout_name)
 
3. BUILD PREDICTIVE FILTER
long LINARFILTERPRED_Build_LinPredictor (const char *IDin_name, long PForder, float PFlag, double SVDeps, double RegLambda, const char *IDoutPF_name, int outMode, int LOOPmode, float LOOPgain)
 Build predictive filter. More...
 
4. APPLY PREDICTIVE FILTER
long LINARFILTERPRED_Apply_LinPredictor_RT (const char *IDfilt_name, const char *IDin_name, const char *IDout_name)
 
long LINARFILTERPRED_Apply_LinPredictor (const char *IDfilt_name, const char *IDin_name, float PFlag, const char *IDout_name)
 
long LINARFILTERPRED_PF_updatePFmatrix (const char *IDPF_name, const char *IDPFM_name, float alpha)
 
long LINARFILTERPRED_PF_RealTimeApply (const char *IDmodevalOL_name, long IndexOffset, int semtrig, const char *IDPFM_name, long NBPFstep, const char *IDPFout_name, int nbGPU, long loop, long NBiter, int SAVEMODE, float tlag, long PFindex)
 
5. MISC TOOLS, DIAGNOSTICS
float LINARFILTERPRED_ScanGain (char *IDin_name, float multfact, float framelag)
 

Detailed Description

Function prototypes for linear autoregressive prediction.

Implements Empirical Orthogonal Functions

Author
O. Guyon
Date
5 Jul 2017
Bug:
No known bugs.

Function Documentation

int_fast8_t init_linARfilterPred ( )
long LINARFILTERPRED_Apply_LinPredictor ( const char *  IDfilt_name,
const char *  IDin_name,
float  PFlag,
const char *  IDout_name 
)
long LINARFILTERPRED_Apply_LinPredictor_RT ( const char *  IDfilt_name,
const char *  IDin_name,
const char *  IDout_name 
)
long LINARFILTERPRED_Build_LinPredictor ( const char *  IDin_name,
long  PForder,
float  PFlag,
double  SVDeps,
double  RegLambda,
const char *  IDoutPF_name,
int  outMode,
int  LOOPmode,
float  LOOPgain 
)

Build predictive filter.

Parameters
[in]IDin_nameInput telemetry, can be a 2D or 3D image
[in]PForderFilter order: number of time steps in filter
[in]SVDepsCutoff limit on singular values
[in]RegLambdaRegularization parameter
[out]IDoutPF_nameOutput predictive filter name
[in]outModeOutput mode. 0: do not write individual files, 1: write individual files (note: output filter cube is always written)
[in]LOOPmode1 if running in infinite loop waiting for input telemetry
[in]LOOPgainif running in loop, mixing coefficient between previous and current filter

Optional pixel masks select input and output variables: "inmask" and "outmask"

if LOOPmode = 1, operate in a loop, and re-run filter computation everytime IDin_name changes

Note
if atmospheric wavefronts, data should be piston-free
Returns
output filter image index

IDin_name is a 2D or 3D image

Optional input and output pixel masks select active input & output

< 1 if regularization

< use MAGMA library if available

< 1 if average value of each mode is removed

measure time

long LINARFILTERPRED_LoadASCIIfiles ( double  tstart,
double  dt,
long  NBpt,
long  NBfr,
const char *  IDoutname 
)

load ascii file(s) into image cube

resamples sequence(s) of data points INPUT FILES HAVE TO BE NAMED seq000.dat, seq001.dat etc...

file starts at tstart, sampling = dt NBpt per file NBfr files

long LINARFILTERPRED_PF_RealTimeApply ( const char *  IDmodevalOL_name,
long  IndexOffset,
int  semtrig,
const char *  IDPFM_name,
long  NBPFstep,
const char *  IDPFout_name,
int  nbGPU,
long  loop,
long  NBiter,
int  SAVEMODE,
float  tlag,
long  PFindex 
)

measure time

long LINARFILTERPRED_PF_updatePFmatrix ( const char *  IDPF_name,
const char *  IDPFM_name,
float  alpha 
)
float LINARFILTERPRED_ScanGain ( char *  IDin_name,
float  multfact,
float  framelag 
)
long LINARFILTERPRED_SelectBlock ( const char *  IDin_name,
const char *  IDblknb_name,
long  blkNB,
const char *  IDout_name 
)
int NBwords ( const char  sentence[])