CartesianRepresentationAttribute¶
-
class
astropy.coordinates.
CartesianRepresentationAttribute
(default=None, secondary_attribute='', unit=None)[source]¶ Bases:
astropy.coordinates.Attribute
A frame attribute that is a CartesianRepresentation with specified units.
- Parameters
- 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.- unitunit object or None
Name of a unit that the input will be converted into. If None, no unit-checking or conversion is performed
Methods Summary
convert_input
(self, value)Checks that the input is a CartesianRepresentation with the correct unit, or the special value
[0, 0, 0]
.Methods Documentation
-
convert_input
(self, value)[source]¶ Checks that the input is a CartesianRepresentation with the correct unit, or the special value
[0, 0, 0]
.- 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.