Varex 1207
The imaging detector communicates with a PC via the CameraLink interface. The data cable connects from the detector to a frame grabber, which is installed into a PCIe slot in the computer. The drivers, control program and libraries can be installed on Windows using the installer found here (link checked 28.2.2023):
https://vareximagpub.sharepoint.com/:f:/g/EpbONhWBk41Bk-E70MJStcIBhnUxjYGYqnY3rFn0OAyf3A
At the moment, the operation of the detector only works on the Windows PC in the phase-contrast room. A graphical user interface is provided by the SCap (or Pelican) program. Own programs can be made at least with C, C++ and Python. The necessary libraries, documentations and example programs can be found in the installation path, e.g., C:\Program Files\Varex\DexelaDetectorAPI.
In the current setup, the piezo and micrometer screw are controlled from the Linux PC and the detector from the Windows PC. The communication between these PCs is implemented via the lab network and server/client programs coded with Python (2.7/3.4). The server program (Phase_step_server.py) has to be located on the Windows PC. It can be obtained from GitLab (https://version.helsinki.fi/xraylab/imaging/phase-contrast/phase-grating-control/-/tree/master/Windows) and placed e.g. in C:\Users\xraylab\Documents\Varex_image_server.
Using the imaging server (on Windows)
Navigate to the folder including the server program and start PowerShell (or other shell program). In the file explorer app (head to the desired folder), PowerShell can be launched in the current folder (path) by clicking the "File" tab in the top bar and "Open Windows PowerShell" from the drop-down menu. You can also first start PowerShell and then navigate to the desired folder with the "cd" command.
The server program has been coded using Python. It can be launched from the shell program with the following command:
When starting the server, the program first checks all CameraLink devices that are present and initializes the detector(s) that are found. After initialization, the server constantly waits for requests from a client program.
Taking images using a client program (on Linux) [OUTDATED]
The Linux PC can communicate with the imaging server on the Windows PC with the client program phase_step_client.py, currently located under /home/phasecontrast/path_to_file. Single images can be taken from a Linux shell (Ctrl+Alt+T) with the command:
where fname is the name of the file that includes the imaging parameters (now /home/phasecontrast/Desktop/input.txt) and imnum is the number of the image (which is appended to the end of the image name). Both the server and the client print info about their activity/actions. The imaging server can be closed from the Linux PC by running the client program without the two command line arguments.
Acquiring a phase stepping series from spec (on Linux) [OUTDATED]
The necessary spec macros for performing phase stepping are located in the file /home/phasecontrast/Desktop/Piezo/piezo.mac, which can be loaded into spec with qdofile("/home/phasecontrast/Desktop/Piezo/piezo.mac").
Phase stepping can be performed by calling:
where the name of the input file (now input.txt) is given as an argument (must include full path and quotes). Both the piezo and the imaging parameters have to be specified in this input file. The stepping macro automatically numbers the images (correctly if # of images < 100), which makes later image analysis easier. The layout of the input file is the following:
10
2
0.2
#Imaging parameters: exptime,impath,imname,darkpath
3200
D:\DATA\Varex_testing_15072019\test\
testim
D:\Varex_calibration\1207-33545-Dark-High-10x3200,ms-Binx11.smv
Make sure not to add any additional or empty lines to file, because the client program needs to know exactly where the imaging parameters start (now on line 7). Piezo starting location (pstart) and step (pstep) are given in micrometers. The exposure time (exptime) has to be set in milliseconds. All the paths are on the Windows PC (note direction of "\").