DifferentialAttribute¶
- class astropy.coordinates.DifferentialAttribute(default=None, allowed_classes=None, secondary_attribute='')[source]¶
Bases:
AttributeA frame attribute which is a differential instance.
The optional
allowed_classesargument allows specifying a restricted set of valid differential classes to check the input against. Otherwise, anyBaseDifferentialsubclass instance is valid.- Parameters:
- default
object Default value for the attribute if not provided
- allowed_classes
tuple, optional A list of allowed differential classes for this attribute to have.
- secondary_attribute
str Name of a secondary instance attribute which supplies the value if
default is Noneand no value was supplied during initialization.
- default
Methods Summary
convert_input(value)Checks that the input is a differential object and is one of the allowed class types.
Methods Documentation
- convert_input(value)[source]¶
Checks that the input is a differential object and is one of the allowed class types.
- Parameters:
- value
object Input value.
- value
- Returns:
- Raises:
ValueErrorIf the input is not valid for this attribute.