CONAN._classes.load_rvs.add_rvGP
================================

.. py:method:: CONAN._classes.load_rvs.add_rvGP(rv_list=None, par=['col0'], kernel=['mat32'], operation=[''], amplitude=[], lengthscale=[], h3=None, h4=None, h5=None, err_col=None, gp_pck='ce', verbose=True)

   Define GP hyperparameters for each RV. The first hyperparameter h1 is amplitude (standard deviation)
   in RV unit while the second h2 is lengthscale in unit of the desired column. h3 and h4 are
   the 3rd and 4th hyperparameters whose definitions depend on the choice of gp kernel.
   see https://github.com/titans-ge/CONAN/wiki/Gaussian-Processes-with-CONAN

   The priors can be defined in following ways:

   - fixed value as float or int, e.g amplitude = 2

   - normal prior as tuple of len 2, (mu, std) e.g. amplitude = (2, 1)

   - uniform as tuple of length 3, (min, start, max) e.g. amplitude = (1,2,5).
   - loguniform: add "LU" to a  for loguniform e.g (1,2,5,"LU")
   - truncnorm as tuple of length 4, (min, max, mu, std) e.g. q1 = (0,1,0.3,0.1)

   If multiplying GP kernels together, the amplitudes are degenerate and only one amplitude is
   required, that of the first kernel. set the other amplitudes to –1 to disable them.

   :param rv_list: list of rv files to add GP to. Default is None for no GP. if 'all' is given, GP is added
                   to all rv files where gp use has been indicated in ``rv_baseline()``. If 'same' is
                   given, a global (same) GP is used for all indicated RV files in ``rv_baseline()``.
   :type rv_list: str, list;
   :param par: column of the input data to use as the GP independent variable. a list is expected if
               different columns are to be used for the rv files given in rv_list. To use 2 different
               kernels on a single rv file, give column name for each kernel as a tuple of length 2.
               e.g. rv_list=['rv1.dat','rv2.dat'], par = [('col0','col0'),'col3'] to use col0 for both
               kernels of rv1, and col3 for rv2.
   :type par: str, tuple, list;
   :param kernel: kernel to use for the GP.

                  - if `George` package,  kernel must be in ['mat32', 'mat52', 'exp', 'cos', 'expsq','exps2','qp','rquad']

                  - if `celerite` package, kernel must in ['mat32', 'exp', 'cos', 'sho','qp_ce']

                  - if `spleaf` package, kernel must be in ['mat32', 'mat52', 'exp', 'cos', 'sho', 'expsq', 'exps2', 'qp', 'qp_sc', 'qp_mp']
   :type kernel: str, tuple, list;

       note that the kernel names have been unified for consistency across the 3 packages.
       The george 'cos' kernel is similarly reimplemented for celerite and spleaf. The celerite
       'exp' kernel is the native package's `RealTerm`. The spleaf 'expsq' kernel is the native
       package's `ESKernel`.

       A list is expected if different kernels are to be used for the rv files given in rv_list.
       to use 2 different kernels on a single rv file, give kernel name for each kernel as a
       tuple of length 2. e.g. rv_list=["rv1.dat","rv2.dat"], kernel = [("mat32","expsq"),"exp"]
       to use mat32 and expsq for rv1, and exp for rv2.
   operation : str, tuple, list;
       operation to combine kernels. Must be one of ["+","*"]. Default is "" for no combination.
   amplitude : float, tuple, list;
       amplitude of the GP kernel. Must be list of int/float or tuple of length 2/3/4
   lengthscale : float, tuple, list;
       lengthscale of the GP kernel. Must be int/float or tuple of length 2/3/4
   h3 : float, tuple, list;
       3rd hyperparameter of the GP kernel. Must be list of int/float or tuple of length 2/3/4
   h4 : float, tuple, list;
       4th hyperparameter of the GP kernel. Must be list of int/float or tuple of length 2/3/4
   h5 : float, tuple, list;
       amplitude of the derivative of the GP kernel.
   err_col: tuple, list;
       column of the uncertainties for the gp axis. only relevant for spleaf multidimensional GP
   gp_pck : str, list;
       package to use for the GP. Must be one of ["ge","ce","sp"]. Default is "ce" for celerite.
   verbose : bool;
       print output. Default is True.

   .. attribute:: _rvGP_dict

      dictionary of rv GP parameters

      :type: dict;

   .. attribute:: _sameRVgp

      namespace object to indicate if same GP is used for all RVs

      :type: SimpleNamespace;

   .. attribute:: _allRVgp

      whether all RVs have GP

      :type: bool;

   .. attribute:: _useGPrv

      list of 'n', 'ce','ge','sp' for each light curve indicating if a GP is to be fitted.

      :type: list;

   .. attribute:: _gp_rvs

      list of rvs with GP fitting

      :type: list;

