Instrument Operation - Polarization-Lab/ULTRASIP-FIREXAQ GitHub Wiki

Initialization

Before taking any measurements, MATLAB has to connect to the instrument's rotation stage and camera as well as define certain variables such as the rotation stage's home position, how many frames to capture to trigger the camera, etc. To initialize the instrument, run initializeUV.m. This script connects to both components by creating objects and sets specific instrument parameters. In addition, the script will generate a 1x512x512 array called "dark" with darkfield measurements to subtract off images.

Note that the instrument has to be re-initialized every time the MATLAB workspace is cleared. Unless the user enters any such command in the command window, the instrument will need to be re-initialized after running ULTRASIP_Auto_Analysis.m and ULTRASIP_Read_Data.m.

Taking Data

After initializing the instrument, data can be collected by running UVsamplerun_automated.m or TestIntegratingSphere.m. Both scripts will save the data collected as a HDF5 file type. For the integrating sphere project, use TestIntegratingSphere.m which collects, saves, processes, and displays all desired data.

The function UV_Data.m captures data and stores the image as a 1x512x512 array. The array can then be immediately plotted using imagesc(reshape(<image>, 512, 512)):

Note that the stripes seen in the image are from polishing marks on the sensor, see the "Data Processing" page for more information.

This instrument takes four images per measurement. Flux image data is then stored in a 4x512x512 array. Although saving data in this fashion is not required, polishing mark correction and data processing functions will expect a 4x512x512 array input and current file saving/opening scripts also assume a 4x512x512 array. Some scripts will take several Stokes parameter measurements at a time and will store data in a (4n)x512x512 array where n is the number of Stokes parameter measurements. The flux images are always ordered 0, 45, 90, 135, meaning that the flux image at an angle a of measurement n will have an index (4n - 3) + (a / 45). For example, the flux image at angle 90 deg for the third measurement can be accessed as image(11,:,:). Sample of intermediate images (polishing marks corrected):

Rotating the polarizer

To manually change the angular position of the polarizer, use the function Move_motor.m. This function takes in the desired angular position relative to the set home position as well as the motor controller object and moves the motor to that location while also outputting its true position. The function can read both positive and negative angles.

Although no function exists to get the current position of the ELL14 motor, sending the command TranslateELL14(query(ELL14, "0gp)) will output the current position of the motor in degrees or just query(ELL14, "0gp) which outputs the position in hex ("0PO--------").

⚠️ **GitHub.com Fallback** ⚠️