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

Class SPoly

source code

object --+    
         |    
PgSAdapter --+
             |
            SPoly

A spherical polygon from pgSphere.

The constructor accepts a list points of SPoints.

Instance Methods
 
__init__(self, points)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
asDALI(self)
returns the DALI form of this polygon.
source code
 
asCooPairs(self)
returns the vertices as a sequence of (long, lat) pairs in degrees.
source code
 
asSTCS(self, systemString) source code
 
asPgSphere(self) source code
 
asPoly(self) source code
 
asSMoc(self, order=6, inclusive=True)
returns an SMoc instance for this polygon.
source code

Inherited from PgSAdapter: __eq__, __ne__, __repr__, asSODA

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

Class Methods
 
fromDALI(cls, daliSeq)
returns a polygon from a DALI float-sequence
source code
Class Variables
  pgType = 'spoly'
hash(x)
  checkedAttributes = ['points']
  pattern = re.compile(r'\([^\)]+\)')
Properties

Inherited from object: __class__

Method Details

__init__(self, points)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

asDALI(self)

source code 

returns the DALI form of this polygon.

This is a sequence of floats of the vertex coordinates in degrees.

fromDALI(cls, daliSeq)
Class Method

source code 

returns a polygon from a DALI float-sequence

This returns None for empty daliSeqs to help with VOTable NULL value handling.

asCooPairs(self)

source code 

returns the vertices as a sequence of (long, lat) pairs in degrees.

This form is required by some functions from base.coords.

asPoly(self)

source code 
Overrides: PgSAdapter.asPoly

asSMoc(self, order=6, inclusive=True)

source code 

returns an SMoc instance for this polygon.

If inclusive is False, do not include healpixes that lie

order is the maximum order of the moc returned.