pre-alpha

This commit is contained in:
eddyem
2017-05-11 12:09:15 +03:00
parent d43501ed98
commit 7143778fa0
7 changed files with 316 additions and 137 deletions

View File

@@ -31,10 +31,18 @@
// max power of Zernike polynomial
#define ZERNIKE_MAX_POWER (100)
typedef struct{
double r,theta; // polar coordinates
int idx; // index of given point in square matrix
} polar;
typedef struct{
double r,theta;
} polar;
polar *P; // polar coordinates inside unitary circle
double **Rpow; // powers of R
int N; // max power of Zernike coeffs
int Sz; // size of P
int WH; // Width/Height of matrix
} polcrds;
int z_set_step(double step);
double z_get_step();
@@ -46,11 +54,18 @@ int z_set_wfunit(char *u);
double z_get_wfcoeff();
void z_print_wfunits();
void z_set_rotangle(double angle);
int z_set_Nzero(int val);
void convert_Zidx(int p, int *N, int *M);
polar *gen_coords(int *len);
polcrds *gen_coords();
void free_coords(polcrds *p);
double *Zcompose(int Zsz, double *Zidxs, int Sz, polar *P);
double **build_rpow(int n, int Sz, polar *P);
int z_save_wavefront(int Sz, polar *P, double *Z, char *filename);
double *Zcompose(int Zsz, double *Zidxs, polcrds *P);
int z_save_wavefront(polcrds *P, double *Z, double *std, char *fprefix);
#endif // __ZERNIKE_H__