require 'voruby/stc/loader' require 'voruby/stc/coords_v1_20' require 'voruby/stc/region_v1_20' include VORuby::STCcoords::V1_20 include VORuby::STCregion::V1_20 module VORuby module STC module V1_20 # Forward declarations class CoordFrameType; end class CoordFrame; end class CoordEquinoxType; end class SpaceRefFrameType; end class ICRSType < SpaceRefFrameType; end class FKType < SpaceRefFrameType; end class CustomSpaceRefFrameType < SpaceRefFrameType; end class SpaceRefFrame; end class ICRS; end class FK4; end class FK5; end class ECLIPTIC; end class GALACTIC_I; end class GALACTIC_II; end class SUPER_GALACTIC; end class AZ_EL; end class BODY; end class GEO_C; end class GEO_D < ICRSType; end class MAG; end class GSE; end class GSM; end class SM; end class HGC; end class HEE; end class HEEQ; end class HCI; end class HCD; end class MERCURY_C; end class VENUS_C; end class LUNA_C; end class MARS_C; end class JUPITER_C_III; end class SATURN_C_III; end class URANUS_C_III; end class NEPTUNE_C_III; end class PLUTO_C; end class MERCURY_G; end class VENUS_G; end class LUNA_G; end class MARS_G; end class JUPITER_G_III; end class SATURN_G_III; end class URANUS_G_III; end class NEPTUNE_G_III; end class PLUTO_G; end class UnknownFrame; end class CustomSpaceRefFrame; end class PlanetaryEphemType; end class ReferencePositionType; end class StdRefPosType < ReferencePositionType; end class CustomRefPosType < ReferencePositionType; end class ReferencePosition; end class TOPOCENTER; end class BARYCENTER; end class HELIOCENTER; end class GEOCENTER; end class LSR; end class LSRK; end class LSRD; end class GALACTIC_CENTER; end class LOCAL_GROUP_CENTER; end class MOON; end class EMBARYCENTER; end class MERCURY; end class VENUS; end class MARS; end class JUPITER; end class SATURN; end class URANUS; end class NEPTUNE; end class PLUTO; end class RELOCATABLE; end class UNKNOWNRefPos; end class CustomRefPos; end class CoordFlavorType; end class CoordFlavor; end class SPHERICAL; end class CARTESIAN; end class UNITSPHERE; end class POLAR; end class SpaceFrameType < CoordFrameType; end class TimeFrameType < CoordFrameType; end class SpectralFrameType < CoordFrameType; end class DopplerDefinitionType; end class RedshiftFrameType < CoordFrameType; end class CoordSysType; end class CoordSys; end class TimeFrame; end class SpaceFrame; end class SpectralFrame; end class RedshiftFrame; end class PixelCoordFrame; end class GenericCoordFrame; end class AstroCoordSystemType < CoordSysType; end class AstroCoordSystem; end class PixelCoordSystemType < CoordSysType; end class PixelCoordSystem; end class CoordIntervalType; end class CoordInterval; end class TimeIntervalType < CoordIntervalType; end class CoordScalarIntervalType < CoordIntervalType; end class CoordScalarInterval; end class Coord2VecIntervalType < CoordIntervalType; end class Coord2VecInterval; end class Coord3VecIntervalType < CoordIntervalType; end class Coord3VecInterval; end class SpatialIntervalType; end class SphereType < SpatialIntervalType; end class Sphere; end class VelocitySphereType < SphereType; end class VelocitySphere; end class PositionIntervalType < SpatialIntervalType; end class PositionInterval; end class VelocityIntervalType < PositionIntervalType; end class VelocityInterval; end class SpectralIntervalType < CoordScalarIntervalType; end class RegionFileType < SpatialIntervalType; end class RegionFile; end class RegionType < SpatialIntervalType; end class Region; end class SpatialInterval; end class VelInterval; end class RedshiftIntervalType < CoordScalarIntervalType; end class CoordAreaType; end class AstroCoordAreaType < CoordAreaType; end class PixelCoordAreaType < CoordAreaType; end class CoordArea; end class AstroCoordArea; end class PixelCoordArea; end class STCMetadataType; end class STCMetadata; end class STCDescriptionType < STCMetadataType; end class STCResourceProfileType < STCDescriptionType; end; class STCResourceProfile; end class SearchLocationType < STCDescriptionType; end class SearchLocation; end class CatalogEntryLocationType < STCDescriptionType; end class CatalogEntryLocation; end class ObsDataLocationType < STCMetadataType; end class ObsDataLocation; end class ObservatoryLocationType < STCDescriptionType; end class ObservationLocationType < STCDescriptionType; end class PixelSpaceType < STCDescriptionType; end SubstitutionGroups = { 'CoordFrame' => [PixelCoordFrame, GenericCoordFrame], 'SpaceRefFrame' => [ICRS, FK4, FK5, ECLIPTIC, GALACTIC_I, GALACTIC_II, SUPER_GALACTIC, AZ_EL, BODY, GEO_C, GEO_D, MAG, GSE, GSM, SM, HGC, HEE, HEEQ, HCI, HCD, MERCURY_C, VENUS_C, LUNA_C, MARS_C, JUPITER_C_III, SATURN_C_III, URANUS_C_III, NEPTUNE_C_III, PLUTO_C, MERCURY_G, VENUS_G, LUNA_G, MARS_G, JUPITER_G_III, SATURN_G_III, URANUS_G_III, NEPTUNE_G_III, PLUTO_G, UnknownFrame, CustomSpaceRefFrame], 'ReferencePosition' => [TOPOCENTER, BARYCENTER, HELIOCENTER, GEOCENTER, LSR, LSRK, LSRD, GALACTIC_CENTER, LOCAL_GROUP_CENTER, MOON, EMBARYCENTER, MERCURY, VENUS, MARS, JUPITER, SATURN, URANUS, NEPTUNE, PLUTO, RELOCATABLE, UNKNOWNRefPos, CustomRefPos], 'CoordFlavor' => [SPHERICAL, CARTESIAN, UNITSPHERE, POLAR], 'CoordSys' => [AstroCoordSystem, PixelCoordSystem], 'CoordInterval' => [CoordScalarInterval, Coord2VecInterval, Coord3VecInterval], 'SpatialInterval' => [Sphere, PositionInterval, RegionFile, Region], 'VelInterval' => [VelocitySphere, VelocityInterval], 'CoordArea' => [AstroCoordArea, PixelCoordArea] } # A CoordFrame has to have at least a name. class CoordFrameType include XML::Mapping text_node :name, 'Name', :optional => true end class CoordFrame include XML::Mapping object_node :value, '', :class => CoordFrameType, :optional => false end # Coordinate equinox: B{year} or J{year} with at least one decimal; do not use in conjunction with ICRS. class CoordEquinoxType include XML::Mapping text_node :value, '', :optional => false def value=(eq) raise "Coordinate equinox #{eq} in wrong format" if !eq.match(/^[BJ]\-?\d?\d?\d?\d\d\d\d\.\d\d?\d?$/) @value = eq end end # Abstract space reference frame type. class SpaceRefFrameType include XML::Mapping end # Head element for the Coordinate reference frame substitution group: optional equinox # with either a standard reference system (ICRS, FK5, FK4) and optional standard pole # (equatorial, ecliptic, galactic, etc.), or a custom frame with pole (positive Z-axis) # and positive X-axis direction. class SpaceRefFrame include XML::Mapping object_node :value, '', :class => SpaceRefFrameType, :optional => false end # ICRS type: no equinox. class ICRSType; end # FK[45] type: needs an equinox. class FKType object_node :equinox, 'Equinox', :class => CoordEquinoxType, :optional => false end # A custom space reference frame type defined through pole and X-axis directions. class CustomSpaceRefFrameType text_node :frame, 'Frame', :optional => false object_node :pole_zaxis, 'Pole_Zaxis', :class => AstroCoordsType, :optional => false object_node :xaxis, 'Xaxis', :class => AstroCoordsType, :optional => false end # The ICRS reference frame. class ICRS include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # FK4; needs a Besselian epoch. class FK4 include XML::Mapping object_node :value, '', :class => FKType, :optional => false end # FK5; needs a Julian epoch. class FK5 include XML::Mapping object_node :value, '', :class => FKType, :optional => false end # Ecliptic coordinates; needs an epoch. class ECLIPTIC include XML::Mapping object_node :value, '', :class => FKType, :optional => false end # Center of the Galaxy. class GALACTIC_CENTER include XML::Mapping object_node :value, '', :class => StdRefPosType, :optional => false end # Galactic coordinates; first system. class GALACTIC_I include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # Galactic coordinates; second system. class GALACTIC_II include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # SuperGalactic coordinates. class SUPER_GALACTIC include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # Local Azimuth and Elevation coordinates. class AZ_EL include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # Generic Body coordinates. class BODY include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The Geocentric (co-rotating) reference frame. class GEO_C include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The Geodetic reference frame; semi-major axis and inverse # flattening may be provided to define the reference spheroid; the default is the IAU 1976 reference spheroid. class GEO_D numeric_node :radius, '@radius', :optional => true, :default_value => 6378140.0 numeric_node :inv_flattening, '@inv_flattening', :optional => true, :default_value => 298.257 object_node :unit, '@unit', :class => PosUnitType, :optional => true, :default_value => 'm' end # The Geomagnetic reference frame. class MAG include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The Geocentric Solar Ecliptic reference frame. class GSE include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The Geocentric Solar Magnetic reference frame. class GSM include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The Solar Magnetic reference frame. class SM include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The Heliographic reference frame. class HGC include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The Heliocentric Earth Ecliptic reference frame. class HEE include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The Heliocentric Earth Equatorial reference frame. class HEEQ include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The Heliocentric Inertial reference frame. class HCI include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The Heliocentric of Date reference frame. class HCD include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The planetocentric reference frame anchored on Mercury. class MERCURY_C include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The planetocentric reference frame anchored on Venus. class VENUS_C include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The lunacentric reference frame anchored on the moon. class LUNA_C include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The planetocentric reference frame anchored on Mars. class MARS_C include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The planetocentric reference frame anchored on Jupiter. class JUPITER_C_III include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The planetocentric reference frame anchored on Saturn. class SATURN_C_III include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The planetocentric reference frame anchored on Uranus. class URANUS_C_III include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The planetocentric reference frame anchored on Neptune. class NEPTUNE_C_III include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The planetographic reference frame anchored on Pluto. class PLUTO_C include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The planetographic reference frame anchored on Mercury. class MERCURY_G include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The planetographic reference frame anchored on Venus. class VENUS_G include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The lunagraphic reference frame anchored on the moon. class LUNA_G include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The planetographic reference frame anchored on Mars. class MARS_G include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The planetographic reference frame anchored on Jupiter. class JUPITER_G_III include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The planetographic reference frame anchored on Saturn. class SATURN_G_III include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The planetographic reference frame anchored on Uranus. class URANUS_G_III include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The planetographic reference frame anchored on Neptune. class NEPTUNE_G_III include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # The planetographic reference frame anchored on Pluto. class PLUTO_G include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # Unknown space reference frame; the client is responsible for assigning a default. class UnkownFrame include XML::Mapping object_node :value, '', :class => ICRSType, :optional => false end # Coordinate reference frame: a custom pole (positive Z-axis) and positive X-axis direction. class CustomSpaceRefFrame include XML::Mapping object_node :value, '', :class => CustomSpaceRefFrameType, :optional => false end # If solar system positions are implied anywhere, the planetary ephemeris to be used needs # to be provided - usually JPL-DE405 with ICRS and JPL-DE200 with FK5. class PlanetaryEphemType include XML::Mapping text_enumeration_node :value, '', :optional => false, :choices => ['JPL-DE200', 'JPL-DE405'] end # Abstract type for reference positions. class ReferencePositionType include XML::Mapping end # Type for standard reference positions. class StdRefPosType object_node :planetary_ephem, 'PlanetaryEphem', :class => PlanetaryEphemType, :optional => true end # Type for custom positions: specifies reference origin. class CustomRefPosType object_node :coord_origin, 'CoordOrigin', :class => AstroCoordsType, :optional => false end # Head element from the ReferencePosition substitution group: either a "known place" # such as geocenter or barycenter (RefPos), or a position defined in a known coordinate system (CoordOrigin). class ReferencePosition; end # Location of the observer/telescope. class TOPOCENTER include XML::Mapping object_node :value, '', :class => StdRefPosType, :optional => false end # Barycenter of the solar system. class BARYCENTER include XML::Mapping object_node :value, '', :class => StdRefPosType, :optional => false end # Center of the sun. class HELIOCENTER include XML::Mapping object_node :value, '', :class => StdRefPosType, :optional => false end # Center of the earth. class GEOCENTER include XML::Mapping object_node :value, '', :class => StdRefPosType, :optional => false end # (Kinematic) Local Standard of Rest (only used for Doppler velocities); equivalent to LSRK. class LSR include XML::Mapping object_node :value, '', :class => StdRefPosType, :optional => false end # Kinematic Local Standard of Rest (only used for Doppler velocities); equivalent to LSR. class LSRK include XML::Mapping object_node :value, '', :class => StdRefPosType, :optional => false end # Dynamic Local Standard of Rest (only used for Doppler velocities). class LSRD include XML::Mapping object_node :value, '', :class => StdRefPosType, :optional => false end # Center of the Galaxy. class GALACTICE_CENTER include XML::Mapping object_node :value, '', :class => StdRefPosType, :optional => false end # Center of the Local Group. class LOCAL_GROUP_CENTER include XML::Mapping object_node :value, '', :class => StdRefPosType, :optional => false end # Center of the Moon. class MOON include XML::Mapping object_node :value, '', :class => StdRefPosType, :optional => false end # Barycenter of the Earth-Moon system. class EMBARYCENTER include XML::Mapping object_node :value, '', :class => StdRefPosType, :optional => false end # Center of Mercury. class MERCURY include XML::Mapping object_node :value, '', :class => StdRefPosType, :optional => false end # Center of Venus. class VENUS include XML::Mapping object_node :value, '', :class => StdRefPosType, :optional => false end # Center of Mars. class MARS include XML::Mapping object_node :value, '', :class => StdRefPosType, :optional => false end # Center of Jupiter. class JUPITER include XML::Mapping object_node :value, '', :class => StdRefPosType, :optional => false end # Center of Saturn. class SATURN include XML::Mapping object_node :value, '', :class => StdRefPosType, :optional => false end # Center of Uranus. class URANUS include XML::Mapping object_node :value, '', :class => StdRefPosType, :optional => false end # Center of Neptune. class NEPTUNE include XML::Mapping object_node :value, '', :class => StdRefPosType, :optional => false end # Center of Pluto. class PLUTO include XML::Mapping object_node :value, '', :class => StdRefPosType, :optional => false end # A relocatable origin, especially useful for simulations. class RELOCATABLE include XML::Mapping object_node :value, '', :class => StdRefPosType, :optional => false end # Unknown origin; the client is responsible for assigning a default. class UNKNOWNRefPos include XML::Mapping object_node :value, '', :class => StdRefPosType, :optional => false end # Origin of the coordinate system, given as a position in another, known, coordinate system. class CustomRefPos include XML::Mapping object_node :value, '', :class => StdRefPosType, :optional => false end # Provides the coordinate definitions: number of axes, SPHERICAL, CARTESIAN, or UNITSPHERE, presence of velocities. class CoordFlavorType include XML::Mapping numeric_node :coord_naxes, '@coord_naxes', :optional => true, :default_value => 2 boolean_node :coord_vel, '@coord_vel', 'true', 'false', :optional => true, :default_value => false end # Abstract head element for the CoordFlavor substitution group. class CoordFlavor; end # Spherical 2-D (longitude, latitude) or 3-D (long, lat, radius/elevation) coordinates. class SPHERICAL include XML::Mapping object_node :value, '', :class => CoordFlavorType, :optional => false end # Cartesian 1-, 2-, or 3-D coordinates. class CARTESIAN include XML::Mapping object_node :value, '', :class => CoordFlavorType, :optional => false end # 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). class UNITSPHERE include XML::Mapping object_node :value, '', :class => CoordFlavorType, :optional => false end # 2-D polar coordinates (radius, posangle). class POLAR include XML::Mapping object_node :value, '', :class => CoordFlavorType, :optional => false end # A spatial coordinate frame consists of a coordinate frame and a reference position. class SpaceFrameType full_object_node :space_ref_frame, STC::group_member_names(SpaceRefFrame, SubstitutionGroups).join('|'), :unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'), :optional => false full_object_node :reference_position, STC::group_member_names(ReferencePosition, SubstitutionGroups).join('|'), :unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'), :optional => false full_object_node :offset_center, 'OffsetCenter/(' + STC::group_member_names(CoordValue, STCcoords::V1_20::SubstitutionGroups).join('|') + ')', :unmarshaller => VORuby::STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'), :optional => true full_object_node :coord_flavor, STC::group_member_names(CoordFlavor, SubstitutionGroups).join('|'), :unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'), :optional => false end class SpaceFrame include XML::Mapping object_node :value, '', :class => SpaceFrameType, :optional => false end # The time reference frame consists of a timescale, a reference position, and optionally # a reference direction (needed when transformations have been applied). class TimeFrameType object_node :time_scale, 'TimeScale', :class => TimeScaleType, :optional => false, :default_value => 'TT' object_node :time_ref_direction, 'TimeRefDirection', :class => AstroCoordsType, :optional => true full_object_node :reference_position, STC::group_member_names(ReferencePosition, SubstitutionGroups).join('|'), :unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'), :optional => false end class TimeFrame include XML::Mapping object_node :value, '', :class => TimeFrameType, :optional => false end # Contains the spectral frame reference position. class SpectralFrameType full_object_node :reference_position, STC::group_member_names(ReferencePosition, SubstitutionGroups).join('|'), :unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'), :optional => false end class SpectralFrame include XML::Mapping object_node :value, '', :class => SpectralFrameType, :optional => false end # The Doppler definition used: optical, radio, or pseudo-relativistic (i.e., how is a # redshift converted to a velocity); the most common is optical, except when the reference is LSR (usually radio). class DopplerDefinitionType include XML::Mapping text_enumeration_node :value, '', :optional => false, :choices => ['OPTICAL', 'RADIO', 'RELATIVISTIC'] end # Contains the Doppler definitions, including whether the values are velocity or redshift (value_type). class RedshiftFrameType text_enumeration_node :value_type, '@value_type', :optional => true, :default_value => 'VELOCITY', :choices => ['VELOCITY', 'REDSHIFT'] object_node :doppler_definition, 'DopplerDefinition', :class => DopplerDefinitionType, :optional => false full_object_node :reference_position, STC::group_member_names(ReferencePosition, SubstitutionGroups).join('|'), :unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'), :optional => false end class RedshiftFrame include XML::Mapping object_node :value, '', :class => RedshiftFrameType, :optional => false end # A CoordSys consists of at least one coordinate frames. class CoordSysType include XML::Mapping text_node :coord_sys_type_id, '@ID', :optional => false object_node :time_frame, 'TimeFrame', :class => TimeFrame, :optional => true object_node :space_frame, 'SpaceFrame', :class => SpaceFrame, :optional => true object_node :spectral_frame, 'SpectralFrame', :class => SpectralFrame, :optional => true object_node :redshift_frame, 'RedshiftFrame', :class => RedshiftFrame, :optional => true full_array_node :coord_frames, STC::group_member_names(CoordFrame, SubstitutionGroups).join('|'), :unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'), :optional => true, :default_value => [] end class CoordSys include XML::Mapping object_node :value, '', :class => CoordSysType, :optional => false end # Element for pixel Coordinate Frames. class PixelCoordFrame include XML::Mapping object_node :value, '', :class => CoordFrameType, :optional => false end # Element for generic Coordinate Frames. class GenericCoordFrame include XML::Mapping object_node :value, '', :class => CoordFrameType, :optional => false end # The astronomical coordinate system definition: spatial coordinate frame and reference position; # time frame and reference position; the coordinate flavor; spectral frame and (optionally) Doppler # frame; and the planetary ephemeris; an ID is required, since this is how coordinate elements are # associated with their coordinate systems. class AstroCoordSystemType text_node :coord_sys_type_id, '@ID', :optional => false object_node :time_frame, 'TimeFrame', :class => TimeFrame, :optional => true object_node :space_frame, 'SpaceFrame', :class => SpaceFrame, :optional => true object_node :spectral_frame, 'SpectralFrame', :class => SpectralFrame, :optional => true object_node :redshift_frame, 'RedshiftFrame', :class => RedshiftFrame, :optional => true array_node :generic_coord_frames, 'GenericCoordFrame', :class => GenericCoordFrame, :optional => true, :default_value => [] end class AstroCoordSystem include XML::Mapping object_node :value, '', :class => AstroCoordSystemType, :optional => false end # The pixel coordinate system definition. class PixelCoordSystemType text_node :coord_sys_type_id, '@ID', :optional => false array_node :pixel_coord_frames, 'PixelCoordFrame', :class => PixelCoordFrame, :optional => false end class PixelCoordSystem include XML::Mapping object_node :value, '', :class => PixelCoordSystemType, :optional => false end # Abstact coordinate interval type. class CoordIntervalType include XML::Mapping boolean_node :lo_include, '@lo_include', 'true', 'false', :optional => false, :default_value => true boolean_node :hi_include, '@hi_include', 'true', 'false', :optional => false, :default_value => true numeric_node :fill_factor, '@fill_factor', :optional => true, :default_value => 1.0 end class CoordInterval; end # The time interval needs to contain a start time or a stop time or both; # it needs to refer to a coordinate system; boundaries may or may not be inclusive. class TimeIntervalType object_node :start_time, 'StartTime', :class => AstronTimeType, :optional => true object_node :end_time, 'EndTime', :class => AstronTimeType, :optional => true end # Scalar coordinate interval type. class CoordScalarIntervalType numeric_node :lo_limit, 'LoLimit', :optional => true numeric_node :hi_limit, 'HiLimit', :optional => true end class CoordScalarInterval include XML::Mapping object_node :value, '', :class => CoordScalarIntervalType, :optional => false end # 2-D coordinate interval type. class Coord2VecIntervalType object_node :lo_limit_2vec, 'LoLimit2Vec', :class => Double2Type, :optional => true object_node :hi_limit_2vec, 'HiLimit2Vec', :class => Double2Type, :optional => true end class Coord2VecInterval include XML::Mapping object_node :value, '', :class => Coord2VecIntervalType, :optional => true end # 3-D coordinate interval type. class Coord3VecIntervalType object_node :lo_limit_3vec, 'LoLimit3Vec', :class => Double3Type, :optional => true object_node :hi_limit_3vec, 'HiLimit3Vec', :class => Double3Type, :optional => true end class Coord3VecInterval include XML::Mapping object_node :value, '', :class => Coord3VecIntervalType, :optional => false end # Parent type for spatial intervals. class SpatialIntervalType include XML::Mapping end # The spatial interval substitution group head element; a spatial coordinate interval # (volume) is specified as a circle (cone) or sphere; a 1-D, 2-D, or 3-D interval; a Region; # or a RegionFile. class SpatialInterval include XML::Mapping object_node :value, '', :class => SpatialIntervalType, :optional => false end # Defines a sphere. class SphereType numeric_node :radius, 'Radius', :optional => false numeric_node :fill_factor, '@fill_factor', :optional => true, :default => 1.0 object_node :center, 'Center', :class => Double3Type, :optional => false object_node :unit, '@unit', :class => PosUnitType, :optional => false object_node :radius_unit, '@radius_unit', :class => PosUnitType, :optional => true, :default_value => 'deg' end class Sphere include XML::Mapping object_node :value, '', :class => SphereType, :optional => false end # Defines a velocity sphere. class VelocitySphereType object_node :vel_time_unit, '@vel_time_unit', :class => VelTimeUnitType, :optional => false end class VelocitySphere include XML::Mapping object_node :value, '', :class => VelocitySphereType, :optional => false end # Contains a spatial position CoordInterval. class PositionIntervalType object_node :unit, '@unit', :class => PosUnitType, :optional => false full_object_node :coord_interval, STC::group_member_names(CoordInterval, SubstitutionGroups).join('|'), :unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'), :optional => false end class PositionInterval include XML::Mapping object_node :value, '', :class => PositionIntervalType, :optional => false end # Contains a spatial velocity CoordInterval. class VelocityIntervalType object_node :vel_time_unit, '@vel_time_unit', :class => VelTimeUnitType, :optional => false end class VelocityInterval include XML::Mapping object_node :value, '', :class => VelocityIntervalType, :optional => false end # Points to a Region file. class RegionFileType object_node :file, 'File', :class => Resources::VOResource::V0_10::AnyURI, :optional => false end class RegionFile include XML::Mapping object_node :value, '', :class => RegionFileType, :optional => false end # Contains an abstract Region. class RegionType full_object_node :region, STC::group_member_names(Region, STCregion::V1_20::SubstitutionGroups).join('|'), :unmarshaller => STC::dispatch_from_element_name('VORuby::STCregion::V1_20'), :optional => true end class Region include XML::Mapping object_node :value, '', :class => RegionType, :optional => false end # Contains a Velocity CoordInterval element: a 1-D range, 2-D box, or 3-D cube; plus a time unit for velocity values. class VelInterval; end # Contains a 1-D spectral interval. class SpectralIntervalType object_node :unit, '@unit', :class => SpectralUnitType, :optional => false end # Contains a 1-D redshift interval; position and time units are required if redshifts are expressed as Doppler velocities. class RedshiftIntervalType object_node :unit, '@unit', :class => PosUnitType, :optional => true object_node :vel_time_unit, '@vel_time_unit', :class => VelTimeUnitType, :optional => true end class CoordAreaType include XML::Mapping text_node :coord_area_id, '@ID', :optional => false text_node :coord_system_id, '@coord_system_id', :optional => false full_object_node :spatial_interval, STC::group_member_names(SpatialInterval, SubstitutionGroups).join('|'), :unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'), :optional => true array_node :time_intervals, 'TimeInterval', :class => TimeIntervalType, :optional => true, :default_value => [] array_node :spectral_intervals, 'SpectralInterval', :class => SpectralIntervalType, :optional => true, :default_value => [] array_node :redshift_intervals, 'RedshiftInterval', :class => RedshiftIntervalType, :optional => true, :default_value => [] full_array_node :vel_intervals, STC::group_member_names(VelInterval, SubstitutionGroups).join('|'), :unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'), :optional => true, :default_value => [] full_array_node :coord_intervals, STC::group_member_names(CoordInterval, SubstitutionGroups).join('|'), :unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'), :optional => true, :default_value => [] end # Astronomical area type. class AstroCoordAreaType array_node :coord_intervals, 'CoordScalarInterval', :class => CoordScalarInterval, :optional => true end class AstroCoordArea include XML::Mapping object_node :value, '', :class => AstroCoordAreaType, :optional => false end # Pixel area type. class PixelCoordAreaType array_node :coord_intervals, 'CoordScalarInterval', :class => CoordScalarInterval, :optional => false end class PixelCoordArea include XML::Mapping object_node :value, '', :class => PixelCoordAreaType, :optional => false end # General coordinate area description; head element but not abstract. class CoordArea; end # Abstract stcMetadata type. class STCMetadataType include XML::Mapping text_node :type_id, '@ID', :optional => true end class STCMetadata include XML::Mapping object_node :value, '', :class => STCMetadataType, :optional => false end # Generalized single stcMetadata type. class STCDescriptionType full_array_node :coord_sys, STC::group_member_names(CoordSys, SubstitutionGroups).join('|'), :unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'), :optional => false full_array_node :coords, STC::group_member_names(Coords, STCcoords::V1_20::SubstitutionGroups).join('|'), :unmarshaller => STC::dispatch_from_element_name('VORuby::STCcoords::V1_20'), :optional => true, :default_value => [] full_array_node :coord_areas, STC::group_member_names(CoordArea, SubstitutionGroups).join('|'), :unmarshaller => STC::dispatch_from_element_name('VORuby::STC::V1_20'), :optional => true, :default_value => [] end # Type for STC Resource Profile. class STCResourceProfileType include XML::Mapping text_node :type_id, '@ID', :optional => true array_node :coord_sys, 'AstroCoordSystem', :class => AstroCoordSystem, :optional => false array_node :coords, 'AstroCoords', :class => AstroCoords, :optional => false array_node :coord_area, 'AstroCoordArea', :class => AstroCoordArea, :optional => false end class STCResourceProfile include XML::Mapping object_node :value, '', :class => STCResourceProfileType, :optional => false end # Type for STC search location. class SearchLocationType text_node :type_id, '@ID', :optional => true array_node :coord_sys, 'AstroCoordSystem', :class => AstroCoordSystem, :optional => false array_node :coords, 'AstroCoords', :class => AstroCoords, :optional => true, :default_value => [] object_node :coord_area, 'AstroCoordArea', :class => AstroCoordArea, :optional => false end class SearchLocation include XML::Mapping object_node :value, '', :class => SearchLocationType, :optional => false end # Type for STC catalog entry description. class CatalogEntryLocationType text_node :type_id, '@ID', :optional => true array_node :coord_sys, 'AstroCoordSystem', :class => AstroCoordSystem, :optional => false array_node :coords, 'AstroCoords', :class => AstroCoords, :optional => false array_node :coord_area, 'AstroCoordArea', :class => AstroCoordArea, :optional => true, :default_value => [] end class CatalogEntryLocation include XML::Mapping object_node :value, '', :class => CatalogEntryLocationType, :optional => false end # Type for observational STC metadata. class ObsDataLocationType object_node :observatory_location, 'ObservatoryLocation', :class => ObservatoryLocationType, :optional => false object_node :observation_location, 'ObservationLocation', :class => ObservationLocationType, :optional => false object_node :pixel_space, 'PixelSpace', :class => PixelSpaceType, :optional => true end class ObsDataLocation include XML::Mapping object_node :value, '', :class => ObsDataLocationType, :optional => false end # Type for an observatory location. class ObservatoryLocationType text_node :type_id, '@ID', :optional => true array_node :coord_sys, 'AstroCoordSystem', :class => AstroCoordSystem, :optional => false object_node :coords, 'AstroCoords', :class => AstroCoords, :optional => false end # Type for describing the coordinate volume occupied by observational data, as seen from the observatory location. class ObservationLocationType text_node :type_id, '@ID', :optional => true array_node :coord_sys, 'AstroCoordSystem', :class => AstroCoordSystem, :optional => false object_node :coords, 'AstroCoords', :class => AstroCoords, :optional => false object_node :coord_area, 'AstroCoordArea', :class => AstroCoordArea, :optional => true end # Type to specify a pixel space. class PixelSpaceType text_node :type_id, '@ID', :optional => true object_node :coord_sys, 'PixelCoordSystem', :class => PixelCoordSystem, :optional => false object_node :coord_area, 'PixelCoordArea', :class => PixelCoordArea, :optional => false array_node :coords, 'PixelCoords', :class => PixelCoords, :optional => true end end end end