gstlal 1.13.0
Loading...
Searching...
No Matches
util.py File Reference

A file that contains some generic plotting module code. More...

Go to the source code of this file.

Namespaces

namespace  python.plotutil
 plotting utilities module

Functions

 python.plots.util.colour_from_instruments (instruments, colours={ "G1":numpy.array(hex2color('#222222')), "H1":numpy.array(hex2color('#ee0000')), "L1":numpy.array(hex2color('#4ba6ff')), "V1":numpy.array(hex2color('#9b59b6')), "K1":numpy.array(hex2color('#ffb200')), "E1":numpy.array((1.0, 0.0, 0.0)), "E2":numpy.array((0.0, 0.8, 0.0)), "E3":numpy.array((1.0, 0.0, 1.0)), })
 python.plots.util.latexnumber (s)
 python.plots.util.latexfilename (s)

Variables

tuple python.plots.util.golden_ratio = (1. + math.sqrt(5.)) / 2.
 python.plots.util.floatpattern = re.compile("([+-]?[.0-9]+)[Ee]([+-]?[0-9]+)")

Detailed Description

A file that contains some generic plotting module code.

Review Status

Definition in file util.py.

Function Documentation

◆ colour_from_instruments()

colour_from_instruments ( instruments,
colours = { "G1": numpy.array(hex2color('#222222')), "H1": numpy.array(hex2color('#ee0000')), "L1": numpy.array(hex2color('#4ba6ff')), "V1": numpy.array(hex2color('#9b59b6')), "K1": numpy.array(hex2color('#ffb200')), "E1": numpy.array((1.0, 0.0, 0.0)), "E2": numpy.array((0.0, 0.8, 0.0)), "E3": numpy.array((1.0, 0.0, 1.0)), } )

Definition at line 42 of file util.py.

◆ latexfilename()

latexfilename ( s)
Escapes "\\" and "_" characters, and replaces " " with "~"
(non-breaking space).

Definition at line 92 of file util.py.

◆ latexnumber()

latexnumber ( s)
Convert a string of the form "d.dddde-dd" to "d.dddd \\times
10^{-dd}".  Strings that contain neither an "e" nor an "E" are
returned unchanged.

Example:

>>> import math
>>> latexnumber("%.12g" % (math.pi * 1e18))
'3.14159265359 \\\\times 10^{18}'

Definition at line 74 of file util.py.

Variable Documentation

◆ floatpattern

python.plots.util.floatpattern = re.compile("([+-]?[.0-9]+)[Ee]([+-]?[0-9]+)")

Definition at line 72 of file util.py.

◆ golden_ratio

tuple python.plots.util.golden_ratio = (1. + math.sqrt(5.)) / 2.

Definition at line 39 of file util.py.