resolve_representationlike¶
- discO.utils.resolve_representationlike(representation: BaseRepresentation | str | ellipsis | Any, error_if_not_type: bool = True) BaseRepresentation | Any [source]¶
Determine the representation and return the class.
- Parameters:
- representation
BaseRepresentation
orstr
If Representation (instance or class), return the class. If str, uses astropy to determine class If Ellipsis, return default representation type
- error_if_not_typebool
Whether to raise TypeError if
representation
is not one of the allowed types. If False, pass through unchanged.
- representation
- Returns:
- frame
BaseCoordinateFrame
instance Replicated without data.
- frame