Changeset 246 for trunk/src/uvmat.m


Ignore:
Timestamp:
Apr 28, 2011, 10:52:31 AM (13 years ago)
Author:
sommeria
Message:

thin plate shell (patch) introduced

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/uvmat.m

    r243 r246  
    21502150        errormsg=['error in reading ' filename ': ' errormsg];
    21512151        return
    2152     end
    2153        
     2152    end       
    21542153    if isfield(ParamOut,'Npx')&& isfield(ParamOut,'Npy')
    21552154        set(handles.npx,'String',num2str(ParamOut.Npx));% display image size on the interface
     
    22962295    index_menu=strcmp(ParamOut.VelType,menu);
    22972296    set(handles.VelType,'Value',find(index_menu,1))
     2297    if ~get(handles.SubField,'value')
    22982298    set(handles.VelType,'String',menu)
    2299 %     set(handles.VelType_1,'Value',1)
    2300 %     set(handles.VelType_1,'String',[{''};menu])
     2299     set(handles.VelType_1,'Value',1)
     2300     set(handles.VelType_1,'String',[{''};menu])
     2301    end
    23012302end
    23022303field_index=strcmp(ParamOut.FieldName,ParamOut.FieldList);
     
    24172418    Field{1}=calc_field([{ParamOut.FieldName} {ParamOut.ColorVar}],Field{1});
    24182419end
    2419 if length(Field)==2 && ~test_keepdata_1 && isequal(FileType_1,'netcdf') && ~isequal(ParamOut_1.FieldName,'get_field...')%&&~isempty(FieldName_1)
     2420if numel(Field)==2 && ~test_keepdata_1 && isequal(FileType_1,'netcdf') && ~isequal(ParamOut_1.FieldName,'get_field...')%&&~isempty(FieldName_1)
    24202421    Field{2}=calc_field([{ParamOut_1.FieldName} {ParamOut_1.ColorVar}],Field{2});
    24212422end
     
    25102511            nbpoints_z=UvData.Field.DimValue(DimIndex(1));
    25112512            DZ=(ZMax-ZMin)/(nbpoints_z-1);
    2512             UvData.Field.Mesh=sqrt(DX*DY*DZ);
     2513            UvData.Field.Mesh=(DX*DY*DZ)^(1/3);
    25132514            UvData.Field.ZMax=ZMax;
    25142515            UvData.Field.ZMin=ZMin;
     
    31263127end
    31273128FileExt_1=get(handles.FileExt_1,'String');
    3128 if isequal(FileExt_1,'"'),FileExt_1=get(handles.FileExt,'String'); end;
     3129if isequal(get(handles.FileExt_1,'Visible'),'off') || isequal(FileExt_1,'"')
     3130    FileExt_1=get(handles.FileExt,'String');%read FileExt by default
     3131end
    31293132FileName_1=[FileName_1 FileIndices_1 FileExt_1];
    31303133
     
    32723275
    32733276%read the rootfile input display
    3274 [FileName,RootPath,FileBase,FileIndices,FileExt_prev]=read_file_boxes_1(handles);
    3275 [P,F,str1,str2,str_a,str_b,E,NomType]=name2display(['xxx' get(handles.FileIndex,'String') FileExt_prev]);
    3276 if isempty(FileExt_prev)|| strcmp(FileExt_prev,'')
    3277     FileExt_1=get(handles.FileExt,'String');
    3278 else
    3279     FileExt_1=FileExt_prev;
    3280 end
     3277[FileName,RootPath,FileBase,FileIndices,FileExt_1]=read_file_boxes_1(handles);
     3278[P,F,str1,str2,str_a,str_b,E,NomType]=name2display(['xxx' get(handles.FileIndex,'String') FileExt_1]);
     3279% if isempty(FileExt_prev)|| strcmp(FileExt_prev,'')
     3280%     FileExt_1=get(handles.FileExt,'String');
     3281% else
     3282%     FileExt_1=FileExt_prev;
     3283% end
    32813284NomType_1=get(handles.FileIndex_1,'UserData');
    32823285if isempty(NomType_1)|| strcmp(NomType_1,'')
     
    33503353else
    33513354    set(handles.SubDir_1,'Visible','on')
    3352     if ~isequal(FileExt_prev,'.nc') %find the new NomType if the previous display was not already a netcdf file
     3355    if ~isequal(FileExt_1,'.nc') %find the new NomType if the previous display was not already a netcdf file
    33533356%         veltype_handles=[handles.VelType_1 handles.interp1_1 handles.filter1_1 handles.civ2_1 handles.interp2_1 handles.filter2_1];
    33543357%         set_veltype_display(veltype_handles,6); % make all civ buttons visible
     
    34963499%---------------------------------------------
    34973500 
    3498 set(handles.FixVelType,'Value',1)
     3501set(handles.FixVelType,'Value',1)% the velocity type is now imposed by the GUI (not automatic)
    34993502%refresh field with a second filename=first fiel name
    35003503set(handles.run0,'BackgroundColor',[1 1 0])%paint the command button in yellow
    3501 drawnow
     3504drawnow   
    35023505filename=read_file_boxes(handles);
    3503 if get(handles.SubField,'Value')
    3504     filename_1=read_file_boxes_1(handles);
    3505 else
    3506     index=get(handles.VelType_1,'Value');
    3507     if index==1
     3506
     3507index=get(handles.VelType_1,'Value');
     3508if index==1
    35083509        filename_1='';% we plot the current field without the second field
    3509     else
    3510         filename_1=filename;
    3511     end
    3512 end
     3510        set(handles.SubField,'Value',0)
     3511        SubField_Callback(hObject, eventdata, handles)
     3512elseif get(handles.SubField,'Value')% if subfield is already 'on'
     3513    filename_1=read_file_boxes_1(handles); %read the current second field
     3514else
     3515     filename_1=filename;% we compare two fields in the same file
     3516     set(handles.SubField,'Value',1)
     3517end
     3518
    35133519num_i1=stra2num(get(handles.i1,'String'));
    35143520num_i2=stra2num(get(handles.i2,'String'));
Note: See TracChangeset for help on using the changeset viewer.