Debian Codegraph @

asdf_astropy/resources/schemas/transform/units_mapping-1.2.0.yaml

raw
1 %YAML 1.1
2 ---
3 $schema: "http://stsci.edu/schemas/yaml-schema/draft-01"
4 id: "http://astropy.org/schemas/astropy/transform/units_mapping-1.2.0"
5
6 title: |
7 Mapper that operates on the units of the input.
8
9 description: |
10 This transform operates on the units of the input, first converting to
11 the expected input units, then assigning replacement output units without
12 further conversion.
13
14 examples:
15 -
16 - Assign units of seconds to dimensionless input.
17 - asdf-standard-1.6.0
18 - |
19 !<tag:astropy.org:astropy/transform/units_mapping-1.2.0>
20 unit_inputs:
21 - name: x
22 unit: !unit/unit-1.0.0
23 unit_outputs:
24 - name: x
25 unit: !unit/unit-1.0.0 s
26 -
27 - Convert input to meters, then assign dimensionless units.
28 - asdf-standard-1.6.0
29 - |
30 !<tag:astropy.org:astropy/transform/units_mapping-1.2.0>
31 unit_inputs:
32 - name: x
33 unit: !unit/unit-1.0.0 m
34 unit_outputs:
35 - name: x
36 unit: !unit/unit-1.0.0
37
38 -
39 - Convert input to meters, then drop units entirely.
40 - asdf-standard-1.6.0
41 - |
42 !<tag:astropy.org:astropy/transform/units_mapping-1.2.0>
43 unit_inputs:
44 - name: x
45 unit: !unit/unit-1.0.0 m
46 unit_outputs:
47 - name: x
48
49 -
50 - Accept any units, then replace with meters.
51 - asdf-standard-1.6.0
52 - |
53 !<tag:astropy.org:astropy/transform/units_mapping-1.2.0>
54 unit_inputs:
55 - name: x
56 unit_outputs:
57 - name: x
58 unit: !unit/unit-1.0.0 m
59
60 allOf:
61 - $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.3.0"
62 - type: object
63 properties:
64 unit_inputs:
65 description: |
66 Array of input configurations.
67 type: array
68 items:
69 $ref: "#/definitions/value_configuration"
70 unit_outputs:
71 description: |
72 Array of output configurations.
73 type: array
74 items:
75 $ref: "#/definitions/value_configuration"
76 required: [unit_inputs, unit_outputs]
77
78 definitions:
79 value_configuration:
80 description: |
81 Configuration of a single model value (input or output).
82 type: object
83 properties:
84 name:
85 description: |
86 Value name.
87 type: string
88 unit:
89 description: |
90 Expected unit.
91 anyOf:
92 - tag: "tag:stsci.edu:asdf/unit/unit-*"
93 - tag: "tag:astropy.org:astropy/units/unit-1.*"
94 equivalencies:
95 description: |
96 Equivalencies to apply when converting value to expected unit.
97 tag: "tag:astropy.org:astropy/units/equivalency-1.*"
98 allow_dimensionless:
99 description: |
100 Allow this value to receive dimensionless data.
101 type: boolean
102 default: false
103 required: [name]
104 ...