def dec_decimal_to_sexegesimal(<EOL>self,<EOL>dec,<EOL>delimiter="<STR_LIT::>"):
self.log.info('<STR_LIT>')<EOL>import math<EOL>try:<EOL><INDENT>self.log.debug("<STR_LIT>")<EOL>dec = float(dec)<EOL><DEDENT>except Exception as e:<EOL><INDENT>self.log.error(<EOL>"<STR_LIT>" % (str(e),))<EOL>return -<NUM_LIT:1><EOL><DEDENT>if dec > -<NUM_LIT> and dec < <NUM_LIT>:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>self.log.error(<EOL>"<STR_LIT>")<EOL>return -<NUM_LIT:1><EOL><DEDENT>if (dec >= <NUM_LIT:0>):<EOL><INDENT>hemisphere = '<STR_LIT:+>'<EOL><DEDENT>else:<EOL><INDENT>hemisphere = '<STR_LIT:->'<EOL>dec *= -<NUM_LIT:1><EOL><DEDENT>decimalLen = len(repr(dec).split("<STR_LIT:.>")[-<NUM_LIT:1>])<EOL>precision = decimalLen - <NUM_LIT:4><EOL>dec_deg = int(dec)<EOL>dec_mm = int((dec - dec_deg) * <NUM_LIT>)<EOL>dec_ss = int(((dec - dec_deg) * <NUM_LIT> - dec_mm) * <NUM_LIT>)<EOL>dec_f = (((dec - dec_deg) * <NUM_LIT> - dec_mm) * <NUM_LIT>) - dec_ss<EOL>dec_f = repr(dec_f)[<NUM_LIT:2>:]<EOL>dec_f = dec_f[:precision]<EOL>if len(dec_f):<EOL><INDENT>dec_f = "<STR_LIT:.>" + dec_f<EOL><DEDENT>if precision < <NUM_LIT:0>:<EOL><INDENT>dec_f = "<STR_LIT>"<EOL><DEDENT>sexegesimal = hemisphere + '<STR_LIT>' % dec_deg + delimiter +'<STR_LIT>' % dec_mm + delimiter + '<STR_LIT>' % dec_ss + dec_f<EOL>self.log.info('<STR_LIT>')<EOL>return sexegesimal<EOL>
*Convert a declination between decimal degrees and sexegesimal.*

Precision should be respected.

**Key Arguments:**
    - ``dec`` -- DEC 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 dec_to_sex in dryxPython in all code

    .. code-block:: python 

        from astrocalc.coords import unit_conversion
        converter = unit_conversion(
            log=log
        )
        dec = converter.dec_decimal_to_sexegesimal(
            dec="-3.454676456",
            delimiter=":"
        )
        print dec

        # OUT: -03:27:16.8