-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
71 changed files
with
8,457 additions
and
602 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#include <stddef.h> | ||
#include <stdio.h> | ||
#include <cstring> | ||
#include <cstdlib> | ||
#include <ctime> | ||
#include <sstream> | ||
#include "Salt.h" | ||
#include "Fpga.h" | ||
#include "fastComm.h" | ||
#include <fstream> | ||
//#include <vector> | ||
|
||
using namespace std; | ||
|
||
class Ana_tests { | ||
|
||
public: | ||
|
||
Ana_tests(){}; | ||
Ana_tests(Fpga*, Salt*, FastComm*); | ||
~Ana_tests(){}; | ||
|
||
void Get_run(string option, int runs, string outText); | ||
void output_file(int runs, float avg_ADC[], float avg_chip[], float avg_noise, float length_avg, string outText, string option); | ||
void Trim_dac_scan(); | ||
bool Check_Gain(); | ||
bool Get_noise(int runs, string data_type, string option); | ||
bool Check_NZS(); | ||
bool Baseline_corr(); | ||
float calculateSD(float data[], int runs); | ||
float calculateSD(int data[], int runs); | ||
void adc_output(int min, int bins); | ||
void histogram(int start, int bins, int data[], int size, int ch); | ||
void set_calib_fifo(); | ||
//vector<int> m_hist[128]; | ||
int m_hmin; | ||
int m_bins; | ||
float m_avg_adc[128]; | ||
float m_std_dev[128]; | ||
float m_gain[128]; | ||
float m_offset[128]; | ||
float m_gain_chip; | ||
float m_offset_chip; | ||
float m_noise; | ||
float m_noise_rms; | ||
int m_mcm_ch; | ||
int m_mcm_v; | ||
float m_a; | ||
float m_b; | ||
float m_c; | ||
// int m_hist[128]; | ||
int adc_hist[128][64]; | ||
// vector<int> hist; | ||
bool Check_PedS(); | ||
bool Check_MCMS(); | ||
bool Check_MCMS(float ADC[128], int mcm1, int mcm2, int mcm_ch, int mcm_v); | ||
bool Check_linear(float x[], float y[], int size, float thresh); | ||
bool Get_Quad_Coef(float x[], float y[], int PointsNum, float &a, float &b, float &c); | ||
void Get_quadTerms(float x[], float y[], int npoints, float &a, float &b, float &c); | ||
|
||
private: | ||
Fpga* fpga_; | ||
Salt* salt_; | ||
FastComm* fastComm_; | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
AVG = 123.164 | ||
STD_DEV = 19.4124 | ||
48 | ||
154 | ||
143 | ||
118 | ||
172 | ||
111 | ||
127 | ||
114 | ||
149 | ||
125 | ||
160 | ||
117 | ||
92 | ||
102 | ||
144 | ||
116 | ||
112 | ||
114 | ||
144 | ||
111 | ||
141 | ||
106 | ||
101 | ||
137 | ||
156 | ||
116 | ||
103 | ||
140 | ||
114 | ||
117 | ||
90 | ||
98 | ||
123 | ||
121 | ||
120 | ||
112 | ||
149 | ||
103 | ||
114 | ||
128 | ||
131 | ||
122 | ||
87 | ||
128 | ||
128 | ||
53 | ||
128 | ||
107 | ||
154 | ||
117 | ||
91 | ||
107 | ||
157 | ||
131 | ||
112 | ||
118 | ||
123 | ||
120 | ||
130 | ||
123 | ||
125 | ||
106 | ||
116 | ||
107 | ||
128 | ||
128 | ||
124 | ||
132 | ||
113 | ||
129 | ||
141 | ||
119 | ||
120 | ||
107 | ||
91 | ||
132 | ||
128 | ||
144 | ||
126 | ||
103 | ||
135 | ||
115 | ||
149 | ||
136 | ||
127 | ||
115 | ||
134 | ||
122 | ||
110 | ||
113 | ||
130 | ||
139 | ||
115 | ||
133 | ||
128 | ||
105 | ||
142 | ||
119 | ||
122 | ||
147 | ||
144 | ||
142 | ||
94 | ||
132 | ||
142 | ||
112 | ||
148 | ||
120 | ||
133 | ||
135 | ||
108 | ||
117 | ||
119 | ||
116 | ||
107 | ||
126 | ||
164 | ||
91 | ||
130 | ||
142 | ||
159 | ||
120 | ||
112 | ||
163 | ||
118 | ||
148 | ||
116 | ||
123 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
length_avg = 2 | ||
runs = 10, Average = 0.00625, std_dev = 0.00681078 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0.1 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0.1 | ||
0 | ||
0 | ||
0.2 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0.1 | ||
0.1 | ||
0 | ||
0 | ||
0.1 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0.1 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0.1 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0.3 | ||
0 | ||
0 | ||
0.1 | ||
0.1 | ||
0 | ||
0.2 | ||
0 | ||
0.1 | ||
0 | ||
0 | ||
0.1 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0.1 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0.1 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0.1 | ||
0 | ||
0.2 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0 | ||
0.1 |
Oops, something went wrong.