resolve_framelike

trackstream.utils.resolve_framelike(frame: None, error_if_not_type: bool = True) astropy.coordinates.BaseCoordinateFrame[source]
trackstream.utils.resolve_framelike(frame: str, error_if_not_type: bool = True) astropy.coordinates.BaseCoordinateFrame
trackstream.utils.resolve_framelike(frame: astropy.coordinates.BaseCoordinateFrame, error_if_not_type: bool = True) astropy.coordinates.BaseCoordinateFrame
trackstream.utils.resolve_framelike(frame: astropy.coordinates.SkyCoord, error_if_not_type: bool = True) astropy.coordinates.BaseCoordinateFrame

Determine the frame and return a blank instance.

Parameters
frameframe-like instance or None (optional)

If BaseCoordinateFrame, replicates without data. If str, uses astropy parsers to determine frame class If None (default), gets default frame name from config, and parses.

error_if_not_typebool

Whether to raise TypeError if frame is not one of the allowed types.

Returns
frameBaseCoordinateFrame instance

Replicated without data.

Raises
TypeError

If frame is not one of the allowed types and ‘error_if_not_type’ is True.