Import Jpk AFM images Matlab?
7 次查看(过去 30 天)
显示 更早的评论
Hi everybody, I am trying to extract, from AFM data, a number of parameters from different sets of channels ( Height, Lateral deflection, Photo sum Etc. ) and import it into Matlab.
I currently use Gwyddion to do so, save to CSV and import to Matlab.
But as the amount of data is consistent, would anyone know how to read '.jpk' extensions in Matalb so I could write a script to do the analysis directly? Or have a script to at least to open the '.jpk' extensions for import?
Traditional input methods, also through the import tool, don't do the job as some import only the first layer of data.
Thank You all very much. Best.
2 个评论
kunal Bhardwaj
2020-5-14
hey Robery Could you show me how to extract from AFM data and import into Matlab for analysis?
I am using gwyddion for AFM
thanks
bhkunal22@gmail.com
Roberto Diego Ortuso
2020-5-15
Dear Bhardwaj,
Sorry, but your question is too vague.
Might I suggest you start from [ http://gwyddion.net/module-list.en.php ] to decode your AFM file format. This repertory is the source list for AFM file import and holds most AFM file types.
The second option is contact your manufacturer and they will most likely provide you with information on file structure and decoding.
Best,
Robert
采纳的回答
Alex Winkel
2016-10-3
Hello Robert
I can give you some detailed info on our file structure if you contact me.
If you can't get a message directly to me through mathworks please comment here.
Best wishes, Alex
0 个评论
更多回答(2 个)
Emanuel Pfitzner
2018-3-19
Hello Robert,
i once started writing a script for that and it's not the nicest to look at. It just loads the Height and auxiliary channel 3 and 4 into Matlab. Using the imfinfo command you get back a more conclusive overview of the *.jpk file content. With that you might get a chance to modify the code below according to your application.
Hope that helps, Emanuel
function [data,X_trace, X_retrace, Y_trace, Y_retrace, topo] = loadJPKAux34(filename,scaling)
info=imfinfo(filename);
% Get the indices for the different channels Hieght measured, Aux 3
% and Aux 4 for trace and retrace.
for j=1:size(info,1)
if strcmp(info(j).UnknownTags(3).Value,'Height')
indexTopo = j;
scalingTopo = info(j).UnknownTags(37).Value;
offsetTopo = info(j).UnknownTags(38).Value;
end
if ~isempty(strfind(info(j).UnknownTags(4).Value,'channel.name : aux3'))&&~isempty(strfind(info(j).UnknownTags(4).Value,'retrace : false'))
indexXTrace=j;
scalingX = info(j).UnknownTags(19).Value;
offsetX = info(j).UnknownTags(20).Value;
end
if ~isempty(strfind(info(j).UnknownTags(4).Value,'channel.name : aux3'))&&~isempty(strfind(info(j).UnknownTags(4).Value,'retrace : true'))
indexXRetrace=j;
scalingX = info(j).UnknownTags(19).Value;
offsetX = info(j).UnknownTags(20).Value;
end
if ~isempty(strfind(info(j).UnknownTags(4).Value,'channel.name : aux4'))&&~isempty(strfind(info(j).UnknownTags(4).Value,'retrace : false'))
indexYTrace=j;
scalingY = info(j).UnknownTags(19).Value;
offsetY = info(j).UnknownTags(20).Value;
end
if ~isempty(strfind(info(j).UnknownTags(4).Value,'channel.name : aux4'))&&~isempty(strfind(info(j).UnknownTags(4).Value,'retrace : true'))
indexYRetrace=j;
scalingY = info(j).UnknownTags(19).Value;
offsetY = info(j).UnknownTags(20).Value;
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%load and correct topography%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Load only the trace map of the topography and scale it by its
% scaling factors and offset.
topo = scalingTopo.*double(imread(filename,'Index',indexTopo))+offsetTopo;
%load X trace and average with retrace
X_trace = (double(imread(filename,'Index',indexXTrace)).*scalingX+offsetX).*scaling;
X_retrace = (double(imread(filename,'Index',indexXRetrace)).*scalingX+offsetX).*scaling;
%load Y trace and average with retrace
Y_trace = (double(imread(filename,'Index',indexYTrace)).*scalingY+offsetY).*scaling;
Y_retrace = (double(imread(filename,'Index',indexYRetrace)).*scalingY+offsetY).*scaling;
data.X_trace = X_trace;
data.Y_trace = Y_trace;
data.X_retrace = X_retrace;
data.Y_retrace = Y_retrace;
data.topo = topo;
end
0 个评论
Peter Newman
2018-7-16
Hi Guys,
The 2018 publication together with software package "Fodis" contains a function "readJPK" that does just the above - see: https://github.com/nicolagalvanetto/Fodis
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!