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

Module pgsphere

source code

Bindings for the pgsphere libarary and psycopg2.

Basically, once per program run, you need to call preparePgSphere(connection), and you're done.

All native representation is in rad.

Classes
  TwoSBoxes
is raised when an SBox is constructed from center and size such that it overlaps the pole.
  PgSAdapter
A base class for objects adapting pgSphere objects.
  SPoint
A point on a sphere from pgSphere.
  SCircle
A spherical circle from pgSphere.
  SPoly
A spherical polygon from pgSphere.
  SBox
A spherical box from pgSphere.
  SMoc
a MOC with a pgsphere interface.
Functions
 
removeTrailingZeroes(s)
remove zeroes in front of whitespace or the string end.
source code
 
preparePgSphere(conn) source code
Variables
  __package__ = 'gavo.utils'
Function Details

removeTrailingZeroes(s)

source code 

remove zeroes in front of whitespace or the string end.

This is used for cosmetics in STC-S strings.

>>> removeTrailingZeroes("23.3420   21.2 12.00000")
'23.342   21.2 12.'