function  [par]=ParSet(nSig,Sigma_FPN)

par.cls_num     =   30;                                 % Number of the cluster category
par.nSig        =   nSig;                               % Variance of the noise image
par.SearchWin   =   30;                                 % Non-local patch searching window
par.delta       =   0.01;                               % Parameter between each iter
par.c           =   sqrt(2);                            % Constant num for the weight vector
par.Innerloop_X =   100;                                % InnerLoop Num of estimating clear image
par.Innerloop_B =   10;                                 % InnerLoop Num of estimating FPN

if Sigma_FPN<=5
    par.kappa        =    2;    par.tau        =  400;      % regularzation parameter for offset(nuclear norm)
    par.rho          =    100;  par.gamma      =  0.1;      % regularzation parameter for sparse dictionary
    par.lambda_1     =    50;   par.belta_1    =  10;       % regularzation parameter for local directional smoothness
    par.lambda_2     =    1000; par.belta_2    =  100;      % regularzation parameter for local directional preservation   
elseif Sigma_FPN<=10
    par.kappa        =    2;    par.tau      =  400;
    par.rho          =    100;  par.gamma      =  0.1;
    par.lambda_1     =    100;  par.belta_1    =  10; 
    par.lambda_2     =    1000; par.belta_2    =  100; 
elseif Sigma_FPN<=20
    par.kappa        =    2;    par.tau        =  400;
    par.rho          =    100;  par.gamma      =  0.1;
    par.lambda_1     =    200;  par.belta_1    =  10; 
    par.lambda_2     =    1000; par.belta_2    =  100;     
else
    par.kappa        =    2;    par.tau        =  400;
    par.rho          =    100;  par.gamma      =  0.1;
    par.lambda_1     =    300;  par.belta_1    =  10;      
    par.lambda_2     =    10000; par.belta_2    =  1000;     
end
    

if nSig<=5
    par.patsize       =   6;                            % Patch size
    par.patnum        =   70;                           % Initial Non-local Patch number
    par.Iter          =   10;                            % total iter numbers
    par.lamada        =   0.54;                         % Noise estimete parameter
elseif nSig <= 10
    par.patsize       =   6;
    par.patnum        =   70;
    par.Iter          =   10;
    par.lamada        =   0.54;     
elseif nSig <= 20
    par.patsize       =   6;
    par.patnum        =   70;
    par.Iter          =   10;
    par.lamada        =   0.56; 
elseif nSig<=40
    par.patsize       =   8;
    par.patnum        =   120;
    par.Iter          =   7;
    par.lamada        =   0.58; 
else
    par.patsize       =   9;
    par.patnum        =   140;
    par.Iter          =   14;
    par.lamada        =   0.58; 
end

par.step      =   floor((par.patsize)/2-1);                   
% Blockmatching and perform WNNM algorithm on all the patches in the image
% is time consuming, we just perform the blockmatching and WNNM on parts of
% patches in the image (we call these patches keypatch in explanatory notes)
% par.step is the step between each keypatch, smaller step will further
% improve the denoisng result