FITS#
- class astropy.units.format.FITS(*args, **kwargs)[source]#
 Bases:
GenericThe FITS standard unit format.
This supports the format defined in the Units section of the FITS Standard.
Attributes Summary
Methods Summary
parse(s[, debug])Convert a string to a unit object.
to_string(unit[, fraction])Convert a unit to its string representation.
Attributes Documentation
- name: ClassVar[str] = 'fits'#
 
Methods Documentation
- classmethod to_string(unit: UnitBase, fraction: bool | Literal['inline'] = False) str[source]#
 Convert a unit to its string representation.
Implementation for
to_string.- Parameters:
 - unit|Unit|
 The unit to convert.
- fraction{False|True|’inline’|’multiline’}, optional
 Options are as follows:
False: display unit bases with negative powers as they are (e.g.,km s-1);‘inline’ or
True: use a single-line fraction (e.g.,km / s);‘multiline’ : use a multiline fraction (available for the
latex,consoleandunicodeformats only; e.g.,$\mathrm{\frac{km}{s}}$).
- Raises:
 ValueErrorIf
fractionis not recognized.