*Convert a right-ascension between decimal degrees and sexegesimal.*

        Precision should be respected.

        **Key Arguments:**
            - ``ra`` -- RA in decimal degrees. Will try and convert to float before performing calculation.
            - ``delimiter`` -- how to delimit the RA units. Default *:*

        **Return:**
            - ``sexegesimal`` -- ra in sexegesimal units

        **Usage:**
            ..  todo::

                - replace ra_to_sex from dryxPython in all code

            .. code-block:: python 

                from astrocalc.coords import unit_conversion
                converter = unit_conversion(
                    log=log
                )
                ra = converter.ra_decimal_to_sexegesimal(
                    ra="-23.454676456",
                    delimiter=":"
                )
                print ra

                # OUT: 22:26:10.87

def ra_decimal_to_sexegesimal(
            self,
            ra,
            delimiter=":"):
        """
        *Convert a right-ascension between decimal degrees and sexegesimal.*

        Precision should be respected.

        **Key Arguments:**
            - ``ra`` -- RA in decimal degrees. Will try and convert to float before performing calculation.
            - ``delimiter`` -- how to delimit the RA units. Default *:*

        **Return:**
            - ``sexegesimal`` -- ra in sexegesimal units

        **Usage:**
            ..  todo::

                - replace ra_to_sex from dryxPython in all code

            .. code-block:: python 

                from astrocalc.coords import unit_conversion
                converter = unit_conversion(
                    log=log
                )
                ra = converter.ra_decimal_to_sexegesimal(
                    ra="-23.454676456",
                    delimiter=":"
                )
                print ra

                # OUT: 22:26:10.87
        """
        self.log.info('starting the ``ra_decimal_to_sexegesimal`` method')

        # CONVERT RA TO FLOAT
        try:
            self.log.debug("attempting to convert RA to float")
            ra = float(ra)
        except Exception, e:
            self.log.error(
                "could not convert RA to float - failed with this error: %s " % (str(e),))
            return -1

        # COMPLAIN IF RA NOT BETWEEN -360 - 360
        if ra > 0. and ra < 360.:
            pass
        elif ra < 0 and ra > -360.:
            ra = 360. + ra
        else:
            self.log.error(
                "RA must be between 0 - 360 degrees")
            return -1

        # PRECISION TEST
        # 1s ARCSEC = .000018519 DEGREE
        # THEREFORE REPORT SECONDS TO A PRECISION = INPUT PRECISION - 5
        decimalLen = len(repr(ra).split(".")[-1])
        precision = decimalLen - 5

        # CALCULATION FROM DECIMAL DEGREES
        import math
        ra_hh = int(ra / 15)
        ra_mm = int((ra / 15 - ra_hh) * 60)
        ra_ss = int(((ra / 15 - ra_hh) * 60 - ra_mm) * 60)
        ra_ff = ((ra / 15 - ra_hh) * 60 - ra_mm) * 60 - ra_ss

        # SET PRECISION
        ra_ff = repr(ra_ff)[2:]
        ra_ff = ra_ff[:precision]
        if len(ra_ff):
            ra_ff = "." + ra_ff
        if precision < 0:
            ra_ff = ""

        sexegesimal = '%02d' % ra_hh + delimiter + '%02d' % ra_mm + \
            delimiter + '%02d' % ra_ss + ra_ff

        self.log.info('completed the ``ra_decimal_to_sexegesimal`` method')
        return sexegesimal