.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/table/tiles.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_table_tiles.py: .. sectionauthor:: Duncan Macleod .. currentmodule:: gwpy.table Plotting an `EventTable` as 2-d tiles ##################################### I would like to study the event triggers generated by the `ExcessPower `_ gravitational-wave burst detection algorithm, over a small stretch of data. The data from which these events were generated contain a simulated gravitational-wave signal, or hardware injection, used to validate the performance of the LIGO detectors and downstream data analysis procedures. .. GENERATED FROM PYTHON SOURCE LINES 35-38 First, we import the `EventTable` object and read in a set of events from a LIGO_LW-format XML file containing a :class:`sngl_burst ` table .. GENERATED FROM PYTHON SOURCE LINES 38-45 .. code-block:: Python from gwpy.table import EventTable events = EventTable.read( "H1-LDAS_STRAIN-968654552-10.xml.gz", tablename="sngl_burst", columns=["peak", "central_freq", "bandwidth", "duration", "snr"], ) .. GENERATED FROM PYTHON SOURCE LINES 46-53 .. note:: Here we manually specify the `columns` to read in order to optimise the `read()` operation to parse only the data we actually need. We can make a plot of these events as 2-dimensional tiles by specifying the x- and y-axis columns, and the widths in those directions: .. GENERATED FROM PYTHON SOURCE LINES 53-69 .. code-block:: Python plot = events.tile( "peak", "central_freq", "duration", "bandwidth", color="snr", ) ax = plot.gca() ax.set_yscale("log") ax.set_ylabel("Frequency [Hz]") ax.set_epoch(968654552) ax.set_xlim(968654552, 968654552+10) ax.set_title("LIGO-Hanford event tiles for HW100916") ax.colorbar(clim=[1, 8], cmap="YlGnBu", label="Signal-to-noise ratio (SNR)") plot.show() .. image-sg:: /examples/table/images/sphx_glr_tiles_001.png :alt: LIGO-Hanford event tiles for HW100916 :srcset: /examples/table/images/sphx_glr_tiles_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.377 seconds) .. _sphx_glr_download_examples_table_tiles.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: tiles.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: tiles.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: tiles.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_