Coverage for /opt/obspy/update-docs/src/obspy/obspy/signal/rotate : 79%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
#!/usr/bin/env python #------------------------------------------------------------------- # Filename: rotate.py # Purpose: Various Seismogram Rotation Functions # Author: Tobias Megies, Tom Richter # Email: tobias.megies@geophysik.uni-muenchen.de # # Copyright (C) 2009-2012 Tobias Megies, Tom Richter #--------------------------------------------------------------------- Various Seismogram Rotation Functions
:copyright: The ObsPy Development Team (devs@obspy.org) :license: GNU Lesser General Public License, Version 3 (http://www.gnu.org/copyleft/lesser.html) """
""" Rotates horizontal components of a seismogram.
The North- and East-Component of a seismogram will be rotated in Radial and Transversal Component. The angle is given as the back-azimuth, that is defined as the angle measured between the vector pointing from the station to the source and the vector pointing from the station to the north.
:type n: :class:`~numpy.ndarray` :param n: Data of the North component of the seismogram. :type e: :class:`~numpy.ndarray` :param e: Data of the East component of the seismogram. :type ba: float :param ba: The back azimuth from station to source in degrees. :return: Radial and Transversal component of seismogram. """ raise TypeError("North and East component have different length.") raise ValueError("Back Azimuth should be between 0 and 360 degrees.")
""" Rotates horizontal components of a seismogram.
Rotates from radial and tranversal components to north and east components.
This is the inverse transformation of the transformation described in :func:`rotate_NE_RT`. """
""" Rotates all components of a seismogram.
The components will be rotated from ZNE (Z, North, East, left-handed) to LQT (e.g. ray coordinate system, right-handed). The rotation angles are given as the back-azimuth and inclination.
The transformation consists of 3 steps::
1. mirroring of E-component at ZN plain: ZNE -> ZNW 2. negative rotation of coordinate system around Z-axis with angle ba: ZNW -> ZRT 3. negative rotation of coordinate system around T-axis with angle inc: ZRT -> LQT
:type z: :class:`~numpy.ndarray` :param z: Data of the Z component of the seismogram. :type n: :class:`~numpy.ndarray` :param n: Data of the North component of the seismogram. :type e: :class:`~numpy.ndarray` :param e: Data of the East component of the seismogram. :type ba: float :param ba: The back azimuth from station to source in degrees. :type inc: float :param inc: The inclination of the ray at the station in degrees. :return: L-, Q- and T-component of seismogram. """ raise TypeError("Z, North and East component have different length!?!") raise ValueError("Back Azimuth should be between 0 and 360 degrees!") raise ValueError("Inclination should be between 0 and 360 degrees!")
""" Rotates all components of a seismogram.
The components will be rotated from LQT to ZNE. This is the inverse transformation of the transformation described in :func:`rotate_ZNE_LQT`. """ raise TypeError("L, Q and T component have different length!?!") raise ValueError("Back Azimuth should be between 0 and 360 degrees!") raise ValueError("Inclination should be between 0 and 360 degrees!") |