def ra_sexegesimal_to_decimal(<EOL>self,<EOL>ra<EOL>):
import re<EOL>try:<EOL><INDENT>ra = float(ra)<EOL>if ra >= <NUM_LIT:0.> and ra <= <NUM_LIT>:<EOL><INDENT>self.log.info(<EOL>'<STR_LIT>' % locals())<EOL>return float(ra)<EOL><DEDENT><DEDENT>except:<EOL><INDENT>pass<EOL><DEDENT>ra = str(ra).strip()<EOL>regex = re.compile(<EOL>'<STR_LIT>')<EOL>raMatch = regex.match(ra)<EOL>if raMatch:<EOL><INDENT>degrees = raMatch.group(<NUM_LIT:1>)<EOL>minutes = raMatch.group(<NUM_LIT:3>)<EOL>seconds = raMatch.group(<NUM_LIT:4>)<EOL>degrees = abs(float(degrees)) * <NUM_LIT><EOL>minutes = float(minutes) * <NUM_LIT><EOL>seconds = float(seconds) * <NUM_LIT><EOL>decimalLen = len(repr(seconds).split("<STR_LIT:.>")[-<NUM_LIT:1>])<EOL>precision = decimalLen + <NUM_LIT:5><EOL>decimalDegrees = (degrees + (minutes / <NUM_LIT>)<EOL>+ (seconds / <NUM_LIT>))<EOL>decimalDegrees = "<STR_LIT>" % (precision, decimalDegrees)<EOL><DEDENT>else:<EOL><INDENT>raise IOError(<EOL>"<STR_LIT>" % locals())<EOL><DEDENT>raDeg = decimalDegrees<EOL>self.log.debug('<STR_LIT>' % locals())<EOL>self.log.info(<EOL>'<STR_LIT>')<EOL>return float(raDeg)<EOL>
*Convert a right-ascension from sexegesimal format to decimal degrees.*

Precision should be respected. If a float is passed to this method, the same float will be returned (useful if unclear which format coordinates are in).

The code will attempt to read the sexegesimal value in whatever form it is passed. Any of the following should be handled correctly

- ``23:45:21.23232``
- ``23h45m21.23232s``
- ``23 45 21.23232``
- ``2 04 21.23232``
- ``04:45  21``

**Key Arguments:**
    - ``ra`` -- ra in sexegesimal units

**Return:**
    - ``decimalDegrees``

**Usage:**

    .. code-block:: python

        - replace dryxPython ra_sexegesimal_to_decimal with this version in all my code

        from astrocalc.coords import unit_conversion
        converter = unit_conversion(
            log=log
        )
        ra = converter.ra_sexegesimal_to_decimal(
            ra="04:45  21"
        )
        print ra

        # OUTPUT: 71.3375