astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v0.3 »
- Astronomical Coordinate Systems (`astropy.coordinates`) »
- coordinate_alias

# coordinate_alias

`astropy.coordinates.transformations.``coordinate_alias`(name, coordcls=None)

  Gives a short name to this coordinate system, allowing other coordinate objects to convert to this one using attribute-style access.

  Parameters:

  name : str

  > The short alias to use for this coordinate class. Should be a valid python identifier.

  coordcls : class or None

  > Either the coordinate class to register or None to use this as a decorator.

  Examples

  For use with a class already defined, do:

      coordinate_alias('fancycoords', MyFancyCoordinateClass)

  To use as a decorator, do:

      @coordiante_alias('fancycoords')
      class MyFancyCoordinateClass(SphericalCoordinatesBase):
          ...