sm4datapreview

Generates .png images of topographic scans and IV spectroscopy in RHK's .sm4 files
114 Downloads
Updated 7 Jul 2017

View License

sm4datapreview reads the .sm4 files in the active directory and generates .png previews of spatial data with a (flattened) topographic scan, and (smoothed) spectral data through the first IV and/or dIdV curves stored in the file.

This program was designed to assist us with data archiving, particularly to speed looking through old data without having to load/flatten or plot the files.
Both types of previews are labeled with the file name, date and time. Topography images also include scan width, and either bias and current (STM), or dF and drive amplitude (AFM). Topography is flattened and contrast adjusted before saving, and if the scan is at least 1 height to 2 width high, adds a scalebar (white fill, black outline to help visibility in different shading areas). Spectral data is smoothed by averaging over the 20 nearest neighbors before plotting to increase clarity.

The program was developed in Shawna Hollen's 2D Materials lab at UNH (http://unh2d.weebly.com/). More information on this program and the suite of related .sm4 programs can be found here: http://unh2d.weebly.com/using-sm4-files-in-matlab.html

Cite As

Jason Moscatello (2024). sm4datapreview (https://www.mathworks.com/matlabcentral/fileexchange/62628-sm4datapreview), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Data Import and Analysis in Help Center and MATLAB Answers
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.8.0.0

Major bug fix: dIdV scans were not being plotted. This has been fixed.

1.7.0.0

1. Waitbar to show progress. 2. Spectral data smoothed for clarity. 3. V=0 reference line added to spectra. 4. Scale bar added on scans taller than at least .5 H x 1 W. 5. Improved memory usage.

1.6.0.0

Fixed an error when processing non-square matrices.

Encountered my first scan where IV and dIdV matrices were present, but empty, which returned an error when trying to plot. The program now checks to make sure they aren't empty.

1.5.0.0

Fixed a memory issue -- all files opened by an fopen are closed by fclose to conserve memory. The program should be able to be run on a larger number of files now without error.

1.4.0.0

-Some saved .sm4 files are all zeros for topography, which returned an error, killing the program. These files are now skipped without a preview.

-A waitbar was added so that progress could be tracked for large amounts of files.

1.3.0.0

Fixed a typo.

1.2.0.0

File name change.

1.1.0.0

Fixed an index bug and have better flattening that ignores values of zero (which the R9 uses to store empty data). Topography previews should be better looking.

1.0.0.0