is in a WCS object.

For example, a ``FREQ`` axis may be translated into ``ZOPT-F2W`` and
vice versa.

Parameters
----------
ctype : str
    Required spectral ``CTYPEia``, maximum of 8 characters.  The first
    four characters are required to be given and are never modified.
    The remaining four, the algorithm code, are completely determined
    by, and must be consistent with, the first four characters.
    Wildcarding may be used, i.e.  if the final three characters are
    specified as ``"???"``, or if just the eighth character is
    specified as ``"?"``, the correct algorithm code will be
    substituted and returned.

i : int
    Index of the spectral axis (0-relative).  If ``i < 0`` (or not
    provided), it will be set to the first spectral axis identified
    from the ``CTYPE`` keyvalues in the FITS header.

Raises
------
MemoryError
    Memory allocation failed.

SingularMatrixError
    Linear transformation matrix is singular.

InconsistentAxisTypesError
    Inconsistent or unrecognized coordinate axis types.

ValueError
    Invalid parameter value.

InvalidTransformError
    Invalid coordinate transformation parameters.

InvalidTransformError
    Ill-conditioned coordinate transformation parameters.

InvalidSubimageSpecificationError
    Invalid subimage specification (no spectral axis).
z