%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/affine-1.4.0"
title: >
  An affine transform.
description: |
  Invertibility: All ASDF tools are required to be able to compute the
  analytic inverse of this transform.


allOf:
  - $ref: "transform-1.3.0"
  - type: object
    properties:
      matrix:
        description: |
          An array of size (*n* x *n*), where *n* is the number of axes,
          representing the linear transformation in an affine transform.
        anyOf:
          - $ref: "../core/ndarray-1.1.0"
          - $ref: "../unit/quantity-1.2.0"
          - type: array
            items:
              type: array
              items:
                type: number
              minItems: 2
              maxItems: 2
            minItems: 2
            maxItems: 2
      translation:
        description: |
          An array of size (*n*,), where  *n* is the number of axes,
          representing the translation in an affine transform.
        anyOf:
          - $ref: "../core/ndarray-1.1.0"
          - $ref: "../unit/quantity-1.2.0"
          - type: array
            items:
              type: number
            minItems: 2
            maxItems: 2
    required: [matrix]
...
