source: trunk/src/series/time_series.m @ 259

Last change on this file since 259 was 259, checked in by sommeria, 13 years ago

bug repaired for time_series

File size: 23.2 KB
Line 
1%'time_series': extract a time series, used with series.fig
2%------------------------------------------------------------------------
3% function GUI_input=time_series(num_i1,num_i2,num_j1,num_j2,Series)
4%
5%OUTPUT
6% GUI_input=list of options in the GUI series.fig needed for the function
7%
8%INPUT:
9%num_i1: series of first indices i (given from the series interface as first_i:incr_i:last_i, mode and list_pair_civ)
10%num_i2: series of second indices i (given from the series interface as first_i:incr_i:last_i, mode and list_pair_civ)
11%num_j1: series of first indices j (given from the series interface as first_j:incr_j:last_j, mode and list_pair_civ )
12%num_j2: series of second indices j (given from the series interface as first_j:incr_j:last_j, mode and list_pair_civ)
13%Series: Matlab structure containing information set by the series interface
14%
15function GUI_input=time_series(num_i1,num_i2,num_j1,num_j2,Series)
16
17%requests for the visibility of input windows in the GUI series  (activated directly by the selection in the menu ACTION)
18if ~exist('num_i1','var')
19    GUI_input={'RootPath';'two';...%nbre of possible input series (options 'on'/'two'/'many', default:'one')
20        'SubDir';'on';... % subdirectory of derived files (PIV fields), ('on' by default)
21        'RootFile';'on';... %root input file name ('on' by default)
22        'FileExt';'on';... %input file extension ('on' by default)
23        'NomType';'on';...%type of file indexing ('on' by default)
24        'NbSlice';'on'; ...%nbre of slices ('off' by default)
25        'VelTypeMenu';'two';...% menu for selecting the velocity type (civ1,..) options 'off'/'one'/'two', 'off' by default)
26        'FieldMenu';'two';...% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default)
27        'CoordType';'on';...%can use a transform function 'off' by default
28        'GetObject';'on';...%can use projection object ,'off' by default
29        %'GetMask';'on'...%can use mask option   ,'off' by default
30        %'PARAMETER'; options: name of the user defined parameter',repeat a line for each parameter
31               ''};
32    return %exit the function
33end
34
35%------------------------------------------------------
36hseries=guidata(Series.hseries);%handles in the GUI series
37WaitbarPos=get(hseries.waitbar_frame,'Position'); %position of the waitbar frame
38
39%% projection object
40test_object=get(hseries.GetObject,'Value');
41if test_object
42    hset_object=findobj(allchild(0),'tag','set_object');
43    ProjObject=read_set_object(guidata(hset_object));
44    %answeryes=questdlg({['field series projected on ' Series.ProjObject.Style]});
45    answeryes=msgbox_uvmat('INPUT_Y-N',['field series projected on ' ProjObject.Style]);
46    if ~isequal(answeryes,'Yes')
47        return
48    end
49else
50    msgbox_uvmat('ERROR','a projection object is needed');
51    return
52end
53
54%% root names
55if iscell(Series.RootPath)
56    RootPath=Series.RootPath;
57    RootFile=Series.RootFile;
58    SubDir=Series.SubDir;
59    FileExt=Series.FileExt;
60    NomType=Series.NomType;
61else
62    RootPath={Series.RootPath};
63    RootFile={Series.RootFile};
64    SubDir={Series.SubDir};
65    FileExt={Series.FileExt};
66    NomType={Series.NomType};
67    num_i1={num_i1};
68    num_i2={num_i2};
69    num_j1={num_j1};
70    num_j2={num_j2};
71end
72ext=FileExt{1};
73form=imformats(ext([2:end]));%test valid Matlab image formats
74testima=0;
75if ~isempty(form)||isequal(lower(ext),'.avi')
76    testima=1;
77end
78nbview=length(RootPath);%number of series (1 or 2)
79nbfield=size(num_i1{1},1)*size(num_i1{1},2); %number of fields in the time series
80
81%Number of input series: this function  accepts only one or two input file series (sub_field is used in the latter case)
82nbview=length(RootPath);
83
84%determine image type
85hhh=which('mmreader');
86testnetcdf=0;
87for iview=1:nbview
88    if isequal(FileExt{iview},'.nc')||isequal(FileExt{iview},'.cdf')
89        FileType{iview}='netcdf';
90        testnetcdf=1;
91    elseif isequal(lower(FileExt{iview}),'.avi')
92        if ~isequal(hhh,'')&& mmreader.isPlatformSupported()
93            MovieObject{iview}=mmreader(fullfile(RootPath{iview},[RootFile{iview} FileExt{iview}]));
94            FileType{iview}='movie';
95        else
96            FileType{iview}='avi';
97        end
98    elseif isequal(lower(FileExt{iview}),'.vol')
99        FileType{iview}='vol';
100    else
101       form=imformats(FileExt{iview}(2:end));
102       if ~isempty(form)% if the extension corresponds to an image format recognized by Matlab
103           if isequal(NomType{iview},'*');
104               FileType{iview}='multimage';
105           else
106               FileType{iview}='image';
107           end
108       end
109    end
110end
111filebase{1}=fullfile(RootPath{1},RootFile{1});
112
113% number of slices
114NbSlice=str2num(get(hseries.NbSlice,'String'));
115if isempty(NbSlice)
116    NbSlice=1;
117end
118NbSlice_name=num2str(NbSlice);
119
120% Field and velocity type (the same for the two views)
121if isfield(Series,'Field')
122    FieldName=Series.Field;%the same set of fields for all views
123else
124    FieldName={''};
125end
126if isequal(FieldName,{''}) && testnetcdf
127    msgbox_uvmat('ERROR','A field must be defined as input')
128    return
129end
130if isequal(FieldName,{'get_field...'})
131    hget_field=findobj(allchild(0),'name','get_field');%find the get_field... GUI
132    if numel(hget_field)>1
133        delete(hget_field(2:end)) % delete multiple occurerence of the GUI get_fioeld
134    elseif isempty(hget_field)
135       filename=name_generator(filebase{1},num_i1{1}(1),num_j1{1}(1),FileExt{1},NomType{1},1,num_i2{1}(1),num_j2{1}(1),SubDir{1});
136       idetect(iview)=exist(filename,'file');
137       hget_field=get_field(filename);
138       return
139    end
140    SubField=read_get_field(hget_field); %read the names of the variables to plot in the get_field GUI
141    if isempty(SubField)
142        delete(hget_field)
143       filename=name_generator(filebase{1},num_i1{1}(1),num_j1{1}(1),FileExt{1},NomType{1},1,num_i2{1}(1),num_j2{1}(1),SubDir{1});
144        hget_field=get_field(filename);
145        SubField=read_get_field(hget_field); %read the names of the variables to plot in the get_field GUI
146    end
147end
148
149%detect whether the two files are 'images' or 'netcdf'
150
151testcivx=0;
152FileExt=get(hseries.FileExt,'String');
153if ~isequal(FieldName,{'get_field...'})
154    testcivx=isequal(FileType{1},'netcdf');
155end
156
157VelType_str=get(hseries.VelTypeMenu,'String');
158VelType_val=get(hseries.VelTypeMenu,'Value');
159VelType{1}=VelType_str{VelType_val};
160if nbview==2
161    VelType_str=get(hseries.VelTypeMenu_1,'String');
162    VelType_val=get(hseries.VelTypeMenu_1,'Value');
163    VelType{2}=VelType_str{VelType_val};
164end
165
166%% Calibration data and timing: read the ImaDoc files
167mode=''; %default
168timecell={};
169XmlData={};
170itime=0;
171NbSlice_calib={};
172for iview=1:nbview%Loop on views
173    XmlData{iview}=[];%default
174    filebase{iview}=fullfile(RootPath{iview},RootFile{iview});
175    if exist([filebase{iview} '.xml'],'file')
176        [XmlData{iview},error]=imadoc2struct([filebase{iview} '.xml']);
177        if isfield(XmlData{iview},'Time')
178            itime=itime+1;
179            timecell{itime}=XmlData{iview}.Time;
180        end
181        if isfield(XmlData{iview},'GeometryCalib') && isfield(XmlData{iview}.GeometryCalib,'SliceCoord')
182            NbSlice_calib{iview}=size(XmlData{iview}.GeometryCalib.SliceCoord,1);%nbre of slices for Zindex in phys transform
183            if ~isequal(NbSlice_calib{iview},NbSlice_calib{1})
184                msgbox_uvmat('WARNING','inconsistent number of Z indices for the field series');
185            end
186        end
187    elseif exist([filebase{iview} '.civ'],'file')
188        [error,time,TimeUnit,mode,npx,npy,pxcmx,pxcmy]=read_imatext([filebase{iview} '.civ']);
189        itime=itime+1;
190        timecell{itime}=time;
191        XmlData{iview}.Time=time;
192        GeometryCalib.R=[pxcmx 0 0; 0 pxcmy 0;0 0 0];
193        GeometryCalib.Tx=0;
194        GeometryCalib.Ty=0;
195        GeometryCalib.Tz=1;
196        GeometryCalib.dpx=1;
197        GeometryCalib.dpy=1;
198        GeometryCalib.sx=1;
199        GeometryCalib.Cx=0;
200        GeometryCalib.Cy=0;
201        GeometryCalib.f=1;
202        GeometryCalib.kappa1=0;
203        GeometryCalib.CoordUnit='cm';
204        XmlData{iview}.GeometryCalib=GeometryCalib;
205        if error==1
206            msgbox_uvmat('WARNING','inconsistent number of fields in the .civ file');
207        end
208    end
209end
210
211%% check coincidence in time
212multitime=0;
213if isempty(timecell)
214    time=[];
215elseif length(timecell)==1
216    time=timecell{1};
217elseif length(timecell)>1
218    multitime=1;
219    for icell=1:length(timecell)
220        if ~isequal(size(timecell{icell}),size(timecell{1}))
221            msgbox_uvmat('WARNING','inconsistent time array dimensions in ImaDoc fields, the time for the first series is used')
222            time=timecell{1};
223            multitime=0;
224            break
225        end
226    end
227end
228if multitime
229    for icell=1:length(timecell)
230        time(icell,:,:)=timecell{icell};
231    end
232    diff_time=max(max(diff(time)));
233    if diff_time>0
234        msgbox_uvmat('WARNING',['times of series differ by more than ' num2str(diff_time)])
235    end   
236end
237if size(time,2) < num_i2{1}(end) || size(time,3) < num_j2{1}(end)% ime array absent or too short in ImaDoc xml file'
238    time=[];
239end
240
241%%  Root name of output files (TO GENERALISE FOR TWO INPUT SERIES)
242subdir_result='time_series';
243pathdir=fullfile(RootPath{1},subdir_result);
244while exist(pathdir,'dir')
245    subdir_result=[subdir_result '.0'];
246    pathdir=fullfile(RootPath{1},subdir_result);
247end
248[m1,m2,m3]=mkdir(pathdir);
249if ~isequal(m2,'')
250     msgbox_uvmat('CONFIRMATION',m2);%error message for directory creation
251end
252[xx,msg2] = fileattrib(pathdir,'+w','g'); %yield writing access (+w) to user group (g)
253if ~strcmp(msg2,'')
254    msgbox_uvmat('ERROR',['pb of permission for ' pathdir ': ' msg2])%error message for directory creation
255    return
256end
257
258filebase_out=filebase{1};
259NomTypeOut=nomtype2pair(NomType{1},num_i2{end}(end)-num_i1{1}(1),num_j2{end}(end)-num_j1{1}(1));
260
261%% coordinate transform or other user defined transform
262transform_fct=[];%default
263if isfield(Series,'transform_fct')
264    transform_fct=Series.transform_fct;
265end
266
267%% velocity type
268VelType_str=get(hseries.VelTypeMenu,'String');
269VelType_val=get(hseries.VelTypeMenu,'Value');
270VelType{1}=VelType_str{VelType_val};
271if nbview==2
272    VelType_str=get(hseries.VelTypeMenu_1,'String');
273    VelType_val=get(hseries.VelTypeMenu_1,'Value');
274    VelType{2}=VelType_str{VelType_val};
275end
276
277%% LOOP ON SLICES
278for i_slice=1:NbSlice
279     dt=[];
280     nbmissing=0; %number of undetected files
281     nbfiles=0;
282    %%%%%%%%%%%%%%%%%%%%%%%%%%%%LOOP ON FIELDS IN  A SLICE
283    for ifile=i_slice:NbSlice:nbfield 
284        stopstate=get(hseries.RUN,'BusyAction');
285        if isequal(stopstate,'queue')% enable STOP command
286             update_waitbar(hseries.waitbar,WaitbarPos,ifile/nbfield)
287             for iview=1:nbview
288                filename=...
289                           name_generator(filebase{iview},num_i1{iview}(ifile),num_j1{iview}(ifile),FileExt{iview},NomType{iview},1,num_i2{iview}(ifile),num_j2{iview}(ifile),SubDir{iview});
290                idetect(iview)=exist(filename,'file');
291                Data{iview}=[]; %default     
292                if ~isequal(FileType{iview},'netcdf')               
293                    Data{iview}.ListVarName={'A'};
294                    Data{iview}.AName='image';
295                    switch FileType{iview}
296                        case 'movie'
297                            A=read(MovieObject{iview},num_i1{iview}(ifile));
298                        case 'avi'
299                            mov=aviread(filename,num_i1{iview}(ifile));
300                            A=frame2im(mov(1));
301                        case 'vol'
302                            A=imread(filename);
303                        case 'multimage'
304                            A=imread(filename,num_i1{iview}(ifile));
305                        case 'image'
306                            A=imread(filename);
307                    end
308                    Data{iview}.ListVarName={'AY','AX','A'}; %
309                    npy=size(A,1);
310                    npx=size(A,2);
311                    nbcolor=size(A,3);
312                    if nbcolor==3
313                         Data{iview}.VarDimName={'AY','AX',{'AY','AX','rgb'}};
314                    else
315                         Data{iview}.VarDimName={'AY','AX',{'AY','AX'}};
316                    end 
317                    Data{iview}.AY=[npy-0.5 0.5];
318                    Data{iview}.AX=[0.5 npx-0.5];
319                    Data{iview}.A=double(A);
320                    Data{iview}.CoordUnit='pixel';
321                elseif testcivx
322                    [Data{iview},VelTypeOut]=read_civxdata(filename,FieldName,VelType);
323                else
324                    [Data{iview},var_detect]=nc2struct(filename,SubField.ListVarName); %read the corresponding input data               
325                    Data{iview}.VarAttribute=SubField.VarAttribute;
326                end
327                if ~isempty(NbSlice_calib)  % z index
328                    Data{iview}.ZIndex=mod(num_i1{iview}(ifile)-1,NbSlice_calib{1})+1;
329                end
330             end
331             
332             % coordinate transform (or other user defined transform)
333            if ~isempty(transform_fct)
334                 % z index
335                if ~isempty(NbSlice_calib)
336                    Data{iview}.ZIndex=mod(num_i1{iview}(ifile)-1,NbSlice_calib{1})+1;%Zindex for phys transform
337                end
338                if nbview==2
339                    [Data{1},Data{2}]=transform_fct(Data{1},XmlData{1},Data{2},XmlData{2});
340                    if isempty(Data{2})
341                        Data(2)=[];
342                    end
343                else
344                    Data{1}=transform_fct(Data{1},XmlData{1});
345                end
346            end     
347            if testcivx && ~isequal(FieldName,{''})
348                    Data{iview}=calc_field(FieldName,Data{iview});%calculate field (vort..)
349            end
350            if length(Data)==2
351                [Field,errormsg]=sub_field(Data{1},Data{2}); %substract the two fields
352                if ~isempty(errormsg)
353                    msgbox_uvmat('ERROR',['error in time_series/sub_field:' errormsg])
354                    return
355                end
356            else
357                Field=Data{1};
358            end
359            if test_object
360                [Field,errormsg]=proj_field(Field,ProjObject);
361                if ~isempty(errormsg)
362                    msgbox_uvmat('ERROR',['error in time_series/proj_field:' errormsg])
363                    return
364                end
365            end
366            if min(idetect)>=1% the input file(s) have been detected         
367                nbfiles=nbfiles+1;
368                if nbfiles==1 %first field: initiate the time series
369                    RecordData=Field;%default
370                    RecordData.NbDim=Field.NbDim+1; %add the time dimension for plots         
371                    nbvar=length(Field.ListVarName);
372                    if nbvar==0
373                        msgbox_uvmat('ERROR','no input variable selected in get_field')
374                        return
375                    end
376                    testsum=2*ones(1,nbvar);%initiate flag for action on each variable
377                    indexfalse=0;
378                    CoordName={};
379                    indexremove=[];
380                    if isfield(Field,'VarAttribute') % look for coordinate and flag variables   
381                        for ivar=1:nbvar
382                            if length(Field.VarAttribute)>=ivar && isfield(Field.VarAttribute{ivar},'Role')
383                               %Field.ListVarName{ivar}
384                                var_role=Field.VarAttribute{ivar}.Role;%'role' of the variable
385                                if isequal(var_role,'errorflag')
386                                    msgbox_uvmat('ERROR','do not handle error flags in time series')
387                                    return                                               
388                                end
389                                if isequal(var_role,'warnflag')                       
390                                    testsum(ivar)=0;  % not recorded variable
391                                    eval(['RecordData=rmfield(RecordData,''' Field.ListVarName{ivar} ''');']);%remove variable
392                                end                 
393                                if isequal(var_role,'coord_x')| isequal(var_role,'coord_y')|...
394                                    isequal(var_role,'coord_z')|isequal(var_role,'coord')
395                                    testsum(ivar)=1; %constant coordinates, record without time evolution
396                                end
397                            end
398                            % check whether the variable ivar is a dimension variable
399                            DimCell=Field.VarDimName{ivar};
400                            if ischar(DimCell)
401                                DimCell={DimCell};
402                            end
403                            if numel(DimCell)==1 && isequal(Field.ListVarName{ivar},DimCell{1})%detect dimension variables
404                               testsum(ivar)=1;
405                            end
406                        end
407                    end
408                    for ivar=1:nbvar
409                        if testsum(ivar)==2                     
410                            eval(['RecordData.' Field.ListVarName{ivar} '=[];'])
411                        end
412                    end
413                    RecordData.ListVarName=[{'Time'} RecordData.ListVarName];
414                end
415                for ivar=1:length(Field.ListVarName)
416                    VarName=Field.ListVarName{ivar};
417                    eval(['VarVal=Field.' VarName ';']);
418                    if testsum(ivar)==2% test for recorded variable
419                        eval(['VarVal=Field.' VarName ';']);
420                        if isequal(ProjObject.ProjMode,'inside')% take the average in the domain for 'inside' mode
421                            if isempty(VarVal)
422                                msgbox_uvmat('ERROR',['empty result at frame index ' num2str(num_i1{iview}(ifile))])
423                                return                             
424                            end
425                            VarVal=mean(VarVal,1);
426                        end
427                        VarVal=shiftdim(VarVal,-1); %shift dimension
428                        eval(['RecordData.' VarName '=cat(1,RecordData.' VarName ',VarVal);']);%concanete the current field to the time series   
429                    elseif testsum(ivar)==1% variable representing fixed coordinates
430                        eval(['VarInit=RecordData.' VarName ';']);
431                        if ~isequal(VarVal,VarInit)
432                            msgbox_uvmat('ERROR',['time series requires constant coordinates ' VarName])
433                            return
434                        end
435                    end                 
436                end
437                % time:
438                if isempty(time)% time read in ncfiles
439                   if isfield(Field,'Time')
440                       RecordData.Time(nbfiles,1)=Field.Time;
441                   else
442                       RecordData.Time(nbfiles,1)=nbfiles;%default
443                   end
444                else % time from ImaDoc prevails
445                    RecordData.Time(nbfiles,1)=(time(1,num_i1{1}(ifile),num_j1{1}(ifile))+time(end,num_i2{end}(ifile),num_j2{end}(ifile)))/2;
446                end
447            else
448                nbmissing=nbmissing+1;
449            end
450        end
451    end
452    %remove time for global attributes if exists
453    for iattr=1:numel(RecordData.ListGlobalAttribute)
454        if strcmp(RecordData.ListGlobalAttribute{iattr},'Time')
455            RecordData.ListGlobalAttribute(iattr)=[];
456            break
457        end
458    end
459    for ivar=1:numel(RecordData.ListVarName)
460        VarName=RecordData.ListVarName{ivar};
461        eval(['RecordData.' VarName '=squeeze(RecordData.' VarName ');']) %remove singletons
462    end
463        % add time dimension and update VarDimIndex:
464        for ivar=1:length(Field.ListVarName)
465             DimCell=Field.VarDimName(ivar);
466             if testsum(ivar)==2%variable used as time series
467                  RecordData.VarDimName{ivar}=[{'Time'} DimCell];
468             elseif testsum(ivar)==1
469                 RecordData.VarDimName{ivar}=DimCell;
470             end
471        end
472    indexremove=find(~testsum);
473    if ~isempty(indexremove)
474        RecordData.ListVarName(1+indexremove)=[];
475        RecordData.VarDimName(indexremove)=[];
476        if isfield(RecordData,'Role')&~isempty(RecordData.Role{1})%generaliser aus autres attributs
477            RecordData.Role(1+indexremove)=[];
478        end
479    end
480
481    %shift variable attributes
482    if isfield(RecordData,'VarAttribute')
483        RecordData.VarAttribute=[{[]} RecordData.VarAttribute];
484    end
485    RecordData.VarDimName=[{'Time'} RecordData.VarDimName];
486    RecordData.Action=Series.Action;%name of the processing programme
487   
488    %name of result file
489%     RecordData
490%     RecordData.VarDimName{1}
491%     RecordData.VarDimName{2}
492%     RecordData.VarDimName{3}
493%     RecordData.VarDimName{4}
494%     RecordData.VarDimName{5}
495%     RecordData.VarDimName{6}
496    [filemean]=...
497               name_generator(filebase_out,num_i1{1}(i_slice),num_j1{1}(i_slice),'.nc','_i1-i2_j1-j2',1,num_i2{end}(ifile),num_j2{end}(ifile),subdir_result);
498    errormsg=struct2nc(filemean,RecordData); %save result file
499    if isempty(errormsg)
500        display([filemean ' written'])
501    else
502        msgbox_uvmat('ERROR',['error in Series/struct2nc: ' errormsg])
503    end
504end
505
506figure
507haxes=axes;
508
509plot_field(RecordData,haxes)
510hget_field=findobj(allchild(0),'name','get_field');
511if ~isempty(hget_field)
512    delete(hget_field)
513end
514
515get_field(filemean,RecordData)
516   
517%-----------------------------------------------------------------------
518% --- Executes on selection change in CoordType.
519function CoordType_Callback(hObject, eventdata, handles)
520menu_str=get(handles.CoordType,'String');
521ind_coord=get(handles.CoordType,'Value');
522coord_option=menu_str{ind_coord};
523if isequal(coord_option,'more...');
524    fct_name='';
525    if exist('./TMP/current_usr_fct.mat','file')% if a file is found
526        h=load('./TMP/current_usr_fct.mat');
527        if isfield(h,'fct_name');
528            fct_name=h.fct_name;
529        end
530    end
531    prompt = {'Enter the name of the transform function'};
532    dlg_title = 'user defined transform';
533    num_lines= 1;
534    [FileName, PathName, filterindex] = uigetfile( ...
535       {'*.m', ' (*.m)';
536        '*.m',  '.m files '; ...
537        '*.*', 'All Files (*.*)'}, ...
538        'Pick a file', fct_name);
539    fct_name=fullfile(PathName,FileName);
540    addpath(PathName);%add the path to the selected fct
541    [errormsg,date_str]=check_functions;%check whether new functions can oversed the uvmat package A UTILISER
542    if ~exist(fct_name,'file')
543           warndlg(['image procesing fct ' fct_name ' not found'])
544    else
545        transform=FileName(1:end-2);%
546        update_menu(handles.CoordType,transform)%add the selected fct to the menu
547  %      set(handles.mouse_coord,'String',menu([1:end-1])')%update the mouse coord menu
548      %save ('./TMP/current_usr_fct.mat','fct_name');
549    end   
550end
551ind_coord=get(handles.CoordType,'Value');   
552
553%---------------------------------------------------------------------
554% % --- Executes on selection change in ProjObject.
555% function ProjObject_Callback(hObject, eventdata, handles)
556%
557% list_object=get(handles.ProjObject,'String');
558% index=get(handles.ProjObject,'Value');
559% hseries=get(handles.ProjObject,'Parent');
560% SeriesData=get(hseries,'UserData');
561% Obj=SeriesData.ProjObject{index};
562% [SeriesData.hset_object,SeriesData.sethandles]=set_object(SeriesData.ProjObject{index});
563% set(hseries,'UserData',SeriesData);
564
Note: See TracBrowser for help on using the repository browser.