Base

class astropy.units.format.Base(*args, **kwargs)[source]

Bases: object

The abstract base class of all unit formats.

Attributes Summary

registry

Methods Summary

parse(s)

Convert a string to a unit object.

to_string(u)

Convert a unit object to a string.

Attributes Documentation

registry = {'cds': <class 'astropy.units.format.cds.CDS'>, 'console': <class 'astropy.units.format.console.Console'>, 'fits': <class 'astropy.units.format.fits.Fits'>, 'generic': <class 'astropy.units.format.generic.Generic'>, 'latex': <class 'astropy.units.format.latex.Latex'>, 'latex_inline': <class 'astropy.units.format.latex.LatexInline'>, 'ogip': <class 'astropy.units.format.ogip.OGIP'>, 'unicode': <class 'astropy.units.format.unicode_format.Unicode'>, 'unscaled': <class 'astropy.units.format.generic.Unscaled'>, 'vounit': <class 'astropy.units.format.vounit.VOUnit'>}

Methods Documentation

classmethod parse(s)[source]

Convert a string to a unit object.

classmethod to_string(u)[source]

Convert a unit object to a string.