Debian Codegraph @

asdf_astropy/resources/schemas/transform/units_mapping-1.0.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.0.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 - |
18 !<tag:astropy.org:astropy/transform/units_mapping-1.0.0>
19 unit_inputs:
20 - name: x
21 unit: !unit/unit-1.0.0
22 unit_outputs:
23 - name: x
24 unit: !unit/unit-1.0.0 s
25 -
26 - Convert input to meters, then assign dimensionless units.
27 - |
28 !<tag:astropy.org:astropy/transform/units_mapping-1.0.0>
29 unit_inputs:
30 - name: x
31 unit: !unit/unit-1.0.0 m
32 unit_outputs:
33 - name: x
34 unit: !unit/unit-1.0.0
35
36 -
37 - Convert input to meters, then drop units entirely.
38 - |
39 !<tag:astropy.org:astropy/transform/units_mapping-1.0.0>
40 unit_inputs:
41 - name: x
42 unit: !unit/unit-1.0.0 m
43 unit_outputs:
44 - name: x
45
46 -
47 - Accept any units, then replace with meters.
48 - |
49 !<tag:astropy.org:astropy/transform/units_mapping-1.0.0>
50 unit_inputs:
51 - name: x
52 unit_outputs:
53 - name: x
54 unit: !unit/unit-1.0.0 m
55
56 allOf:
57 - $ref: "http://stsci.edu/schemas/asdf/transform/transform-1.2.0"
58 - type: object
59 properties:
60 unit_inputs:
61 description: |
62 Array of input configurations.
63 type: array
64 items:
65 $ref: "#/definitions/value_configuration"
66 unit_outputs:
67 description: |
68 Array of output configurations.
69 type: array
70 items:
71 $ref: "#/definitions/value_configuration"
72 required: [unit_inputs, unit_outputs]
73
74 definitions:
75 value_configuration:
76 description: |
77 Configuration of a single model value (input or output).
78 type: object
79 properties:
80 name:
81 description: |
82 Value name.
83 type: string
84 unit:
85 description: |
86 Expected unit.
87 $ref: "http://stsci.edu/schemas/asdf/unit/unit-1.0.0"
88 equivalencies:
89 description: |
90 Equivalencies to apply when converting value to expected unit.
91 $ref: "http://astropy.org/schemas/astropy/units/equivalency-1.0.0"
92 allow_dimensionless:
93 description: |
94 Allow this value to receive dimensionless data.
95 type: boolean
96 default: false
97 required: [name]
98 ...