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
|
| [eVenergy,Xvalue,Yvalue]=ReadHdr(file) |
function [eVenergy,Xvalue,Yvalue]=ReadHdr(file)
%function [evenergy,Xvalue,Yvalue]=ReadHdr(file)
%
%Reads STXM data header file (.hdr) to extract photon energies and x and y image lengths
%R.C. Moffet, T.R. Henn February 2009
%
%Inputs
%------
%file .hdr header file path
%
%Outputs
%-------
%eVenergy vector containing photon energies used to record STXM images
%Xvalue length of horizontal STXM image axis in m
%Yvalue length of vertical STXM image axis in m
filestream = fopen(file, 'r');
cnt=1;
while feof(filestream) == 0
line=fgets(filestream);
energypos=findstr(line,'StackAxis');
pos3=findstr(line,'; XRange =');
if ~isempty(energypos)
line=fgets(filestream);
pos1=findstr(line,'(');
pos2=findstr(line,')');
energyvec=str2num(line(pos1+1:pos2-1));
eVenergy=energyvec(2:end)';
elseif ~isempty(pos3)
pos4=findstr(line,'; YRange =');
pos5=findstr(line,'; XStep =');
Xvalue=str2num(line(pos3+10:pos4-1));
Yvalue=str2num(line(pos4+10:pos5-1));
end
clear line pos3;
cnt=cnt+1;
end
fclose(filestream);
|
|
Contact us at files@mathworks.com