Ignore:
Timestamp:
Apr 17, 2019, 6:22:25 PM (5 years ago)
Author:
sommeria
Message:

geometric calibration corrected

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/browse_data.m

    r1061 r1063  
    2424function varargout = browse_data(varargin)
    2525
    26 % Last Modified by GUIDE v2.5 08-Sep-2018 19:03:40
     26% Last Modified by GUIDE v2.5 17-Apr-2019 18:15:24
    2727
    2828% Begin initialization code - DO NOT EDIT
     
    7575set(hObject, 'Units', OldUnits);
    7676if exist('MultiDevices','var') && strcmp(MultiDevices,'on')
    77     set(handles.ListDevices,'Max',2)
    78 else
    79     set(handles.ListDevices,'Max',1)
     77    set(handles.DataSeries,'Max',2)
     78else
     79    set(handles.DataSeries,'Max',1)
    8080end
    8181if exist('EnableMirror','var') && strcmp(EnableMirror,'on')
     
    212212% List the experiments in a campaign, filling the menu ListExperiments
    213213%------------------------------------------------------------------------
    214 function errormsg=scan_campaign(handles,Campaign,Experiment,DataSeries)
     214function errormsg=scan_campaign(handles,Campaign,Experiment,DataInput)
    215215%------------------------------------------------------------------------
    216216errormsg='';
     
    233233    set(handles.ListExperiments,'Value',index)% initialise the menu selection with the folder defined by the input
    234234    ListExperiments_Callback([],[], handles)
    235     ListDevices=get(handles.ListDevices,'String');
    236     index=find(strcmp(['+/' DataSeries],ListDevices));
     235    DataSeries=get(handles.DataSeries,'String');
     236    index=find(strcmp(['+/' DataInput],DataSeries));
    237237    if isempty(index)
    238         index=find(strcmp(['~/' DataSeries],ListDevices));
     238        index=find(strcmp(['~/' DataInput],DataSeries));
    239239    end
    240240    if ~isempty(index)
    241           set(handles.ListDevices,'Value',index)
     241          set(handles.DataSeries,'Value',index)
    242242    end
    243243else
     
    270270 function list_dataseries(handles,ListExperiments,MirrorPath)
    271271
    272 ListDevices={};
     272DataSeries={};
    273273for iexp=1:numel(ListExperiments)
    274274    if strcmp(ListExperiments{iexp}(1),'+')% if the item is a directory
     
    295295                        ListFiles{ilist}=['+/' ListFiles{ilist}];%mark dir by '+' in the list
    296296                    end
    297                     if isempty(find(strcmp(ListFiles{ilist},ListDevices), 1))% if the item is not already in ListDevices
    298                         ListDevices=[ListDevices;ListFiles{ilist}]; %append the item to the list
     297                    if isempty(find(strcmp(ListFiles{ilist},DataSeries), 1))% if the item is not already in DataSeries
     298                        DataSeries=[DataSeries;ListFiles{ilist}]; %append the item to the list
    299299                    end                   
    300300                end
     
    303303    end
    304304end
    305 set(handles.ListDevices,'Value',1)
    306 set(handles.ListDevices,'String',sort(ListDevices))
     305set(handles.DataSeries,'Value',1)
     306set(handles.DataSeries,'String',sort(DataSeries))
    307307
    308308%------------------------------------------------------------------------
     
    311311 function update_experiments(handles,ListExperiments,CampaignPath,MirrorPath)
    312312
    313 ListDevices={};
     313DataSeries={};
    314314for iexp=1:numel(ListExperiments)
    315315    if strcmp(ListExperiments{iexp}(1),'+')% if the item is a directory
     
    350350                        system(['ln -s ' DataSeries ' ' mirror]); % create the link to the source folder                     
    351351                    end
    352                     if isempty(find(strcmp(ListFiles{ilist},ListDevices), 1))% if the item is not already in ListDevices
     352                    if isempty(find(strcmp(ListFiles{ilist},DataSeries), 1))% if the item is not already in DataSeries
    353353                        if check_dir(ilist)
    354354                            ListFiles{ilist}=['+/' ListFiles{ilist}];%mark dir by '+' in the list
    355355                        end
    356                         ListDevices=[ListDevices;ListFiles{ilist}]; %append the item to the list
     356                        DataSeries=[DataSeries;ListFiles{ilist}]; %append the item to the list
    357357                    end
    358358                end
     
    361361    end
    362362end
    363 set(handles.ListDevices,'String',sort(ListDevices))
     363set(handles.DataSeries,'String',sort(DataSeries))
    364364
    365365%------------------------------------------------------------------------
     
    464464end
    465465Experiment=regexprep(Experiment,'^\+/','');% remove the +/ used to mark dir
    466 Device=get(handles.ListDevices,'String');
    467 Value=get(handles.ListDevices,'Value');
     466Device=get(handles.DataSeries,'String');
     467Value=get(handles.DataSeries,'Value');
    468468Device=Device(Value);
    469469Device=regexprep(Device,'^\+/','');% remove the +/ used to mark dir
     
    553553function Up_Callback(hObject, eventdata, handles)
    554554SourceDir=get(handles.SourceDir,'String');
    555 % Device=ListDevices{get(handles.ListDevices,'Value')};
     555% Device=DataSeries{get(handles.DataSeries,'Value')};
    556556% DataSeries=uigetfile_uvmat('open a data folder',Device,'uigetdir');
    557557% uiresume(handles.browse_data);
     
    566566SourceFolder=regexprep(ListExperiments{list_val(1)},'+','');
    567567set(handles.SourceDir,'String',fullfile(SourceDir,SourceFolder))
    568 ListDevices=get(handles.ListDevices,'String');
    569 ValueDevice=get(handles.ListDevices,'Value');
    570 set(handles.ListExperiments,'String',ListDevices)
     568DataSeries=get(handles.DataSeries,'String');
     569ValueDevice=get(handles.DataSeries,'Value');
     570set(handles.ListExperiments,'String',DataSeries)
    571571set(handles.ListExperiments,'Value',ValueDevice)
    572572ListExperiments_Callback(hObject, [], handles)
    573 % Device=regexprep(ListDevices{get(handles.ListDevices,'Value')},'+','');
     573% Device=regexprep(DataSeries{get(handles.DataSeries,'Value')},'+','');
    574574% Device=regexprep(Device,'~','');
    575575% PathDevice=fullfile(SourceDir,SourceFolder,Device);
     
    578578% % uiresume(handles.browse_data);
    579579% browse_data(fullfile(PathDevice,NewDevice))
     580
     581
     582% --- Executes on selection change in DataSeries.
     583function 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
     590
     591
     592% --- Executes on button press in CheckDevices.
     593function CheckDevices_Callback(hObject, eventdata, handles)
     594if get(handles.CheckDevices,'Value')
     595    set(handles.ListDevices,'Visible','on')
     596else
     597    set(handles.ListDevices,'Visible','off')
     598end
Note: See TracChangeset for help on using the changeset viewer.