-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpbinversion.h
More file actions
69 lines (50 loc) · 2.13 KB
/
pbinversion.h
File metadata and controls
69 lines (50 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#ifndef PBINVERSION_H
#define PBINVERSION_H
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_integration.h>
//#include <gsl/gsl_linalg.h>
#include <QThread>
class PBInversion : public QThread
{
Q_OBJECT
public:
PBInversion();
~PBInversion();
void polar_a(int nl,int odd); // the function set variables nl_v = nl; odd_v = odd;
void polar_b(double **data,double **Imrz,int xc,int yc,int dr,int nl,int odd); // main function of the image inversion
double theta_f(double x,double y); // Obtains polar angle theta from the x, y coordinates
double cubic(double); //
double ldist(double X, gsl_vector *coeff, double *pl, int npl, int odd, int ik);
void load_matrices(int l,int odd);
void generateTestVMI(const int, double, double, double); // size x and y, gauss FWHM, centre position, beta2
void write_forward(int l,int odd); // write basis function
double model_f(double r,void *par); //
double model_c(int k,int l,double x,double z,gsl_integration_workspace *w); //
double lpoly(double X, int npl); //
int save_gsl_matrix(const gsl_matrix * , char*);
int read_gsl_matrix(const gsl_matrix * , char*);
int save_gsl_vector(const gsl_vector * , char*);
int read_gsl_vector(const gsl_vector * , char*);
void set_size(int, int);
void set_parameters(int, int);
void Invert_Polar(double*, double*, int ,int ,int ,int ,bool ); // main function of the image inversion
int NR; // = 256; // Radial binning
int NTH; // = 256; // Angular binning (180 degrees)
int NK; // = 128; // Number of basis functions
int size_r, size_theta, size_basis; // radial bining, angular binning (180 degrees) and number of basis functions
int ncolumns, nrows, ang_size;
bool m_isloaded;
gsl_matrix *U,*V;
gsl_vector *S;
double **ang;
double **data_v; double **Imrz_v;
int xc_v, yc_v, dr_v, nl_v, odd_v;
static double Wrapper_To_Call_model_f(double r,void *par);
signals:
void sent_respond(const char* );
void sent_error(const char* );
protected:
void run();
};
//typedef double (PBInversion::*model_f)(double r,void *par);
#endif // PBINVERSION_H