function [tiltangle,def,def_align,alpha,beta] = getStackInfo(stackname)

fid = fopen([stackname '_stack_info.txt'],'r');
    fgets(fid);
    %tilt,defocus [nm],defocus after align [nm],alpha,beta
    stackinfo = fscanf(fid, '%f, %f, %f, %f, %f',[5, Inf]);
fclose(fid);

tiltangle = stackinfo(1,:)';
def = -stackinfo(2,:)';
def_align = -stackinfo(3,:)';
alpha = stackinfo(4,:)';
beta = stackinfo(5,:)';

end
