1%YAML 1.1
2---
3$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
4id: "http://astropy.org/schemas/astropy/coordinates/representation-1.0.0"
5tag: "tag:astropy.org:astropy/coordinates/representation-1.0.0"
6
7title: |
8  Representation of points or differentials in two or three dimensional space.
9
10description: |
11  Representation of points or differentials in two or three dimensional space.
12
13examples:
14  -
15    - A SphericalRepresentation
16    - |
17        !<tag:astropy.org:astropy/coordinates/representation-1.0.0>
18          components:
19            distance: !unit/quantity-1.1.0 {unit: !unit/unit-1.0.0 AU, value: 1.0}
20            lat: !<tag:astropy.org:astropy/coordinates/latitude-1.0.0> {unit: !unit/unit-1.0.0 deg,
21              value: 10.0}
22            lon: !<tag:astropy.org:astropy/coordinates/longitude-1.0.0>
23              unit: !unit/unit-1.0.0 deg
24              value: 10.0
25              wrap_angle: !<tag:astropy.org:astropy/coordinates/angle-1.0.0> {unit: !unit/unit-1.0.0 deg,
26                value: 360.0}
27          type: SphericalRepresentation
28  -
29    - A CartesianDifferential
30    - |
31        !<tag:astropy.org:astropy/coordinates/representation-1.0.0>
32          components:
33            d_x: !unit/quantity-1.1.0 {unit: !unit/unit-1.0.0 km s-1, value: 100.0}
34            d_y: !unit/quantity-1.1.0 {unit: !unit/unit-1.0.0 km s-1, value: 200.0}
35            d_z: !unit/quantity-1.1.0 {unit: !unit/unit-1.0.0 km s-1, value: 3141.0}
36          type: CartesianDifferential
37
38type: object
39properties:
40  type:
41    type: string
42    enum:
43      - CartesianRepresentation
44      - SphericalRepresentation
45      - UnitSphericalRepresentation
46      - RadialRepresentation
47      - PhysicsSphericalRepresentation
48      - CylindricalRepresentation
49      - CartesianDifferential
50      - SphericalDifferential
51      - UnitSphericalCosLatDifferential
52      - UnitSphericalDifferential
53      - SphericalCosLatDifferential
54      - RadialDifferential
55      - PhysicsSphericalDifferential
56      - CylindricalDifferential
57
58  components:
59    anyOf:
60      # CartesianRepresentation
61      - type: object
62        properties:
63          x:
64            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
65          y:
66            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
67          z:
68            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
69
70      # SphericalRepresentation
71      - type: object
72        properties:
73          lat:
74            $ref: "latitude-1.0.0"
75          lon:
76            $ref: "longitude-1.0.0"
77          distance:
78            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
79
80      # UnitSphericalRepresentation
81      - type: object
82        properties:
83          lat:
84            $ref: "latitude-1.0.0"
85          lon:
86            $ref: "longitude-1.0.0"
87
88      # RadialRepresentation
89      - type: object
90        properties:
91          distance:
92            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
93
94      # PhysicsSphericalRepresentation
95      - type: object
96        properties:
97          phi:
98            $ref: "angle-1.0.0"
99          theta:
100            $ref: "angle-1.0.0"
101          r:
102            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
103
104      # CylindricalRepresentation
105      - type: object
106        properties:
107          rho:
108            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
109          phi:
110            $ref: "angle-1.0.0"
111          z:
112            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
113
114      # CartesianDifferential
115      - type: object
116        properties:
117          d_x:
118            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
119          d_y:
120            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
121          d_z:
122            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
123
124      # SphericalDifferential
125      - type: object
126        properties:
127          d_lon:
128            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
129          d_lat:
130            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
131          d_distance:
132            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
133
134      # UnitSphericalCosLatDifferential
135      - type: object
136        properties:
137          d_lon_coslat:
138            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
139          d_lat:
140            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
141
142      # UnitSphericalDifferential
143      - type: object
144        properties:
145          d_lon:
146            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
147          d_lat:
148            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
149
150      # SphericalCosLatDifferential
151      - type: object
152        properties:
153          d_lon_coslat:
154            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
155          d_lat:
156            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
157          d_distance:
158            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
159
160      # SphericalDifferential
161      - type: object
162        properties:
163          d_lon:
164            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
165          d_lat:
166            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
167          d_distance:
168            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
169
170      # RadialDifferential
171      - type: object
172        properties:
173          d_phi:
174            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
175          d_theta:
176            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
177          d_r:
178            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
179
180      # PhysicsSphericalDifferential
181      - type: object
182        properties:
183          d_phi:
184            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
185          d_theta:
186            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
187          d_r:
188            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
189
190      # RadialDifferential
191      - type: object
192        properties:
193          d_distance:
194            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
195
196      # CylindricalDifferential
197      - type: object
198        properties:
199          d_rho:
200            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
201          d_phi:
202            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
203          d_z:
204            $ref: "tag:stsci.edu:asdf/unit/quantity-1.1.0"
205
206required: [type, components]
207...
208