関数rotate_sequence マニュアル

(The documentation of function rotate_sequence)

Last Update: 2025/7/23


◆機能・用途(Purpose)

ベクトル量の面内での振動のデータ(2つの時系列データの組)において、使用する座標軸を回転する。
Rotate the coordinate axes used to express the oscillation data of a vector quantity in a plane.


◆形式(Format)

#include <sequence/operation.h>
inline void rotate_sequence
(struct sequence seq1,struct sequence seq2,double theta)


◆引数(Arguments)

seq1 ベクトル量の1つ目の成分の時系列データ。 座標回転後のものに関数内で置換される。
A time series data for the 1st component of a vector. This time series data will be replaced by that after the rotation of coordinate in the function.
seq2 ベクトル量の2つ目の成分の時系列データ。 回転面内で1つ目の時系列データを反時計回りに90°回転させた方向の成分 (例:水平面内の回転でseq1が東西成分の場合はseq2は南北成分) であることを仮定する。 座標回転後のものに関数内で置換される。
A time series data for the 2nd component of a vector, which is assumed to be 90° counterclockwise on the rotation plane from the direction of the 1st time series data. This time series data will be replaced by that after the rotation of coordinate in the function.
theta 回転角度(°)。反時計回りを正とする。
The rotation angle (°) counterclockwise.


◆動作(Behaviour)

引数seq1, seq2が表す時系列データを 引数thetaで与えた角度だけ回転させた座標軸で表現したデータで 引数seq1, seq2を置き換える。
Replace the time series data given by arguments seq1 and seq2 with those on a coordinate system that is rotated by the angle given by argument theta.


◆使用例(Example)

struct sequence data1=read_sequence_file("E.seq1");
struct sequence data2=read_sequence_file("N.seq1");
rotate_sequence(data1,data2,-30.0);

この例においてE.seq1が東西成分、N.seq1が南北成分の地震波形記録である場合、 関数実行後はdata1がN120°E成分、data2がN30°E成分の波形記録となる。
If E.seq1 and N.seq1 recorded EW and NS components of a seismogram, respectively, then data1 and data2 after the function call represent N120°E and N30°E components, respectively.