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

.. toctree::
   :hidden:

   /autoapi/CONAN/_classes/load_rvs.add_custom_RV_function
   /autoapi/CONAN/_classes/load_rvs.add_rvGP
   /autoapi/CONAN/_classes/load_rvs.add_spline
   /autoapi/CONAN/_classes/load_rvs.get_decorr
   /autoapi/CONAN/_classes/load_rvs.planet_parameters
   /autoapi/CONAN/_classes/load_rvs.plot
   /autoapi/CONAN/_classes/load_rvs.print
   /autoapi/CONAN/_classes/load_rvs.rescale_data_columns
   /autoapi/CONAN/_classes/load_rvs.rv_baseline
   /autoapi/CONAN/_classes/load_rvs.save_RVs
   /autoapi/CONAN/_classes/load_rvs.update_planet_parameters

.. py:class:: CONAN._classes.load_rvs(file_list=None, data_filepath=None, input_rv=None, nplanet=1, rv_unit='km/s', lc_obj=None, sort=False, verbose=True, show_guide=False)

   rv object to hold lightcurves for analysis

   :param data_filepath: filepath where rvs files are located
   :type data_filepath: str;
   :param file_list: list of filenames for the rvs
   :type file_list: list;
   :param input_rv: dictionary of input RV data. If provided, it overrides the file_list and data_filepath parameters.
                    Each key is the name of the lightcurve and the value is a numpy array with the lightcurve data.
                    The array must be of shape (N,M) where N is the number of data points and M is the number of columns (>=3).
   :type input_rv: dict;
   :param nplanet: number of planets in the system. Default is 1.
   :type nplanet: int;
   :param rv_unit: unit of the rv data. Must be one of ["m/s","km/s"]. Default is "km/s".
   :type rv_unit: str;
   :param lc_obj: lightcurve object to link the parameters with the rv object. if None, it uses the already defined light curve object or creates a new empty one.
   :type lc_obj: object;
   :param sort: if True, sorts the rvs based on the median time. Default is False.
   :type sort: bool;
   :param show_guide: print output to guide the user. Default is False.
   :type show_guide: bool;

   .. attribute:: _obj_type

      object type

      :type: str;

   .. attribute:: _fpath

      path to the data files

      :type: str;

   .. attribute:: _names

      list of names of the input files

      :type: list;

   .. attribute:: _input_rv

      dictionary to hold the input rv data arrays. Keys of the dictionary should be the name for
      each file containing a 2D numpy array (n_pts X n_col).

      :type: dict;

   .. attribute:: _RVunit

      unit of the rv data

      :type: str;

   .. attribute:: _nRV

      number of input rv files

      :type: int;

   .. attribute:: _lcobj

      lightcurve object linked to the rv object

      :type: object;

   .. attribute:: _rms_estimate

      list of rms estimates for each rv data

      :type: list;

   .. attribute:: _jitt_estimate

      list of jitter estimates for each rv data

      :type: list;

   .. attribute:: _RVbases_init

      list of initial baseline model coefficients for each rv

      :type: list;

   :returns: **rv_obj**
   :rtype: rv object

   .. rubric:: Examples

   >>> rv_obj = load_rvs(file_list=["rv1.dat","rv2.dat"], data_filepath="/path/to/data/", rv_unit="km/s")


   .. py:attribute:: _RVbases_init


   .. py:attribute:: _RVunit
      :value: 'km/s'



   .. py:attribute:: _fpath


   .. py:attribute:: _input_rv


   .. py:attribute:: _lcobj
      :value: None



   .. py:attribute:: _nRV


   .. py:attribute:: _nplanet
      :value: 1



   .. py:attribute:: _obj_type
      :value: 'rv_obj'



   .. py:attribute:: _rescaled_data

Methods
-------

.. autoapisummary::

   CONAN._classes.load_rvs.add_custom_RV_function
   CONAN._classes.load_rvs.add_rvGP
   CONAN._classes.load_rvs.add_spline
   CONAN._classes.load_rvs.get_decorr
   CONAN._classes.load_rvs.planet_parameters
   CONAN._classes.load_rvs.plot
   CONAN._classes.load_rvs.print
   CONAN._classes.load_rvs.rescale_data_columns
   CONAN._classes.load_rvs.rv_baseline
   CONAN._classes.load_rvs.save_RVs
   CONAN._classes.load_rvs.update_planet_parameters


