Changeset 1064 for trunk


Ignore:
Timestamp:
Apr 30, 2019, 6:26:20 PM (19 months ago)
Author:
sommeria
Message:

calibration repaired

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/browse_data.m

    r1063 r1064  
    257257ListExperiments=get(handles.ListExperiments,'String');
    258258list_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
     259ListExperiments=ListExperiments(list_val);%choose selected experiments
    265260list_dataseries(handles,ListExperiments,MirrorPath)
    266261
     
    303298    end
    304299end
     300if get(handles.CheckDevices,'Value')
     301    set(handles.ListDevices,'Value',1)
     302set(handles.ListDevices,'String',sort(DataSeries))
     303CheckDevices_Callback([],[], handles)
     304else
    305305set(handles.DataSeries,'Value',1)
    306306set(handles.DataSeries,'String',sort(DataSeries))
     307end
    307308
    308309%------------------------------------------------------------------------
     
    487488
    488489%------------------------------------------------------------------------
    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 % % end
    497 % % delete(get(hObject,'parent'))
    498 
    499 % handles.output = get(hObject,'String');
    500 % guidata(hObject, handles); % Update handles structure
    501 % % Use UIRESUME instead of delete because the OutputFcn needs
    502 % 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 %------------------------------------------------------------------------
    509490% --- Executes when user attempts to close browse_data.
    510491%------------------------------------------------------------------------
     
    553534function Up_Callback(hObject, eventdata, handles)
    554535SourceDir=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);
    558536browse_data(SourceDir)
    559537
     
    571549set(handles.ListExperiments,'Value',ValueDevice)
    572550ListExperiments_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))
    580551
    581552
    582553% --- Executes on selection change in DataSeries.
    583554function DataSeries_Callback(hObject, eventdata, handles)
    584 % hObject    handle to DataSeries (see GCBO)
    585 % eventdata  reserved - to be defined in a future version of MATLAB
    586 % handles    structure with handles and user data (see GUIDATA)
    587 
    588 % Hints: contents = cellstr(get(hObject,'String')) returns DataSeries contents as cell array
    589 %        contents{get(hObject,'Value')} returns selected item from DataSeries
    590555
    591556
     
    594559if get(handles.CheckDevices,'Value')
    595560    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,:)')
     581else
     582    ListDevices=get(handles.ListDevices,'String');
     583    Index=get(handles.ListDevices,'Value');
    597584    set(handles.ListDevices,'Visible','off')
    598 end
     585    set(handles.DataSeries,'String',ListDevices)
     586    set(handles.DataSeries,'Value',Index)
     587end
  • trunk/src/read_GUI.m

    r1061 r1064  
    9494                        check_input=0;
    9595                end
    96                 if check_input%
     96                if check_input && ~isempty(tag)%
    9797                    if index==0
    9898                       struct.(tag)=input;
  • trunk/src/view_field.m

    r1061 r1064  
    336336    FigName=get(ListFig(ilist),'name');
    337337    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
    339343    end
    340344    if ~strcmp(FigName,'uvmat')
Note: See TracChangeset for help on using the changeset viewer.