%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/cylindrical_perspective-1.1.0"
title: |
  The cylindrical perspective projection.

description: |
  Corresponds to the `CYP` projection in the FITS WCS standard.

  The pixel-to-sky transformation is defined as:

  $$\phi &= \frac{x}{\lambda} \\
  \theta &= \arg(1, \eta) + \sin{-1}\left(\frac{\eta \mu}{\sqrt{\eta^2 + 1}}\right)$$

  And the sky-to-pixel transformation is defined as:

  $$x &= \lambda \phi \\
  y &= \frac{180^{\circ}}{\pi}\left(\frac{\mu + \lambda}{\mu + \cos \theta}\right)\sin \theta$$

  Invertibility: All ASDF tools are required to provide the inverse of
  this transform.

allOf:
  - $ref: "cylindrical-1.1.0"
  - type: object
    properties:
      mu:
        type: number
        description: |
          Distance from center of sphere in the direction opposite the
          projected surface, in spherical radii.
        default: 1

      lambda:
        type: number
        description: |
          Radius of the cylinder in spherical radii, default is 1.
        default: 1
...
