function OutList=sim_fun_on_fits(SimFun,varargin)
%--------------------------------------------------------------------------
% sim_fun_on_fits function                                         ImBasic
% Description: 
% Input  : - Function to run (e.g., @sim_imarith).
%          * Arbitrary number of pairs of arguments: ...,keyword,value,...
%            where keyword are one of the followings:
%            'FunArg' -
%            --- Additional parameters
%            Any additional key,val, that are recognized by one of the
%            following programs:
% Output : - 
% Tested : Matlab R2014a
%     By : Eran O. Ofek                    Jan 2015
%    URL : http://weizmann.ac.il/home/eofek/matlab/
% Example: 
% Reliable: 
%--------------------------------------------------------------------------



DefV.FunArg = {};

InPar = set_varargin_keyval(DefV,'n','use',varargin{:});

NargFun = nargin(SimFun);  % number of input arguments for function to run

MainList = varargin{1};
