function opts = pg_main_opts(opts)

%Default values 

if ~isfield(opts,'L_coeff')
    opts.L_coeff = 0.999;
end

% if ~isfield(opts,'L_scaling')
%     opts.L_scaling = 1;
% end

if ~isfield(opts,'iter_max')
    opts.iter_max =  1e4;
end

if ~isfield(opts,'time_max')
    opts.time_max = Inf;
end

if ~isfield(opts,'sigma')
    opts.sigma = 1e-1;
end

if ~isfield(opts,'stable_min')
    opts.stable_min = 10; %will be 5 when acce = 1
end

if ~isfield(opts,'verbose')
    opts.verbose = 1;
end

if ~isfield(opts,'alpha_max')
    opts.alpha_max = 1e+2;
end

if ~isfield(opts,'alpha_min')
    opts.alpha_min = 1e+0;
end

if ~isfield(opts,'eps_l2')
    opts.eps_l2 = 1e-10;
end

if ~isfield(opts,'newton_iters')
    opts.newton_iters = 1;
end

if ~isfield(opts,'base_CG')
    opts.base_CG = Inf;
end

if ~isfield(opts,'init_linesearch')
    opts.init_linesearch = 'Hessian';
end

if ~isfield(opts,'preconditioned')
    opts.preconditioned = 1;
end
if ~isfiled(opts,'angle_eps')
	opts.angle_eps = 1e-20;
end

return;
