Esempio n. 1
0
 def test_gen_plot(self):
     product, args = self.test_get_timeseries()
     product.config_plot(args)
     rcParams.update({
         'text.usetex': False,
     })
     product.gen_plot(args)
     return product, args
Esempio n. 2
0
   StateVectorDataPlot
   SpectrumDataPlot
   TimeSeriesHistogramPlot
   TriggerTimeSeriesDataPlot
   TriggerHistogramPlot
   TriggerRateDataPlot
"""

from matplotlib import __version__ as mpl_version

from gwpy.plotter import rcParams
rcParams.update({
    'figure.subplot.bottom': 0.17,
    'figure.subplot.left': 0.1,
    'figure.subplot.right': 0.9,
    'figure.subplot.top': 0.90,
    'axes.labelsize': 20,
    'grid.color': 'gray',
    'svg.fonttype': 'none',
})

# use new viridis colormap by default
if '1.5' <= mpl_version < '2.0':
    rcParams['image.cmap'] = 'viridis'

from gwsumm import version

__author__ = 'Duncan Macleod <*****@*****.**>'
__version__ = version.version

from .registry import *
Esempio n. 3
0
from lxml import etree

from matplotlib.colors import LogNorm

from gwpy.plotter import (rcParams, HistogramPlot, EventTablePlot,
                          TimeSeriesPlot, Plot)
from gwpy.plotter.table import get_column_string

__author__ = 'Duncan Macleod <*****@*****.**>'
__credits__ = 'Josh Smith, Joe Areeda'

rcParams.update({
    'figure.subplot.bottom': 0.17,
    'figure.subplot.left': 0.1,
    'figure.subplot.right': 0.9,
    'figure.subplot.top': 0.90,
    'axes.labelsize': 24,
    'axes.labelpad': 2,
    'grid.color': 'gray',
})

SHOW_HIDE_JAVASCRIPT = """
    <script type="text/ecmascript">
    <![CDATA[

    function init(evt) {
        if ( window.svgDocument == null ) {
            svgDocument = evt.target.ownerDocument;
            }
        }
Esempio n. 4
0
 def test_gen_plot(self):
     product, args = self.test_get_timeseries()
     product.config_plot(args)
     rcParams.update({'text.usetex': False,})
     product.gen_plot(args)
     return product, args
Esempio n. 5
0
from __future__ import division
import numpy
from matplotlib import pyplot
from matplotlib.colors import to_hex
from gwpy.plotter import rcParams

rcParams.update({
    'text.usetex': False,
    'font.size': 15
})

th = numpy.linspace(0, 2*numpy.pi, 512)
names = [
     'gwpy:geo600',
     'gwpy:kagra',
     'gwpy:ligo-hanford',
     'gwpy:ligo-india',
     'gwpy:ligo-livingston',
     'gwpy:virgo',
]

fig = pyplot.figure(figsize=(5, 2))
ax = fig.gca()
ax.axis('off')

for j, name in enumerate(sorted(names)):
    c = str(to_hex(name))
    print(name, c)
    v_offset = -(j / len(names))
    ax.plot(th, .1*numpy.sin(th) + v_offset, color=c)
    ax.annotate("{!r}".format(name), (0, v_offset), xytext=(-1.5, 0),
Esempio n. 6
0
from __future__ import division
import numpy
from matplotlib import pyplot
from matplotlib.colors import to_hex
from gwpy.plotter import rcParams

rcParams.update({'text.usetex': False, 'font.size': 15})

th = numpy.linspace(0, 2 * numpy.pi, 512)
names = [
    'gwpy:geo600',
    'gwpy:kagra',
    'gwpy:ligo-hanford',
    'gwpy:ligo-india',
    'gwpy:ligo-livingston',
    'gwpy:virgo',
]

fig = pyplot.figure(figsize=(5, 2))
ax = fig.gca()
ax.axis('off')

for j, name in enumerate(sorted(names)):
    c = str(to_hex(name))
    print(name, c)
    v_offset = -(j / len(names))
    ax.plot(th, .1 * numpy.sin(th) + v_offset, color=c)
    ax.annotate("{!r}".format(name), (0, v_offset),
                xytext=(-1.5, 0),
                ha='right',
                va='center',
Esempio n. 7
0
# You should have received a copy of the GNU General Public License
# along with GWDV.  If not, see <http://www.gnu.org/licenses/>

"""GWDV: The gravitational-wave data viewer
"""

from . import version

__author__ = 'Duncan Macleod <*****@*****.**>'
__credits__ = 'The LIGO Laboratory, and the LIGO Scientific Collaboration'
__version__ = version.version

from gwpy.plotter import rcParams

# set default params
rcParams.update({
    'figure.subplot.bottom': 0.17,
    'figure.subplot.left': 0.1,
    'figure.subplot.right': 0.9,
    'figure.subplot.top': 0.90,
})

del rcParams

# import user-level monitors
from .config import *
from .registry import *
from .timeseries import *
from .spectrum import *
from .spectrogram import *