close all; clear all; try,% Make the timeseries newpath=MBARI_path('/hosts/tornado/vol/vol0/ssdsdata/ecocimt/src'); cd(newpath); cdir = ['../configuration/ecofl2.properties']; prop = readProperties(cdir); otype='plot'; p=getprops(prop,otype); % Create interval which is the number of days to process. Then process the % data and create plots today=now; first_day=datenum(2004,6,3); interval = round(today - first_day); fid=fopen([p.ldir,'/',p.log],'at+'); fprintf(fid,'%s\n',['ECO TS ',p.ecotype,' ',p.project,', ',p.mooring, ', device number: ', p.dev, ', serial number ', p.serial]); fprintf(fid,'%s\n',[' 1. MK_TS: ' DATESTR(NOW), ' interval=',num2str(interval)]); fclose(fid); eco_process(interval); % This function extracts, calibrates, and plots the data cd ../plots dir % Change the name of the output file, which has the interval embedded in % the name. Then delete the original file. filename=['eco' num2str(interval) '.jpg'] copyfile(filename,'eco_ts.jpg'); dir %delete(filename); dir filename=['eco' num2str(interval) '.png'] copyfile(filename,'eco_ts.png'); delete(filename); exit catch, % Something went wrong, capture error message and write to log file [LASTMSG, LASTID] = lasterr; disp(['** PROCESSING HALTED** Error: ',LASTMSG]); disp([' Last ID: ', LASTID]); fid=fopen([p.ldir,'/',p.log],'at+'); fprintf(fid,'%s\n',['ECO TS']); fprintf(fid,'%s\n',[' **PROCESSING HALTED** Error: ', LASTMSG ]); fprintf(fid,'%s\n',[' Last ID: ', LASTID ]); fprintf(fid,'%s\n',':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::'); fprintf(fid,'\n'); fclose(fid); exit; end