Changeset 949 for trunk/src


Ignore:
Timestamp:
Jun 3, 2016, 9:14:33 PM (9 years ago)
Author:
sommeria
Message:

fix modified in civ series

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/filter_tps.m

    r924 r949  
    154154U_smooth=U_smooth./nb_select;% take the average at the intersection of several subdomains
    155155V_smooth=V_smooth./nb_select;
     156U_smooth(FF==20)=U(FF==20);% set to the initial values the eliminated vectors (flagged as false)
     157V_smooth(FF==20)=V(FF==20);
    156158fill=zeros(NbCoord+1,NbCoord,size(SubRange,3)); %matrix of zeros to complement the matrix Data.Civ1_Coord_tps (conveninent for file storage)
    157159Coord_tps=cat(1,Coord_tps,fill);
  • trunk/src/series/civ_series.m

    r944 r949  
    593593        [Data.Civ1_SubRange,Data.Civ1_NbCentres,Data.Civ1_Coord_tps,Data.Civ1_U_tps,Data.Civ1_V_tps,tild,Ures, Vres,tild,FFres]=...
    594594            filter_tps([Data.Civ1_X(ind_good) Data.Civ1_Y(ind_good)],Data.Civ1_U(ind_good),Data.Civ1_V(ind_good),[],Data.Patch1_SubDomainSize,Data.Patch1_FieldSmooth,Data.Patch1_MaxDiff);
    595         Data.Civ1_U_smooth(ind_good)=Ures;% take the interpolated (smoothed) velocity values for good vectors, keep 0 for the others
     595        Data.Civ1_U_smooth(ind_good)=Ures;% take the interpolated (smoothed) velocity values for good vectors, keep civ1 data for the other
    596596        Data.Civ1_V_smooth(ind_good)=Vres;
    597597        Data.Civ1_FF(ind_good)=int8(FFres);
     
    869869        Data.VarAttribute{nbvar+6}.Role='vector_x';
    870870        Data.VarAttribute{nbvar+7}.Role='vector_y';
    871         Data.Civ2_U_smooth=Data.Civ2_U; % zeros(size(Data.Civ2_X));
    872         Data.Civ2_V_smooth=Data.Civ2_V; %zeros(size(Data.Civ2_X));
     871        Data.Civ2_U_smooth=Data.Civ2_U;
     872        Data.Civ2_V_smooth=Data.Civ2_V;
    873873        if isfield(Data,'Civ2_FF')
    874874            ind_good=find(Data.Civ2_FF==0);
     
    876876            ind_good=1:numel(Data.Civ2_X);
    877877        end
    878         [Data.Civ2_SubRange,Data.Civ2_NbCentres,Data.Civ2_Coord_tps,Data.Civ2_U_tps,Data.Civ2_V_tps,tild,Ures, Vres,tild,FFres]=...
     878        [Data.Civ2_SubRange,Data.Civ2_NbCentres,Data.Civ2_Coord_tps,Data.Civ2_U_tps,Data.Civ2_V_tps,tild,Ures,Vres,tild,FFres]=...
    879879            filter_tps([Data.Civ2_X(ind_good) Data.Civ2_Y(ind_good)],Data.Civ2_U(ind_good),Data.Civ2_V(ind_good),[],Data.Patch2_SubDomainSize,Data.Patch2_FieldSmooth,Data.Patch2_MaxDiff);
    880880        Data.Civ2_U_smooth(ind_good)=Ures;
  • trunk/src/series/extract_rdvision.m

    r939 r949  
    494494uid_Dtk=find(t,'ImaDoc/Camera/BurstTiming/Dtk');
    495495if ~isempty(uid_Dtk)
    496 uid_content_Dtk=get(t,uid_Dtk,'contents');
    497 Dtk=str2num(get(t,uid_content_Dtk,'value'));
    498 uid_content_NbDtk=get(t,uid_NbDtk,'contents');
    499 NbDtk=str2num(get(t,uid_content_NbDtk,'value'));
    500 Dtk_stamp=(timestamp(end-NbDti,1)-timestamp(1,1))/NbDtk;
    501 if abs(Dtk_stamp-Dtk)>Dtk/1000
    502     disp([msg 'Dtk from xml file corrected by ' num2str(Dtk_stamp-Dtk)]);
    503 else
    504     disp('Dtk OK')
    505 end
    506 t=set(t,uid_content_Dtk,'value',num2str(Dtk_stamp));
     496    uid_content_Dtk=get(t,uid_Dtk,'contents');
     497    Dtk=str2num(get(t,uid_content_Dtk,'value'));
     498    uid_content_NbDtk=get(t,uid_NbDtk,'contents');
     499    NbDtk=str2num(get(t,uid_content_NbDtk,'value'));
     500    Dtk_stamp=(timestamp(end-NbDti,1)-timestamp(1,1))/NbDtk;
     501    if abs(Dtk_stamp-Dtk)>Dtk/1000
     502        disp(['Dtk from xml file corrected by ' num2str(Dtk_stamp-Dtk)]);
     503    else
     504        disp('Dtk OK')
     505    end
     506    t=set(t,uid_content_Dtk,'value',num2str(Dtk_stamp));
    507507end
    508508
    509509save(t,newxml)
    510        [success,msg] = fileattrib(newxml,'+w','g');% allow writing access for the group of users 
    511         if success==0
    512             disp({['warning: unable to set group write access to ' newxml ':']; msg});%error message for directory creation
    513         end
    514 
    515 
    516 
     510[success,errormsg] = fileattrib(newxml,'+w','g');% allow writing access for the group of users
     511if success==0
     512    disp({['warning: unable to set group write access to ' newxml ':']; errormsg});%error message for directory creation
     513    msg=erromsg;
     514end
     515
     516
     517
Note: See TracChangeset for help on using the changeset viewer.