Changeset 188


Ignore:
Timestamp:
Feb 2, 2011, 1:22:05 AM (13 years ago)
Author:
sommeria
Message:

various bug repairs and cleaning

Location:
trunk/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r183 r188  
    46254625    hwaitbar=uicontrol('Style','frame','Units','normalized', 'Position',BarPosition ,'BackgroundColor',[1 0 0],'tag','waitbar');
    46264626end
    4627 datnum=[];
     4627% datnum=[];
    46284628Tabchar={};
    46294629nbfiles=numel(civ_files);
    46304630count=0;
     4631testrecent=0;
    46314632while count<nbfiles
    46324633    count=0;
     4634    datnum=zeros(1,nbfiles);
    46334635    for ifile=1:nbfiles
    46344636        detect=exist(civ_files{ifile},'file'); % check the existence of the file
     
    46374639            option_str='not created';
    46384640        else
    4639             datfile=dir(civ_files{ifile});
    4640             datnum(ifile)=datenum(datfile.date);
     4641            datfile=dir(civ_files{ifile})
     4642            if isfield(datfile,'datenum')
     4643                datnum(ifile)=datfile.datenum;%only available in recent matlab versions
     4644                testrecent=1;
     4645            end
    46414646            filefound(ifile)={datfile.name};
    46424647            lastfield='';
     
    46694674        Tabchar{ifile,1}=[fullfile([subdir extdir],filename) ext  '...' option_str];
    46704675    end
    4671     if isempty(datnum)
    4672          message='no civ result created yet';
     4676    datnum=datnum(find(datnum));%keep the non zero values corresponding to existing files
     4677    if isempty(datnum)
     4678        if testrecent
     4679            message='no civ result created yet';
     4680        else
     4681            message='';
     4682        end
    46734683    else
    46744684        datnum=datnum(find(datnum));%keep the non zero values corresponding to existing files
     
    47084718     ind_dot=findstr(filename,'...');
    47094719     filename=filename(1:ind_dot-1);
    4710       filename=fullfile(rootroot,filename)
     4720      filename=fullfile(rootroot,filename);
    47114721      if exist(filename,'file')%visualise the vel field if it exists
    47124722        %[Field,VelTypeOut]=read_civxdata(filename);
  • trunk/src/get_field.m

    r187 r188  
    810810    huvmat=findobj(allchild(0),'tag','uvmat');
    811811    if isempty(huvmat)
    812         inputfile=get(handles.inputfile,'String');
    813812        uvmat(inputfile)
    814813    else
     
    830829    browse_fig(handles.list_fig); %update the list of new existing figures
    831830end
     831set(handles.RUN,'BackgroundColor',[1 0 0])
    832832
    833833%------------------------------------------------------------------------
  • trunk/src/nc2struct.m

    r150 r188  
    103103        indstr1=regexp(keystr,'\\','once');%detect '\\'
    104104        indstr2=regexp(keystr,'\.','once');%detect '\.'
    105         if isempty(indstr1) && isempty(indstr2)
     105        %indtitle=regexp(keystr,'title','once');%detect 'title'(bad characters)
     106        if isempty(indstr1) && isempty(indstr2)%&&isempty(indtitle)
    106107           valuestr = netcdf.getAtt(nc,netcdf.getConstant('NC_GLOBAL'),keystr);
    107            if ischar(valuestr) && length(valuestr)<200
     108           if ischar(valuestr) & length(valuestr)<200 & double(valuestr)<=122 & double(valuestr)>=48 %usual characters
    108109                iatt_g=iatt_g+1;
    109110                indstr1=regexp(keystr,'\\','once');%detect '\\'
  • trunk/src/plot_field.m

    r187 r188  
    239239tagaxes=get(haxes,'tag');
    240240if isfield(FigData,tagaxes)
    241     eval(['FigData.' tagaxes '=Data'])
     241    eval(['FigData.' tagaxes '=Data;'])
    242242    set(hfig,'UserData',FigData)
    243243end
  • trunk/src/series.m

    r179 r188  
    10151015ref_i=str2num(get(handles.ref_i,'String'));
    10161016ref_j=str2num(get(handles.ref_j,'String'));
    1017 % time=[];
    1018 % ref_time=[];
    1019  ref_time=0;
    1020 % if isfield(SeriesData,'Time')&~isempty(SeriesData.Time{Val})&~isequal(SeriesData.Time{Val},0)
    1021 %     time=SeriesData.Time{Val}; %get the set of times
    1022 %     siztime=size(time);
    1023 %     nbfield=siztime(1);
    1024 %     nbfield2=siztime(2);
    1025 % %     test_imadoc=1;
    1026 % else
    1027 %     test_imadoc=0;%no image documentation file
    1028     nbfield=50;
    1029     nbfield2=50;%default max number of pairs
    1030 % end
     1017ref_time=0;
     1018nbfield=50;
     1019nbfield2=50;%default max number of pairs
     1020
    10311021%look for existing processed pairs involving the field at the middle of the series if civ1 will not
    10321022% be performed, while the result is needed for next steps.
     
    10411031end
    10421032if strcmp(mode,'series(Di)')
    1043     nbfield
    10441033     for index=1:min(nbfield-1,50)
    10451034         filename=name_generator(filebase,ref_i-floor(index/2),ref_j,'.nc',NomType,1,ref_i+ceil(index/2),ref_j,subdir);
     
    10791068                displ_num(3,ind_exist)=0;
    10801069                displ_num(4,ind_exist)=0;
    1081                 %[cte_detect,vdt,cte_read]=read_netcdf(filename,{'dt','dt2','absolut_time_T0','absolute_time_TO_2'});
    10821070                [Cte,var_detect,ichoice]=nc2struct(filename,{});
    10831071                if isfield(Cte,'dt2')
Note: See TracChangeset for help on using the changeset viewer.