# CoordinateAttribute¶

class astropy.coordinates.CoordinateAttribute(frame, default=None, secondary_attribute='')[source]

A frame attribute which is a coordinate object. It can be given as a low-level frame class or a SkyCoord, but will always be converted to the low-level frame class when accessed.

Parameters
framea coordinate frame class

The type of frame this attribute can be

defaultobject

Default value for the attribute if not provided

secondary_attributestr

Name of a secondary instance attribute which supplies the value if default is None and no value was supplied during initialization.

Methods Summary

 convert_input(self, value) Checks that the input is a SkyCoord with the necessary units (or the special value None).

Methods Documentation

convert_input(self, value)[source]

Checks that the input is a SkyCoord with the necessary units (or the special value None).

Parameters
valueobject

Input value to be converted.

Returns
out, convertedcorrectly-typed object, boolean

Tuple consisting of the correctly-typed object and a boolean which indicates if conversion was actually performed.

Raises
ValueError

If the input is not valid for this attribute.