The CGcamera class
CGcamera is a handle class.
The CGcamera object represents the imaging system. It is composed of a regular camera, a cross-grating, and possibly a relay lens in between. Each of these three components are also represented by objects, respectively from the classes Camera, CrossGrating, and RelayLens.
Properties
name |
type |
default |
description |
|---|---|---|---|
|
Camera |
|
Camera |
|
RelayLens |
Relay lens |
|
|
CrossGrating |
Cross-grating |
|
|
char |
FileName of the CGcamera, if any |
|
|
double |
0 |
Grating-camera distance \(d\) [m] |
name |
type |
description |
|---|---|---|
|
double |
Effective dexel size (divided by the RL zoom) [m] |
|
double |
zeta factor \(\zeta=\Gamma Z/2p\) |
|
double |
zoom of the RL system \(Z\) |
Note
The property dxSize is a dependent attribute that returns the effective dexel size, which is not necessarily the actual dexel size of the camera sensor. When there is a RL, applying a zoom \(Z\) to the system, the {RL, camera} system is equivalent to a single camera with a dexel size divided by the zoom. This method returns the dexel size fo this equivalent camera, called the effective dexel size.
Constructor
Constructor
Synthax
% prototypes
obj = CGcamera();
obj = CGcamera(camName);
obj = CGcamera(CGcamName);
obj = CGcamera(camName,CGname);
obj = CGcamera(camName,CGname,zoom);
% examples
obj = CGcamera('Zyla');
obj = CGcamera('Silios_mono');
obj = CGcamera('Zyla', 'F3');
obj = CGcamera('Zyla', 'P2', 1.11);
obj = CGcamera() creates an empty CGcamera object.
obj = CGcamera(camName) creates a CGcamera object that consists only of a camera (no relay-lens, no cross-grating). camName is a char that defines the camera. The camera names must correspond to the names of the files contained in the folder spec/cameras. For instance, obj = CGcamera('Zyla');.
obj = CGcamera(CGcamName) creates a CGcamera object from the name of a QLSI device. The CGcamera names must correspond to the names of the files contained in the folder spec/CGcameras. For instance, obj = CGcamera('Silios_mono');.
obj = Interfero(camName, CGname) creates a CGcamera object obj from the specification of a camera and a cross-grating. camName is the char name of the camera, and CGname is the char name of the cross-grating. The possible names of camera and cross-grating are the names of the files contained in the folder spec/cameras and spec/CG. For instance, obj = CGcamera('Zyla','P4');.
obj = Interfero(camName, CGname, zoom) creates a CGcamera object obj from the specification of a camera, a cross-grating, and a zoom. camName is the char name of the camera, CGname is the char name of the cross-grating, and zoom is a number that corresponds to the zoom of a relay lens. The specification of a zoom value leads to the creation of a non-empty RL properties in the CGcamera object, i.e., it creates a relay-lens.
CGcamera spec files
Each pre-defined CGcamera is associated with a file located in the spec/CGcameras folder. This file contains all the characteristics of the CG camera. Here is for instance a copy of the Silios_mono.txt file:
dexel size: 5.5e-6
Gamma: 33e-6
Nx: 2048
Ny: 2048
distance: 0.75e-3
CGdepth: 550e-9
CGangle: 57.0078
The folder CGcameras contains .txt files associated to each predefined camera, namely:
sC8-830.txt
A sC8 camera from Phasics we own at the Institut Fresnel, with the reference number 830.
sC8-944.txt
A sC8 camera from Phasics we own at the Institut Fresnel, with the reference number 944.
Sid4-CRHEA.txt
A Sid4-HR camera from Phasics own by the CRHEA in Nice, France.
Sid4-Element-Sona.txt
Our Sid4-Element from Phasics, associated with a Sona camera from Andor.
Sid4Element.txt
Our Sid4-Element from Phasics, associated with a Zyla 5.5 camera from Andor.
Silios_mono.txt
The Makatea wavefront camera from Silios.
If other QLSI cameras are being used, new custom files can be made, following this pattern and placed in the spec/CGcamera folder.
If other QLSI cameras are being used, new custom files can be made, following this pattern. Any new file can be saved in the spec/CGcamera folder, or in any other folder known by Matlab. However, in order to simply keep track of the updated versions of PhaseLAB via Github, I suggest to store any custom-made file to a separate folder, out of the PhaseLAB package, and include this directory in the Matlab paths. Also, feel free to contact me to ask for any file addition/modification in the public Github version of PhaseLAB that would suit your studies.
CGcamera methods
alpha
Computes and returns the alpha value of the QLSI camera system.
Synthax
val = obj.alpha();
val = obj.alpha(lambda);
Description
val = obj.alpha(); returns the alpha parameter of a QLSI system. The alpha parameter is defined by 1:
where \(\Gamma\) is the pitch of the grating, \(p\) is the dexel size of the camera, \(Z\) the zoom of the RL, and \(d\) is the camera-grating distance.
- 1
Quantitative phase microscopy using quadriwave lateral shearing interferometry (QLSI): principle, terminology, algorithm and grating shadow description, Baffou G., J. Phys. D: Appl. Phys. 54, 294002 (2021)
When using a RL, the alpha parameter depends on the wavelength, because of the imperfection of the RL (the focal lengths of the relay lens slightly depends on the wavelength). In this case, the wavelength lambda should be indicated as an input argument: val = obj.alpha(lambda);.
distance
Returns the effective grating-camera distance.
Synthax
val = obj.distance();
val = obj.distance(lambda);
Description
val = obj.distance(); normally returns obj.CGpos. However, when a RL is used, the effective grating-camera distance becomes dependent on the wavelength. In this latter case, one should write val = obj.distance(lambda); where lambda is the value of the wavelength.
setDistance
Sets the grating-camera distance.
Synthax
obj.setDistance(val);
Description
obj.setDistance(val); directly sets the value of the grating-camera distance, i.e., the value of the CGpos property.