Import Jpk AFM images Matlab?
조회 수: 9 (최근 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!