function anothermoviemaker
%this file's job is to run through a series of .b16 images (captured with the PCO sensicam) using b16_reader, make a movie, convert it to .avi,...
%and save it

tic
num_frames=132;
movie_name='siphon_0p2Hzcapture_1minperiod_125x_lowquality'

close all, colordef none
for jj=1:num_frames
    if jj<10, frame_num=strcat('000',num2str(jj));
    elseif jj<100,frame_num=strcat('00',num2str(jj));
    elseif jj<1000,frame_num=strcat('0',num2str(jj));
    else error('Too many frames')
    end
    eval([    '[imm,mx,mn]=b16_reader(''capture0p2Hz_2min_period_jan31_2007_movie_' frame_num  '.b16'');'      ])
    M(jj) = getframe(gcf);    %M is a structure array;  getframe returns a structure
    close
end
%movie(M)
movie2avi(M,movie_name,'fps',25,'compression','Indeo5','quality',25)
toc