Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
b2faf8451a
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
25 lines (19 sloc) 862 Bytes
function nrframes = andor_nrframes(absfilepath, varargin)
%function nrframes = andor_nrframes(filename, varargin)
%get number of frames in sif file
%adapted from sifreadexample
%Written by Marcel
params.signal = 0;
params = omex_read_params(params, varargin);
rc=atsif_setfileaccessmode(1); %sets up the sif library to set the access property to load the entire file
rc=atsif_readfromfile(absfilepath); % attempt to open the file
if (rc == 22002) % check that the file was successfully opened
signal=0;
[rc,present]=atsif_isdatasourcepresent(signal); % check there is a signal present
if present
[rc,nrframes]=atsif_getnumberframes(signal); % query the number of frames contained in the file (e.g. in the instance of a kinetic series there may be more than 1
end
else
error('Could not find or load file. ERROR - ');
%disp(rc);
end