110 likes | 272 Views
Update on the PS-PSB wire scanner calibration application. Student Meeting 12/05/2014. Carolina Bianchini BE-BI-BL. Outline. Python GUI Design . Python GUI implementation. Mathematical Routines in Python . Data Structure . Conclusions. Python GUI Design .
E N D
Update on the PS-PSB wire scanner calibration application Student Meeting 12/05/2014 Carolina Bianchini BE-BI-BL
Outline Python GUI Design Python GUI implementation MathematicalRoutines in Python Data Structure Conclusions
Python GUI Design This GUI allows the users to select the folder containing the calibration data. Once it is loaded the calibration process starts. • With the 4 tabs 10IN, 10OUT, 15IN and 15OUT, the user can select each configuration speed/movement. • Speed can be 10m/s or 15m/s and the movement can be IN or OUT. It’s also possible to choose the polynomial order to be used to interpolate the raw data in order to generate the calibration tables.
Python GUI Design This GUI allows the users to select the folder containing the calibration data. Once it is loaded the calibration process starts. In the other two plot the user are able to check the error range and the goodness of the signal.
Mathematical Routines in Python Library: Numpyand Scipy (Python) Matlab (New Method tests) Python (apply new Method + GUI) Smooth (18 pt) Gaussian Smooth yy = smooth(y) smooths the data in the column vector y using a moving average filter. window=degree*2-1 weight=numpy.array([1.0]*window) weightGauss=1/(numpy.exp((4*(frac))**2)) w=numpy.array(weightGauss)*weight smoothed[i]=sum(numpy.array(list[i:i+window])*w)/sum(w)
MathematicalRoutins in Python Library: Numpyand Scipy (Python) Matlab (New Method tests) Python (apply new Method + GUI) Threshold Threshold Smooth (5 pt) GaussianSmooth Gaussian Fit Gaussian Fit f = fit(x.',y.','gauss2') scipy.optimize.curve_fit(f, xdata, ydata, p0=None) Polynomial Fit Polynomial Fit p = polyfit(x,y,n) numpy.polynomial.polynomial.polyval(x,c, tensor=True)
Data Structure Library: Numpy (Python)
Data Structure After having made the average for each scan:
Conclusions • The final code is almost ready, although the GUI is still not connected to the calibration routines. • I have to improve the processing time, which is still slower compared to Matlab. • We should be able to process all the PS and PSB BWS calibration in the following 15 days.
Thanks to... Emiliano 11