Slowness vector object.
More...
#include <SlownessVector.h>
|
|
class | boost::serialization::access |
| |
Slowness vector object.
Slowness vectors are a seismology concept used to describe wave propagation. A slowness vector points in the direction of propagation of a wave with a magnitude equal to the slowness (1/velocity) of propagation.
- Author
- Gary L. Pavlis
◆ SlownessVector() [1/3]
| mspass::seismic::SlownessVector::SlownessVector |
( |
| ) |
|
Default constructor.
9 {
12 azimuth0 = 0.0;
13}
double uy
Definition SlownessVector.h:25
double ux
Definition SlownessVector.h:21
References ux, and uy.
◆ SlownessVector() [2/3]
| mspass::seismic::SlownessVector::SlownessVector |
( |
const double |
ux0, |
|
|
const double |
uy0, |
|
|
const double |
az0 = 0.0 |
|
) |
| |
Fully parameterized constructor.
A slowness vector is defined by it's components. There is one ambiguity, however, with a zero slowness vector. That is, normally direction of propagation is inferred from the vector azimuth. A zero slowness vector has physical significance (normal incidence) but presents and ambiguity in this regard. We use a defaulted az0 parameter to specify the azimuth that should be used if the magnitude of slowness vector is 0.
- Parameters
-
| ux0 | - set x (EW) component to this value. |
| uy0 | - set y (NS) component to this value. |
| az0 | - use this as azimuth (radians) if this is a zero slowness vector (default 0.0) |
20 {
23 azimuth0 = az0;
24}
References ux, and uy.
◆ SlownessVector() [3/3]
| mspass::seismic::SlownessVector::SlownessVector |
( |
const SlownessVector & |
old | ) |
|
Copy constructor.
14 {
17 azimuth0 = old.azimuth0;
18}
References ux, and uy.
◆ azimuth()
| double mspass::seismic::SlownessVector::azimuth |
( |
| ) |
const |
|
noexcept |
Returns the propagation direction defined by a slowness vector. Azimuth is a direction clockwise from north in the standard geographic convention. Value returned is in radians.
59 {
60 if (this->
mag() <= FLT_EPSILON)
61 return (azimuth0);
62 double phi;
63 phi = M_PI_2 - atan2(
uy,
ux);
64 if (phi > M_PI)
65 return (phi - 2.0 * M_PI);
66 else if (phi < -M_PI)
67 return (phi + 2.0 * M_PI);
68 else
69 return (phi);
70}
double mag() const noexcept
Definition SlownessVector.cc:58
References mag(), ux, and uy.
◆ baz()
| double mspass::seismic::SlownessVector::baz |
( |
| ) |
const |
|
noexcept |
Returns the back azimuth direction defined by a slowness vector. A back azimuth is 180 degrees away from the direction of propagation and points along the great circle path directed back to the source point from a given position. The value returned is in radians.
71 {
72 double phi;
73 if (this->
mag() <= FLT_EPSILON)
74 phi = M_PI - azimuth0;
75 else
76 phi = 3.0 * M_PI_2 - atan2(
uy,
ux);
77 if (phi > M_PI)
78 return (phi - 2.0 * M_PI);
79 else if (phi < -M_PI)
80 return (phi + 2.0 * M_PI);
81 else
82 return (phi);
83}
References mag(), ux, and uy.
◆ mag()
| double mspass::seismic::SlownessVector::mag |
( |
| ) |
const |
|
noexcept |
Computes the magntitude of the slowness vector. Value returned is in units of seconds/kilometer.
58{
return (hypot(
ux,
uy)); }
References ux, and uy.
◆ operator+()
Return the component-wise sum of two slowness vectors.
44 {
46 result += other;
47 return result;
48}
SlownessVector()
Definition SlownessVector.cc:9
◆ operator+=()
Add another slowness vector to this one component-wise.
33 {
36 return (*this);
37}
References ux, and uy.
◆ operator-()
Return the component-wise difference of two slowness vectors.
50 {
52 result -= other;
53 return result;
54}
◆ operator-=()
Subtract another slowness vector from this one component-wise.
38 {
41 return (*this);
42}
References ux, and uy.
◆ operator=()
Standard assignment operator.
25 {
26 if (this != &parent) {
29 azimuth0 = parent.azimuth0;
30 }
31 return (*this);
32}
References ux, and uy.
◆ ux
| double mspass::seismic::SlownessVector::ux |
East-west component of slowness vector.
◆ uy
| double mspass::seismic::SlownessVector::uy |
North-south component of slowness vector.
The documentation for this class was generated from the following files:
- /home/runner/work/mspass/mspass/cxx/include/mspass/seismic/SlownessVector.h
- /home/runner/work/mspass/mspass/cxx/src/lib/seismic/SlownessVector.cc