%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/gwcs/frame-1.2.0"
title: |
  The base class of all coordinate frames.

description: |
  These objects are designed to be nested in arbitrary ways to build up
  transformation pipelines out of a number of low-level pieces.

examples:
  -
    - |
        A celestial frame in the ICRS reference frame.
    - asdf-standard-1.6.0
    - |
        !<tag:stsci.edu:gwcs/celestial_frame-1.1.0>
          axes_names: [lon, lat]
          name: CelestialFrame
          reference_frame: !<tag:astropy.org:astropy/coordinates/frames/icrs-1.1.0>
            frame_attributes: {}
          unit: [!unit/unit-1.0.0 deg, !unit/unit-1.0.0 deg]

  -
    - |
        A pixel frame in three dimensions
    - asdf-standard-1.6.0
    - |
        !<tag:stsci.edu:gwcs/frame-1.2.0>
          axes_names: [raster position, slit position, wavelength]
          axes_order: [0, 1, 2]
          axes_type: [SPATIAL, SPATIAL, SPECTRAL]
          name: pixel
          naxes: 3
          unit: [!unit/unit-1.0.0 pixel, !unit/unit-1.0.0 pixel, !unit/unit-1.0.0 pixel]

type: object
properties:
  name:
    description: |
      A user-friendly name for the frame.
    type: string

  axes_order:
    description: |
      The order of the axes.
    type: array
    items:
      type: integer

  axes_names:
    description: |
      The name of each axis in this frame.
    type: array
    items:
      anyOf:
        - type: string
        - type: 'null'

  reference_frame:
    description: |
      The reference frame.
    $ref: "http://astropy.org/schemas/astropy/coordinates/frames/baseframe-1.2.0"

  unit:
    description: |
      Units for each axis.
    type: array
    items:
      anyOf:
        - tag: "tag:stsci.edu:asdf/unit/unit-1.*"
        - tag: "tag:astropy.org:astropy/units/unit-1.*"

  axis_physical_types:
    description: |
      An iterable of strings describing the physical type for each world axis.
      These should be names from the VO UCD1+ controlled Vocabulary
      (http://www.ivoa.net/documents/latest/UCDlist.html).
    type: array
    items:
      type:
        string

required: [name]
additionalProperties: true
...
