voruby 1.1.1 → 2.0.0
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.
- data/Rakefile.rb +107 -224
- data/lib/misc.rb +1 -0
- data/lib/misc/misc.rb +60 -0
- data/lib/misc/propertyfile.rb +31 -0
- data/lib/symphony.rb +1 -0
- data/lib/symphony/symphony.rb +247 -0
- data/lib/voruby.rb +186 -0
- data/lib/voruby/active_votable/active_votable.rb +468 -347
- data/lib/voruby/adql/1.0/adql.rb +2418 -0
- data/lib/voruby/adql/support.rb +2 -0
- data/lib/voruby/misc.rb +351 -0
- data/lib/voruby/misc/connection_monitor.rb +97 -0
- data/lib/voruby/misc/libxml_ext.rb +121 -0
- data/lib/voruby/misc/rexml_ext.rb +223 -0
- data/lib/voruby/resolver/resolver.rb +12 -0
- data/lib/voruby/resolver/sesame.rb +299 -0
- data/lib/voruby/sky_query/sky_query.rb +192 -0
- data/lib/voruby/stc/1.10/coords.rb +2272 -0
- data/lib/voruby/stc/1.10/region.rb +892 -0
- data/lib/voruby/stc/1.10/stc.rb +3271 -0
- data/lib/voruby/stc/1.30/stc.rb +8666 -0
- data/lib/voruby/stc/support.rb +2 -0
- data/lib/voruby/ucd/ucd.rb +173 -0
- data/lib/voruby/voevent/1.1/voevent.rb +1124 -0
- data/lib/voruby/voevent/support.rb +5 -0
- data/lib/voruby/votable/1.0/votable.rb +1807 -0
- data/lib/voruby/votable/1.1/votable.rb +2100 -0
- data/lib/voruby/votable/votable.rb +305 -0
- data/lib/voruby/wesix/wesix.rb +491 -0
- data/lib/voruby/xlink/1.2/xlink.rb +21 -0
- data/test/voruby/active_votable/complex.vot +60 -0
- data/test/voruby/active_votable/error.vot +6 -0
- data/test/voruby/active_votable/large.vot +130040 -0
- data/test/voruby/active_votable/simple1.vot +38 -0
- data/test/voruby/active_votable/simple2.vot +38 -0
- data/test/voruby/active_votable/test.rb +193 -0
- data/test/voruby/adql/1.0/adql-alias.sql +1 -0
- data/test/voruby/adql/1.0/adql-alias.xml +26 -0
- data/test/voruby/adql/1.0/adql-avg.sql +1 -0
- data/test/voruby/adql/1.0/adql-avg.xml +31 -0
- data/test/voruby/adql/1.0/adql-circle.sql +1 -0
- data/test/voruby/adql/1.0/adql-circle.xml +46 -0
- data/test/voruby/adql/1.0/adql-expr.sql +1 -0
- data/test/voruby/adql/1.0/adql-expr.xml +34 -0
- data/test/voruby/adql/1.0/adql-function.sql +1 -0
- data/test/voruby/adql/1.0/adql-function.xml +41 -0
- data/test/voruby/adql/1.0/adql-group.sql +1 -0
- data/test/voruby/adql/1.0/adql-group.xml +51 -0
- data/test/voruby/adql/1.0/adql-having.sql +1 -0
- data/test/voruby/adql/1.0/adql-having.xml +25 -0
- data/test/voruby/adql/1.0/adql-like.sql +1 -0
- data/test/voruby/adql/1.0/adql-like.xml +17 -0
- data/test/voruby/adql/1.0/adql-order.sql +1 -0
- data/test/voruby/adql/1.0/adql-order.xml +37 -0
- data/test/voruby/adql/1.0/adql-simple.sql +1 -0
- data/test/voruby/adql/1.0/adql-simple.xml +12 -0
- data/test/voruby/adql/1.0/adql-top.sql +1 -0
- data/test/voruby/adql/1.0/adql-top.xml +33 -0
- data/test/voruby/adql/1.0/test.rb +2220 -0
- data/test/voruby/misc/test.rb +32 -0
- data/test/voruby/resolver/sesame/test.rb +56 -0
- data/test/voruby/sky_query/test.rb +107 -0
- data/test/voruby/stc/1.10/coords_test.rb +3704 -0
- data/test/voruby/stc/1.10/region_test.rb +993 -0
- data/test/voruby/stc/1.10/stc-catalog-entry-location.xml +112 -0
- data/test/voruby/stc/1.10/stc-obs-data-location.xml +126 -0
- data/test/voruby/stc/1.10/stc-region-circle.xml +5 -0
- data/test/voruby/stc/1.10/stc-region-convex.xml +11 -0
- data/test/voruby/stc/1.10/stc-region-convexhull.xml +5 -0
- data/test/voruby/stc/1.10/stc-region-ellipse.xml +7 -0
- data/test/voruby/stc/1.10/stc-region-intersection.xml +25 -0
- data/test/voruby/stc/1.10/stc-region-negation.xml +7 -0
- data/test/voruby/stc/1.10/stc-region-polygon.xml +13 -0
- data/test/voruby/stc/1.10/stc-region-sector.xml +6 -0
- data/test/voruby/stc/1.10/stc-region-union.xml +25 -0
- data/test/voruby/stc/1.10/stc-resource-profile.xml +60 -0
- data/test/voruby/stc/1.10/stc-search-location.xml +54 -0
- data/test/voruby/stc/1.10/stc_test.rb +4626 -0
- data/test/voruby/stc/1.30/stc-catalog-entry-location.xml +210 -0
- data/test/voruby/stc/1.30/stc-obs-data-location-arecibo.xml +353 -0
- data/test/voruby/stc/1.30/stc-obs-data-location-fits.xml +250 -0
- data/test/voruby/stc/1.30/stc-obs-data-location-xlink.xml +63 -0
- data/test/voruby/stc/1.30/stc-obs-data-location.xml +216 -0
- data/test/voruby/stc/1.30/stc-resource-profile-unusual-ref-pos.xml +39 -0
- data/test/voruby/stc/1.30/stc-resource-profile.xml +129 -0
- data/test/voruby/stc/1.30/stc-search-location-arecibo.xml +86 -0
- data/test/voruby/stc/1.30/stc-search-location.xml +101 -0
- data/test/voruby/stc/1.30/test.rb +6274 -0
- data/test/voruby/ucd/test.rb +48 -0
- data/test/voruby/voevent/1.1/test.rb +812 -0
- data/test/{voevent/voevent_v1_1.xml → voruby/voevent/1.1/voevent.xml} +2 -2
- data/test/voruby/voregistry/0.3/test.rb +137 -0
- data/test/voruby/votable/1.0/test.rb +714 -0
- data/test/voruby/votable/1.0/votable.basic.xml +660 -0
- data/test/voruby/votable/1.0/votable.html +86 -0
- data/test/voruby/votable/1.0/votable.ns.xml +56 -0
- data/test/voruby/votable/1.1/test.rb +785 -0
- data/test/voruby/votable/1.1/votable.basic.xml +38 -0
- data/test/voruby/votable/1.1/votable.html +86 -0
- data/test/voruby/votable/1.1/votable.ns.xml +56 -0
- data/test/voruby/votable/test.rb +15 -0
- data/test/voruby/wesix/test.rb +268 -0
- data/test/voruby/wesix/testr.fits +28 -0
- metadata +234 -247
- data/REQUIREMENTS +0 -6
- data/lib/voruby/active_votable/loader.rb +0 -5
- data/lib/voruby/adql/adql.rb +0 -2787
- data/lib/voruby/adql/ext.rb +0 -14
- data/lib/voruby/adql/loader.rb +0 -6
- data/lib/voruby/adql/operations.rb +0 -54
- data/lib/voruby/adql/parser.rb +0 -160
- data/lib/voruby/adql/transforms.rb +0 -573
- data/lib/voruby/ext.rb +0 -17
- data/lib/voruby/loader.rb +0 -4
- data/lib/voruby/misc/propertyfile.rb +0 -36
- data/lib/voruby/plastic/applications.rb +0 -174
- data/lib/voruby/plastic/constants.rb +0 -30
- data/lib/voruby/plastic/loader.rb +0 -10
- data/lib/voruby/plastic/plastic.rb +0 -1
- data/lib/voruby/resources/conesearch/conesearch.rb +0 -9
- data/lib/voruby/resources/conesearch/conesearch_v0_2.rb +0 -55
- data/lib/voruby/resources/conesearch/conesearch_v0_3.rb +0 -50
- data/lib/voruby/resources/conesearch/conesearch_v1_0.rb +0 -72
- data/lib/voruby/resources/conesearch/loader.rb +0 -4
- data/lib/voruby/resources/loader.rb +0 -50
- data/lib/voruby/resources/nodes.rb +0 -190
- data/lib/voruby/resources/openskynode/loader.rb +0 -4
- data/lib/voruby/resources/openskynode/openskynode.rb +0 -9
- data/lib/voruby/resources/openskynode/openskynode_v0_1.rb +0 -54
- data/lib/voruby/resources/sia/loader.rb +0 -5
- data/lib/voruby/resources/sia/sia.rb +0 -9
- data/lib/voruby/resources/sia/sia_v0_6.rb +0 -90
- data/lib/voruby/resources/sia/sia_v0_7.rb +0 -89
- data/lib/voruby/resources/sia/sia_v1_0.rb +0 -122
- data/lib/voruby/resources/stsci.rb +0 -59
- data/lib/voruby/resources/vodataservice/coverage_v0_2.rb +0 -195
- data/lib/voruby/resources/vodataservice/coverage_v0_3.rb +0 -158
- data/lib/voruby/resources/vodataservice/loader.rb +0 -5
- data/lib/voruby/resources/vodataservice/vodataservice.rb +0 -9
- data/lib/voruby/resources/vodataservice/vodataservice_v0_4.rb +0 -189
- data/lib/voruby/resources/vodataservice/vodataservice_v0_5.rb +0 -163
- data/lib/voruby/resources/vodataservice/vodataservice_v1_0.rb +0 -221
- data/lib/voruby/resources/voregistry/loader.rb +0 -4
- data/lib/voruby/resources/voregistry/voregistry.rb +0 -9
- data/lib/voruby/resources/voregistry/voregistry_v0_2.rb +0 -40
- data/lib/voruby/resources/voregistry/voregistry_v0_3.rb +0 -30
- data/lib/voruby/resources/voregistry/voregistry_v1_0.rb +0 -86
- data/lib/voruby/resources/voresource/loader.rb +0 -17
- data/lib/voruby/resources/voresource/voresource.rb +0 -9
- data/lib/voruby/resources/voresource/voresource_v0_10.rb +0 -327
- data/lib/voruby/resources/voresource/voresource_v0_9.rb +0 -405
- data/lib/voruby/resources/voresource/voresource_v1_0.rb +0 -230
- data/lib/voruby/services/ext.rb +0 -11
- data/lib/voruby/services/gestalt/footprint.rb +0 -95
- data/lib/voruby/services/gestalt/wcs_fixer.rb +0 -105
- data/lib/voruby/services/gestalt/wesix.rb +0 -155
- data/lib/voruby/services/loader.rb +0 -7
- data/lib/voruby/services/registry/registry.rb +0 -53
- data/lib/voruby/services/resolver/resolver.rb +0 -35
- data/lib/voruby/services/schema/schema.rb +0 -644
- data/lib/voruby/sesame/loader.rb +0 -6
- data/lib/voruby/sesame/sesame_v1_0.rb +0 -64
- data/lib/voruby/simple/loader.rb +0 -6
- data/lib/voruby/simple/parameters.rb +0 -196
- data/lib/voruby/simple/sap.rb +0 -446
- data/lib/voruby/spacetime/loader.rb +0 -3
- data/lib/voruby/spacetime/spacetime.rb +0 -607
- data/lib/voruby/stc/coords_v1_20.rb +0 -900
- data/lib/voruby/stc/loader.rb +0 -55
- data/lib/voruby/stc/region_v1_20.rb +0 -274
- data/lib/voruby/stc/stc_v1_20.rb +0 -1196
- data/lib/voruby/util.rb +0 -27
- data/lib/voruby/voevent/loader.rb +0 -7
- data/lib/voruby/voevent/voevent_v1_0.rb +0 -213
- data/lib/voruby/voevent/voevent_v1_1.rb +0 -196
- data/lib/voruby/votables/chandra.rb +0 -373
- data/lib/voruby/votables/data.rb +0 -179
- data/lib/voruby/votables/galex.rb +0 -377
- data/lib/voruby/votables/int.rb +0 -354
- data/lib/voruby/votables/libxml_parser.rb +0 -411
- data/lib/voruby/votables/libxml_votable.rb +0 -67
- data/lib/voruby/votables/loader.rb +0 -10
- data/lib/voruby/votables/meta.rb +0 -763
- data/lib/voruby/votables/misc.rb +0 -51
- data/lib/voruby/votables/nsa.rb +0 -410
- data/lib/voruby/votables/rexml_parser.rb +0 -408
- data/lib/voruby/votables/rexml_votable.rb +0 -67
- data/lib/voruby/votables/sdss.rb +0 -356
- data/lib/voruby/votables/transforms.rb +0 -388
- data/lib/voruby/votables/tree.rb +0 -45
- data/lib/voruby/votables/types.rb +0 -391
- data/lib/voruby/votables/votable.rb +0 -687
- data/test/active_votable/database.yml +0 -6
- data/test/active_votable/test.vot +0 -168492
- data/test/active_votable/unittest.rb +0 -41
- data/test/adql/test1.adql +0 -49
- data/test/adql/test2.adql +0 -51
- data/test/adql/test3.adql +0 -81
- data/test/adql/test4.adql +0 -53
- data/test/adql/test5.adql +0 -55
- data/test/adql/test6.adql +0 -18
- data/test/adql/test7.adql +0 -48
- data/test/adql/unittest.rb +0 -1672
- data/test/plastic/test.rb +0 -44
- data/test/plastic/test.vot +0 -5385
- data/test/plastic/unittest.rb +0 -66
- data/test/resources/conesearch/conesearch_v0_3.xml +0 -31
- data/test/resources/conesearch/conesearch_v1_0.xml +0 -86
- data/test/resources/conesearch/unittest_v0_3.rb +0 -22
- data/test/resources/conesearch/unittest_v1_0.rb +0 -24
- data/test/resources/openskynode/open_sky_node_v0_1.xml +0 -32
- data/test/resources/openskynode/unittest_v0_1.rb +0 -31
- data/test/resources/sia/simple_image_access_v0_7.xml +0 -36
- data/test/resources/sia/simple_image_access_v1_0.xml +0 -122
- data/test/resources/sia/unittest_v0_7.rb +0 -24
- data/test/resources/sia/unittest_v1_0.rb +0 -29
- data/test/resources/stsci.xml +0 -336
- data/test/resources/unittest_stsci.rb +0 -25
- data/test/resources/vodataservice/catalog_service_resource_v1_0.xml +0 -128
- data/test/resources/vodataservice/data_collection_resource_v0_5.xml +0 -54
- data/test/resources/vodataservice/data_collection_resource_v1_0.xml +0 -117
- data/test/resources/vodataservice/data_service_resource_v1_0.xml +0 -115
- data/test/resources/vodataservice/sky_service_resource_v0_10.xml +0 -45
- data/test/resources/vodataservice/table_service_resource_v1_0.xml +0 -122
- data/test/resources/vodataservice/tabular_sky_service_resource_v0_10.xml +0 -60
- data/test/resources/vodataservice/unittest_v0_5.rb +0 -126
- data/test/resources/vodataservice/unittest_v1_0.rb +0 -151
- data/test/resources/voregistry/authority_resource_v0_3.xml +0 -20
- data/test/resources/voregistry/authority_resource_v1_0.xml +0 -82
- data/test/resources/voregistry/registry_service_v0_3.xml +0 -20
- data/test/resources/voregistry/registry_service_v1_0.xml +0 -107
- data/test/resources/voregistry/unittest_v0_3.rb +0 -31
- data/test/resources/voregistry/unittest_v1_0.rb +0 -34
- data/test/resources/voresource/organisation_resource_v1_0.xml +0 -90
- data/test/resources/voresource/resource_organisation_v0_10.xml +0 -22
- data/test/resources/voresource/resource_service_v0_10.xml +0 -19
- data/test/resources/voresource/resource_v0_10.xml +0 -19
- data/test/resources/voresource/resource_v1_0.xml +0 -79
- data/test/resources/voresource/service_resource_v1_0.xml +0 -91
- data/test/resources/voresource/unittest_v0_10.rb +0 -61
- data/test/resources/voresource/unittest_v0_9.rb +0 -4
- data/test/resources/voresource/unittest_v1_0.rb +0 -190
- data/test/services/gestalt/unittest.rb +0 -74
- data/test/services/registry/unittest.rb +0 -34
- data/test/services/resolver/unittest.rb +0 -38
- data/test/simple/unittest.rb +0 -46
- data/test/spacetime/unittest.rb +0 -39
- data/test/stc/catalog_entry_location_v1_20.xml +0 -112
- data/test/stc/obs_data_location_v1_20.xml +0 -108
- data/test/stc/search_location_v1_20.xml +0 -54
- data/test/stc/stc_resource_profile_v1_20.xml +0 -60
- data/test/stc/unittest_v1_20.rb +0 -620
- data/test/voevent/unittest_v1_0.rb +0 -79
- data/test/voevent/unittest_v1_1.rb +0 -70
- data/test/voevent/voevent_v1_0.xml +0 -96
- data/test/votables/test.vot +0 -366
- data/test/votables/unittest.rb +0 -54
data/lib/voruby/stc/loader.rb
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'xml/mapping'
|
3
|
-
|
4
|
-
require 'voruby/loader'
|
5
|
-
|
6
|
-
require 'voruby/resources/nodes'
|
7
|
-
require 'voruby/resources/voresource/voresource_v0_10'
|
8
|
-
|
9
|
-
module VORuby
|
10
|
-
module STC
|
11
|
-
def self.dispatch_from_element_name(ns, override=nil)
|
12
|
-
Proc.new{ |xml|
|
13
|
-
name = (override)? override.call(xml.name): xml.name
|
14
|
-
eval("#{ns}::#{name}.load_from_xml(xml)")
|
15
|
-
}
|
16
|
-
end
|
17
|
-
|
18
|
-
def self.expand_group(sub_groups, group, expanded=[])
|
19
|
-
group_name = (group.is_a?(String))? group: group.to_s.split('::')[-1]
|
20
|
-
return if !sub_groups.has_key?(group_name)
|
21
|
-
|
22
|
-
sub_groups[group_name].each do |klass|
|
23
|
-
expanded.push(klass)
|
24
|
-
|
25
|
-
klass_name = klass.name.split('::')[-1]
|
26
|
-
if sub_groups.has_key?(klass_name)
|
27
|
-
sub_groups[klass_name].each do |sub_klass|
|
28
|
-
expanded.push(sub_klass)
|
29
|
-
|
30
|
-
sub_klass_name = sub_klass.name.split('::')[-1]
|
31
|
-
expand_group(sub_groups, sub_klass, expanded)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
return expanded
|
37
|
-
end
|
38
|
-
|
39
|
-
def self.group_members(sub_groups, group)
|
40
|
-
group_name = (group.is_a?(String))? group: group.to_s.split('::')[-1]
|
41
|
-
raise "Substition group #{group_name} does not exist" if !sub_groups.has_key?(group_name)
|
42
|
-
|
43
|
-
return STC::expand_group(sub_groups, group)
|
44
|
-
end
|
45
|
-
|
46
|
-
def self.group_member_names(group, sub_groups, nsprefix=nil)
|
47
|
-
return STC::group_members(sub_groups, group).collect{ |klass|
|
48
|
-
element_name = klass.name.split('::')[-1]
|
49
|
-
element_name = "#{nsprefix}:#{element_name}" if nsprefix
|
50
|
-
element_name
|
51
|
-
}
|
52
|
-
end
|
53
|
-
|
54
|
-
end
|
55
|
-
end
|
@@ -1,274 +0,0 @@
|
|
1
|
-
require 'voruby/stc/loader'
|
2
|
-
|
3
|
-
require 'voruby/stc/coords_v1_20'
|
4
|
-
include VORuby::STCcoords::V1_20
|
5
|
-
|
6
|
-
module VORuby
|
7
|
-
module STCregion
|
8
|
-
module V1_20
|
9
|
-
|
10
|
-
# Forward declarations
|
11
|
-
class RegionType; end
|
12
|
-
class Region; end
|
13
|
-
class ShapeType < RegionType; end
|
14
|
-
class CircleType < ShapeType; end
|
15
|
-
class EllipseType < CircleType; end
|
16
|
-
class SmallCircleType; end
|
17
|
-
class VertexType; end
|
18
|
-
class PolygonType < ShapeType; end
|
19
|
-
class BoxType < ShapeType; end
|
20
|
-
class SectorType < ShapeType; end
|
21
|
-
class ConstraintType; end
|
22
|
-
class ConvexType < ShapeType; end
|
23
|
-
class ConvexHullType < ShapeType; end
|
24
|
-
class SkyIndexType < ShapeType; end
|
25
|
-
class UnionType < RegionType; end
|
26
|
-
class Union; end
|
27
|
-
class IntersectionType < RegionType; end
|
28
|
-
class Intersection; end
|
29
|
-
class NegationType < RegionType; end
|
30
|
-
class Negation; end
|
31
|
-
class AllSky; end
|
32
|
-
class Circle; end
|
33
|
-
class Ellipse; end
|
34
|
-
class Polygon; end
|
35
|
-
class Box; end
|
36
|
-
class Sector; end
|
37
|
-
class Convex; end
|
38
|
-
class ConvexHull; end
|
39
|
-
class SkyIndex; end
|
40
|
-
|
41
|
-
SubstitutionGroups = {
|
42
|
-
'Region' => [Intersection, Union, Negation, AllSky, Circle, Ellipse, Polygon, Box, Sector, Convex, ConvexHull, SkyIndex]
|
43
|
-
}
|
44
|
-
|
45
|
-
# Region is the base type for everything.
|
46
|
-
class RegionType
|
47
|
-
include XML::Mapping
|
48
|
-
|
49
|
-
# the fill_factor (value between 0 and 1) indicates the fraction of the region that is actually included;
|
50
|
-
# possible application: large scale resource coverage areas
|
51
|
-
numeric_node :fill_factor, '@fill_factor', :optional => true, :default_value => 1.0
|
52
|
-
text_node :note, '@note', :optional => true
|
53
|
-
end
|
54
|
-
|
55
|
-
# Head element of the Region substitution group.
|
56
|
-
class Region
|
57
|
-
include XML::Mapping
|
58
|
-
|
59
|
-
object_node :value, '', :class => RegionType, :optional => false
|
60
|
-
end
|
61
|
-
|
62
|
-
# Shape is the abstract type that is the building block of regions; in real life it needs to be replaced by a concrete shape.
|
63
|
-
class ShapeType
|
64
|
-
object_node :unit, '@unit', :class => PosUnitType, :optional => true, :default_value => 'deg'
|
65
|
-
end
|
66
|
-
|
67
|
-
# Circle shape: center and radius.
|
68
|
-
class CircleType
|
69
|
-
# the radius of the circle
|
70
|
-
numeric_node :radius, 'Radius', :optional => false
|
71
|
-
|
72
|
-
# the coordinates of the circle's center
|
73
|
-
object_node :center, 'Center', :class => Double2Type, :optional => false
|
74
|
-
end
|
75
|
-
|
76
|
-
# Ellipse shape: adds semi-minor axis and position angle to circleType.
|
77
|
-
class EllipseType
|
78
|
-
# half the minor axis of the ellipse, in radius_unit
|
79
|
-
numeric_node :minor_radius, 'MinorRadius', :optional => false
|
80
|
-
|
81
|
-
# position angle of major axis (Radius)
|
82
|
-
object_node :pos_angle, 'PosAngle', :class => PosAngleType, :optional => false
|
83
|
-
end
|
84
|
-
|
85
|
-
# SmallCircleType indicates in polygons that side is along small circle; with optional pole.
|
86
|
-
class SmallCircleType
|
87
|
-
include XML::Mapping
|
88
|
-
|
89
|
-
object_node :pole, 'Pole', :class => Double2Type, :optional => true
|
90
|
-
end
|
91
|
-
|
92
|
-
# Vertex is a position with optional SmallCircle element;
|
93
|
-
# the SmallCircle element indicates that the polygon side
|
94
|
-
# formed by that vertex and its predecessor vertex is a small
|
95
|
-
# circle, rather than a great circle; SmallCircle has no meaning
|
96
|
-
# in Cartesian coordinates.
|
97
|
-
class VertexType
|
98
|
-
include XML::Mapping
|
99
|
-
|
100
|
-
object_node :position, 'Position', :class => Double2Type, :optional => false
|
101
|
-
object_node :small_circle, 'SmallCircle', :class => SmallCircleType, :optional => true
|
102
|
-
end
|
103
|
-
|
104
|
-
# Polygon: one or more vertices;
|
105
|
-
# counter-clockwise encircled area is enclosed;
|
106
|
-
# sides should span less than 180 deg in each coordinate if spherical
|
107
|
-
class PolygonType
|
108
|
-
array_node :vertices, 'Vertex', :class => VertexType, :optional => false
|
109
|
-
end
|
110
|
-
|
111
|
-
# Box shape: a rectangle defined by its center and size on both dimensions;
|
112
|
-
# since it is a polygon, it is redundant, but simple rectangles with great
|
113
|
-
# circle sides are awkward to define in spherical coordinates.
|
114
|
-
class BoxType
|
115
|
-
# the coordinates of the box's center
|
116
|
-
object_node :center, 'Center', :class => Double2Type, :optional => false
|
117
|
-
# the lengths of the box's sides
|
118
|
-
object_node :size, 'Size', :class => Double2Type, :optional => false
|
119
|
-
end
|
120
|
-
|
121
|
-
# A sector is the counter-clockwise area between two half-lines.
|
122
|
-
class SectorType
|
123
|
-
# the vertex position of the sector
|
124
|
-
object_node :position, 'Position', :class => Double2Type, :optional => false
|
125
|
-
# the area ccw from this position angle is included
|
126
|
-
object_node :pos_angle1, 'PosAngle1', :class => PosAngleType, :optional => false
|
127
|
-
# the area cw from this position angle is included
|
128
|
-
object_node :pos_angle2, 'PosAngle2', :class => PosAngleType, :optional => false
|
129
|
-
end
|
130
|
-
|
131
|
-
# An area on the unit sphere defined by the intersection with a plane.
|
132
|
-
class ConstraintType
|
133
|
-
include XML::Mapping
|
134
|
-
|
135
|
-
# the distance along the normal vector where the constraint plane
|
136
|
-
# intersects that vector; if positive, the spherical sector on the
|
137
|
-
# far side (seen from the center) is selected; if negative, the point
|
138
|
-
# of intersection is in the opposite direction of the vector, resulting
|
139
|
-
# in more than a hemisphere; the valid range is -1.0 to +1.0
|
140
|
-
numeric_node :offset, 'Offset', :optional => false
|
141
|
-
|
142
|
-
# this needs to be a spherical coordinate vector; it is the unit vector
|
143
|
-
# that is normal to the plane that forms a constraint for a convex
|
144
|
-
object_node :vector, 'Vector', :class => Double3Type, :optional => false
|
145
|
-
end
|
146
|
-
|
147
|
-
# A convex polygon defined by one or more Constraints.
|
148
|
-
class ConvexType
|
149
|
-
array_node :constraints, 'Constraint', :class => ConstraintType, :optional => false
|
150
|
-
end
|
151
|
-
|
152
|
-
# A convex hull.
|
153
|
-
class ConvexHullType
|
154
|
-
array_node :points, 'Point', :class => Double3Type, :optional => false
|
155
|
-
end
|
156
|
-
|
157
|
-
# This is a hook for regions defined in sky indexing schemes.
|
158
|
-
class SkyIndexType; end
|
159
|
-
|
160
|
-
# The union of two or more regions is a region.
|
161
|
-
class UnionType
|
162
|
-
full_array_node :regions, 'Region/(' + STC::group_member_names(Region, SubstitutionGroups).join('|') + ')',
|
163
|
-
:unmarshaller => STC::dispatch_from_element_name('VORuby::STCregion::V1_20', Proc.new{|name| "#{name}Type"}),
|
164
|
-
:optional => false
|
165
|
-
end
|
166
|
-
class Union
|
167
|
-
include XML::Mapping
|
168
|
-
|
169
|
-
object_node :value, '', :class => UnionType, :optional => false
|
170
|
-
end
|
171
|
-
|
172
|
-
# The intersection of two or more regions is a region.
|
173
|
-
class IntersectionType
|
174
|
-
full_array_node :regions, 'Region/(' + STC::group_member_names(Region, SubstitutionGroups).join('|') + ')',
|
175
|
-
:unmarshaller => STC::dispatch_from_element_name('VORuby::STCregion::V1_20', Proc.new{|name| "#{name}Type"}),
|
176
|
-
:optional => false
|
177
|
-
end
|
178
|
-
class Intersection
|
179
|
-
include XML::Mapping
|
180
|
-
|
181
|
-
object_node :value, '', :class => IntersectionType, :optional => false
|
182
|
-
end
|
183
|
-
|
184
|
-
# The negation of a region is a region.
|
185
|
-
class NegationType
|
186
|
-
full_object_node :region, 'Region/(' + STC::group_member_names(Region, SubstitutionGroups).join('|') + ')',
|
187
|
-
:unmarshaller => STC::dispatch_from_element_name('VORuby::STCregion::V1_20', Proc.new{|name| "#{name}Type"}),
|
188
|
-
:optional => false
|
189
|
-
end
|
190
|
-
class Negation
|
191
|
-
include XML::Mapping
|
192
|
-
|
193
|
-
object_node :value, '', :class => NegationType, :optional => false
|
194
|
-
end
|
195
|
-
|
196
|
-
# AllSky is just a convenience, meaning no bounds.
|
197
|
-
class AllSky
|
198
|
-
include XML::Mapping
|
199
|
-
|
200
|
-
object_node :value, '', :class => RegionType, :optional => false
|
201
|
-
end
|
202
|
-
|
203
|
-
# The circle is defined by a center and a radius.
|
204
|
-
class Circle
|
205
|
-
include XML::Mapping
|
206
|
-
|
207
|
-
object_node :value, '', :class => CircleType, :optional => false
|
208
|
-
end
|
209
|
-
|
210
|
-
# Ellipse is an extension of the circle shape, with a minor axis radius and position angle.
|
211
|
-
class Ellipse
|
212
|
-
include XML::Mapping
|
213
|
-
|
214
|
-
object_node :value, '', :class => EllipseType, :optional => false
|
215
|
-
end
|
216
|
-
|
217
|
-
# A polygon is a shape delineated by a list of vertices connected with lines,
|
218
|
-
# great circles, or small circles; the inside of the polygon is circumscribed
|
219
|
-
# counter-clockwise by the list of vertices; the polygon may be concave but not
|
220
|
-
# self-intersecting; the last vertex in the list is the predecessor of the first.
|
221
|
-
# For celestial coordinates it is assumed that we are looking at the sphere
|
222
|
-
# from the inside, with Right Ascension increasing to the left. Sides should span
|
223
|
-
# less than 180 deg in each coordinate.
|
224
|
-
class Polygon
|
225
|
-
include XML::Mapping
|
226
|
-
|
227
|
-
object_node :value, '', :class => PolygonType, :optional => false
|
228
|
-
end
|
229
|
-
|
230
|
-
# A box is a rectangle; the midpoints of its sides are the endpoints of a cross
|
231
|
-
# centered on the center position with arms that extend half the size for each
|
232
|
-
# coordinate in both directions, and the sides are lines or great circles that
|
233
|
-
# intersect the cross at its end points at right angles; the arms of the cross
|
234
|
-
# are parallel to the coordinate axes at the center point.
|
235
|
-
class Box
|
236
|
-
include XML::Mapping
|
237
|
-
|
238
|
-
object_node :value, '', :class => BoxType, :optional => false
|
239
|
-
end
|
240
|
-
|
241
|
-
# A sector selects the area between two half great circles or half lines meeting in a specified point.
|
242
|
-
class Sector
|
243
|
-
include XML::Mapping
|
244
|
-
|
245
|
-
object_node :value, '', :class => SectorType, :optional => false
|
246
|
-
end
|
247
|
-
|
248
|
-
# A convex is defined as the intersection of one or more half-plane constraints
|
249
|
-
# with the unit sphere; this may also be described as the union of one or more
|
250
|
-
# convex polygons bounded by one or more constraint planes.
|
251
|
-
class Convex
|
252
|
-
include XML::Mapping
|
253
|
-
|
254
|
-
object_node :value, '', :class => ConvexType, :optional => false
|
255
|
-
end
|
256
|
-
|
257
|
-
# A convex hull is the convex polygon that contains all of the specified
|
258
|
-
# positions; the points have to be constrained to lie in one hemisphere.
|
259
|
-
class ConvexHull
|
260
|
-
include XML::Mapping
|
261
|
-
|
262
|
-
object_node :value, '', :class => ConvexHullType, :optional => false
|
263
|
-
end
|
264
|
-
|
265
|
-
# A shape defined through a sky indexing scheme; this is really a substitutino group for concrete implementations.
|
266
|
-
class SkyIndex
|
267
|
-
include XML::Mapping
|
268
|
-
|
269
|
-
object_node :value, '', :class => SkyIndexType, :optional => false
|
270
|
-
end
|
271
|
-
|
272
|
-
end
|
273
|
-
end
|
274
|
-
end
|
data/lib/voruby/stc/stc_v1_20.rb
DELETED
@@ -1,1196 +0,0 @@
|
|
1
|
-
require 'voruby/stc/loader'
|
2
|
-
|
3
|
-
require 'voruby/stc/coords_v1_20'
|
4
|
-
require 'voruby/stc/region_v1_20'
|
5
|
-
|
6
|
-
include VORuby::STCcoords::V1_20
|
7
|
-
include VORuby::STCregion::V1_20
|
8
|
-
|
9
|
-
module VORuby
|
10
|
-
module STC
|
11
|
-
module V1_20
|
12
|
-
|
13
|
-
# Forward declarations
|
14
|
-
class CoordFrameType; end
|
15
|
-
class CoordFrame; end
|
16
|
-
class CoordEquinoxType; end
|
17
|
-
class SpaceRefFrameType; end
|
18
|
-
class ICRSType < SpaceRefFrameType; end
|
19
|
-
class FKType < SpaceRefFrameType; end
|
20
|
-
class CustomSpaceRefFrameType < SpaceRefFrameType; end
|
21
|
-
class SpaceRefFrame; end
|
22
|
-
class ICRS; end
|
23
|
-
class FK4; end
|
24
|
-
class FK5; end
|
25
|
-
class ECLIPTIC; end
|
26
|
-
class GALACTIC_I; end
|
27
|
-
class GALACTIC_II; end
|
28
|
-
class SUPER_GALACTIC; end
|
29
|
-
class AZ_EL; end
|
30
|
-
class BODY; end
|
31
|
-
class GEO_C; end
|
32
|
-
class GEO_D < ICRSType; end
|
33
|
-
class MAG; end
|
34
|
-
class GSE; end
|
35
|
-
class GSM; end
|
36
|
-
class SM; end
|
37
|
-
class HGC; end
|
38
|
-
class HEE; end
|
39
|
-
class HEEQ; end
|
40
|
-
class HCI; end
|
41
|
-
class HCD; end
|
42
|
-
class MERCURY_C; end
|
43
|
-
class VENUS_C; end
|
44
|
-
class LUNA_C; end
|
45
|
-
class MARS_C; end
|
46
|
-
class JUPITER_C_III; end
|
47
|
-
class SATURN_C_III; end
|
48
|
-
class URANUS_C_III; end
|
49
|
-
class NEPTUNE_C_III; end
|
50
|
-
class PLUTO_C; end
|
51
|
-
class MERCURY_G; end
|
52
|
-
class VENUS_G; end
|
53
|
-
class LUNA_G; end
|
54
|
-
class MARS_G; end
|
55
|
-
class JUPITER_G_III; end
|
56
|
-
class SATURN_G_III; end
|
57
|
-
class URANUS_G_III; end
|
58
|
-
class NEPTUNE_G_III; end
|
59
|
-
class PLUTO_G; end
|
60
|
-
class UnknownFrame; end
|
61
|
-
class CustomSpaceRefFrame; end
|
62
|
-
class PlanetaryEphemType; end
|
63
|
-
class ReferencePositionType; end
|
64
|
-
class StdRefPosType < ReferencePositionType; end
|
65
|
-
class CustomRefPosType < ReferencePositionType; end
|
66
|
-
class ReferencePosition; end
|
67
|
-
class TOPOCENTER; end
|
68
|
-
class BARYCENTER; end
|
69
|
-
class HELIOCENTER; end
|
70
|
-
class GEOCENTER; end
|
71
|
-
class LSR; end
|
72
|
-
class LSRK; end
|
73
|
-
class LSRD; end
|
74
|
-
class GALACTIC_CENTER; end
|
75
|
-
class LOCAL_GROUP_CENTER; end
|
76
|
-
class MOON; end
|
77
|
-
class EMBARYCENTER; end
|
78
|
-
class MERCURY; end
|
79
|
-
class VENUS; end
|
80
|
-
class MARS; end
|
81
|
-
class JUPITER; end
|
82
|
-
class SATURN; end
|
83
|
-
class URANUS; end
|
84
|
-
class NEPTUNE; end
|
85
|
-
class PLUTO; end
|
86
|
-
class RELOCATABLE; end
|
87
|
-
class UNKNOWNRefPos; end
|
88
|
-
class CustomRefPos; end
|
89
|
-
class CoordFlavorType; end
|
90
|
-
class CoordFlavor; end
|
91
|
-
class SPHERICAL; end
|
92
|
-
class CARTESIAN; end
|
93
|
-
class UNITSPHERE; end
|
94
|
-
class POLAR; end
|
95
|
-
class SpaceFrameType < CoordFrameType; end
|
96
|
-
class TimeFrameType < CoordFrameType; end
|
97
|
-
class SpectralFrameType < CoordFrameType; end
|
98
|
-
class DopplerDefinitionType; end
|
99
|
-
class RedshiftFrameType < CoordFrameType; end
|
100
|
-
class CoordSysType; end
|
101
|
-
class CoordSys; end
|
102
|
-
class TimeFrame; end
|
103
|
-
class SpaceFrame; end
|
104
|
-
class SpectralFrame; end
|
105
|
-
class RedshiftFrame; end
|
106
|
-
class PixelCoordFrame; end
|
107
|
-
class GenericCoordFrame; end
|
108
|
-
class AstroCoordSystemType < CoordSysType; end
|
109
|
-
class AstroCoordSystem; end
|
110
|
-
class PixelCoordSystemType < CoordSysType; end
|
111
|
-
class PixelCoordSystem; end
|
112
|
-
class CoordIntervalType; end
|
113
|
-
class CoordInterval; end
|
114
|
-
class TimeIntervalType < CoordIntervalType; end
|
115
|
-
class CoordScalarIntervalType < CoordIntervalType; end
|
116
|
-
class CoordScalarInterval; end
|
117
|
-
class Coord2VecIntervalType < CoordIntervalType; end
|
118
|
-
class Coord2VecInterval; end
|
119
|
-
class Coord3VecIntervalType < CoordIntervalType; end
|
120
|
-
class Coord3VecInterval; end
|
121
|
-
class SpatialIntervalType; end
|
122
|
-
class SphereType < SpatialIntervalType; end
|
123
|
-
class Sphere; end
|
124
|
-
class VelocitySphereType < SphereType; end
|
125
|
-
class VelocitySphere; end
|
126
|
-
class PositionIntervalType < SpatialIntervalType; end
|
127
|
-
class PositionInterval; end
|
128
|
-
class VelocityIntervalType < PositionIntervalType; end
|
129
|
-
class VelocityInterval; end
|
130
|
-
class SpectralIntervalType < CoordScalarIntervalType; end
|
131
|
-
class RegionFileType < SpatialIntervalType; end
|
132
|
-
class RegionFile; end
|
133
|
-
class RegionType < SpatialIntervalType; end
|
134
|
-
class Region; end
|
135
|
-
class SpatialInterval; end
|
136
|
-
class VelInterval; end
|
137
|
-
class RedshiftIntervalType < CoordScalarIntervalType; end
|
138
|
-
class CoordAreaType; end
|
139
|
-
class AstroCoordAreaType < CoordAreaType; end
|
140
|
-
class PixelCoordAreaType < CoordAreaType; end
|
141
|
-
class CoordArea; end
|
142
|
-
class AstroCoordArea; end
|
143
|
-
class PixelCoordArea; end
|
144
|
-
class STCMetadataType; end
|
145
|
-
class STCMetadata; end
|
146
|
-
class STCDescriptionType < STCMetadataType; end
|
147
|
-
class STCResourceProfileType < STCDescriptionType; end;
|
148
|
-
class STCResourceProfile; end
|
149
|
-
class SearchLocationType < STCDescriptionType; end
|
150
|
-
class SearchLocation; end
|
151
|
-
class CatalogEntryLocationType < STCDescriptionType; end
|
152
|
-
class CatalogEntryLocation; end
|
153
|
-
class ObsDataLocationType < STCMetadataType; end
|
154
|
-
class ObsDataLocation; end
|
155
|
-
class ObservatoryLocationType < STCDescriptionType; end
|
156
|
-
class ObservationLocationType < STCDescriptionType; end
|
157
|
-
class PixelSpaceType < STCDescriptionType; end
|
158
|
-
|
159
|
-
SubstitutionGroups = {
|
160
|
-
'CoordFrame' => [PixelCoordFrame, GenericCoordFrame],
|
161
|
-
'SpaceRefFrame' => [ICRS, FK4, FK5, ECLIPTIC, GALACTIC_I, GALACTIC_II, SUPER_GALACTIC, AZ_EL, BODY,
|
162
|
-
GEO_C, GEO_D, MAG, GSE, GSM, SM, HGC, HEE, HEEQ, HCI, HCD,
|
163
|
-
MERCURY_C, VENUS_C, LUNA_C, MARS_C, JUPITER_C_III, SATURN_C_III, URANUS_C_III, NEPTUNE_C_III, PLUTO_C,
|
164
|
-
MERCURY_G, VENUS_G, LUNA_G, MARS_G, JUPITER_G_III, SATURN_G_III, URANUS_G_III, NEPTUNE_G_III, PLUTO_G,
|
165
|
-
UnknownFrame, CustomSpaceRefFrame],
|
166
|
-
'ReferencePosition' => [TOPOCENTER, BARYCENTER, HELIOCENTER, GEOCENTER,
|
167
|
-
LSR, LSRK, LSRD,
|
168
|
-
GALACTIC_CENTER, LOCAL_GROUP_CENTER,
|
169
|
-
MOON, EMBARYCENTER, MERCURY, VENUS, MARS, JUPITER, SATURN, URANUS, NEPTUNE, PLUTO,
|
170
|
-
RELOCATABLE, UNKNOWNRefPos, CustomRefPos],
|
171
|
-
'CoordFlavor' => [SPHERICAL, CARTESIAN, UNITSPHERE, POLAR],
|
172
|
-
'CoordSys' => [AstroCoordSystem, PixelCoordSystem],
|
173
|
-
'CoordInterval' => [CoordScalarInterval, Coord2VecInterval, Coord3VecInterval],
|
174
|
-
'SpatialInterval' => [Sphere, PositionInterval, RegionFile, Region],
|
175
|
-
'VelInterval' => [VelocitySphere, VelocityInterval],
|
176
|
-
'CoordArea' => [AstroCoordArea, PixelCoordArea]
|
177
|
-
}
|
178
|
-
|
179
|
-
# A CoordFrame has to have at least a name.
|
180
|
-
class CoordFrameType
|
181
|
-
include XML::Mapping
|
182
|
-
|
183
|
-
text_node :name, 'Name', :optional => true
|
184
|
-
end
|
185
|
-
class CoordFrame
|
186
|
-
include XML::Mapping
|
187
|
-
|
188
|
-
object_node :value, '', :class => CoordFrameType, :optional => false
|
189
|
-
end
|
190
|
-
|
191
|
-
# Coordinate equinox: B{year} or J{year} with at least one decimal; do not use in conjunction with ICRS.
|
192
|
-
class CoordEquinoxType
|
193
|
-
include XML::Mapping
|
194
|
-
|
195
|
-
text_node :value, '', :optional => false
|
196
|
-
|
197
|
-
def value=(eq)
|
198
|
-
raise "Coordinate equinox #{eq} in wrong format" if !eq.match(/^[BJ]\-?\d?\d?\d?\d\d\d\d\.\d\d?\d?$/)
|
199
|
-
@value = eq
|
200
|
-
end
|
201
|
-
end
|
202
|
-
|
203
|
-
# Abstract space reference frame type.
|
204
|
-
class SpaceRefFrameType
|
205
|
-
include XML::Mapping
|
206
|
-
end
|
207
|
-
# Head element for the Coordinate reference frame substitution group: optional equinox
|
208
|
-
# with either a standard reference system (ICRS, FK5, FK4) and optional standard pole
|
209
|
-
# (equatorial, ecliptic, galactic, etc.), or a custom frame with pole (positive Z-axis)
|
210
|
-
# and positive X-axis direction.
|
211
|
-
class SpaceRefFrame
|
212
|
-
include XML::Mapping
|
213
|
-
|
214
|
-
object_node :value, '', :class => SpaceRefFrameType, :optional => false
|
215
|
-
end
|
216
|
-
|
217
|
-
# ICRS type: no equinox.
|
218
|
-
class ICRSType; end
|
219
|
-
|
220
|
-
# FK[45] type: needs an equinox.
|
221
|
-
class FKType
|
222
|
-
object_node :equinox, 'Equinox', :class => CoordEquinoxType, :optional => false
|
223
|
-
end
|
224
|
-
|
225
|
-
# A custom space reference frame type defined through pole and X-axis directions.
|
226
|
-
class CustomSpaceRefFrameType
|
227
|
-
text_node :frame, 'Frame', :optional => false
|
228
|
-
|
229
|
-
object_node :pole_zaxis, 'Pole_Zaxis', :class => AstroCoordsType, :optional => false
|
230
|
-
object_node :xaxis, 'Xaxis', :class => AstroCoordsType, :optional => false
|
231
|
-
end
|
232
|
-
|
233
|
-
# The ICRS reference frame.
|
234
|
-
class ICRS
|
235
|
-
include XML::Mapping
|
236
|
-
|
237
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
238
|
-
end
|
239
|
-
|
240
|
-
# FK4; needs a Besselian epoch.
|
241
|
-
class FK4
|
242
|
-
include XML::Mapping
|
243
|
-
|
244
|
-
object_node :value, '', :class => FKType, :optional => false
|
245
|
-
end
|
246
|
-
|
247
|
-
# FK5; needs a Julian epoch.
|
248
|
-
class FK5
|
249
|
-
include XML::Mapping
|
250
|
-
|
251
|
-
object_node :value, '', :class => FKType, :optional => false
|
252
|
-
end
|
253
|
-
|
254
|
-
# Ecliptic coordinates; needs an epoch.
|
255
|
-
class ECLIPTIC
|
256
|
-
include XML::Mapping
|
257
|
-
|
258
|
-
object_node :value, '', :class => FKType, :optional => false
|
259
|
-
end
|
260
|
-
|
261
|
-
# Center of the Galaxy.
|
262
|
-
class GALACTIC_CENTER
|
263
|
-
include XML::Mapping
|
264
|
-
|
265
|
-
object_node :value, '', :class => StdRefPosType, :optional => false
|
266
|
-
end
|
267
|
-
|
268
|
-
# Galactic coordinates; first system.
|
269
|
-
class GALACTIC_I
|
270
|
-
include XML::Mapping
|
271
|
-
|
272
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
273
|
-
end
|
274
|
-
|
275
|
-
# Galactic coordinates; second system.
|
276
|
-
class GALACTIC_II
|
277
|
-
include XML::Mapping
|
278
|
-
|
279
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
280
|
-
end
|
281
|
-
|
282
|
-
# SuperGalactic coordinates.
|
283
|
-
class SUPER_GALACTIC
|
284
|
-
include XML::Mapping
|
285
|
-
|
286
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
287
|
-
end
|
288
|
-
|
289
|
-
# Local Azimuth and Elevation coordinates.
|
290
|
-
class AZ_EL
|
291
|
-
include XML::Mapping
|
292
|
-
|
293
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
294
|
-
end
|
295
|
-
|
296
|
-
# Generic Body coordinates.
|
297
|
-
class BODY
|
298
|
-
include XML::Mapping
|
299
|
-
|
300
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
301
|
-
end
|
302
|
-
|
303
|
-
# The Geocentric (co-rotating) reference frame.
|
304
|
-
class GEO_C
|
305
|
-
include XML::Mapping
|
306
|
-
|
307
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
308
|
-
end
|
309
|
-
|
310
|
-
# The Geodetic reference frame; semi-major axis and inverse
|
311
|
-
# flattening may be provided to define the reference spheroid; the default is the IAU 1976 reference spheroid.
|
312
|
-
class GEO_D
|
313
|
-
numeric_node :radius, '@radius', :optional => true, :default_value => 6378140.0
|
314
|
-
numeric_node :inv_flattening, '@inv_flattening', :optional => true, :default_value => 298.257
|
315
|
-
|
316
|
-
object_node :unit, '@unit', :class => PosUnitType, :optional => true, :default_value => 'm'
|
317
|
-
end
|
318
|
-
|
319
|
-
# The Geomagnetic reference frame.
|
320
|
-
class MAG
|
321
|
-
include XML::Mapping
|
322
|
-
|
323
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
324
|
-
end
|
325
|
-
|
326
|
-
# The Geocentric Solar Ecliptic reference frame.
|
327
|
-
class GSE
|
328
|
-
include XML::Mapping
|
329
|
-
|
330
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
331
|
-
end
|
332
|
-
|
333
|
-
# The Geocentric Solar Magnetic reference frame.
|
334
|
-
class GSM
|
335
|
-
include XML::Mapping
|
336
|
-
|
337
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
338
|
-
end
|
339
|
-
|
340
|
-
# The Solar Magnetic reference frame.
|
341
|
-
class SM
|
342
|
-
include XML::Mapping
|
343
|
-
|
344
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
345
|
-
end
|
346
|
-
|
347
|
-
# The Heliographic reference frame.
|
348
|
-
class HGC
|
349
|
-
include XML::Mapping
|
350
|
-
|
351
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
352
|
-
end
|
353
|
-
|
354
|
-
# The Heliocentric Earth Ecliptic reference frame.
|
355
|
-
class HEE
|
356
|
-
include XML::Mapping
|
357
|
-
|
358
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
359
|
-
end
|
360
|
-
|
361
|
-
# The Heliocentric Earth Equatorial reference frame.
|
362
|
-
class HEEQ
|
363
|
-
include XML::Mapping
|
364
|
-
|
365
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
366
|
-
end
|
367
|
-
|
368
|
-
# The Heliocentric Inertial reference frame.
|
369
|
-
class HCI
|
370
|
-
include XML::Mapping
|
371
|
-
|
372
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
373
|
-
end
|
374
|
-
|
375
|
-
# The Heliocentric of Date reference frame.
|
376
|
-
class HCD
|
377
|
-
include XML::Mapping
|
378
|
-
|
379
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
380
|
-
end
|
381
|
-
|
382
|
-
# The planetocentric reference frame anchored on Mercury.
|
383
|
-
class MERCURY_C
|
384
|
-
include XML::Mapping
|
385
|
-
|
386
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
387
|
-
end
|
388
|
-
|
389
|
-
# The planetocentric reference frame anchored on Venus.
|
390
|
-
class VENUS_C
|
391
|
-
include XML::Mapping
|
392
|
-
|
393
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
394
|
-
end
|
395
|
-
|
396
|
-
# The lunacentric reference frame anchored on the moon.
|
397
|
-
class LUNA_C
|
398
|
-
include XML::Mapping
|
399
|
-
|
400
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
401
|
-
end
|
402
|
-
|
403
|
-
# The planetocentric reference frame anchored on Mars.
|
404
|
-
class MARS_C
|
405
|
-
include XML::Mapping
|
406
|
-
|
407
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
408
|
-
end
|
409
|
-
|
410
|
-
# The planetocentric reference frame anchored on Jupiter.
|
411
|
-
class JUPITER_C_III
|
412
|
-
include XML::Mapping
|
413
|
-
|
414
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
415
|
-
end
|
416
|
-
|
417
|
-
# The planetocentric reference frame anchored on Saturn.
|
418
|
-
class SATURN_C_III
|
419
|
-
include XML::Mapping
|
420
|
-
|
421
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
422
|
-
end
|
423
|
-
|
424
|
-
# The planetocentric reference frame anchored on Uranus.
|
425
|
-
class URANUS_C_III
|
426
|
-
include XML::Mapping
|
427
|
-
|
428
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
429
|
-
end
|
430
|
-
|
431
|
-
# The planetocentric reference frame anchored on Neptune.
|
432
|
-
class NEPTUNE_C_III
|
433
|
-
include XML::Mapping
|
434
|
-
|
435
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
436
|
-
end
|
437
|
-
|
438
|
-
# The planetographic reference frame anchored on Pluto.
|
439
|
-
class PLUTO_C
|
440
|
-
include XML::Mapping
|
441
|
-
|
442
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
443
|
-
end
|
444
|
-
|
445
|
-
# The planetographic reference frame anchored on Mercury.
|
446
|
-
class MERCURY_G
|
447
|
-
include XML::Mapping
|
448
|
-
|
449
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
450
|
-
end
|
451
|
-
|
452
|
-
# The planetographic reference frame anchored on Venus.
|
453
|
-
class VENUS_G
|
454
|
-
include XML::Mapping
|
455
|
-
|
456
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
457
|
-
end
|
458
|
-
|
459
|
-
# The lunagraphic reference frame anchored on the moon.
|
460
|
-
class LUNA_G
|
461
|
-
include XML::Mapping
|
462
|
-
|
463
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
464
|
-
end
|
465
|
-
|
466
|
-
# The planetographic reference frame anchored on Mars.
|
467
|
-
class MARS_G
|
468
|
-
include XML::Mapping
|
469
|
-
|
470
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
471
|
-
end
|
472
|
-
|
473
|
-
# The planetographic reference frame anchored on Jupiter.
|
474
|
-
class JUPITER_G_III
|
475
|
-
include XML::Mapping
|
476
|
-
|
477
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
478
|
-
end
|
479
|
-
|
480
|
-
# The planetographic reference frame anchored on Saturn.
|
481
|
-
class SATURN_G_III
|
482
|
-
include XML::Mapping
|
483
|
-
|
484
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
485
|
-
end
|
486
|
-
|
487
|
-
# The planetographic reference frame anchored on Uranus.
|
488
|
-
class URANUS_G_III
|
489
|
-
include XML::Mapping
|
490
|
-
|
491
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
492
|
-
end
|
493
|
-
|
494
|
-
# The planetographic reference frame anchored on Neptune.
|
495
|
-
class NEPTUNE_G_III
|
496
|
-
include XML::Mapping
|
497
|
-
|
498
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
499
|
-
end
|
500
|
-
|
501
|
-
# The planetographic reference frame anchored on Pluto.
|
502
|
-
class PLUTO_G
|
503
|
-
include XML::Mapping
|
504
|
-
|
505
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
506
|
-
end
|
507
|
-
|
508
|
-
# Unknown space reference frame; the client is responsible for assigning a default.
|
509
|
-
class UnkownFrame
|
510
|
-
include XML::Mapping
|
511
|
-
|
512
|
-
object_node :value, '', :class => ICRSType, :optional => false
|
513
|
-
end
|
514
|
-
|
515
|
-
# Coordinate reference frame: a custom pole (positive Z-axis) and positive X-axis direction.
|
516
|
-
class CustomSpaceRefFrame
|
517
|
-
include XML::Mapping
|
518
|
-
|
519
|
-
object_node :value, '', :class => CustomSpaceRefFrameType, :optional => false
|
520
|
-
end
|
521
|
-
|
522
|
-
# If solar system positions are implied anywhere, the planetary ephemeris to be used needs
|
523
|
-
# to be provided - usually JPL-DE405 with ICRS and JPL-DE200 with FK5.
|
524
|
-
class PlanetaryEphemType
|
525
|
-
include XML::Mapping
|
526
|
-
|
527
|
-
text_enumeration_node :value, '', :optional => false,
|
528
|
-
:choices => ['JPL-DE200', 'JPL-DE405']
|
529
|
-
end
|
530
|
-
|
531
|
-
# Abstract type for reference positions.
|
532
|
-
class ReferencePositionType
|
533
|
-
include XML::Mapping
|
534
|
-
end
|
535
|
-
|
536
|
-
# Type for standard reference positions.
|
537
|
-
class StdRefPosType
|
538
|
-
object_node :planetary_ephem, 'PlanetaryEphem', :class => PlanetaryEphemType, :optional => true
|
539
|
-
end
|
540
|
-
|
541
|
-
# Type for custom positions: specifies reference origin.
|
542
|
-
class CustomRefPosType
|
543
|
-
object_node :coord_origin, 'CoordOrigin', :class => AstroCoordsType, :optional => false
|
544
|
-
end
|
545
|
-
|
546
|
-
# Head element from the ReferencePosition substitution group: either a "known place"
|
547
|
-
# such as geocenter or barycenter (RefPos), or a position defined in a known coordinate system (CoordOrigin).
|
548
|
-
class ReferencePosition; end
|
549
|
-
|
550
|
-
# Location of the observer/telescope.
|
551
|
-
class TOPOCENTER
|
552
|
-
include XML::Mapping
|
553
|
-
|
554
|
-
object_node :value, '', :class => StdRefPosType, :optional => false
|
555
|
-
end
|
556
|
-
|
557
|
-
# Barycenter of the solar system.
|
558
|
-
class BARYCENTER
|
559
|
-
include XML::Mapping
|
560
|
-
|
561
|
-
object_node :value, '', :class => StdRefPosType, :optional => false
|
562
|
-
end
|
563
|
-
|
564
|
-
# Center of the sun.
|
565
|
-
class HELIOCENTER
|
566
|
-
include XML::Mapping
|
567
|
-
|
568
|
-
object_node :value, '', :class => StdRefPosType, :optional => false
|
569
|
-
end
|
570
|
-
|
571
|
-
# Center of the earth.
|
572
|
-
class GEOCENTER
|
573
|
-
include XML::Mapping
|
574
|
-
|
575
|
-
object_node :value, '', :class => StdRefPosType, :optional => false
|
576
|
-
end
|
577
|
-
|
578
|
-
# (Kinematic) Local Standard of Rest (only used for Doppler velocities); equivalent to LSRK.
|
579
|
-
class LSR
|
580
|
-
include XML::Mapping
|
581
|
-
|
582
|
-
object_node :value, '', :class => StdRefPosType, :optional => false
|
583
|
-
end
|
584
|
-
|
585
|
-
# Kinematic Local Standard of Rest (only used for Doppler velocities); equivalent to LSR.
|
586
|
-
class LSRK
|
587
|
-
include XML::Mapping
|
588
|
-
|
589
|
-
object_node :value, '', :class => StdRefPosType, :optional => false
|
590
|
-
end
|
591
|
-
|
592
|
-
# Dynamic Local Standard of Rest (only used for Doppler velocities).
|
593
|
-
class LSRD
|
594
|
-
include XML::Mapping
|
595
|
-
|
596
|
-
object_node :value, '', :class => StdRefPosType, :optional => false
|
597
|
-
end
|
598
|
-
|
599
|
-
# Center of the Galaxy.
|
600
|
-
class GALACTICE_CENTER
|
601
|
-
include XML::Mapping
|
602
|
-
|
603
|
-
object_node :value, '', :class => StdRefPosType, :optional => false
|
604
|
-
end
|
605
|
-
|
606
|
-
# Center of the Local Group.
|
607
|
-
class LOCAL_GROUP_CENTER
|
608
|
-
include XML::Mapping
|
609
|
-
|
610
|
-
object_node :value, '', :class => StdRefPosType, :optional => false
|
611
|
-
end
|
612
|
-
|
613
|
-
# Center of the Moon.
|
614
|
-
class MOON
|
615
|
-
include XML::Mapping
|
616
|
-
|
617
|
-
object_node :value, '', :class => StdRefPosType, :optional => false
|
618
|
-
end
|
619
|
-
|
620
|
-
# Barycenter of the Earth-Moon system.
|
621
|
-
class EMBARYCENTER
|
622
|
-
include XML::Mapping
|
623
|
-
|
624
|
-
object_node :value, '', :class => StdRefPosType, :optional => false
|
625
|
-
end
|
626
|
-
|
627
|
-
# Center of Mercury.
|
628
|
-
class MERCURY
|
629
|
-
include XML::Mapping
|
630
|
-
|
631
|
-
object_node :value, '', :class => StdRefPosType, :optional => false
|
632
|
-
end
|
633
|
-
|
634
|
-
# Center of Venus.
|
635
|
-
class VENUS
|
636
|
-
include XML::Mapping
|
637
|
-
|
638
|
-
object_node :value, '', :class => StdRefPosType, :optional => false
|
639
|
-
end
|
640
|
-
|
641
|
-
# Center of Mars.
|
642
|
-
class MARS
|
643
|
-
include XML::Mapping
|
644
|
-
|
645
|
-
object_node :value, '', :class => StdRefPosType, :optional => false
|
646
|
-
end
|
647
|
-
|
648
|
-
# Center of Jupiter.
|
649
|
-
class JUPITER
|
650
|
-
include XML::Mapping
|
651
|
-
|
652
|
-
object_node :value, '', :class => StdRefPosType, :optional => false
|
653
|
-
end
|
654
|
-
|
655
|
-
# Center of Saturn.
|
656
|
-
class SATURN
|
657
|
-
include XML::Mapping
|
658
|
-
|
659
|
-
object_node :value, '', :class => StdRefPosType, :optional => false
|
660
|
-
end
|
661
|
-
|
662
|
-
# Center of Uranus.
|
663
|
-
class URANUS
|
664
|
-
include XML::Mapping
|
665
|
-
|
666
|
-
object_node :value, '', :class => StdRefPosType, :optional => false
|
667
|
-
end
|
668
|
-
|
669
|
-
# Center of Neptune.
|
670
|
-
class NEPTUNE
|
671
|
-
include XML::Mapping
|
672
|
-
|
673
|
-
object_node :value, '', :class => StdRefPosType, :optional => false
|
674
|
-
end
|
675
|
-
|
676
|
-
# Center of Pluto.
|
677
|
-
class PLUTO
|
678
|
-
include XML::Mapping
|
679
|
-
|
680
|
-
object_node :value, '', :class => StdRefPosType, :optional => false
|
681
|
-
end
|
682
|
-
|
683
|
-
# A relocatable origin, especially useful for simulations.
|
684
|
-
class RELOCATABLE
|
685
|
-
include XML::Mapping
|
686
|
-
|
687
|
-
object_node :value, '', :class => StdRefPosType, :optional => false
|
688
|
-
end
|
689
|
-
|
690
|
-
# Unknown origin; the client is responsible for assigning a default.
|
691
|
-
class UNKNOWNRefPos
|
692
|
-
include XML::Mapping
|
693
|
-
|
694
|
-
object_node :value, '', :class => StdRefPosType, :optional => false
|
695
|
-
end
|
696
|
-
|
697
|
-
# Origin of the coordinate system, given as a position in another, known, coordinate system.
|
698
|
-
class CustomRefPos
|
699
|
-
include XML::Mapping
|
700
|
-
|
701
|
-
object_node :value, '', :class => StdRefPosType, :optional => false
|
702
|
-
end
|
703
|
-
|
704
|
-
# Provides the coordinate definitions: number of axes, SPHERICAL, CARTESIAN, or UNITSPHERE, presence of velocities.
|
705
|
-
class CoordFlavorType
|
706
|
-
include XML::Mapping
|
707
|
-
|
708
|
-
numeric_node :coord_naxes, '@coord_naxes', :optional => true, :default_value => 2
|
709
|
-
|
710
|
-
boolean_node :coord_vel, '@coord_vel', 'true', 'false', :optional => true, :default_value => false
|
711
|
-
end
|
712
|
-
|
713
|
-
# Abstract head element for the CoordFlavor substitution group.
|
714
|
-
class CoordFlavor; end
|
715
|
-
|
716
|
-
# Spherical 2-D (longitude, latitude) or 3-D (long, lat, radius/elevation) coordinates.
|
717
|
-
class SPHERICAL
|
718
|
-
include XML::Mapping
|
719
|
-
|
720
|
-
object_node :value, '', :class => CoordFlavorType, :optional => false
|
721
|
-
end
|
722
|
-
|
723
|
-
# Cartesian 1-, 2-, or 3-D coordinates.
|
724
|
-
class CARTESIAN
|
725
|
-
include XML::Mapping
|
726
|
-
|
727
|
-
object_node :value, '', :class => CoordFlavorType, :optional => false
|
728
|
-
end
|
729
|
-
|
730
|
-
# 3-D Unit sphere coordinates (direction cosines); in (long,lat), X is in the direction (0,0), Y (pi/2,0), Z (0,pi/2).
|
731
|
-
class UNITSPHERE
|
732
|
-
include XML::Mapping
|
733
|
-
|
734
|
-
object_node :value, '', :class => CoordFlavorType, :optional => false
|
735
|
-
end
|
736
|
-
|
737
|
-
# 2-D polar coordinates (radius, posangle).
|
738
|
-
class POLAR
|
739
|
-
include XML::Mapping
|
740
|
-
|
741
|
-
object_node :value, '', :class => CoordFlavorType, :optional => false
|
742
|
-
end
|
743
|
-
|
744
|
-
# A spatial coordinate frame consists of a coordinate frame and a reference position.
|
745
|
-
class SpaceFrameType
|
746
|
-
full_object_node :space_ref_frame, STC::group_member_names(SpaceRefFrame, SubstitutionGroups).join('|'),
|
747
|
-
:unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'),
|
748
|
-
:optional => false
|
749
|
-
full_object_node :reference_position, STC::group_member_names(ReferencePosition, SubstitutionGroups).join('|'),
|
750
|
-
:unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'),
|
751
|
-
:optional => false
|
752
|
-
full_object_node :offset_center,
|
753
|
-
'OffsetCenter/(' + STC::group_member_names(CoordValue, STCcoords::V1_20::SubstitutionGroups).join('|') + ')',
|
754
|
-
:unmarshaller => VORuby::STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
|
755
|
-
:optional => true
|
756
|
-
full_object_node :coord_flavor, STC::group_member_names(CoordFlavor, SubstitutionGroups).join('|'),
|
757
|
-
:unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'),
|
758
|
-
:optional => false
|
759
|
-
end
|
760
|
-
class SpaceFrame
|
761
|
-
include XML::Mapping
|
762
|
-
|
763
|
-
object_node :value, '', :class => SpaceFrameType, :optional => false
|
764
|
-
end
|
765
|
-
|
766
|
-
# The time reference frame consists of a timescale, a reference position, and optionally
|
767
|
-
# a reference direction (needed when transformations have been applied).
|
768
|
-
class TimeFrameType
|
769
|
-
object_node :time_scale, 'TimeScale', :class => TimeScaleType, :optional => false, :default_value => 'TT'
|
770
|
-
object_node :time_ref_direction, 'TimeRefDirection', :class => AstroCoordsType, :optional => true
|
771
|
-
|
772
|
-
full_object_node :reference_position, STC::group_member_names(ReferencePosition, SubstitutionGroups).join('|'),
|
773
|
-
:unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'),
|
774
|
-
:optional => false
|
775
|
-
end
|
776
|
-
class TimeFrame
|
777
|
-
include XML::Mapping
|
778
|
-
|
779
|
-
object_node :value, '', :class => TimeFrameType, :optional => false
|
780
|
-
end
|
781
|
-
|
782
|
-
# Contains the spectral frame reference position.
|
783
|
-
class SpectralFrameType
|
784
|
-
full_object_node :reference_position, STC::group_member_names(ReferencePosition, SubstitutionGroups).join('|'),
|
785
|
-
:unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'),
|
786
|
-
:optional => false
|
787
|
-
end
|
788
|
-
class SpectralFrame
|
789
|
-
include XML::Mapping
|
790
|
-
|
791
|
-
object_node :value, '', :class => SpectralFrameType, :optional => false
|
792
|
-
end
|
793
|
-
|
794
|
-
# The Doppler definition used: optical, radio, or pseudo-relativistic (i.e., how is a
|
795
|
-
# redshift converted to a velocity); the most common is optical, except when the reference is LSR (usually radio).
|
796
|
-
class DopplerDefinitionType
|
797
|
-
include XML::Mapping
|
798
|
-
|
799
|
-
text_enumeration_node :value, '', :optional => false,
|
800
|
-
:choices => ['OPTICAL', 'RADIO', 'RELATIVISTIC']
|
801
|
-
end
|
802
|
-
|
803
|
-
# Contains the Doppler definitions, including whether the values are velocity or redshift (value_type).
|
804
|
-
class RedshiftFrameType
|
805
|
-
text_enumeration_node :value_type, '@value_type', :optional => true, :default_value => 'VELOCITY',
|
806
|
-
:choices => ['VELOCITY', 'REDSHIFT']
|
807
|
-
|
808
|
-
object_node :doppler_definition, 'DopplerDefinition', :class => DopplerDefinitionType, :optional => false
|
809
|
-
|
810
|
-
full_object_node :reference_position, STC::group_member_names(ReferencePosition, SubstitutionGroups).join('|'),
|
811
|
-
:unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'),
|
812
|
-
:optional => false
|
813
|
-
end
|
814
|
-
class RedshiftFrame
|
815
|
-
include XML::Mapping
|
816
|
-
|
817
|
-
object_node :value, '', :class => RedshiftFrameType, :optional => false
|
818
|
-
end
|
819
|
-
|
820
|
-
# A CoordSys consists of at least one coordinate frames.
|
821
|
-
class CoordSysType
|
822
|
-
include XML::Mapping
|
823
|
-
|
824
|
-
text_node :coord_sys_type_id, '@ID', :optional => false
|
825
|
-
|
826
|
-
object_node :time_frame, 'TimeFrame', :class => TimeFrame, :optional => true
|
827
|
-
object_node :space_frame, 'SpaceFrame', :class => SpaceFrame, :optional => true
|
828
|
-
object_node :spectral_frame, 'SpectralFrame', :class => SpectralFrame, :optional => true
|
829
|
-
object_node :redshift_frame, 'RedshiftFrame', :class => RedshiftFrame, :optional => true
|
830
|
-
|
831
|
-
full_array_node :coord_frames, STC::group_member_names(CoordFrame, SubstitutionGroups).join('|'),
|
832
|
-
:unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'),
|
833
|
-
:optional => true, :default_value => []
|
834
|
-
end
|
835
|
-
class CoordSys
|
836
|
-
include XML::Mapping
|
837
|
-
|
838
|
-
object_node :value, '', :class => CoordSysType, :optional => false
|
839
|
-
end
|
840
|
-
|
841
|
-
# Element for pixel Coordinate Frames.
|
842
|
-
class PixelCoordFrame
|
843
|
-
include XML::Mapping
|
844
|
-
|
845
|
-
object_node :value, '', :class => CoordFrameType, :optional => false
|
846
|
-
end
|
847
|
-
|
848
|
-
# Element for generic Coordinate Frames.
|
849
|
-
class GenericCoordFrame
|
850
|
-
include XML::Mapping
|
851
|
-
|
852
|
-
object_node :value, '', :class => CoordFrameType, :optional => false
|
853
|
-
end
|
854
|
-
|
855
|
-
# The astronomical coordinate system definition: spatial coordinate frame and reference position;
|
856
|
-
# time frame and reference position; the coordinate flavor; spectral frame and (optionally) Doppler
|
857
|
-
# frame; and the planetary ephemeris; an ID is required, since this is how coordinate elements are
|
858
|
-
# associated with their coordinate systems.
|
859
|
-
class AstroCoordSystemType
|
860
|
-
text_node :coord_sys_type_id, '@ID', :optional => false
|
861
|
-
|
862
|
-
object_node :time_frame, 'TimeFrame', :class => TimeFrame, :optional => true
|
863
|
-
object_node :space_frame, 'SpaceFrame', :class => SpaceFrame, :optional => true
|
864
|
-
object_node :spectral_frame, 'SpectralFrame', :class => SpectralFrame, :optional => true
|
865
|
-
object_node :redshift_frame, 'RedshiftFrame', :class => RedshiftFrame, :optional => true
|
866
|
-
|
867
|
-
array_node :generic_coord_frames, 'GenericCoordFrame', :class => GenericCoordFrame, :optional => true,
|
868
|
-
:default_value => []
|
869
|
-
end
|
870
|
-
class AstroCoordSystem
|
871
|
-
include XML::Mapping
|
872
|
-
|
873
|
-
object_node :value, '', :class => AstroCoordSystemType, :optional => false
|
874
|
-
end
|
875
|
-
|
876
|
-
# The pixel coordinate system definition.
|
877
|
-
class PixelCoordSystemType
|
878
|
-
text_node :coord_sys_type_id, '@ID', :optional => false
|
879
|
-
|
880
|
-
array_node :pixel_coord_frames, 'PixelCoordFrame', :class => PixelCoordFrame, :optional => false
|
881
|
-
end
|
882
|
-
class PixelCoordSystem
|
883
|
-
include XML::Mapping
|
884
|
-
|
885
|
-
object_node :value, '', :class => PixelCoordSystemType, :optional => false
|
886
|
-
end
|
887
|
-
|
888
|
-
# Abstact coordinate interval type.
|
889
|
-
class CoordIntervalType
|
890
|
-
include XML::Mapping
|
891
|
-
|
892
|
-
boolean_node :lo_include, '@lo_include', 'true', 'false', :optional => false, :default_value => true
|
893
|
-
boolean_node :hi_include, '@hi_include', 'true', 'false', :optional => false, :default_value => true
|
894
|
-
|
895
|
-
numeric_node :fill_factor, '@fill_factor', :optional => true, :default_value => 1.0
|
896
|
-
end
|
897
|
-
class CoordInterval; end
|
898
|
-
|
899
|
-
# The time interval needs to contain a start time or a stop time or both;
|
900
|
-
# it needs to refer to a coordinate system; boundaries may or may not be inclusive.
|
901
|
-
class TimeIntervalType
|
902
|
-
object_node :start_time, 'StartTime', :class => AstronTimeType, :optional => true
|
903
|
-
object_node :end_time, 'EndTime', :class => AstronTimeType, :optional => true
|
904
|
-
end
|
905
|
-
|
906
|
-
# Scalar coordinate interval type.
|
907
|
-
class CoordScalarIntervalType
|
908
|
-
numeric_node :lo_limit, 'LoLimit', :optional => true
|
909
|
-
numeric_node :hi_limit, 'HiLimit', :optional => true
|
910
|
-
end
|
911
|
-
class CoordScalarInterval
|
912
|
-
include XML::Mapping
|
913
|
-
|
914
|
-
object_node :value, '', :class => CoordScalarIntervalType, :optional => false
|
915
|
-
end
|
916
|
-
|
917
|
-
# 2-D coordinate interval type.
|
918
|
-
class Coord2VecIntervalType
|
919
|
-
object_node :lo_limit_2vec, 'LoLimit2Vec', :class => Double2Type, :optional => true
|
920
|
-
object_node :hi_limit_2vec, 'HiLimit2Vec', :class => Double2Type, :optional => true
|
921
|
-
end
|
922
|
-
class Coord2VecInterval
|
923
|
-
include XML::Mapping
|
924
|
-
|
925
|
-
object_node :value, '', :class => Coord2VecIntervalType, :optional => true
|
926
|
-
end
|
927
|
-
|
928
|
-
# 3-D coordinate interval type.
|
929
|
-
class Coord3VecIntervalType
|
930
|
-
object_node :lo_limit_3vec, 'LoLimit3Vec', :class => Double3Type, :optional => true
|
931
|
-
object_node :hi_limit_3vec, 'HiLimit3Vec', :class => Double3Type, :optional => true
|
932
|
-
end
|
933
|
-
class Coord3VecInterval
|
934
|
-
include XML::Mapping
|
935
|
-
|
936
|
-
object_node :value, '', :class => Coord3VecIntervalType, :optional => false
|
937
|
-
end
|
938
|
-
|
939
|
-
# Parent type for spatial intervals.
|
940
|
-
class SpatialIntervalType
|
941
|
-
include XML::Mapping
|
942
|
-
end
|
943
|
-
|
944
|
-
# The spatial interval substitution group head element; a spatial coordinate interval
|
945
|
-
# (volume) is specified as a circle (cone) or sphere; a 1-D, 2-D, or 3-D interval; a Region;
|
946
|
-
# or a RegionFile.
|
947
|
-
class SpatialInterval
|
948
|
-
include XML::Mapping
|
949
|
-
|
950
|
-
object_node :value, '', :class => SpatialIntervalType, :optional => false
|
951
|
-
end
|
952
|
-
|
953
|
-
# Defines a sphere.
|
954
|
-
class SphereType
|
955
|
-
numeric_node :radius, 'Radius', :optional => false
|
956
|
-
numeric_node :fill_factor, '@fill_factor', :optional => true, :default => 1.0
|
957
|
-
|
958
|
-
object_node :center, 'Center', :class => Double3Type, :optional => false
|
959
|
-
object_node :unit, '@unit', :class => PosUnitType, :optional => false
|
960
|
-
object_node :radius_unit, '@radius_unit', :class => PosUnitType, :optional => true, :default_value => 'deg'
|
961
|
-
end
|
962
|
-
class Sphere
|
963
|
-
include XML::Mapping
|
964
|
-
|
965
|
-
object_node :value, '', :class => SphereType, :optional => false
|
966
|
-
end
|
967
|
-
|
968
|
-
# Defines a velocity sphere.
|
969
|
-
class VelocitySphereType
|
970
|
-
object_node :vel_time_unit, '@vel_time_unit', :class => VelTimeUnitType, :optional => false
|
971
|
-
end
|
972
|
-
class VelocitySphere
|
973
|
-
include XML::Mapping
|
974
|
-
|
975
|
-
object_node :value, '', :class => VelocitySphereType, :optional => false
|
976
|
-
end
|
977
|
-
|
978
|
-
# Contains a spatial position CoordInterval.
|
979
|
-
class PositionIntervalType
|
980
|
-
object_node :unit, '@unit', :class => PosUnitType, :optional => false
|
981
|
-
|
982
|
-
full_object_node :coord_interval, STC::group_member_names(CoordInterval, SubstitutionGroups).join('|'),
|
983
|
-
:unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'),
|
984
|
-
:optional => false
|
985
|
-
end
|
986
|
-
class PositionInterval
|
987
|
-
include XML::Mapping
|
988
|
-
|
989
|
-
object_node :value, '', :class => PositionIntervalType, :optional => false
|
990
|
-
end
|
991
|
-
|
992
|
-
# Contains a spatial velocity CoordInterval.
|
993
|
-
class VelocityIntervalType
|
994
|
-
object_node :vel_time_unit, '@vel_time_unit', :class => VelTimeUnitType, :optional => false
|
995
|
-
end
|
996
|
-
class VelocityInterval
|
997
|
-
include XML::Mapping
|
998
|
-
|
999
|
-
object_node :value, '', :class => VelocityIntervalType, :optional => false
|
1000
|
-
end
|
1001
|
-
|
1002
|
-
# Points to a Region file.
|
1003
|
-
class RegionFileType
|
1004
|
-
object_node :file, 'File', :class => Resources::VOResource::V0_10::AnyURI, :optional => false
|
1005
|
-
end
|
1006
|
-
class RegionFile
|
1007
|
-
include XML::Mapping
|
1008
|
-
|
1009
|
-
object_node :value, '', :class => RegionFileType, :optional => false
|
1010
|
-
end
|
1011
|
-
|
1012
|
-
# Contains an abstract Region.
|
1013
|
-
class RegionType
|
1014
|
-
full_object_node :region, STC::group_member_names(Region, STCregion::V1_20::SubstitutionGroups).join('|'),
|
1015
|
-
:unmarshaller => STC::dispatch_from_element_name('VORuby::STCregion::V1_20'),
|
1016
|
-
:optional => true
|
1017
|
-
end
|
1018
|
-
class Region
|
1019
|
-
include XML::Mapping
|
1020
|
-
|
1021
|
-
object_node :value, '', :class => RegionType, :optional => false
|
1022
|
-
end
|
1023
|
-
|
1024
|
-
# Contains a Velocity CoordInterval element: a 1-D range, 2-D box, or 3-D cube; plus a time unit for velocity values.
|
1025
|
-
class VelInterval; end
|
1026
|
-
|
1027
|
-
# Contains a 1-D spectral interval.
|
1028
|
-
class SpectralIntervalType
|
1029
|
-
object_node :unit, '@unit', :class => SpectralUnitType, :optional => false
|
1030
|
-
end
|
1031
|
-
|
1032
|
-
# Contains a 1-D redshift interval; position and time units are required if redshifts are expressed as Doppler velocities.
|
1033
|
-
class RedshiftIntervalType
|
1034
|
-
object_node :unit, '@unit', :class => PosUnitType, :optional => true
|
1035
|
-
object_node :vel_time_unit, '@vel_time_unit', :class => VelTimeUnitType, :optional => true
|
1036
|
-
end
|
1037
|
-
|
1038
|
-
class CoordAreaType
|
1039
|
-
include XML::Mapping
|
1040
|
-
|
1041
|
-
text_node :coord_area_id, '@ID', :optional => false
|
1042
|
-
text_node :coord_system_id, '@coord_system_id', :optional => false
|
1043
|
-
|
1044
|
-
full_object_node :spatial_interval, STC::group_member_names(SpatialInterval, SubstitutionGroups).join('|'),
|
1045
|
-
:unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'),
|
1046
|
-
:optional => true
|
1047
|
-
|
1048
|
-
array_node :time_intervals, 'TimeInterval', :class => TimeIntervalType, :optional => true, :default_value => []
|
1049
|
-
array_node :spectral_intervals, 'SpectralInterval', :class => SpectralIntervalType, :optional => true, :default_value => []
|
1050
|
-
array_node :redshift_intervals, 'RedshiftInterval', :class => RedshiftIntervalType, :optional => true, :default_value => []
|
1051
|
-
|
1052
|
-
full_array_node :vel_intervals, STC::group_member_names(VelInterval, SubstitutionGroups).join('|'),
|
1053
|
-
:unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'),
|
1054
|
-
:optional => true, :default_value => []
|
1055
|
-
full_array_node :coord_intervals, STC::group_member_names(CoordInterval, SubstitutionGroups).join('|'),
|
1056
|
-
:unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'),
|
1057
|
-
:optional => true, :default_value => []
|
1058
|
-
end
|
1059
|
-
|
1060
|
-
# Astronomical area type.
|
1061
|
-
class AstroCoordAreaType
|
1062
|
-
array_node :coord_intervals, 'CoordScalarInterval', :class => CoordScalarInterval, :optional => true
|
1063
|
-
end
|
1064
|
-
class AstroCoordArea
|
1065
|
-
include XML::Mapping
|
1066
|
-
|
1067
|
-
object_node :value, '', :class => AstroCoordAreaType, :optional => false
|
1068
|
-
end
|
1069
|
-
|
1070
|
-
# Pixel area type.
|
1071
|
-
class PixelCoordAreaType
|
1072
|
-
array_node :coord_intervals, 'CoordScalarInterval', :class => CoordScalarInterval, :optional => false
|
1073
|
-
end
|
1074
|
-
class PixelCoordArea
|
1075
|
-
include XML::Mapping
|
1076
|
-
|
1077
|
-
object_node :value, '', :class => PixelCoordAreaType, :optional => false
|
1078
|
-
end
|
1079
|
-
|
1080
|
-
# General coordinate area description; head element but not abstract.
|
1081
|
-
class CoordArea; end
|
1082
|
-
|
1083
|
-
# Abstract stcMetadata type.
|
1084
|
-
class STCMetadataType
|
1085
|
-
include XML::Mapping
|
1086
|
-
|
1087
|
-
text_node :type_id, '@ID', :optional => true
|
1088
|
-
end
|
1089
|
-
class STCMetadata
|
1090
|
-
include XML::Mapping
|
1091
|
-
|
1092
|
-
object_node :value, '', :class => STCMetadataType, :optional => false
|
1093
|
-
end
|
1094
|
-
|
1095
|
-
# Generalized single stcMetadata type.
|
1096
|
-
class STCDescriptionType
|
1097
|
-
full_array_node :coord_sys, STC::group_member_names(CoordSys, SubstitutionGroups).join('|'),
|
1098
|
-
:unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'),
|
1099
|
-
:optional => false
|
1100
|
-
full_array_node :coords, STC::group_member_names(Coords, STCcoords::V1_20::SubstitutionGroups).join('|'),
|
1101
|
-
:unmarshaller => STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'),
|
1102
|
-
:optional => true, :default_value => []
|
1103
|
-
full_array_node :coord_areas, STC::group_member_names(CoordArea, SubstitutionGroups).join('|'),
|
1104
|
-
:unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'),
|
1105
|
-
:optional => true, :default_value => []
|
1106
|
-
end
|
1107
|
-
|
1108
|
-
# Type for STC Resource Profile.
|
1109
|
-
class STCResourceProfileType
|
1110
|
-
include XML::Mapping
|
1111
|
-
|
1112
|
-
text_node :type_id, '@ID', :optional => true
|
1113
|
-
|
1114
|
-
array_node :coord_sys, 'AstroCoordSystem', :class => AstroCoordSystem, :optional => false
|
1115
|
-
array_node :coords, 'AstroCoords', :class => AstroCoords, :optional => false
|
1116
|
-
array_node :coord_area, 'AstroCoordArea', :class => AstroCoordArea, :optional => false
|
1117
|
-
end
|
1118
|
-
class STCResourceProfile
|
1119
|
-
include XML::Mapping
|
1120
|
-
|
1121
|
-
object_node :value, '', :class => STCResourceProfileType, :optional => false
|
1122
|
-
end
|
1123
|
-
|
1124
|
-
# Type for STC search location.
|
1125
|
-
class SearchLocationType
|
1126
|
-
text_node :type_id, '@ID', :optional => true
|
1127
|
-
|
1128
|
-
array_node :coord_sys, 'AstroCoordSystem', :class => AstroCoordSystem, :optional => false
|
1129
|
-
array_node :coords, 'AstroCoords', :class => AstroCoords, :optional => true, :default_value => []
|
1130
|
-
|
1131
|
-
object_node :coord_area, 'AstroCoordArea', :class => AstroCoordArea, :optional => false
|
1132
|
-
end
|
1133
|
-
class SearchLocation
|
1134
|
-
include XML::Mapping
|
1135
|
-
|
1136
|
-
object_node :value, '', :class => SearchLocationType, :optional => false
|
1137
|
-
end
|
1138
|
-
|
1139
|
-
# Type for STC catalog entry description.
|
1140
|
-
class CatalogEntryLocationType
|
1141
|
-
text_node :type_id, '@ID', :optional => true
|
1142
|
-
|
1143
|
-
array_node :coord_sys, 'AstroCoordSystem', :class => AstroCoordSystem, :optional => false
|
1144
|
-
array_node :coords, 'AstroCoords', :class => AstroCoords, :optional => false
|
1145
|
-
array_node :coord_area, 'AstroCoordArea', :class => AstroCoordArea, :optional => true, :default_value => []
|
1146
|
-
end
|
1147
|
-
class CatalogEntryLocation
|
1148
|
-
include XML::Mapping
|
1149
|
-
|
1150
|
-
object_node :value, '', :class => CatalogEntryLocationType, :optional => false
|
1151
|
-
end
|
1152
|
-
|
1153
|
-
# Type for observational STC metadata.
|
1154
|
-
class ObsDataLocationType
|
1155
|
-
object_node :observatory_location, 'ObservatoryLocation', :class => ObservatoryLocationType, :optional => false
|
1156
|
-
object_node :observation_location, 'ObservationLocation', :class => ObservationLocationType, :optional => false
|
1157
|
-
object_node :pixel_space, 'PixelSpace', :class => PixelSpaceType, :optional => true
|
1158
|
-
end
|
1159
|
-
class ObsDataLocation
|
1160
|
-
include XML::Mapping
|
1161
|
-
|
1162
|
-
object_node :value, '', :class => ObsDataLocationType, :optional => false
|
1163
|
-
end
|
1164
|
-
|
1165
|
-
# Type for an observatory location.
|
1166
|
-
class ObservatoryLocationType
|
1167
|
-
text_node :type_id, '@ID', :optional => true
|
1168
|
-
|
1169
|
-
array_node :coord_sys, 'AstroCoordSystem', :class => AstroCoordSystem, :optional => false
|
1170
|
-
|
1171
|
-
object_node :coords, 'AstroCoords', :class => AstroCoords, :optional => false
|
1172
|
-
end
|
1173
|
-
|
1174
|
-
# Type for describing the coordinate volume occupied by observational data, as seen from the observatory location.
|
1175
|
-
class ObservationLocationType
|
1176
|
-
text_node :type_id, '@ID', :optional => true
|
1177
|
-
|
1178
|
-
array_node :coord_sys, 'AstroCoordSystem', :class => AstroCoordSystem, :optional => false
|
1179
|
-
|
1180
|
-
object_node :coords, 'AstroCoords', :class => AstroCoords, :optional => false
|
1181
|
-
object_node :coord_area, 'AstroCoordArea', :class => AstroCoordArea, :optional => true
|
1182
|
-
end
|
1183
|
-
|
1184
|
-
# Type to specify a pixel space.
|
1185
|
-
class PixelSpaceType
|
1186
|
-
text_node :type_id, '@ID', :optional => true
|
1187
|
-
|
1188
|
-
object_node :coord_sys, 'PixelCoordSystem', :class => PixelCoordSystem, :optional => false
|
1189
|
-
object_node :coord_area, 'PixelCoordArea', :class => PixelCoordArea, :optional => false
|
1190
|
-
|
1191
|
-
array_node :coords, 'PixelCoords', :class => PixelCoords, :optional => true
|
1192
|
-
end
|
1193
|
-
|
1194
|
-
end
|
1195
|
-
end
|
1196
|
-
end
|