%YAML 1.1
---
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
id: "http://stsci.edu/schemas/asdf/transform/sersic2d-1.1.0"
title: >
  Two dimensional Sersic surface brightness profile.

description: >
  Two dimensional Sersic surface brightness profile.

examples:
  -
    - $I(x, y)=I(r)=I(x, y)=I(r)=10.0\exp\left\{-b_n\left[\left(\frac{(\sqrt{(x-0.5)^2 + (y-1.5)^2})}{1.0}\right)^{(1/4)}-1\right]\right\}$ where $b_n$ is defined such that $r_e$ contains half the total luminosity (can be solved for numerically).
    - asdf-standard-1.6.0
    - |
      !transform/sersic2d-1.1.0 {amplitude: 10.0, ellip: 0.0, n: 4.0, r_eff: 1.0, theta: 0.0, x_0: 0.5, y_0: 1.5}

allOf:
  - $ref: "transform-1.3.0"
  - type: object
    properties:
      amplitude:
        anyOf:
          - $ref: "../unit/quantity-1.2.0"
          - type: number
        description: Surface brightness at r_eff.
      r_eff:
        anyOf:
          - $ref: "../unit/quantity-1.2.0"
          - type: number
        description: Effective (half-light) radius.
      n:
        anyOf:
          - $ref: "../unit/quantity-1.2.0"
          - type: number
        description: Sersic index.
      x_0:
        anyOf:
          - $ref: "../unit/quantity-1.2.0"
          - type: number
        description: x position of the center.
      y_0:
        anyOf:
          - $ref: "../unit/quantity-1.2.0"
          - type: number
        description: y position of the center.
      ellip:
        anyOf:
          - $ref: "../unit/quantity-1.2.0"
          - type: number
        description: Ellipticity.
      theta:
        anyOf:
          - $ref: "../unit/quantity-1.2.0"
          - type: number
        description: Rotation angle in radians, increases counterclockwise from the positive x-axis.

    required: ['amplitude', 'r_eff', 'n', 'x_0', 'y_0', 'ellip', 'theta']
...
