#ifndef __AASTATS_H__
#define __AASTATS_H__
#ifndef __UTILITIES_H__
#include "utilities.h"
#endif
#ifndef __ATMOSPHERE_H__
#include "atmosphere.h"
#endif
struct aaStats {
int N, N2, NU, NU2, NF, NF2, psd_size, cov_size, ind_size;
float2 *d__psd;
float *d__cov, *d__alpha, *d__beta, n_full, n_comp, b_full, b_comp, cov_eval_et, sampling;
cufftHandle plan;
#if defined(AASTATS_DEBUG) || defined(PASTATS_DEBUG)
float2 *psd, *cov;
#endif
int N_SRC2;
void setup(int N, const atmosphere *atm, float lenslet_pitch, const source *src, int N_SRC);
void cleanup(void);
void info(int kappa, float d);
float variance(void);
void toFile(char *filename);
};
struct paStats {
int osf, M, shift;
int *M_LAYER;
int N, N2, NU, NU2, NF, NF2, psd_size, cov_size, ind_size;
float2 *d__psd;
float *d__cov, *d__alpha, *d__beta, n_full, n_comp, b_full, b_comp, cov_eval_et, sampling;
cufftHandle plan;
#if defined(AASTATS_DEBUG) || defined(PASTATS_DEBUG)
float2 *psd, *cov;
#endif
int N_SRC2;
void setup(int M_, int N_, int osf_, const atmosphere *atm, float lenslet_pitch,
source *phase_src, int N_P_SRC, const source *slopes_src, int N_S_SRC);
void setup(int M_, int N_, int osf_, const atmosphere *atm, float lenslet_pitch,
const source *slopes_src, int N_S_SRC,
float z_radius);
void cleanup(void);
void info(int kappa, float d);
void MVM(float *out_vector, float *in_vector,
float d1, float g1, int N1,
float d2, int N2,
atmosphere *atm,
source *phase_src, int N_P_SRC,
source *slopes_src, int N_S_SRC) ;
void toFile(char *filename);
void variance(void);
};
#endif