WS Calibration Program and GUI in python 18/11/2014 Carolina - - PowerPoint PPT Presentation

ws calibration program and gui
SMART_READER_LITE
LIVE PREVIEW

WS Calibration Program and GUI in python 18/11/2014 Carolina - - PowerPoint PPT Presentation

WS Calibration Program and GUI in python 18/11/2014 Carolina Bianchini BE-BI-BL Outline Wire scanner calibration Old vs New method GUI: Interface Elements Behind the code How to use the GUI to generate Calibration Executable file


slide-1
SLIDE 1

WS Calibration Program and GUI in python

18/11/2014

Carolina Bianchini BE-BI-BL

slide-2
SLIDE 2

11/08/2014 Carolina Bianchini

18/11/2014

2

Outline

GUI: Interface Elements Conclusions How to use the GUI to generate Calibration Old vs New method Compare Calibration for WS in PSB Behind the code Executable file Wire scanner calibration

slide-3
SLIDE 3

11/08/2014 Carolina Bianchini

18/11/2014

3

Wire Scanners calibration is needed to correlate the potentiometer values with the projected position of the beam.

Wirescanner calibration

PS Wirescanner

slide-4
SLIDE 4

11/08/2014 Carolina Bianchini

18/11/2014

4

Wirescanner calibration

The measurement are taken in fixed range with 1mm step. Three scans are

performed at each position and each scan is saved into an xml file. Laser Splitter Photodiode Combiner Wirescanner PSB PS

slide-5
SLIDE 5

11/08/2014 Carolina Bianchini

18/11/2014

Old Method

5

Old method vs New method

xml file reading Searching the point where the change is ≥ 40% (4 points) Calculate the average for the first and second couple of points (peaks position) Calculate the average between the two peaks Apply the polynomial fit (2nd order)

  • n the curve

Calculate the table (without the extension)

slide-6
SLIDE 6

11/08/2014 Carolina Bianchini

18/11/2014

Old Method

6

Old method vs New method

xml file reading Searching the point where the change is ≥ 40% (4 points) Calculate the average for the first and second couple of points (peaks position) Calculate the average between the two peaks Apply the polynomial fit (2nd order)

  • n the curve

Calculate the table (without the extension)

slide-7
SLIDE 7

11/08/2014 Carolina Bianchini

18/11/2014

7

Normal method vs New method

New Method

Read xml file Apply the smooth “filter” to reduce the noise Move threshold to find the four points relative to the peaks Apply the smooth “filter” to reduce the electrical noise on the peaks Find two window around the peaks and apply the gaussian fit, than take the center parameter Calculate average between the two peaks Apply the polynomial fit (8th

  • rder) on

the curve Calculate the Table (with the extension)

slide-8
SLIDE 8

11/08/2014 Carolina Bianchini

18/11/2014

8

WS PSB VERTICAL

0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 31000 32000 33000 34000 35000 36000

129614 10IN

0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 31000 32000 33000 34000 35000 36000

129615 10IN

0.192253

0.02 0.04 0.06 0.08 0.1 0.12 0.14 31000 32000 33000 34000 35000 36000

129620 10IN

0.05748

0.05 0.1 0.15 0.2 0.25 31000 32000 33000 34000 35000 36000

0.058156

129621 10IN

|c1-c2|

0.052927

slide-9
SLIDE 9

11/08/2014 Carolina Bianchini

18/11/2014

0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 30000 31000 32000 33000 34000 35000

9

WS PSB HORIZONTAL

129622 10IN

0.041264

0.05 0.1 0.15 0.2 0.25 0.3 0.35 31000 32000 33000 34000 35000 36000

129619 10IN

0.136221

0.05 0.1 0.15 0.2 0.25 31000 32000 33000 34000 35000 36000

129617 10IN

0.122571

|c1-c2|

0.0000000 0.0000002 0.0000004 0.0000006 0.0000008 0.0000010 0.0000012 0.0000014 0.0000016 31000 32000 33000 34000 35000 36000

129618 10IN

0.0000009503

slide-10
SLIDE 10

11/08/2014 Carolina Bianchini

18/11/2014

10

Program Calibration in python

  • 1. Select

the Calibration Folder 2.Find the peaks value and calculate the average value between them (at each position by the relative .xml file). 3.Data Processing: choose the best polynomial fit

  • rder

4.Generate the Calibration Table and write the Calibration Table in .clt file

slide-11
SLIDE 11

11/08/2014 Carolina Bianchini

18/11/2014

GUI: Interface Elements

11 Here is possible to choose the speed and type of movement to plot

slide-12
SLIDE 12

11/08/2014 Carolina Bianchini

18/11/2014

GUI: Interface Elements

12 User can select the type

  • f WS, because in the PBS

case, the calibration file require the extension

slide-13
SLIDE 13

11/08/2014 Carolina Bianchini

18/11/2014

GUI: Interface Elements

13 You can plot one data file

  • n top of the other to

compare it automatically User can delete the out- layer (y)

slide-14
SLIDE 14

11/08/2014 Carolina Bianchini

18/11/2014

GUI: Interface Elements

14 From the table, user can choose the best order for the polynomial fit (select the row) and pushing the button, the plots will be update with the new order

slide-15
SLIDE 15

11/08/2014 Carolina Bianchini

18/11/2014

GUI: Interface Elements

15 Pushing this button, the calibration table in the .clt file for the movement and speed selected will be generated

slide-16
SLIDE 16

11/08/2014 Carolina Bianchini

18/11/2014

16

Graphical User Interface in Python

RMS between real value and the polynomial fit value

slide-17
SLIDE 17

11/08/2014 Carolina Bianchini

18/11/2014

17

Graphical User Interface in Python

Average value between real

  • ne and the

polynomial fit

  • ne
slide-18
SLIDE 18

11/08/2014 Carolina Bianchini

18/11/2014

18

Graphical User Interface in Python

Average peaks distance

slide-19
SLIDE 19

11/08/2014 Carolina Bianchini

18/11/2014

19

Graphical User Interface in Python

RMS between peaks distance and the real

  • ne (≈2.85 mm)
slide-20
SLIDE 20

11/08/2014 Carolina Bianchini

18/11/2014

Behind the code

  • Error bar
  • PSB extension

20

slide-21
SLIDE 21

11/08/2014 Carolina Bianchini

18/11/2014

GUI Error Bar

21

slide-22
SLIDE 22

11/08/2014 Carolina Bianchini

18/11/2014

GUI Error Bar

22

scan1 scan2 scan3 We take the average

  • f these points in
  • rder to find the

laser position Potentiometer (bit)

slide-23
SLIDE 23

11/08/2014 Carolina Bianchini

18/11/2014

23

Extension of the Calibration Curve

Linear Curve Extension

slide-24
SLIDE 24

11/08/2014 Carolina Bianchini

18/11/2014

24

Extension of the Calibration Curve

We have a theoretical curve for the WS in the PSB.

Theory Curve Extension Linear Curve Extension

Theory Curve

We are in this region!

slide-25
SLIDE 25

11/08/2014 Carolina Bianchini

18/11/2014

25

Extension of the Calibration Curve

The extension procedure calculate all the steps between one point and the next one in the Theoretical curve. Then I have:

  • Theoretical curve (position vs potentiometer)
  • Theoretical curve steps.

In order to add the extension, the program search the last point around 30 and -30 on the first array. Then with the same array-index, in the second array get the step-value and add on the last point. Following this operation with the others steps in

  • rder to arrive at 50 and -50.

30

  • 30
slide-26
SLIDE 26

11/08/2014 Carolina Bianchini

18/11/2014

26

How to use the GUI for generate Calibration

slide-27
SLIDE 27

11/08/2014 Carolina Bianchini

18/11/2014

How to use the GUI for generate Calibration

Select the folder, wire scanner and date of measurement Select accelerator Run the calibration

At each movement (IN, HOME) and speed (10, 15)

  • Flag clean and delete the point out of range
  • Choose the polynomial order to fit the data, looking at errors
  • Generate the calibration table
slide-28
SLIDE 28

11/08/2014 Carolina Bianchini

18/11/2014

28

How to use the GUI for generate Calibration

slide-29
SLIDE 29

11/08/2014 Carolina Bianchini

18/11/2014

Executable file

29

slide-30
SLIDE 30

11/08/2014 Carolina Bianchini

18/11/2014

Executable file

30

dist build Program’s output

  • Calibration Tables

Input file

  • Theoretical Steps
slide-31
SLIDE 31

11/08/2014 Carolina Bianchini

18/11/2014

Development of Compare Calibration Program (python)

slide-32
SLIDE 32

11/08/2014 Carolina Bianchini

18/11/2014

Development of Compare Calibration Program (python)

slide-33
SLIDE 33

11/08/2014 Carolina Bianchini

18/11/2014

Development of Compare Calibration Program (python)

slide-34
SLIDE 34

11/08/2014 Carolina Bianchini

18/11/2014

Conclusions

34

  • As I have shown in the previous slides, with the new program, the

resolution between different calibration is improved.

  • The GUI is done, now after the test bench measurement is directly

possible to generate the calibration table or analyse the measurement to check its goodness.

  • The other program with relative interface can generate automatically

the average between different calibration on the same WS and eventually choose the calibration file with best resolution.

  • The last step regards an improvement of the polynomial fit, it will be

done after the extension on the PSB calibration tables. And the table will be saved in the folder structure performed to run the compare calibration program.

slide-35
SLIDE 35

11/08/2014 Carolina Bianchini

18/11/2014

35

Emiliano, Ana and Jonathan

Thanks to...