Two types of functional GUI's can be made
This commit is contained in:
parent
4f617e27e3
commit
b3c257fff2
BIN
.Chi_error.h.swp
BIN
.Chi_error.h.swp
Binary file not shown.
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1 +1,3 @@
|
|||
ADEX
|
||||
ADT
|
||||
.gitignore
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
angle,Y,Yerr
|
||||
45,1.29,.10
|
||||
90,1.10,.10
|
||||
135,1.29,.10
|
|
9
GUI_AD.h
9
GUI_AD.h
|
@ -55,6 +55,7 @@ class HistoGUIad{
|
|||
double A0;
|
||||
double A2E;
|
||||
double A4E;
|
||||
double Ierr;
|
||||
int SetFit(double a, double b, double c){
|
||||
A0 = a;
|
||||
A2E = b;
|
||||
|
@ -385,7 +386,7 @@ int HistoGUIad::DrawData(double x_low_win, double y_low_win, double x_hi_win, do
|
|||
for(int i=0; i < x.size() - 1; i++){
|
||||
x_wid = (x[i] + x_offset) / width_scale;
|
||||
y_wid = (y[i] + y_offset) / height_scale;
|
||||
y_errors_wid = (y_errors[i] / height_scale);
|
||||
y_errors_wid = ((y_errors[i]/A0) / height_scale);
|
||||
// x_wid2 = (x[i + 1] + x_offset) / width_scale;
|
||||
// y_wid2 = (y[i + 1] + y_offset) / height_scale;
|
||||
//printf("(%f, %f), (%f,%f)\n", x_wid,y_wid,x_wid2,y_wid2);
|
||||
|
@ -424,14 +425,14 @@ int HistoGUIad::DrawData(double x_low_win, double y_low_win, double x_hi_win, do
|
|||
for(int i=0; i < (int) width; i += w_step){
|
||||
double x_val = i * width_scale - x_offset;
|
||||
sprintf(axis_val, "%.1f", x_val);
|
||||
XDrawString(disp, wind, DefaultGC(disp, screen), i, axis_y + 10, axis_val, strlen(axis_val));
|
||||
XDrawString(disp, wind, DefaultGC(disp, screen), i, axis_y + 10/A0, axis_val, strlen(axis_val));
|
||||
}
|
||||
|
||||
int h_step = height / 10;
|
||||
for(int i=0; i < (int) height; i += h_step){
|
||||
double y_val = i * height_scale - y_offset;
|
||||
sprintf(axis_val, "%.1f", y_val);
|
||||
XDrawString(disp, wind, DefaultGC(disp, screen), axis_x + 10, i, axis_val, strlen(axis_val));
|
||||
XDrawString(disp, wind, DefaultGC(disp, screen), axis_x + 10/A0, i, axis_val, strlen(axis_val));
|
||||
}
|
||||
|
||||
|
||||
|
@ -447,7 +448,7 @@ int HistoGUIad::DrawData(double x_low_win, double y_low_win, double x_hi_win, do
|
|||
x_wid = (x[i] + x_offset) / width_scale;
|
||||
y_wid = (y[i] + y_offset) / height_scale;
|
||||
|
||||
y_errors_wid = (y_errors[i] / height_scale);
|
||||
y_errors_wid = ((y_errors[i]/A0) / height_scale);
|
||||
|
||||
// x_wid2 = (x[i + 1] + x_offset) / width_scale;
|
||||
// y_wid2 = (y[i + 1] + y_offset) / height_scale;
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -210,9 +210,9 @@ double HistoGUI::legval(double theta){
|
|||
|
||||
double lg;
|
||||
|
||||
double aaa = A0;
|
||||
double aab = A2E*(1.5 * pow(theta,2) - .5);
|
||||
double aac = A4E*(35./8. * pow(theta,4) - 30./8. * pow(theta,2) + 3./8. );
|
||||
double aaa = A0/A0;
|
||||
double aab = (A2E/A0)*(1.5 * pow(cos(theta),2) - .5);
|
||||
double aac = (A4E/A0)*(35./8. * pow(cos(theta),4) - 30./8. * pow(cos(theta),2) + 3./8. );
|
||||
|
||||
lg = aaa + aab + aac;
|
||||
|
||||
|
|
|
@ -5,10 +5,13 @@ int main ( int argc, char** argv){
|
|||
|
||||
HistoGUI gui;
|
||||
|
||||
double A0E = 134.327;
|
||||
double A2E = -11.7874;
|
||||
double A4E = 0.760896;
|
||||
double A0E = 111.514;
|
||||
double A2E = -54.3312;
|
||||
double A4E = -76.4778;
|
||||
|
||||
//double A0E = 134.327;
|
||||
//double A2E = -11.7874;
|
||||
//double A4E = 0.760896;
|
||||
double step = 0.0001;
|
||||
|
||||
vector<double> Theta;
|
||||
|
@ -27,7 +30,7 @@ int main ( int argc, char** argv){
|
|||
|
||||
Iad = aaa + aab + aac;
|
||||
|
||||
cout << theta << "\n";
|
||||
// cout << theta << "\n";
|
||||
|
||||
AD_I.push_back(Iad);
|
||||
Theta.push_back(theta);
|
||||
|
@ -43,16 +46,16 @@ int main ( int argc, char** argv){
|
|||
dangle.push_back(1.5619);
|
||||
vector<double> dydata;
|
||||
//= {129.,110.,129.};
|
||||
dydata.push_back(129.);
|
||||
dydata.push_back(110.);
|
||||
dydata.push_back(129.);
|
||||
dydata.push_back(115.);
|
||||
dydata.push_back(129./A0E);
|
||||
dydata.push_back(110./A0E);
|
||||
dydata.push_back(129./A0E);
|
||||
dydata.push_back(115./A0E);
|
||||
vector<double> deydata;
|
||||
//= {10.,10.,10.};
|
||||
deydata.push_back(10.);
|
||||
deydata.push_back(10.);
|
||||
deydata.push_back(10.);
|
||||
deydata.push_back(10.);
|
||||
deydata.push_back(5.);
|
||||
deydata.push_back(5.);
|
||||
deydata.push_back(5.);
|
||||
deydata.push_back(5.);
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user