function Cat=get_gaia(RA,Dec,SearchRadius,varargin)
% Search GAIA local HTM catalog 
% Package: Catalog.search
% Description: Coordinate cone search of all the GAIA-DR1 sources in the
%              local HTM catalog.
% Input  : - J2000.0 R.A. 
%          - J2000.0 Dec.
%          - Search radius [arcsec default]. Default is 60".
%          * Arbitrary number of ...,key,val,.. arguments.
%            The following keywords are available:
%            'SearcRadUnits' - Search radius units. See convert.angular for
%                              details.
%     By : Eran O. Ofek                    Dec 2016
%    URL : http://weizmann.ac.il/home/eofek/matlab/
% Example: Cat=VO.search.get_gaia(1,1,3600); 
% Reliable: 2

if (nargin==2)
    SearchRadius = 60;
end


DefV.SearcRadUnits        = 'arcsec';
InPar = InArg.populate_keyval(DefV,varargin,mfilename);

CatName              = 'GAIA_DR1_HTMindex.hdf5';
BaseName             = 'GAIA_DR1_HTM%06d.hdf5';
ColCellFile          = 'GAIA_DR1_HTMcolcell.mat';
HTMinFile            = 100;
VarBaseName          = 'HTM%06d';

Cat = VO.search.search_mhtm_cat(CatName,RA,Dec,SearchRadius,...
                                                    'SearcRadUnits',InPar.SearcRadUnits,...
                                                    'BaseName',BaseName,...
                                                    'ColCellFile',ColCellFile,...
                                                    'HTMinFile',HTMinFile,...
                                                    'VarBaseName',VarBaseName);
                                                
