%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/ellipse2d-1.2.0"
title: >
  Two dimensional ellipse model.

description: >
  Two dimensional ellipse.

examples:
  -
    - A 2D ellipse centered at (x, y) = (0.5, 1.5), with a semimajor axis of 2.0, semiminor axis of 4.0, oriented at 0.2 radians counterclockwise from the positive x-axis.
    - asdf-standard-1.6.0
    - |
      !transform/ellipse2d-1.2.0
        a: 2.0
        amplitude: 10.0
        b: 4.0
        bounding_box:
        - [-2.4403509950278934, 5.440350995027893]
        - [-1.6150966966034175, 2.6150966966034175]
        theta: 0.2
        x_0: 0.5
        y_0: 1.5

allOf:
  - $ref: "transform-1.4.0"
  - type: object
    properties:
      amplitude:
        anyOf:
          - tag: "tag:stsci.edu:asdf/unit/quantity-1.*"
          - type: number
        description: Value of the ellipse.
      x_0:
        anyOf:
          - tag: "tag:stsci.edu:asdf/unit/quantity-1.*"
          - type: number
        description: x position of the center of the ellipse.
      y_0:
        anyOf:
          - tag: "tag:stsci.edu:asdf/unit/quantity-1.*"
          - type: number
        description: y position of the center of the ellipse.
      a:
        anyOf:
          - tag: "tag:stsci.edu:asdf/unit/quantity-1.*"
          - type: number
        description: The length of the semimajor axis.
      b:
        anyOf:
          - tag: "tag:stsci.edu:asdf/unit/quantity-1.*"
          - type: number
        description: The length of the seminor axis.
      theta:
        anyOf:
          - tag: "tag:stsci.edu:asdf/unit/quantity-1.*"
          - type: number
        description: The rotation angle in radians of the semimajor axis. The rotation angle increase counterclockwise from the positive x axis.

    required: ['amplitude', 'x_0', 'y_0', 'a', 'b', 'theta']
...
