.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/frequencyseries/transfer_function.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_frequencyseries_transfer_function.py: .. sectionauthor:: Duncan Macleod .. currentmodule:: gwpy.timeseries Transfer function ################# In this example we demonstrate how to calculate the transfer function between two `TimeSeries` signals. All ground-based gravitational wave observatories would be unable to operate if they did not employ sophisticated ground-motion suppression technology to prevent vibrations from the local (or remote) environment from transferring through to optical components. The impact of the seismic isolation system can be seen by calculating the transfer function between the ground motion at the laboratory and that of the optical suspension points. .. GENERATED FROM PYTHON SOURCE LINES 38-43 .. code-block:: Python from gwpy.time import tconvert from gwpy.timeseries import TimeSeriesDict from gwpy.plot import BodePlot .. GENERATED FROM PYTHON SOURCE LINES 44-45 For this example we will use data from the |GWOSC_AUX_RELEASE|_: .. GENERATED FROM PYTHON SOURCE LINES 45-51 .. code-block:: Python start = tconvert("August 14 2017 10:25") end = start + 1800 gndchannel = "L1:ISI-GND_STS_ITMY_Y_DQ" suschannel = "L1:ISI-ITMY_SUSPOINT_ITMY_EUL_L_DQ" .. GENERATED FROM PYTHON SOURCE LINES 52-54 We can call the :meth:`~TimeSeriesDict.get` method of the `TimeSeriesDict` to retrieve all data in a single operation: .. GENERATED FROM PYTHON SOURCE LINES 54-64 .. code-block:: Python data = TimeSeriesDict.get( [gndchannel, suschannel], start, end, verbose=True, host="nds.gwosc.org", ) gnd = data[gndchannel] sus = data[suschannel] .. rst-class:: sphx-glr-script-out .. code-block:: none - Attempting data access from files /home/duncan.macleod/gwpy-nightly-build/conda/envs/gwpy-nightly-3.11/lib/python3.11/site-packages/igwn_auth_utils/requests.py:46: DeprecationWarning: Support for identity-based X.509 credentials for LIGO.ORG is being dropped. Calls to this utility will stop working on/around 20 May 2025. For details on this change please see https://computing.docs.ligo.org/guide/compsoft/roadmap/LVK/x509_retirement/ If you have questions about this message, or its implications, please consider opening an IGWN Computing Help Desk ticket: https://git.ligo.org/computing/helpdesk/-/issues/new return func(*args, **kwargs) Cannot locate the following channel(s) in any known frametype at GPS=1186741518: L1:ISI-GND_STS_ITMY_Y_DQ L1:ISI-ITMY_SUSPOINT_ITMY_EUL_L_DQ [files on tape have not been checked, use allow_tape=True for a complete search] Data access from files failed - Attempting data access from NDS2 .. GENERATED FROM PYTHON SOURCE LINES 65-67 The transfer function between time series is easily computed with the :meth:`~TimeSeries.transfer_function` method: .. GENERATED FROM PYTHON SOURCE LINES 67-69 .. code-block:: Python tf = gnd.transfer_function(sus, fftlength=128, overlap=64) .. GENERATED FROM PYTHON SOURCE LINES 70-72 The `~gwpy.plot.BodePlot` knows how to separate a complex-valued `~gwpy.frequencyseries.FrequencySeries` into magnitude and phase: .. GENERATED FROM PYTHON SOURCE LINES 72-82 .. code-block:: Python plot = BodePlot(tf) plot.maxes.set_title( r"L1 ITMY ground $\rightarrow$ SUS transfer function", ) plot.maxes.set_xlim(5e-2, 30) plot.show() # This example demonstrates the impressive noise suppression of the LIGO # seismic isolation system. For more details, please see # https://www.ligo.caltech.edu/page/vibration-isolation. .. image-sg:: /examples/frequencyseries/images/sphx_glr_transfer_function_001.png :alt: L1 ITMY ground $\rightarrow$ SUS transfer function :srcset: /examples/frequencyseries/images/sphx_glr_transfer_function_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 2.019 seconds) .. _sphx_glr_download_examples_frequencyseries_transfer_function.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: transfer_function.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: transfer_function.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: transfer_function.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_