Custom m-files for using .sm4 files in MATLAB
Our RHK R9 microscope saves its data into a proprietary .sm4 format, which is incompatible with MATLAB, a commonly used language for scientific and image analysis. We have developed a suite of MATLAB m-files focusing on using the data stored in the .sm4 in the MATLAB environment. The existed programs are listed below, along with a short description of their use -- below each description are links to each file and a more thorough discussion of the program.
[top]
[top]
Description
This program reads the .sm4 file and outputs the outfile .mat structure (a translation of most of the .sm4 file data) and formatoutfile. The formatoutfile structure contains only the information we are interested in, sorted into three main substructures:
This is, generally speaking, the first program in the chain and subsequent programs require data in the formatoutfile format to be able to read them properly.
Links
Location on the MathWorks File Exchange: sm4reader.m
More details: sm4reader.m and the .mat file format
[top]
This program reads the .sm4 file and outputs the outfile .mat structure (a translation of most of the .sm4 file data) and formatoutfile. The formatoutfile structure contains only the information we are interested in, sorted into three main substructures:
- Spatial, for spatial scans such as topographical data
- Spectral, for any y vs. x type graph, such as dI/dV curves
- PLL, for any spatial scan or spectra for which the phase-locked loop is on
This is, generally speaking, the first program in the chain and subsequent programs require data in the formatoutfile format to be able to read them properly.
Links
Location on the MathWorks File Exchange: sm4reader.m
More details: sm4reader.m and the .mat file format
[top]
Description
This program automates sm4reader to act on an entire directory.
Links
Location on the MathWorks File Exchange: sm4tomatlab.m
More details: Automating conversion with sm4tomatlab
Requires: sm4reader.m
[top]
This program automates sm4reader to act on an entire directory.
Links
Location on the MathWorks File Exchange: sm4tomatlab.m
More details: Automating conversion with sm4tomatlab
Requires: sm4reader.m
[top]
Description
This program generates labeled PNG previews of topographical (includes image flattening), I-V, and dI-dV data from the .sm4 files directly. The idea behind the previews is to assist in sorting through data sets using the thumbnail previews of the PNGs to make things faster.
Requires
sm4reader.m
Links
Location on the MathWorks File Exchange: sm4datapreview.m
Example previews
This program generates labeled PNG previews of topographical (includes image flattening), I-V, and dI-dV data from the .sm4 files directly. The idea behind the previews is to assist in sorting through data sets using the thumbnail previews of the PNGs to make things faster.
Requires
sm4reader.m
Links
Location on the MathWorks File Exchange: sm4datapreview.m
Example previews
Description
This program is used to generate waterfall plots of I-V and dI/dV data. It includes options for averaging over repeated measurements and data smoothing (over neighboring points). In addition to the spectral plots, the program will also flatten and display an associated spatial plot of the users' choice, showing each point where the data was taken. STSplot also returns the plotted x and y data into a formatted structure so it can be used in further analysis.
Requires
sm4reader.m to read directly from .sm4
sm4reader.m and optionally sm4tomatlab.m to convert files first
varycolor.m by Daniel Helmick for dynamic colour designation
Links
Location on the MathWorks File Exchange: STSPlot.m
More details: Using STSPlot.m
Example graphs
This program is used to generate waterfall plots of I-V and dI/dV data. It includes options for averaging over repeated measurements and data smoothing (over neighboring points). In addition to the spectral plots, the program will also flatten and display an associated spatial plot of the users' choice, showing each point where the data was taken. STSplot also returns the plotted x and y data into a formatted structure so it can be used in further analysis.
Requires
sm4reader.m to read directly from .sm4
sm4reader.m and optionally sm4tomatlab.m to convert files first
varycolor.m by Daniel Helmick for dynamic colour designation
Links
Location on the MathWorks File Exchange: STSPlot.m
More details: Using STSPlot.m
Example graphs