Code covered by the BSD License
-
STACKLab(varargin)
function STACKLAB(S) explores the stack standard struct S
-
B=FTMatrixShift(A,dy,dx)
function B=FTMatrixShift(A,dy,dx)
-
LoadStackRaw(filedir)
function S=LoadStackRaw(filedir)
-
S=FTAlignStack(stack)
function S=FTAlignStack(stack)
-
S=OdStack(structin,method)
function S=OdStack(structin,method)
-
Scomplete=CombineStacks(S1,S2)
function Scombined=CombineStacks(S1,S2)
-
StackMovie(S)
function StackMovie(S)
-
[eVenergy,Xvalue,Yvalue]=Read...
function [evenergy,Xvalue,Yvalue]=ReadHdr(file)
-
dftregistration(buf1ft,buf2ft...
function [output Greg] = dftregistration(buf1ft,buf2ft,usfac);
-
stackSVD(S,varargin)
function svdM = stackSVD(S,varargin)
-
View all files
from
STXM data analysis script collection - STACKLab
by Tobias Henn
STXM data analysis script collection with stack exploration GUI tool STACKLab
|
| LoadStackRaw(filedir)
|
function S = LoadStackRaw(filedir)
%function S=LoadStackRaw(filedir)
%
%Imports STXM raw data from input directoy filedir
%filedir needs to contain the STXM header file (.hdr) and the STXM data files (.xim)
%R.C. Moffet, T.R. Henn February 2009
%
%Inputs
%------
%filedir path to STXM raw data directory
%
%Outputs
%-------
%S structure array containing imported STXM data
%S.spectr STXM absorption images
%S.eVenergy Photon energies used to record images
%S.Xvalue length of horizontal STXM image axis in m
%S.Yvalue length of vertical STXM image axis in m
cd(filedir)
FileStruct=dir;
spccnt=1;
for i=1:length(FileStruct)
stridx=findstr(FileStruct(i).name,'xim');
hdridx=findstr(FileStruct(i).name,'hdr');
if ~isempty(stridx)
S.spectr(:,:,spccnt)=flipud(load(FileStruct(i).name));
spccnt=spccnt+1;
elseif ~isempty(hdridx)
[S.eVenergy,S.Xvalue,S.Yvalue]=ReadHdr(FileStruct(i).name);
end
end
% truncate crashed stacks:
if size(S.spectr,3)<length(S.eVenergy)
S.eVenergy((size(S.spectr,3)+1):length(S.eVenergy))=[];
end
|
|
Contact us at files@mathworks.com