Changeset 1064
- Timestamp:
- Apr 30, 2019, 6:26:20 PM (6 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/browse_data.m
r1063 r1064 257 257 ListExperiments=get(handles.ListExperiments,'String'); 258 258 list_val=get(handles.ListExperiments,'Value'); 259 % if isequal(list_val(1),1) 260 % ListExperiments=ListExperiments(2:end); %choose all experiments if the first line '*' is selected 261 % set(handles.ListExperiments,'Value',1) 262 % else 263 ListExperiments=ListExperiments(list_val);%choose selected experiments 264 % end 259 ListExperiments=ListExperiments(list_val);%choose selected experiments 265 260 list_dataseries(handles,ListExperiments,MirrorPath) 266 261 … … 303 298 end 304 299 end 300 if get(handles.CheckDevices,'Value') 301 set(handles.ListDevices,'Value',1) 302 set(handles.ListDevices,'String',sort(DataSeries)) 303 CheckDevices_Callback([],[], handles) 304 else 305 305 set(handles.DataSeries,'Value',1) 306 306 set(handles.DataSeries,'String',sort(DataSeries)) 307 end 307 308 308 309 %------------------------------------------------------------------------ … … 487 488 488 489 %------------------------------------------------------------------------ 489 % --- Executes on button press in Cancel.490 %------------------------------------------------------------------------491 % function Cancel_Callback(hObject, eventdata, handles)492 % % hseries=findobj(allchild(0),'Tag','series');493 % % if ~isempty(hseries)494 % % hhh=guidata(hseries);495 % % set(hhh.Replicate,'Value',0)496 % % end497 % % delete(get(hObject,'parent'))498 499 % handles.output = get(hObject,'String');500 % guidata(hObject, handles); % Update handles structure501 % % Use UIRESUME instead of delete because the OutputFcn needs502 % uiresume(handles.browse_data);503 504 %------------------------------------------------------------------------505 % --- executes when user attempts to close geometry_calib.506 function browse_data_CloseRequestFcn(hObject, eventdata, handles)507 508 %------------------------------------------------------------------------509 490 % --- Executes when user attempts to close browse_data. 510 491 %------------------------------------------------------------------------ … … 553 534 function Up_Callback(hObject, eventdata, handles) 554 535 SourceDir=get(handles.SourceDir,'String'); 555 % Device=DataSeries{get(handles.DataSeries,'Value')};556 % DataSeries=uigetfile_uvmat('open a data folder',Device,'uigetdir');557 % uiresume(handles.browse_data);558 536 browse_data(SourceDir) 559 537 … … 571 549 set(handles.ListExperiments,'Value',ValueDevice) 572 550 ListExperiments_Callback(hObject, [], handles) 573 % Device=regexprep(DataSeries{get(handles.DataSeries,'Value')},'+','');574 % Device=regexprep(Device,'~','');575 % PathDevice=fullfile(SourceDir,SourceFolder,Device);576 % DirDevice=dir(PathDevice);577 % NewDevice=DirDevice(end).name;578 % % uiresume(handles.browse_data);579 % browse_data(fullfile(PathDevice,NewDevice))580 551 581 552 582 553 % --- Executes on selection change in DataSeries. 583 554 function DataSeries_Callback(hObject, eventdata, handles) 584 % hObject handle to DataSeries (see GCBO)585 % eventdata reserved - to be defined in a future version of MATLAB586 % handles structure with handles and user data (see GUIDATA)587 588 % Hints: contents = cellstr(get(hObject,'String')) returns DataSeries contents as cell array589 % contents{get(hObject,'Value')} returns selected item from DataSeries590 555 591 556 … … 594 559 if get(handles.CheckDevices,'Value') 595 560 set(handles.ListDevices,'Visible','on') 596 else 561 ListDevices=get(handles.DataSeries,'String'); 562 Index=get(handles.DataSeries,'Value'); 563 set(handles.ListDevices,'String',ListDevices) 564 set(handles.ListDevices,'Value',Index) 565 set(handles.DataSeries,'Value',1) 566 if strcmp(get(handles.MirrorDir,'Visible'),'on') 567 MirrorPath=get(handles.MirrorDir,'String'); 568 else 569 MirrorPath=get(handles.SourceDir,'String'); 570 end 571 IndexExperiment=get(handles.ListExperiments,'Value'); 572 ListExperiment=get(handles.ListExperiments,'String'); 573 Experiment=ListExperiment{get(handles.ListExperiments,'Value')}; 574 Experiment=regexprep(Experiment,'^\+/','');% remove the +/ used to mark dir 575 Experiment=regexprep(Experiment,'^~','');% remove the ~ used to mark symbolic link 576 Device=regexprep(ListDevices{Index},'^\+/','');% remove the +/ used to mark dir 577 Device=regexprep(Device,'^~','');% remove the ~ used to mark symbolic link 578 DataSeries=dir(fullfile(MirrorPath,Experiment,Device)); 579 DataSeriesCell=struct2cell(DataSeries); 580 set(handles.DataSeries,'String',DataSeriesCell(1,:)') 581 else 582 ListDevices=get(handles.ListDevices,'String'); 583 Index=get(handles.ListDevices,'Value'); 597 584 set(handles.ListDevices,'Visible','off') 598 end 585 set(handles.DataSeries,'String',ListDevices) 586 set(handles.DataSeries,'Value',Index) 587 end -
trunk/src/read_GUI.m
r1061 r1064 94 94 check_input=0; 95 95 end 96 if check_input %96 if check_input && ~isempty(tag)% 97 97 if index==0 98 98 struct.(tag)=input; -
trunk/src/view_field.m
r1061 r1064 336 336 FigName=get(ListFig(ilist),'name'); 337 337 if isempty(FigName) 338 FigName=['figure ' num2str(ListFig(ilist).Number)]; 338 if isnumeric( ListFig(ilist)) 339 FigName= ['figure ' num2str(ListFig(ilist))]; 340 else 341 FigName=['figure ' num2str(ListFig(ilist).Number)]; 342 end 339 343 end 340 344 if ~strcmp(FigName,'uvmat')
Note: See TracChangeset
for help on using the changeset viewer.