tape.utils.column_mapper
========================

.. py:module:: tape.utils.column_mapper


Submodules
----------

.. toctree::
   :maxdepth: 1

   /autoapi/tape/utils/column_mapper/column_mapper/index


Classes
-------

.. autoapisummary::

   tape.utils.column_mapper.ColumnMapper


Package Contents
----------------

.. py:class:: ColumnMapper(id_col=None, time_col=None, flux_col=None, err_col=None, band_col=None)

   Maps columns from a given dataset into known ensemble column


   .. py:attribute:: Column


   .. py:attribute:: map


   .. py:attribute:: required


   .. py:attribute:: known_maps


   .. py:method:: _set_known_map(hipscat=True)
      :abstractmethod:


      Must be defined in a known map class



   .. py:method:: use_known_map(map_id, hipscat=True)

      Use a known mapping scheme

      :param map_id: Identifies which mapping scheme to use
      :type map_id: 'str'
      :param hipscat: Indicates whether the data is in hipscat format or not, which will
                      affect the chosen ID column (_hipscat_index will be used when
                      hipscat is true. True by default.
      :type hipscat: 'bool'

      :returns: * *A ColumnMapper subclass object dependent on the map_id provided,*
                * *ZTFColumnMapper in the case of "ZTF" for example*



   .. py:method:: is_ready(show_needed=False)

      shows whether the ColumnMapper has all critical columns assigned

      :param show_needed: Indicates whether to also return a list of missing columns
      :type show_needed: 'bool', optional

      :rtype: `bool` or tuple of (bool, list) dependent on show_needed parameter



   .. py:method:: assign(id_col=None, time_col=None, flux_col=None, err_col=None, band_col=None)

      Updates a given set of columns

      :param id_col: Identifies which column contains the Object IDs
      :type id_col: 'str', optional
      :param time_col: Identifies which column contains the time information
      :type time_col: 'str', optional
      :param flux_col: Identifies which column contains the flux/magnitude information
      :type flux_col: 'str', optional
      :param err_col: Identifies which column contains the flux/mag error information
      :type err_col: 'str', optional
      :param band_col: Identifies which column contains the band information
      :type band_col: 'str', optional
      :param nobs_col: Identifies which columns contain number of observations for each
                       band, if available in the input object file
      :type nobs_col: list of 'str', optional
      :param nobs_tot_col: Identifies which column contains the total number of observations,
                           if available in the input object file
      :type nobs_tot_col: 'str', optional



