Skip to content

Commit e42f776

Browse files
authored
Merge pull request #68 from braingram/refs_to_tags
Update schemas to prefer tag vs ref
2 parents 7d9ba96 + fe65a99 commit e42f776

22 files changed

Lines changed: 1105 additions & 114 deletions

CHANGES.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- Update documentation configuration settings to be consistent with other asdf subprojects [#65]
55
- Fix typo in latex logo path and footer copyright author text [#66]
66
- Adds global navigation in docs top bar [#67]
7+
- Update schemas to prefer tag over ref [#68]
78

89
0.4.0 (2024-03-09)
910
------------------

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ classifiers = [
1212
]
1313
dependencies = [
1414
'asdf-standard >= 1.1.0',
15-
'asdf-transform-schemas >= 0.5.0',
16-
'asdf-coordinates-schemas >= 0.3.0',
15+
'asdf-transform-schemas >= 0.6.0',
16+
'asdf-coordinates-schemas >= 0.4.0',
1717
]
1818
dynamic = ['version']
1919

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
%YAML 1.1
2+
---
3+
id: asdf://asdf-format.org/astronomy/gwcs/manifests/gwcs-1.4.0
4+
extension_uri: asdf://asdf-format.org/astronomy/gwcs/extensions/gwcs-1.4.0
5+
title: gwcs extension
6+
description: |-
7+
A set of tags for serializing STScI gwcs models.
8+
asdf_standard_requirement:
9+
gte: 1.6.0
10+
tags:
11+
- tag_uri: tag:stsci.edu:gwcs/celestial_frame-1.2.0
12+
schema_uri: http://stsci.edu/schemas/gwcs/celestial_frame-1.2.0
13+
title: A celestial frame
14+
description: |-
15+
Represents a celestial frame
16+
- tag_uri: tag:stsci.edu:gwcs/composite_frame-1.0.0
17+
schema_uri: http://stsci.edu/schemas/gwcs/composite_frame-1.0.0
18+
title: A set of frames
19+
description: |-
20+
Represents a set of frames
21+
- tag_uri: "tag:stsci.edu:gwcs/direction_cosines-1.3.0"
22+
schema_uri: "http://stsci.edu/schemas/gwcs/direction_cosines-1.3.0"
23+
title: >
24+
Convert coordinates between vector and direction cosine form.
25+
description: |
26+
This schema is for transforms which convert to and from direction cosines.
27+
- tag_uri: "tag:stsci.edu:gwcs/frame-1.2.0"
28+
schema_uri: "http://stsci.edu/schemas/gwcs/frame-1.2.0"
29+
title: |
30+
The base class of all coordinate frames.
31+
description: |
32+
These objects are designed to be nested in arbitrary ways to build up
33+
transformation pipelines out of a number of low-level pieces.
34+
- tag_uri: "tag:stsci.edu:gwcs/frame2d-1.2.0"
35+
schema_uri: "http://stsci.edu/schemas/gwcs/frame2d-1.2.0"
36+
title: >
37+
Represents a 2D frame.
38+
description: |
39+
Represents a 2D frame.
40+
- tag_uri: "tag:stsci.edu:gwcs/grating_equation-1.3.0"
41+
schema_uri: "http://stsci.edu/schemas/gwcs/grating_equation-1.3.0"
42+
title: >
43+
A grating equation model.
44+
description: |
45+
Supports two models:
46+
- Given incident angle and wavelength compute the refraction/difraction angle.
47+
- Given an incident angle and a refraction angle compute the wavelength.
48+
- tag_uri: "tag:stsci.edu:gwcs/label_mapper-1.3.0"
49+
schema_uri: "http://stsci.edu/schemas/gwcs/label_mapper-1.3.0"
50+
title: >
51+
Represents a mapping from a coordinate value to a label.
52+
description: |
53+
A label mapper instance maps inputs to a label. It is used together
54+
with
55+
[regions_selector](ref:regions_selector-1.3.0). The
56+
[label_mapper](ref:label_mapper-1.3.0)
57+
returns the label corresponding to given inputs. The
58+
[regions_selector](ref:regions_selector-1.3.0)
59+
returns the transform corresponding to this label. This maps inputs
60+
(e.g. pixels on a detector) to transforms uniquely.
61+
- tag_uri: "tag:stsci.edu:gwcs/regions_selector-1.3.0"
62+
schema_uri: "http://stsci.edu/schemas/gwcs/regions_selector-1.3.0"
63+
title: >
64+
Represents a discontinuous transform.
65+
description: |
66+
Maps regions to transgorms and evaluates the transforms with the corresponding inputs.
67+
- tag_uri: "tag:stsci.edu:gwcs/sellmeier_glass-1.3.0"
68+
schema_uri: "http://stsci.edu/schemas/gwcs/sellmeier_glass-1.3.0"
69+
title: >
70+
Sellmeier equation for glass
71+
description: |
72+
Sellmeier equation for glass.
73+
74+
$$ n(\\lambda)^2 = 1 + \\frac{(B1 * \\lambda^2 )}{(\\lambda^2 - C1)} +
75+
\\frac{(B2 * \\lambda^2 )}{(\\lambda^2 - C2)} +
76+
\\frac{(B3 * \\lambda^2 )}{(\\lambda^2 - C3)} $$
77+
- tag_uri: "tag:stsci.edu:gwcs/sellmeier_zemax-1.3.0"
78+
schema_uri: "http://stsci.edu/schemas/gwcs/sellmeier_zemax-1.3.0"
79+
title: Sellmeier equation for glass used by Zemax
80+
description: |
81+
Sellmeier equation for glass used by Zemax
82+
- tag_uri: "tag:stsci.edu:gwcs/snell3d-1.3.0"
83+
schema_uri: "http://stsci.edu/schemas/gwcs/snell3d-1.3.0"
84+
title: Snell Law in 3D space
85+
description: |
86+
Snell Law in 3D.
87+
Inputs are index of refraction and direction cosines.
88+
Outputs are direction cosines.
89+
- tag_uri: "tag:stsci.edu:gwcs/spectral_frame-1.2.0"
90+
schema_uri: "http://stsci.edu/schemas/gwcs/spectral_frame-1.2.0"
91+
title: >
92+
Represents a spectral frame.
93+
description: >
94+
- tag_uri: "tag:stsci.edu:gwcs/spherical_cartesian-1.3.0"
95+
schema_uri: "http://stsci.edu/schemas/gwcs/spherical_cartesian-1.3.0"
96+
title: >
97+
Convert coordinates between spherical and Cartesian coordinates.
98+
description: |
99+
This schema is for transforms which convert between spherical coordinates
100+
(on the unit sphere) and Cartesian coordinates.
101+
- tag_uri: "tag:stsci.edu:gwcs/step-1.3.0"
102+
schema_uri: "http://stsci.edu/schemas/gwcs/step-1.3.0"
103+
title: >
104+
Describes a single step of a WCS transform pipeline.
105+
description: >
106+
- tag_uri: "tag:stsci.edu:gwcs/stokes_frame-1.0.0"
107+
schema_uri: "http://stsci.edu/schemas/gwcs/stokes_frame-1.0.0"
108+
title: >
109+
Represents a stokes frame
110+
description: >
111+
- tag_uri: "tag:stsci.edu:gwcs/temporal_frame-1.2.0"
112+
schema_uri: "http://stsci.edu/schemas/gwcs/temporal_frame-1.2.0"
113+
title: >
114+
Represents a temporal frame.
115+
description: >
116+
- tag_uri: "tag:stsci.edu:gwcs/wcs-1.4.0"
117+
schema_uri: "http://stsci.edu/schemas/gwcs/wcs-1.4.0"
118+
title: >
119+
A system for describing generalized world coordinate transformations.
120+
description: >
121+
ASDF WCS is a way of specifying transformations (usually from
122+
detector space to world coordinate space and back) by using the
123+
transformations in the `transform-schema` module.
124+
...
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
%YAML 1.1
2+
---
3+
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
4+
id: "http://stsci.edu/schemas/gwcs/celestial_frame-1.2.0"
5+
6+
title: >
7+
Represents a celestial frame.
8+
9+
allOf:
10+
- type: object
11+
properties:
12+
axes_names:
13+
minItems: 2
14+
maxItems: 3
15+
16+
axes_order:
17+
minItems: 2
18+
maxItems: 3
19+
20+
unit:
21+
minItems: 2
22+
maxItems: 3
23+
24+
- $ref: frame-1.2.0
25+
...
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
%YAML 1.1
2+
---
3+
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
4+
id: "http://stsci.edu/schemas/gwcs/direction_cosines-1.3.0"
5+
6+
title: >
7+
Convert coordinates between vector and direction cosine form.
8+
9+
description: |
10+
This schema is for transforms which convert to and from direction cosines.
11+
12+
examples:
13+
-
14+
- Convert direction cosines to vectors.
15+
- asdf-standard-1.6.0
16+
- |
17+
18+
!<tag:stsci.edu:gwcs/direction_cosines-1.3.0>
19+
transform_type: from_direction_cosines
20+
21+
-
22+
- Convert vectors to directional cosines.
23+
- asdf-standard-1.6.0
24+
- |
25+
!<tag:stsci.edu:gwcs/direction_cosines-1.3.0>
26+
transform_type: to_direction_cosines
27+
28+
allOf:
29+
- $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.4.0"
30+
- object:
31+
properties:
32+
transform_type:
33+
description: |
34+
The type of transform/class to initialize.
35+
type: string
36+
enum: [to_direction_cosines, from_direction_cosines]
37+
required: [transform_type]
38+
...
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
%YAML 1.1
2+
---
3+
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
4+
id: "http://stsci.edu/schemas/gwcs/frame-1.2.0"
5+
title: |
6+
The base class of all coordinate frames.
7+
8+
description: |
9+
These objects are designed to be nested in arbitrary ways to build up
10+
transformation pipelines out of a number of low-level pieces.
11+
12+
examples:
13+
-
14+
- |
15+
A celestial frame in the ICRS reference frame.
16+
- asdf-standard-1.6.0
17+
- |
18+
!<tag:stsci.edu:gwcs/celestial_frame-1.1.0>
19+
axes_names: [lon, lat]
20+
name: CelestialFrame
21+
reference_frame: !<tag:astropy.org:astropy/coordinates/frames/icrs-1.1.0>
22+
frame_attributes: {}
23+
unit: [!unit/unit-1.0.0 deg, !unit/unit-1.0.0 deg]
24+
25+
-
26+
- |
27+
A pixel frame in three dimensions
28+
- asdf-standard-1.6.0
29+
- |
30+
!<tag:stsci.edu:gwcs/frame-1.2.0>
31+
axes_names: [raster position, slit position, wavelength]
32+
axes_order: [0, 1, 2]
33+
axes_type: [SPATIAL, SPATIAL, SPECTRAL]
34+
name: pixel
35+
naxes: 3
36+
unit: [!unit/unit-1.0.0 pixel, !unit/unit-1.0.0 pixel, !unit/unit-1.0.0 pixel]
37+
38+
type: object
39+
properties:
40+
name:
41+
description: |
42+
A user-friendly name for the frame.
43+
type: string
44+
45+
axes_order:
46+
description: |
47+
The order of the axes.
48+
type: array
49+
items:
50+
type: integer
51+
52+
axes_names:
53+
description: |
54+
The name of each axis in this frame.
55+
type: array
56+
items:
57+
anyOf:
58+
- type: string
59+
- type: 'null'
60+
61+
reference_frame:
62+
description: |
63+
The reference frame.
64+
$ref: "http://astropy.org/schemas/astropy/coordinates/frames/baseframe-1.2.0"
65+
66+
unit:
67+
description: |
68+
Units for each axis.
69+
type: array
70+
items:
71+
anyOf:
72+
- tag: "tag:stsci.edu:asdf/unit/unit-1.*"
73+
- tag: "tag:astropy.org:astropy/units/unit-1.*"
74+
75+
axis_physical_types:
76+
description: |
77+
An iterable of strings describing the physical type for each world axis.
78+
These should be names from the VO UCD1+ controlled Vocabulary
79+
(http://www.ivoa.net/documents/latest/UCDlist.html).
80+
type: array
81+
items:
82+
type:
83+
string
84+
85+
required: [name]
86+
additionalProperties: true
87+
...
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
%YAML 1.1
2+
---
3+
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
4+
id: "http://stsci.edu/schemas/gwcs/frame2d-1.2.0"
5+
6+
title: >
7+
Represents a 2D frame.
8+
9+
examples:
10+
-
11+
- |
12+
A two dimensional spatial frame
13+
- |
14+
!<tag:stsci.edu:gwcs/frame2d-1.2.0>
15+
axes_names: [lon, lat]
16+
name: Frame2D
17+
unit: [!unit/unit-1.0.0 pixel, !unit/unit-1.0.0 pixel]
18+
19+
20+
allOf:
21+
- type: object
22+
properties:
23+
axes_names:
24+
minItems: 2
25+
maxItems: 2
26+
27+
axes_order:
28+
minItems: 2
29+
maxItems: 2
30+
31+
unit:
32+
minItems: 2
33+
maxItems: 2
34+
35+
- $ref: frame-1.2.0
36+
...
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
%YAML 1.1
2+
---
3+
$schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
4+
id: "http://stsci.edu/schemas/gwcs/grating_equation-1.3.0"
5+
6+
title: >
7+
A grating equation model.
8+
description: |
9+
Supports two models:
10+
- Given incident angle and wavelength compute the refraction/difraction angle.
11+
- Given an incident angle and a refraction angle compute the wavelength.
12+
13+
examples:
14+
-
15+
- AnglesFromGratingEquation3D model.
16+
- asdf-standard-1.6.0
17+
- |
18+
!<tag:stsci.edu:gwcs/grating_equation-1.3.0>
19+
groove_density: 2700.0
20+
order: 2.0
21+
output: angle
22+
23+
-
24+
- WavelengthFromGratingEquation model.
25+
- asdf-standard-1.6.0
26+
- |
27+
!<tag:stsci.edu:gwcs/grating_equation-1.3.0>
28+
groove_density: 2700.0
29+
order: 2.0
30+
output: wavelength
31+
32+
allOf:
33+
- $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.4.0"
34+
- type: object
35+
properties:
36+
groove_density:
37+
description: |
38+
The groove density of the grating
39+
anyOf:
40+
- type: number
41+
- tag: "tag:stsci.edu:asdf/unit/quantity-1.*"
42+
order:
43+
description: |
44+
Spectral order
45+
type: number
46+
output:
47+
type: string
48+
description: |
49+
indicates which quantity the grating equation is solved for.
50+
enum: [wavelength, angle]
51+
required: [groove_density, order, output]
52+
...

0 commit comments

Comments
 (0)