%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/rotate_sequence_3d-1.1.0"
title: >
  Rotation in 3D space.
description: |
  Rotation in 3D space by arbitrary number of angles about
  arbitrary order of "x", "y", "z" axes.

examples:
  -
    - A sequence of rotation around 5 axes..
    - asdf-standard-1.6.0
    - |
      !transform/rotate_sequence_3d-1.1.0
        angles: [-0.0193, -0.1432, -0.04, -65.60, 273.089]
        axes_order: zyxyz
        rotation_type: cartesian

allOf:
  - $ref: "transform-1.3.0"
  - type: object
    properties:
      angles:
        type: array
        items:
          anyOf:
          - $ref: "../unit/quantity-1.2.0"
          - type: number
        description: |
          The angles of rotation in units of deg.
    axes_order:
      description: |
        A sequence of "x", "y" or "z" characters representing an axis of rotation.
        The number of characters must equal the number of angles.
        For the JWST V23 to sky transform the axes are zyxyz.
      type: string
    rotation_type:
      description: |
        The type of rotation class to nitialize
      type: str
      enum: [spherical, cartesian]
    required: [angles, axes_order, rotation_type]
...
