Package gavo :: Package utils :: Module pgsphere :: Class SPoint
[frames] | no frames]

Class SPoint

source code

object --+    
         |    
PgSAdapter --+
             |
            SPoint

A point on a sphere from pgSphere.

>>> SPoint(1, 1).asSTCS("ICRS")
'Position ICRS 57.2957795131 57.2957795131'
>>> SPoint.fromDegrees(1, -1).asSTCS("ICRS")
'Position ICRS 1. -1.'
Instance Methods
 
__init__(self, x, y)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__repr__(self)
repr(x)
source code
 
asCooPair(self)
returns this point as (long, lat) in degrees.
source code
 
asSTCS(self, systemString) source code
 
asPgSphere(self) source code
 
p(self) source code
 
asUnitSphereVec(self)
returns self as a triple of cx, cy, cz on the unit sphere.
source code
 
asDALI(self) source code

Inherited from PgSAdapter: __eq__, __ne__, asPoly, asSODA

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods
 
fromDegrees(cls, x, y) source code
 
fromDALI(cls, coos) source code
Class Variables
  pgType = 'spoint'
hash(x)
  checkedAttributes = ['x', 'y']
  pattern = re.compile(r'\s*\(\s*([0-9\.e-]+)\s*,\s*([0-9\.e-]+)...
Properties

Inherited from object: __class__

Method Details

__init__(self, x, y)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

Class Variable Details

pattern

Value:
re.compile(r'\s*\(\s*([0-9\.e-]+)\s*,\s*([0-9\.e-]+)\s*\)')