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:
representationBaseRepresentation or str

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.

Returns:
frameBaseCoordinateFrame instance

Replicated without data.