Class: VORuby::VOTable::V1_1::Coosys

Inherits:
Base show all
Defined in:
lib/voruby/votable/1.1/votable.rb

Overview

A celestial coordinate system, to which the components of a position on the celestial sphere refer.

Constant Summary collapse

ELEMENT_NAME =
'COOSYS'

Instance Attribute Summary

Attributes inherited from XML::Object::Base

#node

Instance Method Summary collapse

Methods inherited from Base

#==, element_name, #get_element, #xpath_for

Methods inherited from XML::Object::Base

#==, element_name, from_file, #to_s

Constructor Details

#initialize(defn = nil) ⇒ Coosys

Create a new coordinate system.

coosys = Coosys.new(
  :id => 'J2000',
  :equinox => 'J2000.',
  :epoch => 'J2000.',
  :system => 'eq_FK5'
)

The default system is eq_FK5.



245
246
247
248
# File 'lib/voruby/votable/1.1/votable.rb', line 245

def initialize(defn=nil)
  super(defn)
  self.system = 'eq_FK5' if !self.system
end

Instance Method Details

#epochObject



266
267
268
# File 'lib/voruby/votable/1.1/votable.rb', line 266

def epoch
  self.node['epoch']
end

#epoch=(e) ⇒ Object



270
271
272
# File 'lib/voruby/votable/1.1/votable.rb', line 270

def epoch=(e)
  @node['epoch'] = e.to_s
end

#equinoxObject



258
259
260
# File 'lib/voruby/votable/1.1/votable.rb', line 258

def equinox
  self.node['equinox']
end

#equinox=(e) ⇒ Object



262
263
264
# File 'lib/voruby/votable/1.1/votable.rb', line 262

def equinox=(e)
  @node['equinox'] = e.to_s
end

#idObject



250
251
252
# File 'lib/voruby/votable/1.1/votable.rb', line 250

def id
  self.node['ID']
end

#id=(i) ⇒ Object



254
255
256
# File 'lib/voruby/votable/1.1/votable.rb', line 254

def id=(i)
  @node['ID'] = i.to_s
end

#systemObject



274
275
276
# File 'lib/voruby/votable/1.1/votable.rb', line 274

def system
  self.node['system']
end

#system=(s) ⇒ Object

Set the system. May be one of: eq_FK4, eq_FK5, ICRS, ecl_FK4, ecl_FK5, galactic, supergalactic, xy, barycentric or geo_app.



282
283
284
# File 'lib/voruby/votable/1.1/votable.rb', line 282

def system=(s)
  @node['system'] = s.to_s
end