Changeset 246 for trunk/src/uvmat.m
- Timestamp:
- Apr 28, 2011, 10:52:31 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r243 r246 2150 2150 errormsg=['error in reading ' filename ': ' errormsg]; 2151 2151 return 2152 end 2153 2152 end 2154 2153 if isfield(ParamOut,'Npx')&& isfield(ParamOut,'Npy') 2155 2154 set(handles.npx,'String',num2str(ParamOut.Npx));% display image size on the interface … … 2296 2295 index_menu=strcmp(ParamOut.VelType,menu); 2297 2296 set(handles.VelType,'Value',find(index_menu,1)) 2297 if ~get(handles.SubField,'value') 2298 2298 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 2301 2302 end 2302 2303 field_index=strcmp(ParamOut.FieldName,ParamOut.FieldList); … … 2417 2418 Field{1}=calc_field([{ParamOut.FieldName} {ParamOut.ColorVar}],Field{1}); 2418 2419 end 2419 if length(Field)==2 && ~test_keepdata_1 && isequal(FileType_1,'netcdf') && ~isequal(ParamOut_1.FieldName,'get_field...')%&&~isempty(FieldName_1)2420 if numel(Field)==2 && ~test_keepdata_1 && isequal(FileType_1,'netcdf') && ~isequal(ParamOut_1.FieldName,'get_field...')%&&~isempty(FieldName_1) 2420 2421 Field{2}=calc_field([{ParamOut_1.FieldName} {ParamOut_1.ColorVar}],Field{2}); 2421 2422 end … … 2510 2511 nbpoints_z=UvData.Field.DimValue(DimIndex(1)); 2511 2512 DZ=(ZMax-ZMin)/(nbpoints_z-1); 2512 UvData.Field.Mesh= sqrt(DX*DY*DZ);2513 UvData.Field.Mesh=(DX*DY*DZ)^(1/3); 2513 2514 UvData.Field.ZMax=ZMax; 2514 2515 UvData.Field.ZMin=ZMin; … … 3126 3127 end 3127 3128 FileExt_1=get(handles.FileExt_1,'String'); 3128 if isequal(FileExt_1,'"'),FileExt_1=get(handles.FileExt,'String'); end; 3129 if isequal(get(handles.FileExt_1,'Visible'),'off') || isequal(FileExt_1,'"') 3130 FileExt_1=get(handles.FileExt,'String');%read FileExt by default 3131 end 3129 3132 FileName_1=[FileName_1 FileIndices_1 FileExt_1]; 3130 3133 … … 3272 3275 3273 3276 %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 else3279 FileExt_1=FileExt_prev;3280 end3277 [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 3281 3284 NomType_1=get(handles.FileIndex_1,'UserData'); 3282 3285 if isempty(NomType_1)|| strcmp(NomType_1,'') … … 3350 3353 else 3351 3354 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 file3355 if ~isequal(FileExt_1,'.nc') %find the new NomType if the previous display was not already a netcdf file 3353 3356 % veltype_handles=[handles.VelType_1 handles.interp1_1 handles.filter1_1 handles.civ2_1 handles.interp2_1 handles.filter2_1]; 3354 3357 % set_veltype_display(veltype_handles,6); % make all civ buttons visible … … 3496 3499 %--------------------------------------------- 3497 3500 3498 set(handles.FixVelType,'Value',1) 3501 set(handles.FixVelType,'Value',1)% the velocity type is now imposed by the GUI (not automatic) 3499 3502 %refresh field with a second filename=first fiel name 3500 3503 set(handles.run0,'BackgroundColor',[1 1 0])%paint the command button in yellow 3501 drawnow 3504 drawnow 3502 3505 filename=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 3507 index=get(handles.VelType_1,'Value'); 3508 if index==1 3508 3509 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) 3512 elseif get(handles.SubField,'Value')% if subfield is already 'on' 3513 filename_1=read_file_boxes_1(handles); %read the current second field 3514 else 3515 filename_1=filename;% we compare two fields in the same file 3516 set(handles.SubField,'Value',1) 3517 end 3518 3513 3519 num_i1=stra2num(get(handles.i1,'String')); 3514 3520 num_i2=stra2num(get(handles.i2,'String'));
Note: See TracChangeset
for help on using the changeset viewer.