astropy:docs

Note

This is an old version of the documentation. See http://docs.astropy.org/en/stable for the latest version.

EarthLocationAttribute

class astropy.coordinates.EarthLocationAttribute(default=None, secondary_attribute=u'')[source] [edit on github]

Bases: astropy.coordinates.FrameAttribute

A frame attribute that can act as a EarthLocation. It can be created as anything that can be transformed to the ITRS frame, but always presents as an EarthLocation when accessed after creation.

Parameters:

default : object

Default value for the attribute if not provided

secondary_attribute : str

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(value) Checks that the input is a Quantity with the necessary units (or the special value 0).

Methods Documentation

convert_input(value)[source] [edit on github]

Checks that the input is a Quantity with the necessary units (or the special value 0).

Parameters:

value : object

Input value to be converted.

Returns:

out, converted : correctly-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.

Page Contents