Measuring Fabry-Perot fringes#
This example shows how to measure Fabry-Perot fringes using the image processing features of DataLab:
Load an image of a Fabry-Perot interferometer
Define a circular region of interest (ROI) around the central fringe
Detect contours in the ROI and fit them to circles
Show the radius of the circles
Annotate the image
Copy/paste the ROI to another image
Extract the intensity profile along the X axis
Save the workspace
First, we open DataLab and load the images:
The selected image is displayed in the main window. We can zoom in and out by pressing the right mouse button and dragging the mouse up and down. We can also pan the image by pressing the middle mouse button and dragging the mouse.
Note
When working on application-specific images (e.g. X-ray radiography images, or optical microscopy images), it is often useful to change the colormap to a grayscale colormap. If you see a different image colormap than the one shown in the figure, you can change it by selecting the image in the visualization panel, and the selecting the colormap in the vertical toolbar on the left of the visualization panel.
Or, even better, you can change the default colormap in the DataLab settings by selecting “Edit > Settings…” in the menu, or the button in the toolbar.
Then, let’s define a circular region of interest (ROI) around the central fringe.
Now, let’s detect the contours in the ROI and fit them to circles.
Note
If you want to show the analysis results again, you can select the “Show results” entry in the “Analysis” menu, or the “Show results” button, below the image list:
The images (or signals) can also be displayed in a separate window, by clicking on the “View in a new window” entry in the “View” menu (or the button in the toolbar). This is useful to compare side by side images or signals.
If you want to take a closer look at the metadata, you can open the “Metadata” dialog.
Now, let’s delete the image metadata (including the annotations) to clean up the image.
If we want to define the exact same ROI on the second image, we can copy/paste the ROI from the first image to the second image, using the metadata.
To extract the intensity profile along the X axis, we have two options:
Either select the “Line profile…” entry in the “Operations > Intensity profiles” menu.
Or activate the “Cross section” tool in the vertical toolbar on the left of the visualization panel.
Let’s try the first option, by selecting the “Line profile…” entry :
that is the most straightforward way to extract a profile from an image, and it
corresponds to the compute_profile
method of DataLab’s API (so it can be used
in a script, a plugin or a macro).
If you want to do some measurements on the profile, or add annotations, you can open the signal in a separate window, by clicking on the “View in a new window” entry in the “View” menu (or the button in the toolbar).
Now, let’s try the second option for extracting the intensity profile along the X axis, by activating the “Cross section” tool in the vertical toolbar on the left of the visualization panel (this tool is a PlotPy feature). Before being able to use it, we need to select the image in the visualization panel (otherwise the tool is grayed out). Then, we can click on the image to display the intensity profile along the X axis. DataLab integrates a modified version of this tool, that allows to transfer the profile to the “Signals” panel for further processing.
Then, click on the “Process signal” button in the toolbar near the profile to transfer the profile to the “Signals” panel.
Finally, we can save the workspace to a file. The workspace contains all the images and signals that were loaded or processed in DataLab. It also contains the analysis results, the visualization settings (colormaps, contrast, etc.), the metadata, and the annotations.
If you want to load the workspace again, you can use the “File > Open HDF5 file…” (or the button in the toolbar) to load the whole workspace, or the “File > Browse HDF5 file…” (or the button in the toolbar) to load only a selection of data sets from the workspace.