voruby 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. data/LICENSE +339 -0
  2. data/REQUIREMENTS +4 -0
  3. data/Rakefile.rb +296 -0
  4. data/lib/voruby/adql/adql.rb +2735 -0
  5. data/lib/voruby/adql/ext.rb +15 -0
  6. data/lib/voruby/adql/loader.rb +5 -0
  7. data/lib/voruby/adql/operations.rb +54 -0
  8. data/lib/voruby/adql/parser.rb +160 -0
  9. data/lib/voruby/adql/transforms.rb +573 -0
  10. data/lib/voruby/ext.rb +17 -0
  11. data/lib/voruby/loader.rb +4 -0
  12. data/lib/voruby/misc/propertyfile.rb +36 -0
  13. data/lib/voruby/plastic/applications.rb +174 -0
  14. data/lib/voruby/plastic/constants.rb +30 -0
  15. data/lib/voruby/plastic/loader.rb +10 -0
  16. data/lib/voruby/plastic/plastic.rb +1 -0
  17. data/lib/voruby/resources/conesearch/conesearch.rb +9 -0
  18. data/lib/voruby/resources/conesearch/conesearch_v0_2.rb +55 -0
  19. data/lib/voruby/resources/conesearch/conesearch_v0_3.rb +50 -0
  20. data/lib/voruby/resources/conesearch/conesearch_v1_0.rb +72 -0
  21. data/lib/voruby/resources/conesearch/loader.rb +4 -0
  22. data/lib/voruby/resources/loader.rb +50 -0
  23. data/lib/voruby/resources/nodes.rb +190 -0
  24. data/lib/voruby/resources/openskynode/loader.rb +4 -0
  25. data/lib/voruby/resources/openskynode/openskynode.rb +9 -0
  26. data/lib/voruby/resources/openskynode/openskynode_v0_1.rb +54 -0
  27. data/lib/voruby/resources/sia/loader.rb +5 -0
  28. data/lib/voruby/resources/sia/sia.rb +9 -0
  29. data/lib/voruby/resources/sia/sia_v0_6.rb +90 -0
  30. data/lib/voruby/resources/sia/sia_v0_7.rb +89 -0
  31. data/lib/voruby/resources/sia/sia_v1_0.rb +122 -0
  32. data/lib/voruby/resources/stsci.rb +59 -0
  33. data/lib/voruby/resources/vodataservice/coverage_v0_2.rb +195 -0
  34. data/lib/voruby/resources/vodataservice/coverage_v0_3.rb +158 -0
  35. data/lib/voruby/resources/vodataservice/loader.rb +5 -0
  36. data/lib/voruby/resources/vodataservice/vodataservice.rb +9 -0
  37. data/lib/voruby/resources/vodataservice/vodataservice_v0_4.rb +189 -0
  38. data/lib/voruby/resources/vodataservice/vodataservice_v0_5.rb +163 -0
  39. data/lib/voruby/resources/vodataservice/vodataservice_v1_0.rb +221 -0
  40. data/lib/voruby/resources/voregistry/loader.rb +4 -0
  41. data/lib/voruby/resources/voregistry/voregistry.rb +9 -0
  42. data/lib/voruby/resources/voregistry/voregistry_v0_2.rb +40 -0
  43. data/lib/voruby/resources/voregistry/voregistry_v0_3.rb +30 -0
  44. data/lib/voruby/resources/voregistry/voregistry_v1_0.rb +86 -0
  45. data/lib/voruby/resources/voresource/loader.rb +17 -0
  46. data/lib/voruby/resources/voresource/voresource.rb +9 -0
  47. data/lib/voruby/resources/voresource/voresource_v0_10.rb +322 -0
  48. data/lib/voruby/resources/voresource/voresource_v0_9.rb +405 -0
  49. data/lib/voruby/resources/voresource/voresource_v1_0.rb +230 -0
  50. data/lib/voruby/services/ext.rb +11 -0
  51. data/lib/voruby/services/gestalt/footprint.rb +95 -0
  52. data/lib/voruby/services/gestalt/wcs_fixer.rb +105 -0
  53. data/lib/voruby/services/gestalt/wesix.rb +155 -0
  54. data/lib/voruby/services/loader.rb +7 -0
  55. data/lib/voruby/services/registry/registry.rb +53 -0
  56. data/lib/voruby/services/resolver/resolver.rb +35 -0
  57. data/lib/voruby/sesame/loader.rb +6 -0
  58. data/lib/voruby/sesame/sesame_v1_0.rb +64 -0
  59. data/lib/voruby/simple/loader.rb +6 -0
  60. data/lib/voruby/simple/parameters.rb +196 -0
  61. data/lib/voruby/simple/sap.rb +446 -0
  62. data/lib/voruby/spacetime/loader.rb +3 -0
  63. data/lib/voruby/spacetime/spacetime.rb +607 -0
  64. data/lib/voruby/stc/coords_v1_20.rb +900 -0
  65. data/lib/voruby/stc/loader.rb +55 -0
  66. data/lib/voruby/stc/region_v1_20.rb +274 -0
  67. data/lib/voruby/stc/stc_v1_20.rb +1196 -0
  68. data/lib/voruby/util.rb +27 -0
  69. data/lib/voruby/voevent/loader.rb +7 -0
  70. data/lib/voruby/voevent/voevent_v1_0.rb +213 -0
  71. data/lib/voruby/voevent/voevent_v1_1.rb +196 -0
  72. data/lib/voruby/votables/chandra.rb +410 -0
  73. data/lib/voruby/votables/cnoc.rb +393 -0
  74. data/lib/voruby/votables/data.rb +179 -0
  75. data/lib/voruby/votables/galex.rb +390 -0
  76. data/lib/voruby/votables/hst.rb +391 -0
  77. data/lib/voruby/votables/int.rb +391 -0
  78. data/lib/voruby/votables/libxml_parser.rb +411 -0
  79. data/lib/voruby/votables/libxml_votable.rb +67 -0
  80. data/lib/voruby/votables/loader.rb +10 -0
  81. data/lib/voruby/votables/meta.rb +763 -0
  82. data/lib/voruby/votables/misc.rb +51 -0
  83. data/lib/voruby/votables/nsa.rb +393 -0
  84. data/lib/voruby/votables/nsar3.rb +410 -0
  85. data/lib/voruby/votables/rexml_parser.rb +408 -0
  86. data/lib/voruby/votables/rexml_votable.rb +67 -0
  87. data/lib/voruby/votables/sdss.rb +393 -0
  88. data/lib/voruby/votables/transforms.rb +388 -0
  89. data/lib/voruby/votables/tree.rb +45 -0
  90. data/lib/voruby/votables/types.rb +391 -0
  91. data/lib/voruby/votables/votable.rb +630 -0
  92. data/lib/voruby/votables/xmm.rb +394 -0
  93. data/test/adql/test1.adql +49 -0
  94. data/test/adql/test2.adql +51 -0
  95. data/test/adql/test3.adql +81 -0
  96. data/test/adql/test4.adql +53 -0
  97. data/test/adql/test5.adql +55 -0
  98. data/test/adql/test6.adql +18 -0
  99. data/test/adql/test7.adql +48 -0
  100. data/test/adql/unittest.rb +1672 -0
  101. data/test/plastic/test.rb +44 -0
  102. data/test/plastic/test.vot +5385 -0
  103. data/test/plastic/unittest.rb +66 -0
  104. data/test/resources/conesearch/conesearch_v0_3.xml +31 -0
  105. data/test/resources/conesearch/conesearch_v1_0.xml +86 -0
  106. data/test/resources/conesearch/unittest_v0_3.rb +22 -0
  107. data/test/resources/conesearch/unittest_v1_0.rb +24 -0
  108. data/test/resources/openskynode/open_sky_node_v0_1.xml +32 -0
  109. data/test/resources/openskynode/unittest_v0_1.rb +31 -0
  110. data/test/resources/sia/simple_image_access_v0_7.xml +36 -0
  111. data/test/resources/sia/simple_image_access_v1_0.xml +122 -0
  112. data/test/resources/sia/unittest_v0_7.rb +24 -0
  113. data/test/resources/sia/unittest_v1_0.rb +29 -0
  114. data/test/resources/stsci.xml +336 -0
  115. data/test/resources/unittest_stsci.rb +25 -0
  116. data/test/resources/vodataservice/catalog_service_resource_v1_0.xml +128 -0
  117. data/test/resources/vodataservice/data_collection_resource_v0_5.xml +54 -0
  118. data/test/resources/vodataservice/data_collection_resource_v1_0.xml +117 -0
  119. data/test/resources/vodataservice/data_service_resource_v1_0.xml +115 -0
  120. data/test/resources/vodataservice/sky_service_resource_v0_10.xml +45 -0
  121. data/test/resources/vodataservice/table_service_resource_v1_0.xml +122 -0
  122. data/test/resources/vodataservice/tabular_sky_service_resource_v0_10.xml +60 -0
  123. data/test/resources/vodataservice/unittest_v0_5.rb +126 -0
  124. data/test/resources/vodataservice/unittest_v1_0.rb +151 -0
  125. data/test/resources/voregistry/authority_resource_v0_3.xml +20 -0
  126. data/test/resources/voregistry/authority_resource_v1_0.xml +82 -0
  127. data/test/resources/voregistry/registry_service_v0_3.xml +20 -0
  128. data/test/resources/voregistry/registry_service_v1_0.xml +107 -0
  129. data/test/resources/voregistry/unittest_v0_3.rb +31 -0
  130. data/test/resources/voregistry/unittest_v1_0.rb +34 -0
  131. data/test/resources/voresource/organisation_resource_v1_0.xml +90 -0
  132. data/test/resources/voresource/resource_organisation_v0_10.xml +22 -0
  133. data/test/resources/voresource/resource_service_v0_10.xml +19 -0
  134. data/test/resources/voresource/resource_v0_10.xml +19 -0
  135. data/test/resources/voresource/resource_v1_0.xml +79 -0
  136. data/test/resources/voresource/service_resource_v1_0.xml +91 -0
  137. data/test/resources/voresource/unittest_v0_10.rb +61 -0
  138. data/test/resources/voresource/unittest_v0_9.rb +4 -0
  139. data/test/resources/voresource/unittest_v1_0.rb +190 -0
  140. data/test/services/gestalt/unittest.rb +74 -0
  141. data/test/services/registry/unittest.rb +34 -0
  142. data/test/services/resolver/unittest.rb +38 -0
  143. data/test/simple/unittest.rb +46 -0
  144. data/test/spacetime/unittest.rb +39 -0
  145. data/test/stc/catalog_entry_location_v1_20.xml +112 -0
  146. data/test/stc/obs_data_location_v1_20.xml +108 -0
  147. data/test/stc/search_location_v1_20.xml +54 -0
  148. data/test/stc/stc_resource_profile_v1_20.xml +60 -0
  149. data/test/stc/unittest_v1_20.rb +620 -0
  150. data/test/voevent/unittest_v1_0.rb +79 -0
  151. data/test/voevent/unittest_v1_1.rb +70 -0
  152. data/test/voevent/voevent_v1_0.xml +96 -0
  153. data/test/voevent/voevent_v1_1.xml +76 -0
  154. data/test/votables/test.vot +366 -0
  155. data/test/votables/unittest.rb +54 -0
  156. metadata +256 -0
@@ -0,0 +1,900 @@
1
+ require 'voruby/stc/loader'
2
+
3
+ module VORuby
4
+ module STCcoords
5
+ module V1_20
6
+
7
+ # Forward declarations
8
+ class UnitType; end
9
+ class TimeUnitType < UnitType; end
10
+ class PosUnitType < UnitType; end
11
+ class AngleUnitType < UnitType; end
12
+ class PosAngleReferenceType; end
13
+ class VelTimeUnitType < UnitType; end
14
+ class SpectralUnitType < UnitType; end
15
+ class TimeScaleType; end
16
+ class PosAngleType; end
17
+ class AbsoluteTime; end
18
+ class ISOTime; end
19
+ class ISOTimeRef; end
20
+ class JDTime; end
21
+ class JDTimeRef; end
22
+ class MJDTime; end
23
+ class MJDTimeRef; end
24
+ class TimeOrigin; end
25
+ class RelativeTime; end
26
+ class TimeOffset; end
27
+ class TimeOffsetRef; end
28
+ class AstronTimeType; end
29
+ class DoubleArrayType; end
30
+ class Double2Type < DoubleArrayType; end
31
+ class Double3Type < DoubleArrayType; end
32
+ class Double4Type < DoubleArrayType; end
33
+ class Double9Type < DoubleArrayType; end
34
+ class CoordValue; end
35
+ class CValue; end
36
+ class Value; end
37
+ class ValueRef; end
38
+ class CError; end
39
+ class Error; end
40
+ class ErrorRef; end
41
+ class CResolution; end
42
+ class Resolution; end
43
+ class ResolutionRef; end
44
+ class CSize; end
45
+ class Size; end
46
+ class SizeRef; end
47
+ class CPixSize; end
48
+ class PixSize; end
49
+ class PixSizeRef; end
50
+ class CoordinateType; end
51
+ class ScalarCoordinateType < CoordinateType; end
52
+ class TimeCoordinateType < CoordinateType; end
53
+ class Size2Type; end
54
+ class CValue2; end
55
+ class Value2; end
56
+ class Value2Ref; end
57
+ class CError2; end
58
+ class Error2; end
59
+ class Error2PA; end
60
+ class Error2Matrix; end
61
+ class Error2Ref; end
62
+ class CResolution2; end
63
+ class Resolution2; end
64
+ class Resolution2PA; end
65
+ class Resolution2Matrix; end
66
+ class Resolution2Ref; end
67
+ class CSize2; end
68
+ class Size2; end
69
+ class Size2PA; end
70
+ class Size2Matrix; end
71
+ class Size2Ref; end
72
+ class CPixSize2; end
73
+ class PixSize2; end
74
+ class PixSize2PA; end
75
+ class PixSize2Matrix; end
76
+ class PixSize2Ref; end
77
+ class Vector2CoordinateType < CoordinateType; end
78
+ class Size3Type; end
79
+ class CValue3; end
80
+ class Value3; end
81
+ class Value3Ref; end
82
+ class CError3; end
83
+ class Error3; end
84
+ class Error3PA; end
85
+ class Error3Matrix; end
86
+ class Error3Ref; end
87
+ class CResolution3; end
88
+ class Resolution3; end
89
+ class Resolution3PA; end
90
+ class Resolution3Matrix; end
91
+ class Resolution3Ref; end
92
+ class CSize3; end
93
+ class Size3; end
94
+ class Size3PA; end
95
+ class Size3Matrix; end
96
+ class Size3Ref; end
97
+ class CPixSize3; end
98
+ class PixSize3; end
99
+ class PixSize3PA; end
100
+ class PixSize3Matrix; end
101
+ class PixSize3Ref; end
102
+ class Vector3CoordinateType < CoordinateType; end
103
+ class Coordinate; end
104
+ class ScalarCoordinate < ScalarCoordinateType; end
105
+ class StringCoordinate < CoordinateType; end
106
+ class PixelCoordinate < CoordinateType; end
107
+ class Position; end
108
+ class Position1D < ScalarCoordinateType; end
109
+ class Position2D < Vector2CoordinateType; end
110
+ class Position3D < Vector3CoordinateType; end
111
+ class Velocity; end
112
+ class Velocity1D < ScalarCoordinateType; end
113
+ class Velocity2D < Vector2CoordinateType; end
114
+ class Velocity3D < Vector3CoordinateType; end
115
+ class FitsType < Resources::VOResource::V0_10::AnyURI; end
116
+ class CoordFITSColumnsType; end
117
+ class AstroCoordsFileType; end
118
+ class CoordsType; end
119
+ class AstroCoordsType < CoordsType; end
120
+ class Spectral < ScalarCoordinateType; end
121
+ class Redshift < ScalarCoordinateType; end
122
+ class CoordFile; end
123
+ class PixelCoordsType < CoordsType; end
124
+ class Coords; end
125
+ class AstroCoords; end
126
+ class PixelCoords; end
127
+
128
+ SubstitutionGroups = {
129
+ 'AbsoluteTime' => [ISOTime, ISOTimeRef, JDTime, JDTimeRef, MJDTime, MJDTimeRef, TimeOrigin],
130
+ 'RelativeTime' => [TimeOffset, TimeOffsetRef],
131
+ 'CoordValue' => [CValue, CValue2],
132
+ 'CValue' => [Value, ValueRef],
133
+ 'CError' => [Error, ErrorRef],
134
+ 'CResolution' => [Resolution, ResolutionRef],
135
+ 'CSize' => [Size, SizeRef],
136
+ 'CPixSize' => [PixSize, PixSizeRef],
137
+ 'CValue2' => [Value2, Value2Ref],
138
+ 'CError2' => [Error2, Error2PA, Error2Matrix, Error2Ref],
139
+ 'CResolution2' => [Resolution2, Resolution2PA, Resolution2Matrix, Resolution2Ref],
140
+ 'CSize2' => [Size2, Size2PA, Size2Matrix, Size2Ref],
141
+ 'CPixSize2' => [PixSize2, PixSize2PA, PixSize2Matrix, PixSizeRef],
142
+ 'CValue3' => [Value3, Value3Ref],
143
+ 'CError3' => [Error3, Error3PA, Error3Matrix, Error3Ref],
144
+ 'CResolution3' => [Resolution3, Resolution3PA, Resolution3Matrix, Resolution3Ref],
145
+ 'CSize3' => [Size3, Size3PA, Size3Matrix, Size3Ref],
146
+ 'CPixSize3' => [PixSize3, PixSize3PA, PixSize3Matrix, PixSize3Ref],
147
+ 'Coordinate' => [ScalarCoordinate, StringCoordinate, PixelCoordinate],
148
+ 'Position' => [Position1D, Position2D, Position3D],
149
+ 'Velocity' => [Velocity1D, Velocity2D, Velocity3D],
150
+ 'Coords' => [AstroCoords, PixelCoords]
151
+ }
152
+
153
+ # Basic unit type.
154
+ class UnitType
155
+ include XML::Mapping
156
+
157
+ text_node :value, '', :optional => false
158
+ end
159
+
160
+ # Time units may be second (s), hour (h: 3600 s), day (d: 86400 s),
161
+ # Julian year (a, yr: 365.25 d), Julian century (cy: 36525 d),
162
+ # or empty (i.e., dimensionless) for ISO-8601 format.
163
+ class TimeUnitType
164
+ text_enumeration_node :value, '', :optional => false,
165
+ :choices => ['s', 'h', 'd', 'a', 'yr', 'cy', '']
166
+ end
167
+
168
+ # Coordinate units may be angular (degrees, radians, hours,
169
+ # arcmins, arcsecs), linear (meters, km, mm, AUs, parsecs,
170
+ # kpc, Mpc, lightyears), or empty (i.e., dimensionless).
171
+ class PosUnitType
172
+ text_enumeration_node :value, '', :optional => false,
173
+ :choices => ['deg', 'deg deg m', 'rad', 'h', 'arcmin', 'arcsec',
174
+ 'm', 'km', 'mm', 'AU', 'pc', 'kpc', 'Mpc', 'lyr', '']
175
+ end
176
+
177
+ # Angular coordinate units may be degrees, radians, hours, arcmins, arcsecs.
178
+ class AngleUnitType
179
+ text_enumeration_node :value, '', :optional => false,
180
+ :choices => ['deg', 'rad', 'h', 'arcmin', 'arcsec']
181
+ end
182
+
183
+ # Position angles may be counted from North (through East), (positive) X (to positive Y),
184
+ # or (positive) Y (to positive X) axis.
185
+ class PosAngleReferenceType
186
+ include XML::Mapping
187
+
188
+ text_enumeration_node :value, '', :optional => false,
189
+ :choices => ['North', 'X', 'Y']
190
+ end
191
+
192
+ # Velocity units are a posUnitType / velTimeType; the latter may be second, day, hour,
193
+ # year (a or yr), century, but not empty.
194
+ class VelTimeUnitType
195
+ text_enumeration_node :value, '', :optional => false,
196
+ :choices => ['s', 'h', 'd', 'a', 'yr', 'cy']
197
+ end
198
+
199
+ # Spectral units may be frequency (Hz, kHz, MHz, GHz), wavelength (meters, mm,
200
+ # micron, nm, Angstrom), or energy (eV, keV, MeV, GeV, TeV).
201
+ class SpectralUnitType
202
+ text_enumeration_node :value, '', :optional => false,
203
+ :choices => ['Hz', 'kHz', 'MHz', 'GHz', 'm', 'mm', 'um', 'nm',
204
+ 'Angstrom', 'eV', 'keV', 'MeV', 'GeV', 'TeV']
205
+ end
206
+
207
+ # The actual time scale used: TT, TAI, UTC, TDB, etc.
208
+ class TimeScaleType
209
+ include XML::Mapping
210
+
211
+ text_enumeration_node :value, '', :optional => false,
212
+ :choices => ['TT', 'TDT', 'ET', 'TEB', 'TDB', 'TCG', 'TCB', 'TAI',
213
+ 'IAT', 'UTC', 'LST', 'LOCAL']
214
+ end
215
+
216
+ # Position angles are doubles and include optionally a unit attribute
217
+ # (default deg) and a reference attribute (default X).
218
+ class PosAngleType
219
+ include XML::Mapping
220
+
221
+ numeric_node :value, '', :optional => false
222
+
223
+ object_node :unit, '@unit', :class => AngleUnitType, :optional => true, :default_value => 'deg'
224
+ object_node :reference, '@reference', :class => PosAngleReferenceType, :optional => true, :default_value => 'X'
225
+ end
226
+
227
+ # Substitution group for absoluteTimeType component of astronTimeType.
228
+ class AbsoluteTime; end
229
+
230
+ # ISO8601 time; note: only a limited subset of ISO 8601 is allowed: yyyy-mm-ddThh:mm:ss.sss...
231
+ class ISOTime
232
+ include XML::Mapping
233
+
234
+ date_time_node :value, '', :optional => false
235
+ end
236
+ class ISOTimeRef
237
+ include XML::Mapping
238
+
239
+ text_node :value, '', :optional => false
240
+ end
241
+
242
+ # JD time.
243
+ class JDTime
244
+ include XML::Mapping
245
+
246
+ julian_date_time_node :value, '', :optional => false
247
+ end
248
+ class JDTimeRef
249
+ include XML::Mapping
250
+
251
+ text_node :value, '', :optional => false
252
+ end
253
+
254
+ # MJD time (=JD - 2400000.5).
255
+ class MJDTime
256
+ include XML::Mapping
257
+
258
+ date_time_node :value, '', :optional => false
259
+ end
260
+ class MJDTimeRef
261
+ include XML::Mapping
262
+
263
+ text_node :value, '', :optional => false
264
+ end
265
+
266
+ # A relocatable time origin for simulations.
267
+ class TimeOrigin
268
+ include XML::Mapping
269
+
270
+ text_enumeration_node :value, '', :optional => false,
271
+ :choices => ['RELOCATABLE']
272
+ end
273
+
274
+ # Substitution group: Relative time is elapsed time relative to the absolute reference time component.
275
+ class RelativeTime; end
276
+
277
+ # Actual elapsed time offset.
278
+ class TimeOffset
279
+ include XML::Mapping
280
+
281
+ numeric_node :value, '', :optional => false
282
+
283
+ object_node :unit, '@unit', :class => TimeUnitType, :optional => true, :default_value => 's'
284
+ end
285
+ class TimeOffsetRef
286
+ include XML::Mapping
287
+
288
+ text_node :value, '', :optional => false
289
+
290
+ object_node :unit, '@unit', :class => TimeUnitType, :optional => true, :default_value => 's'
291
+ end
292
+
293
+ # AstronTime is the generalized astronomical time type and consists of
294
+ # two or three elements: TimeScale, optional relative time offset, and
295
+ # an absolute time (ISO8601 or a decimal JD or MJD; or it may be an IDREF to one of those three).
296
+ class AstronTimeType
297
+ include XML::Mapping
298
+
299
+ object_node :timescale, 'Timescale', :class => TimeScaleType, :optional => true
300
+
301
+ full_object_node :relative_time, STC::group_member_names(RelativeTime, SubstitutionGroups).join('|'),
302
+ :unmarshaller => STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
303
+ :optional => true
304
+ full_object_node :absolute_time, STC::group_member_names(AbsoluteTime, SubstitutionGroups).join('|'),
305
+ :unmarshaller => STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
306
+ :optional => false
307
+ end
308
+
309
+ # For vector coordinates we need arrays of doubles.
310
+ class DoubleArrayType
311
+ include XML::Mapping
312
+
313
+ text_float_array_node :value, '', :optional => false
314
+ end
315
+
316
+ # The head element for the CoordinateValue substitution group.
317
+ class CoordValue; end
318
+
319
+ # Substitution group for a scalar coordinate value.
320
+ class CValue; end
321
+
322
+ class Value
323
+ include XML::Mapping
324
+
325
+ numeric_node :value, '', :optional => false
326
+ end
327
+ class ValueRef
328
+ include XML::Mapping
329
+
330
+ text_node :value, '', :optional => false
331
+ end
332
+
333
+ # Substitution group for a scalar coordinate error.
334
+ class CError; end
335
+
336
+ class Error
337
+ include XML::Mapping
338
+
339
+ numeric_node :value, '', :optional => false
340
+ end
341
+ class ErrorRef
342
+ include XML::Mapping
343
+
344
+ text_node :value, '', :optional => false
345
+ end
346
+
347
+ # Substitution group for a scalar coordinate resolution.
348
+ class CResolution; end
349
+
350
+ class Resolution
351
+ include XML::Mapping
352
+
353
+ numeric_node :value, '', :optional => false
354
+ end
355
+ class ResolutionRef
356
+ include XML::Mapping
357
+
358
+ text_node :value, '', :optional => false
359
+ end
360
+
361
+ # Substitution group for a scalar coordinate size.
362
+ class CSize; end
363
+
364
+ class Size
365
+ include XML::Mapping
366
+
367
+ numeric_node :value, '', :optional => false
368
+ end
369
+ class SizeRef
370
+ include XML::Mapping
371
+
372
+ text_node :value, '', :optional => false
373
+ end
374
+
375
+ # Substitution group for a scalar coordinate pixel size.
376
+ class CPixSize; end
377
+
378
+ class PixSize
379
+ include XML::Mapping
380
+
381
+ numeric_node :value, '', :optional => false
382
+ end
383
+ class PixSizeRef
384
+ include XML::Mapping
385
+
386
+ text_node :value, '', :optional => false
387
+ end
388
+
389
+ # Abstract coordinate type; a concrete Coordinate consists of a Value, Error, Resolution, Size, and PixSize.
390
+ class CoordinateType
391
+ include XML::Mapping
392
+
393
+ text_node :name, 'Name', :optional => true
394
+ end
395
+
396
+ # Generic scalar coordinate type.
397
+ # Single CError, CResolution, CSize, CPixSize elements indicate definite values; pairs indicate ranges.
398
+ class ScalarCoordinateType
399
+ full_object_node :value, STC::group_member_names(CValue, SubstitutionGroups).join('|'),
400
+ :unmarshaller => VORuby::STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
401
+ :optional => true
402
+
403
+ full_array_node :error, STC::group_member_names(CError, SubstitutionGroups).join('|'),
404
+ :unmarshaller => VORuby::STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
405
+ :optional => true, :default_value => []
406
+ full_array_node :resolution, STC::group_member_names(CResolution, SubstitutionGroups).join('|'),
407
+ :unmarshaller => VORuby::STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
408
+ :optional => true, :default_value => []
409
+ full_array_node :size, STC::group_member_names(CSize, SubstitutionGroups).join('|'),
410
+ :unmarshaller => VORuby::STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
411
+ :optional => true, :default_value => []
412
+ full_array_node :pix_size, STC::group_member_names(CPixSize, SubstitutionGroups).join('|'),
413
+ :unmarshaller => VORuby::STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
414
+ :optional => true, :default_value => []
415
+ end
416
+
417
+ # Time coordinate type.
418
+ # Single CError, CResolution, CSize, CPixSize elements indicate definite values; pairs indicate ranges.
419
+ class TimeCoordinateType
420
+ object_node :time_instant, 'TimeInstant', :class => AstronTimeType, :optional => true
421
+ object_node :unit, '@unit', :class => TimeUnitType, :optional => true, :default => 's'
422
+
423
+ full_array_node :error, STC::group_member_names(CError, SubstitutionGroups).join('|'),
424
+ :unmarshaller => VORuby::STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
425
+ :optional => true, :default_value => []
426
+ full_array_node :resolution, STC::group_member_names(CResolution, SubstitutionGroups).join('|'),
427
+ :unmarshaller => VORuby::STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
428
+ :optional => true, :default_value => []
429
+ full_array_node :size, STC::group_member_names(CSize, SubstitutionGroups).join('|'),
430
+ :unmarshaller => VORuby::STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
431
+ :optional => true, :default_value => []
432
+ full_array_node :pix_size, STC::group_member_names(CPixSize, SubstitutionGroups).join('|'),
433
+ :unmarshaller => VORuby::STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
434
+ :optional => true, :default_value => []
435
+ end
436
+
437
+ # Consists of a Size (2 doubles) and optional position angle element.
438
+ class Size2Type
439
+ include XML::Mapping
440
+
441
+ object_node :size, 'Size', :class => Double2Type, :optional => false
442
+ object_node :pos_angle, 'PosAngle', :class => PosAngleType, :optional => true
443
+ end
444
+
445
+ # Substitution group for a 2-D coordinate value.
446
+ class CValue2; end
447
+
448
+ class Value2
449
+ include XML::Mapping
450
+
451
+ object_node :value, '', :class => Double2Type, :optional => false
452
+ end
453
+ class Value2Ref
454
+ include XML::Mapping
455
+
456
+ text_node :value, '', :optional => false
457
+ end
458
+
459
+ # Substitution group for a 2-D coordinate error.
460
+ class CError2; end
461
+
462
+ class Error2
463
+ include XML::Mapping
464
+
465
+ object_node :value, '', :class => Double2Type, :optional => false
466
+ end
467
+ class Error2Ref
468
+ include XML::Mapping
469
+
470
+ text_node :value, '', :optional => false
471
+ end
472
+
473
+ class Error2PA
474
+ include XML::Mapping
475
+
476
+ object_node :value, '', :class => Size2Type, :optional => false
477
+ end
478
+
479
+ class Error2Matrix
480
+ include XML::Mapping
481
+
482
+ object_node :value, '', :class => Double4Type, :optional => false
483
+ end
484
+
485
+ # Substitution group for a 2-D coordinate resolution.
486
+ class CResolution; end
487
+
488
+ class Resolution2
489
+ include XML::Mapping
490
+
491
+ object_node :value, '', :class => Double2Type, :optional => false
492
+ end
493
+ class Resolution2Ref
494
+ include XML::Mapping
495
+
496
+ text_node :value, '', :optional => false
497
+ end
498
+
499
+ class Resolution2PA
500
+ include XML::Mapping
501
+
502
+ object_node :value, '', :class => Size2Type, :optional => false
503
+ end
504
+
505
+ class Resolution2Matrix
506
+ include XML::Mapping
507
+
508
+ object_node :value, '', :class => Double4Type, :optional => false
509
+ end
510
+
511
+ # Substitution group for a 2-D coordinate size.
512
+ class CSize2; end
513
+ class Size2
514
+ include XML::Mapping
515
+
516
+ object_node :value, '', :class => Double2Type, :optional => false
517
+ end
518
+
519
+ class Size2PA
520
+ include XML::Mapping
521
+
522
+ object_node :value, '', :class => Size2Type, :optional => false
523
+ end
524
+
525
+ class Size2Matrix
526
+ include XML::Mapping
527
+
528
+ object_node :value, '', :class => Double4Type, :optional => false
529
+ end
530
+
531
+ class Size2Ref
532
+ include XML::Mapping
533
+
534
+ text_node :value, '', :optional => false
535
+ end
536
+
537
+ # Substitution group for a 2-D coordinate pixel size.
538
+ class CPixSize2; end
539
+ class PixSize2
540
+ include XML::Mapping
541
+
542
+ object_node :value, '', :class => Double2Type, :optional => false
543
+ end
544
+
545
+ class PixSize2PA
546
+ include XML::Mapping
547
+
548
+ object_node :value, '', :class => Size2Type, :optional => false
549
+ end
550
+
551
+ class PixSize2Matrix
552
+ include XML::Mapping
553
+
554
+ object_node :value, '', :class => Double4Type, :optional => false
555
+ end
556
+
557
+ class PixSizeRef
558
+ include XML::Mapping
559
+
560
+ text_node :value, '', :optional => false
561
+ end
562
+
563
+ # Generic 2-D coordinate type.
564
+ # Single CError2, CResolution2, CSize2, CPixSize2 elements indicate definite values; pairs indicate ranges.
565
+ class Vector2CoordinateType
566
+ full_object_node :value, STC::group_member_names(CValue2, SubstitutionGroups).join('|'),
567
+ :unmarshaller => VORuby::STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
568
+ :optional => true
569
+
570
+ full_array_node :error, STC::group_member_names(CError2, SubstitutionGroups).join('|'),
571
+ :unmarshaller => VORuby::STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
572
+ :optional => true
573
+ full_array_node :resolution, STC::group_member_names(CResolution2, SubstitutionGroups).join('|'),
574
+ :unmarshaller => VORuby::STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
575
+ :optional => true
576
+ full_array_node :size, STC::group_member_names(CSize2, SubstitutionGroups).join('|'),
577
+ :unmarshaller => VORuby::STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
578
+ :optional => true
579
+ full_array_node :pix_size, STC::group_member_names(CPixSize2, SubstitutionGroups).join('|'),
580
+ :unmarshaller => VORuby::STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
581
+ :optional => true
582
+ end
583
+
584
+ # Consists of a Size (3 doubles) and optional position angle element.
585
+ class Size3Type
586
+ include XML::Mapping
587
+
588
+ object_node :size, 'Size', :class => Double3Type, :optional => false
589
+ object_node :pos_angle1, 'PosAngle1', :class => PosAngleType, :optional => true
590
+ object_node :pos_angle2, 'PosAngle2', :class => PosAngleType, :optional => true
591
+ end
592
+
593
+ # Substitution group for a 3-D coordinate value.
594
+ class CValue3; end
595
+ class Value3
596
+ include XML::Mapping
597
+
598
+ object_node :value, '', :class => Double3Type, :optional => false
599
+ end
600
+
601
+ class Value3Ref
602
+ include XML::Mapping
603
+
604
+ text_node :value, '', :optional => false
605
+ end
606
+
607
+ # Substitution group for a 3-D coordinate error.
608
+ class CError3; end
609
+ class Error3
610
+ include XML::Mapping
611
+
612
+ object_node :value, '', :class => Double3Type, :optional => false
613
+ end
614
+
615
+ class Error3PA
616
+ include XML::Mapping
617
+
618
+ object_node :value, '', :class => Size3Type, :optional => false
619
+ end
620
+
621
+ class Error3Matrix
622
+ include XML::Mapping
623
+
624
+ object_node :value, '', :class => Double9Type, :optional => false
625
+ end
626
+
627
+ class Error3Ref
628
+ include XML::Mapping
629
+
630
+ text_node :value, '', :optional => false
631
+ end
632
+
633
+ # Substitution group for a 3-D coordinate resolution.
634
+ class CResolution3; end
635
+ class Resolution3
636
+ include XML::Mapping
637
+
638
+ object_node :value, '', :class => Double3Type, :optional => false
639
+ end
640
+
641
+ class Resolution3PA
642
+ include XML::Mapping
643
+
644
+ object_node :value, '', :class => Size3Type, :optional => false
645
+ end
646
+
647
+ class Resolution3Matrix
648
+ include XML::Mapping
649
+
650
+ object_node :value, '', :class => Double9Type, :optional => false
651
+ end
652
+
653
+ class Resolution3Ref
654
+ include XML::Mapping
655
+
656
+ text_node :value, '', :optional => false
657
+ end
658
+
659
+ # Substitution group for a 3-D coordinate size.
660
+ class CSize3; end
661
+ class Size3
662
+ include XML::Mapping
663
+
664
+ object_node :value, '', :class => Double3Type, :optional => false
665
+ end
666
+
667
+ class Size3PA
668
+ include XML::Mapping
669
+
670
+ object_node :value, '', :class => Size3Type, :optional => false
671
+ end
672
+
673
+ class Size3Matrix
674
+ include XML::Mapping
675
+
676
+ object_node :value, '', :class => Double9Type, :optional => false
677
+ end
678
+
679
+ class Size3Ref
680
+ include XML::Mapping
681
+
682
+ text_node :value, '', :optional => false
683
+ end
684
+
685
+ # Substitution group for a 3-D coordinate pixel size.
686
+ class CPixSize3; end
687
+ class PixSize3
688
+ include XML::Mapping
689
+
690
+ object_node :value, '', :class => Double3Type, :optional => false
691
+ end
692
+
693
+ class PixSize3PA
694
+ include XML::Mapping
695
+
696
+ object_node :value, '', :class => Size3Type, :optional => false
697
+ end
698
+
699
+ class PixSize3Matrix
700
+ include XML::Mapping
701
+
702
+ object_node :value, '', :class => Double9Type, :optional => false
703
+ end
704
+
705
+ class PixSize3Ref
706
+ include XML::Mapping
707
+
708
+ text_node :value, '', :optional => false
709
+ end
710
+
711
+ # Generic 3-D coordinate type.
712
+ # Single CError3, CResolution3, CSize3, CPixSize3 elements indicate definite values; pairs indicate ranges.
713
+ class Vector3CoordinateType
714
+ full_object_node :value, STC::group_member_names(CValue3, SubstitutionGroups).join('|'),
715
+ :unmarshaller => VORuby::STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
716
+ :optional => true
717
+
718
+ full_array_node :error, STC::group_member_names(CError3, SubstitutionGroups).join('|'),
719
+ :unmarshaller => VORuby::STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
720
+ :optional => true
721
+ full_array_node :resolution, STC::group_member_names(CResolution3, SubstitutionGroups).join('|'),
722
+ :unmarshaller => VORuby::STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
723
+ :optional => true
724
+ full_array_node :size, STC::group_member_names(CSize3, SubstitutionGroups).join('|'),
725
+ :unmarshaller => VORuby::STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
726
+ :optional => true
727
+ full_array_node :pix_size, STC::group_member_names(CPixSize3, SubstitutionGroups).join('|'),
728
+ :unmarshaller => VORuby::STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
729
+ :optional => true
730
+ end
731
+
732
+ # Coordinate substitution group.
733
+ class Coordinate
734
+ include XML::Mapping
735
+
736
+ object_node :value, '', :class => CoordinateType, :optional => false
737
+ end
738
+
739
+ # Generic scalar coordinate element.
740
+ class ScalarCoordinate
741
+ text_node :unit, '@unit', :optional => true
742
+ end
743
+
744
+ # Generic string coordinate element.
745
+ class StringCoordinate
746
+ text_node :value, 'Value', :optional => false
747
+ text_node :unit, '@unit', :optional => true
748
+ end
749
+
750
+ # Generic coordinate element for pixels.
751
+ class PixelCoordinate
752
+ numeric_node :value, 'Value', :optional => false
753
+ end
754
+
755
+ # Position coordinate substitution group.
756
+ class Position; end
757
+
758
+ # 1-D Position coordinate.
759
+ class Position1D
760
+ object_node :unit, '@unit', :class => PosUnitType, :optional => false
761
+ end
762
+
763
+ # 2-D Position coordinate.
764
+ class Position2D
765
+ object_node :unit, '@unit', :class => PosUnitType, :optional => false
766
+ end
767
+
768
+ # 3-D Position coordinate.
769
+ class Position3D
770
+ object_node :unit, '@unit', :class => PosUnitType, :optional => false
771
+ end
772
+
773
+ # Velocity coordinate substitution group.
774
+ class Velocity; end
775
+
776
+ # 1-D Velocity coordinate.
777
+ class Velocity1D
778
+ object_node :unit, '@unit', :class => PosUnitType, :optional => false
779
+ object_node :vel_time_unit, '@vel_time_unit', :class => VelTimeUnitType, :optional => false
780
+ end
781
+
782
+ # 2-D Velocity coordinate.
783
+ class Velocity2D
784
+ object_node :unit, '@unit', :class => PosUnitType, :optional => false
785
+ object_node :vel_time_unit, '@vel_time_unit', :class => VelTimeUnitType, :optional => false
786
+ end
787
+
788
+ # 3-D Velocity coordinate.
789
+ class Velocity3D
790
+ object_node :unit, '@unit', :class => PosUnitType, :optional => false
791
+ object_node :vel_time_unit, '@vel_time_unit', :class => VelTimeUnitType, :optional => false
792
+ end
793
+
794
+ # Specifies a FITS file and optionally a specific HDU by HDU number or HDU name.
795
+ class FitsType
796
+ include XML::Mapping
797
+
798
+ numeric_node :hdu_num, '@hdu_num', :optional => true
799
+ text_node :hdu_name, '@hdu_name', :optional => true
800
+ end
801
+
802
+ # Refers coordinate components to specific columns in the FITS file HDU.
803
+ class CoordFITSColumnsType
804
+ include XML::Mapping
805
+
806
+ text_node :name, 'Name', :optional => false
807
+ # the column name for the coordinate value; comma-separated if multi-dimensional
808
+ text_node :value, 'Value', :optional => true
809
+ # the column name for the coordinate error; comma-separated if multi-dimensional
810
+ text_node :error, 'Error', :optional => true
811
+ # the column name for the coordinate resolution; comma-separated if multi-dimensional
812
+ text_node :resolution, 'Resolution', :optional => true
813
+ # the column name for the coordinate size; comma-separated if multi-dimensional
814
+ text_node :size, 'Size', :optional => true
815
+ # the column name for the coordinate pixel size; comma-separated if multi-dimensional
816
+ text_node :pix_size, 'PixSize', :optional => true
817
+ end
818
+
819
+ # Coordinate references to a specific FITS file.
820
+ class AstroCoordsFileType
821
+ include XML::Mapping
822
+
823
+ object_node :file, 'FITSFile', :class => FitsType, :optional => false
824
+ object_node :time, 'FITSTime', :class => CoordFITSColumnsType, :optional => true
825
+ object_node :position, 'FITSPosition', :class => CoordFITSColumnsType, :optional => true
826
+ object_node :velocity, 'FITSVelocity', :class => CoordFITSColumnsType, :optional => true
827
+ object_node :spectral, 'FITSSpectral', :class => CoordFITSColumnsType, :optional => true
828
+ object_node :redshift, 'FITSRedshift', :class => CoordFITSColumnsType, :optional => true
829
+ end
830
+
831
+ # The generic coordsType.
832
+ class CoordsType
833
+ include XML::Mapping
834
+
835
+ text_node :coord_system_id, '@coord_system_id', :optional => false
836
+
837
+ full_array_node :coordinates, STC::group_member_names(Coordinate, SubstitutionGroups).join('|'),
838
+ :unmarshaller => VORuby::STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
839
+ :optional => true
840
+ end
841
+
842
+ # The astronomical (STC) coordsType.
843
+ class AstroCoordsType
844
+ object_node :time, 'Time', :class => TimeCoordinateType, :optional => true
845
+ object_node :spectral, 'Spectral', :class => Spectral, :optional => true
846
+ object_node :redshift, 'Redshift', :class => Redshift, :optional => true
847
+ # some or all coordinate values may be given in file
848
+ object_node :coord_file, 'CoordFile', :class => AstroCoordsFileType, :optional => true
849
+
850
+ full_object_node :position, STC::group_member_names(Position, SubstitutionGroups).join('|'),
851
+ :unmarshaller => VORuby::STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
852
+ :optional => true
853
+ full_object_node :velocity, STC::group_member_names(Velocity, SubstitutionGroups).join('|'),
854
+ :unmarshaller => VORuby::STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
855
+ :optional => true
856
+ end
857
+
858
+ class Spectral
859
+ object_node :unit, '@unit', :class => SpectralUnitType, :optional => true
860
+ end
861
+
862
+ class Redshift
863
+ object_node :unit, '@unit', :class => PosUnitType, :optional => true
864
+ object_node :vel_time_unit, '@vel_time_unit', :class => VelTimeUnitType, :optional => true
865
+ end
866
+
867
+ # The pixel coordinates type.
868
+ class PixelCoordsType
869
+ text_node :coord_system_id, '@coord_system_id', :optional => false
870
+
871
+ array_node :pixel_coordinates, 'PixelCoordinate', :class => PixelCoordinate, :optional => false
872
+ end
873
+
874
+ # Head element of Coords group (not abstract).
875
+ class Coords
876
+ include XML::Mapping
877
+
878
+ object_node :value, '', :class => CoordsType, :optional => false
879
+ end
880
+
881
+ # The coordinate element consists either of a coordinate file or
882
+ # a sequence of time element, spatial coordinate element, velocity
883
+ # element, and redshift element; the spatial and velocity elements
884
+ # may be scalar or vector; it needs to refer to a coordinate system.
885
+ class AstroCoords
886
+ include XML::Mapping
887
+
888
+ object_node :value, '', :class => AstroCoordsType, :optional => false
889
+ end
890
+
891
+ # Contains pixel coordinates.
892
+ class PixelCoords
893
+ include XML::Mapping
894
+
895
+ object_node :value, '', :class => PixelCoordsType, :optional => false
896
+ end
897
+
898
+ end
899
+ end
900
+ end