You are on page 1of 3

Characterizing

the LC2002. (*Skipping the setup of the optical elements, since you are already using a different one) How to use the existing software Inside the folder Scatter measurement there is a sub-folder, named Scripts. It contains all the scripts and functions in order to operate the camera and the LCD simultaneously with the script LUCA_LCOS.m, which was initially used for the optical integration method, and was modified to fit the needs of this experiment. The LUCA_LCOS script, is, as described above, controlling both the camera and the LCD is mainly divided into two fields. At the left side, the cameras reception is depicted, and on the right side, is previewed what is projected on the LCD.

It should be clear that before using the LUCA_LCOS script, all external hardware should be connected. Otherwise Matlab gives an error. What is also should be noticed, is before even operating Matlab, after having connected the LC2002 and having it plugged, is that it is recognized and used by Windows as an external monitor. This can be checked in Windows screen properties. After having everything connected, and getting LUCA_LCOS into run mode, in order to set the camera ON, there is a button on the upper left corner of the LUCA_LCOSs GUI. When pressed ON, an very characteristic sound of the cooling fan of the camera can be heard, like being turned off and on again. If this sound is heard, then the indications of EM and ET (electron multiplying and exposure time respectively) are TRUE. If this sound of the fan restarting is not heard, then the indications of EM and ET are again shown, but are false. In this case the camera connection should be checked and Matlab should be restarted in order to renew its information on the computers bus connections. EM is by default set to 220 and ET to 0.1. EMs value corresponds to a value that refers to the electro multiplying process. If EM is set to 0 then no electron multiplying is taking place (no signal gain). ETs value corresponds to exposure time in seconds. The camera can record up to 37 frames/second so the minimum

Picture 1. GUI of LUCA_LCOS

affordable value of the ET field can be up to approximately 0.05 seconds. Another field that can be useful is the AC field. It corresponds to accumulation of frames. For example, if set to 2 then the camera records two sequential frames and gives as an output the mean value for every pixel for those two frames. On the projection part, there are three basic input fields. The Ini, Step and End. They all three refer to the initial value of the sequence of projected gray levels (from 0 to 255), the step of the sequence and the final value of the sequence. For example of their values are 0/20/140 this measurement sequence will result in an initial gray level of 0 then 20,40,60,80,100,120 and 140. In order to do a sequential measurement, after setting the Ini, Step and End field, it is needed to firstly set a name of the sequence in the field of file name (number 3 on the picture 1) and then the button START & GetImage should be pressed, after being prompted to choose a folder to save the acquired pictures, the sequence starts. There is also an option for projecting a chosen gray level on the LC2002, and keeping it on, mostly for testing purposes. In order to do this, the desired value of a gray level should be on the Ini field and then the Start button should be pressed. It is important that the small box Set fix. Point is Unchecked. Data acquisition and manipulation. After every measurement sequence, the cameras output files are in .sif format. For this reason some actions are needed in order to get all the information contained in those files. Firstly, it is noted that every resulting file is situated on the specific folder indicated by the user when prompted. All files that are generated, contain the filename given in the filename box plus information of the gray level with some other information from the camera. For example:

25_25__514_cX350_cY250_GreyLevel0.sif

The first letters, in red, of this string are the input for filename given by the user. The last letters, in green, are the gray level outomatically created by the camera. From its previous use, this script also creates another .sif file called by the filename given followed by the word backround which should not be taken into consideration. After collecting all files, they can be copied/moved on a separate folder, accompanied by a function called sifread.m and a script called readscript.m . The sifread function is used to make all the information of the sif file readable by matlab. Every .sif file contains all the information from the camera for every frame taken such as exposure time, date, time, as well as information about the image. All the information needed is extracted and manipulated by the readscript.m script. With this custom made script a sif file can be easily selected (when run, there is a prompt to choose a .sif file to analyze) and result to a text file generated, containing the mean value of recorded intensity of every pixel contained in the frame that is recorded. After the .txt is generated, in command line of Matlab the user is being prompted if he wants to continue whith another .sif file, by simply typing y or n for yes or no respectively. If y is typed, then

the same procedure takes place, with the user having to select a different .sif file, and the mean value recorded in the same .txt file one line above. After analyzing all .sif files they can either be transferred to Excel for data analysis or use Matlab. Curve Fitting As described in the literature, at some point, in order to extract the parameters of the LC2002, a fitting of a specific sinusoidal function will be required. For this purpose, there are two ways to find the best curve fitting. If Matlab 2012b (or later) is used, there is a quite easy and graphical way to do the curve fitting. By going to the APPS tab of Matlab and use the curve fitting app. It is necessary to create primarily two different variables containing the data to be plotted and fitted. In this specific case those variables would be angle (in Radians) and recorder mean intensity.

If the user is using this way off fitting, it will be able for him to customize the function that is needed to be fitted onto the data. The second way to do the fitting includes a script and a matlab function called by the script. It also needed to work with an xls file where all the data are being kept. By reading the script it can be easily understood what is the initial format of the xls file needed. This specific script concludes to a curve fitting of an exact function, which in this exact case is :

A+B*cos(4*angles+C)
Where A, B and C are the values of the parameters to be used into the calculation of the LC2002 characteristics.

You might also like