Package pylal :: Module galaxyutils
[hide private]
[frames] | no frames]

Module galaxyutils

source code


Author: Nickolas Fotopoulos <nvf@gravity.phys.uwm.edu>

Classes [hide private]
  CBCGC
class for working with the galaxy catalog created and maintained by the CBC group
  GalaxyCatalog
left here to maintain compatibility with existing codes
  GWGC
useful class for dealing with the gravitational wave galaxy catalog
  CBCGGalaxy
A galaxy object that knows how to initialize itself from a line in a text file and consumes a minimum of memory.
  GWGCgalaxy
A galaxy object that knows how to initialize itself from a line in a text file and consumes a minimum of memory.
Functions [hide private]
 
_make_within_pi(angles)
Make an array of angles completely between -pi and pi.
source code
 
is_inside_polygon(point, vertices)
Return True if the (2-D) point is inside the (2-D) polygon defined by the vertices.
source code
 
is_within_distances(gal_dist, dmin, dmax)
Return True if dmax > gal_dist > dmin
source code
 
hms2rad(ra_sex)
Convert right ascension and from a sexagesimal string to floating point radians.
source code
 
dms2rad(dec_sex)
Convert declination from a colon-delimited sexagesimal string to floating point radians.
source code
 
hm2rad(ra_sex)
Convert right ascension and from a sexagesimal string to floating point radians.
source code
 
dm2rad(dec_sex)
Convert declination from a colon-delimited sexagesimal string to floating point radians.
source code
 
amin2rad_or_tilde(amins)
convert arcminutes to radians
source code
 
deg2rad_or_tilde(degs)
convert degrees to radians
source code
 
h2rad(hours)
convert hours to radians
source code
 
float_or_tilde(num)
deal with the use of tildes (and other strings) for unknown float quantities in the GWGC catalog
source code
 
int_or_tilde(num)
deal with the use of tildes for unknown int quantities in the GWGC catalog
source code
Function Details [hide private]

is_inside_polygon(point, vertices)

source code 

Return True if the (2-D) point is inside the (2-D) polygon defined by the vertices.

Warning: Result is undefined for points lying along the edge of the polygon.

Adapted from: http://local.wasp.uwa.edu.au/~pbourke/geometry/insidepoly/ (solution 2)

hms2rad(ra_sex)

source code 

Convert right ascension and from a sexagesimal string to floating point radians. Handles h:m:s or h:m.

dms2rad(dec_sex)

source code 

Convert declination from a colon-delimited sexagesimal string to floating point radians. Handles d:m:s.

hm2rad(ra_sex)

source code 

Convert right ascension and from a sexagesimal string to floating point radians. Handles h:m.

dm2rad(dec_sex)

source code 

Convert declination from a colon-delimited sexagesimal string to floating point radians. Handles d:m.