sacrotateコマンド マニュアル

(The documentation of sacrotate command)

Last Update: 2022/7/28


◆機能・用途(Purpose)

SAC時系列データの水平2成分を用いて 方位を回転させた時系列データを作成する。
Create time series data by rotating the directions from two horizontal components of original time series data.


◆ソースコード(Source code)

$YMAEDA_OPENTOOL_DIR/sac_data/src/sacrotate.c


◆使用方法(Usage)

コマンドライン引数でパラメータを指定する。 パラメータの一覧を下表に示す。
Specify parameters by command-line arguments. The table below shows a list of parameters.


●「-」から始まらない引数 (Arguments not beginning with “-”)

このコマンドでは「-」から始まらない引数は存在しない。
This command does not have arguments not beginning with “-”.


●1つの「-」から始まる引数 (Arguments beginning with a single “-”)

このコマンドでは1つの「-」から始まる引数は存在しない。
This command does not have arguments beginning with a single “-”.


●「--パラメータ名=パラメータ値」の形式の引数 (Arguments of a form “--Parameter name=Parameter Value”)

「--パラメータ名=パラメータ値」の形式の引数は自由な順番で指定できる。 「-」から始まらない引数の間に挿入しても良い。 相反する指定がなされた場合には後の指定が優先される。 デフォルト値を持つパラメータは省略できる。
Arguments of a form “--Parameter name=Parameter Value” can be placed in an arbitrary order. They can even be inserted between arguments not beginning with “-”. In case of conflicting options being specified, the latter option has a higher priority. Parameters that have default values can be omitted.

パラメータ名
Parameter name
意味
Meaning
可能なパラメータ値
Allowed parameter values
デフォルト値
Default value
Efile 東西成分(東が正)の入力SACファイル名。
The name of the input SAC file for EW component; positive must be eastward.
ファイル名。
A file name.
省略不可
Cannot be omitted
Nfile 南北成分(北が正)の入力SACファイル名。
The name of the input SAC file for NS component; positive must be northward.
ファイル名。
A file name.
省略不可
Cannot be omitted
mode 目的と処理内容。
The purpose and processings to be done.
  • correct
    地震計の設置方位のずれの修正を目的とする。 パラメータEfile, Nfileで指定した入力SACファイルを 正しい設置方位に直した時系列データで上書きする。
    Correct the misorientation of the seismometer at the installation. The input SAC files specified by parameters Efile and Nfile are overwritten by time series data corrected for the orientation.

  • EN2RT
    東西・南北成分の組合せから radial, transverse成分の組合せに変換する。 入力SACファイルはそのまま残し、 radial, transverse成分のSACファイルを新たに作成する。
    Convert the components from EW and NS to radial and transverse. New SAC files for the radial and transverse components are created, keeping the input SAC files unchanged.

省略不可
Cannot be omitted
angle 回転角度(°)。 実際に地震計が設置されている方位の、 正しい方位からのずれの角度を反時計回りで指定する。
The angle of rotation (°). Specify the angle of misorientation of the seismometer from the correct direction in counterclockwise.
実数。
A real number.
mode=correctの場合は省略不可、 mode=EN2RTの場合は用いられない。
Cannot be omitted in case of mode=correct, while this parameter is not used in case of mode=EN2RT.
station 観測点の水平位置(直交座標)。 \(x\)座標(東)と\(y\)座標(北)をカンマ(,)で区切って与える。
The horizontal location (cartesian coordinate) of the station, given by the \(x\) (east) and \(y\) (north) coordinates separated by a comma (,).
2つの実数をカンマ(,)で区切って並べた文字列。
A string composed of two real numbers separated by a comma (,).
mode=EN2RTの場合は省略不可、 mode=correctの場合は用いられない。
Cannot be omitted in case of mode=EN2RT, while this parameter is not used in case of mode=correct.
source radial, transverseの基準点の水平位置(直交座標)。 \(x\)座標(東)と\(y\)座標(北)をカンマ(,)で区切って与える。
The horizontal location (cartesian coordinate) of the reference point for defining the radial and transverse, given by the \(x\) (east) and \(y\) (north) coordinates separated by a comma (,).
2つの実数をカンマ(,)で区切って並べた文字列。
A string composed of two real numbers separated by a comma (,).
mode=EN2RTの場合は省略不可、 mode=correctの場合は用いられない。
Cannot be omitted in case of mode=EN2RT, while this parameter is not used in case of mode=correct.
Rfile radial成分の時系列データの出力先SACファイル名。
The name of the output SAC file into which the time series data for the radial component will be written.
ファイル名。
A file name.
mode=EN2RTの場合は省略不可、 mode=correctの場合は用いられない。
Cannot be omitted in case of mode=EN2RT, while this parameter is not used in case of mode=correct.
Tfile transverse成分の時系列データの出力先SACファイル名。
The name of the output SAC file into which the time series data for the transverse component will be written.
ファイル名。
A file name.
mode=EN2RTの場合は省略不可、 mode=correctの場合は用いられない。
Cannot be omitted in case of mode=EN2RT, while this parameter is not used in case of mode=correct.

なお、radialは パラメータsourceで与えた位置からパラメータstationで与えた位置に 向かう方位(外向き)を正とし、 transverseはradialを反時計回りに90°回転させた向きを正とする。
The positive direction of the radial is defined outward, from the location given by parameter source to that given by parameter station. The positive direction of the transverse is defined as 90° counterclockwise from the radial direction.


◆動作(Behaviour)

● --mode=correctオプションが指定された場合 (When --mode=correct option was specified)

パラメータEfile, Nfileで指定したファイルからSAC時系列データを読み込み、 それらがパラメータangleで指定した角度だけ 正しい方位から反時計回りにずれて設置された地震計によって 観測されたデータであると仮定して 正しい東西・南北方向の時系列データを作成する。 SACファイルを修正後の時系列データで上書きする。
Read SAC time series data from files specified by parameters Efile and Nfile, and compute time series data for correct EW and NS components assuming that the input data were recorded by a seismometer that was misoriented counterclockwise by the angle specified by parameter angle. The input SAC files are overwritten by the corrected time series data.


● --mode=EN2RTオプションが指定された場合 (When --mode=EN2RT option was specified)

パラメータEfile, Nfileで指定したファイルからSAC時系列データを読み込み、 それらを元にradial, transverse成分の時系列データを合成して パラメータRfile, Tfileで指定したファイルに出力する。
Read SAC time series data from files specified by parameters Efile and Nfile, synthetize them to create radial and transverse components, and output the resultant time series data into files specified by parameters Rfile and Tfile.


◆使用例(Example)

● 例1: 地震計の設置方位の修正 (Example 1: Correction for the misorientation of a seismometer)

観測点ST1で観測された東西成分の波形がファイルST1.E.sacに、 南北成分の波形がファイルST1.N.sacに記録されているものとする。 観測点ST1の地震計は正しい方位から反時計回りに10°ずれて設置されているものとする。 このとき、ファイルST1.E.sac, ST1.N.sacを 正しい東西・南北成分の時系列データに修正するには 以下のコマンドを実行すれば良い。
Suppose that the EW and NS components of waveforms at a station ST1 are recorded in files ST1.E.sac and ST1.N.sac, respectively. Suppose that the seismometer at the station ST1 is misoriented counterclockwise by 10°. To correct for the data in files ST1.E.sac and ST1.N.sac to time series data in correct EW and NS directions, use the command below.

sacrotate --Efile=ST1.E.sac --Nfile=ST1.N.sac --mode=correct --angle=10.0


● 例2: radial, transverse成分の波形の合成 (Example 2: Synthetizing waveforms in radial and transverse directions)

観測点ST2の座標を\((1000,2000)\)とし、 この観測点で観測された波形の東西成分がファイルST2.E.sacに、 南北成分がファイルST2.N.sacに記録されているものとする。 これらを元に座標\((0,-100)\)を基準点とするradial, transverse成分の波形 (ファイルST2.R.sac, ST2.T.sac)を合成するには以下のコマンドを実行すれば良い。
Suppose that the EW and NS components of waveforms at a station ST2 (coordinate: \((1000,2000)\)) are recorded in files ST2.E.sac and ST2.N.sac, respectively. To synthetize waveforms in radial and transverse directions (files ST2.R.sac and ST2.T.sac, respectively), from a reference point at a coordinate \((0,100)\) use the command below.

sacrotate --Efile=ST2.E.sac --Nfile=ST2.N.sac --mode=EN2RT --source=0.0,-100.0 --station=1000.0,2000.0 --Rfile=ST2.R.sac --Tfile=ST2.T.sac


◆計算式(Formula)

● 地震計の設置方位の修正 (Correction for the misorientation of a seismometer)

地震計の東西成分の向きの単位ベクトルを\(\myvector{\epsilon_e^{in}}\)、 南北成分の向きの単位ベクトルを\(\myvector{\epsilon_n^{in}}\)、 正しい東方向の単位ベクトルを\(\myvector{\epsilon_e^c}\)、 北方向の単位ベクトルを\(\myvector{\epsilon_n^c}\)とする。 地震計は正しい方位から角度\(\theta\)だけ反時計回りにずれて 設置されているものとする。 このとき\(\myvector{\epsilon_e^{in}}\)と\(\myvector{\epsilon_e^c}\)、 \(\myvector{\epsilon_n^{in}}\)と\(\myvector{\epsilon_n^c}\) のなす角は\(\theta\)であるので \[\begin{equation} \myvector{\epsilon_e^{in}}\cdot\myvector{\epsilon_e^c}=\cos\theta \label{eq.correction.ee} \end{equation}\] \[\begin{equation} \myvector{\epsilon_n^{in}}\cdot\myvector{\epsilon_n^c}=\cos\theta \label{eq.correction.nn} \end{equation}\] が成り立つ。また \(\myvector{\epsilon_e^{in}}\)と\(\myvector{\epsilon_n^c}\)のなす角は \(\pi/2-\theta\)であるので \[\begin{equation} \myvector{\epsilon_e^{in}}\cdot\myvector{\epsilon_n^c} =\cos\left(\frac{\pi}{2}-\theta\right) =\sin\theta \label{eq.correction.en} \end{equation}\] が成り立ち、 \(\myvector{\epsilon_n^{in}}\)と\(\myvector{\epsilon_e^c}\)のなす角は \(\theta+\pi/2\)であるので \[\begin{equation} \myvector{\epsilon_n^{in}}\cdot\myvector{\epsilon_e^c} =\cos\left(\theta+\frac{\pi}{2}\right) =-\sin\theta \label{eq.correction.ne} \end{equation}\] が成り立つ。
Let the unit vectors in the directions of EW and NS components of the seismometer be \(\myvector{\epsilon_e^{in}}\) and \(\myvector{\epsilon_n^{in}}\), respectively, and let the unit vectors in correct east and north directions be \(\myvector{\epsilon_e^c}\) and \(\myvector{\epsilon_n^c}\), respectively. Suppose that the seismometer is misoriented counterclockwise by angle \(\theta\). In this case, the angles between \(\myvector{\epsilon_e^{in}}\) and \(\myvector{\epsilon_e^c}\), and between \(\myvector{\epsilon_n^{in}}\) and \(\myvector{\epsilon_n^c}\), are \(\theta\), giving Eqs. (\ref{eq.correction.ee}) and (\ref{eq.correction.nn}). The angle between \(\myvector{\epsilon_e^{in}}\) and \(\myvector{\epsilon_n^c}\) is \(\pi/2-\theta\), yielding Eq. (\ref{eq.correction.en}), while the angle between \(\myvector{\epsilon_n^{in}}\) and \(\myvector{\epsilon_e^c}\) is \(\theta+\pi/2\) so that Eq. (\ref{eq.correction.ne}) holds.

変位ベクトル(あるいは速度ベクトル)を\(\myvector{u}(t)\)として、 観測波形の東西成分は \[\begin{equation} u_e^{in}(t)=\myvector{u}(t)\cdot\myvector{\epsilon_e^{in}} \label{eq.correction.u_e_in} \end{equation}\] 南北成分は \[\begin{equation} u_n^{in}(t)=\myvector{u}(t)\cdot\myvector{\epsilon_n^{in}} \label{eq.correction.u_n_in} \end{equation}\] と表される。また正しい東西方向の波形は \[\begin{equation} u_e^c(t)=\myvector{u}(t)\cdot\myvector{\epsilon_e^c} \label{eq.correction.u_e_c} \end{equation}\] 南北方向の波形は \[\begin{equation} u_n^c(t)=\myvector{u}(t)\cdot\myvector{\epsilon_n^c} \label{eq.correction.u_n_c} \end{equation}\] と表される。 観測波形\(u_e^{in}(t)\), \(u_n^{in}(t)\)を元に \(u_e^c(t)\), \(u_n^c(t)\)を合成すれば良いので、 (\ref{eq.correction.ee})-(\ref{eq.correction.ne})式を用いて \[\begin{eqnarray} u_e^c(t) &=& \myvector{u}(t)\cdot\myvector{\epsilon_e^c} \nonumber \\ &=& \left[u_e^{in}(t)\myvector{\epsilon_e^{in}} +u_n^{in}(t)\myvector{\epsilon_n^{in}}\right] \cdot\myvector{\epsilon_e^c} \nonumber \\ &=& u_e^{in}(t)\myvector{\epsilon_e^{in}}\cdot\myvector{\epsilon_e^c} +u_n^{in}(t)\myvector{\epsilon_n^{in}}\cdot\myvector{\epsilon_e^c} \nonumber \\ &=& u_e^{in}(t)\cos\theta -u_n^{in}(t)\sin\theta \label{eq.correction.e} \end{eqnarray}\] \[\begin{eqnarray} u_n^c(t) &=& \myvector{u}(t)\cdot\myvector{\epsilon_n^c} \nonumber \\ &=& \left[u_e^{in}(t)\myvector{\epsilon_e^{in}} +u_n^{in}(t)\myvector{\epsilon_n^{in}}\right] \cdot\myvector{\epsilon_n^c} \nonumber \\ &=& u_e^{in}(t)\myvector{\epsilon_e^{in}}\cdot\myvector{\epsilon_n^c} +u_n^{in}(t)\myvector{\epsilon_n^{in}}\cdot\myvector{\epsilon_n^c} \nonumber \\ &=& u_e^{in}(t)\sin\theta +u_n^{in}(t)\cos\theta \label{eq.correction.n} \end{eqnarray}\] と計算できる。
Let \(\myvector{u}(t)\) be a displacement (or velocity) vector. The EW and NS components of the observed waveforms are represented by Eqs. (\ref{eq.correction.u_e_in}) and (\ref{eq.correction.u_n_in}), respectively, while the correct EW and NS waveforms are represented by Eqs. (\ref{eq.correction.u_e_c}) and (\ref{eq.correction.u_n_c}), respectively. The computation needed is to synthetize \(u_e^c(t)\) and \(u_n^c(t)\) from the observed waveforms \(u_e^{in}(t)\) and \(u_n^{in}(t)\), which can be realized by Eqs. (\ref{eq.correction.e}) and (\ref{eq.correction.n}), where Eqs. (\ref{eq.correction.ee})-(\ref{eq.correction.ne}) were used.


● radial, transverse成分の波形の合成 (Synthetizing waveforms in radial and transverse directions)

パラメータsourceで指定した基準点の座標を\((x_o,y_o)\)、 パラメータstationで指定した観測点の座標を\((x,y)\)とする。 基準点から観測点までの距離を\(r\)、 基準点から観測点への単位方向ベクトルを\(\myvector{\epsilon_r}\)、 それに直交する方向の単位ベクトルを\(\myvector{\epsilon_t}\)とする。 但し\(\myvector{\epsilon_t}\)は\(\myvector{\epsilon_r}\)を 反時計回りに90°回転させた向きに取る。 このとき \[\begin{equation} r=\sqrt{(x-x_o)^2+(y-y_o)^2} \label{eq.EN2RT.r} \end{equation}\] \[\begin{equation} \myvector{\epsilon_r}=\frac{(x-x_o,y-y_o)}{r} \label{eq.EN2RT.epsilon_r} \end{equation}\] \[\begin{equation} \myvector{\epsilon_t}=\frac{(-(y-y_o),x-x_o)}{r} \label{eq.EN2RT.epsilon_t} \end{equation}\] である。
Let the coordinate of the reference point specified by parameter source be \((x_o,y_o)\), and that of the station specified by parameter station) be \((x,y)\). Let \(r\) and \(\myvector{\epsilon_r}\) be the distance and the unit directional vector from the reference point to the station. Let \(\myvector{\epsilon_t}\) be a unit vector oriented 90° counterclockwise from \(\myvector{\epsilon_r}\). Then Eqs. (\ref{eq.EN2RT.r})-(\ref{eq.EN2RT.epsilon_t}) hold.

変位ベクトル(あるいは速度ベクトル)を\(\myvector{u}(t)\)、 観測波形の東西成分を\(u_e(t)\)、南北成分を\(u_n(t)\)とすると、 観測波形のradial成分は \[\begin{eqnarray} u_r(t) &=& \myvector{u}(t)\cdot\myvector{\epsilon_r} \nonumber \\ &=& (u_e(t),u_n(t))\cdot\frac{(x-x_o,y-y_o)}{r} \nonumber \\ &=& \frac{u_e(t)(x-x_o)+u_n(t)(y-y_o)}{r} \nonumber \\ &=& \frac{u_e(t)(x-x_o)+u_n(t)(y-y_o)}{\sqrt{(x-x_o)^2+(y-y_o)^2}} \label{eq.EN2RT.ur} \end{eqnarray}\] transverse成分は \[\begin{eqnarray} u_t(t) &=& \myvector{u}(t)\cdot\myvector{\epsilon_t} \nonumber \\ &=& (u_e(t),u_n(t))\cdot\frac{(-(y-y_o),x-x_o)}{r} \nonumber \\ &=& \frac{-u_e(t)(y-y_o)+u_n(t)(x-x_o)}{r} \nonumber \\ &=& \frac{-u_e(t)(y-y_o)+u_n(t)(x-x_o)}{\sqrt{(x-x_o)^2+(y-y_o)^2}} \label{eq.EN2RT.ut} \end{eqnarray}\] と計算できる。
Let \(\myvector{u}(t)\) be a displacement (or velocity) vector, and \(u_e(t)\) and \(u_n(t)\) be the EW and NS components of the observed waveform, respectively. The radial and transverse components can then be computed by Eqs. (\ref{eq.EN2RT.ur}) and (\ref{eq.EN2RT.ut}), respectively.