resolve_framelike

discO.utils.resolve_framelike(frame: CoordinateFrame | SkyCoord | str | None | ellipsis | Any, error_if_not_type: bool = True) CoordinateFrame | Any[source]

Determine the frame and return a blank instance.

Parameters:
frameframe-like instance or None

If BaseCoordinateFrame, replicates without data. If str, uses astropy parsers to determine frame class If None (default), return UnFrame. If Ellipsis, return default frame.

error_if_not_typebool

Whether to raise TypeError if frame is not one of the allowed types. If False, pass through unchanged.

Returns:
frameBaseCoordinateFrame instance

Replicated without data.