%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/conic-1.4.0"
title: |
  Base class of all conic projections.

description: |
  In conic projections, the sphere is thought to be projected onto the
  surface of a cone which is then opened out.

  In a general sense, the pixel-to-sky transformation is defined as:

  $$\phi &= \arg\left(\frac{Y_0 - y}{R_\theta}, \frac{x}{R_\theta}\right) / C \\
    R_\theta &= \mathrm{sign} \theta_a \sqrt{x^2 + (Y_0 - y)^2}$$

  and the inverse (sky-to-pixel) is defined as:

  $$x &= R_\theta \sin (C \phi) \\
    y &= R_\theta \cos (C \phi) + Y_0$$

  where $C$ is the "constant of the cone":

  $$C = \frac{180^\circ \cos \theta}{\pi R_\theta}$$

allOf:
  - $ref: "transform-1.3.0"
  - type: object
    properties:
      direction:
        enum: [pix2sky, sky2pix]
        default: pix2sky

      sigma:
        anyOf:
          - $ref: "../unit/quantity-1.2.0"
          - type: number
        description: |
          $(\theta_1 + \theta_2) / 2$ where $\theta_1$ and $\theta_2$
          are the latitudes of the standard parallels, in degrees. This
          parameter is also referred to as `theta_A`.

      delta:
        anyOf:
          - $ref: "../unit/quantity-1.2.0"
          - type: number
        description: |
          $(\theta_1 - \theta_2) / 2$ where $\theta_1$ and $\theta_2$
          are the latitudes of the standard parallels, in degrees. This
          parameter is also referred to as `delta`.
        default: 0
...
