winvコマンド専用のヘッダファイル

(Header files exclusively used by winv command)

Last Update : 2024/7/3


1. 概要 (Overview)

ymaeda_opentoolsでは全てのプログラムで共通に使用するヘッダファイルを $YMAEDA_OPENTOOL_DIR/include の下に置いており、そのマニュアルは ここにある。
Header files commonly used by all programs of ymaeda_opentools are located under $YMAEDA_OPENTOOL_DIR/include, and the documentations for these header files are available from this link.

winvコマンドではそれ以外に、 このプログラム専用のヘッダファイルを用いている。 それらは $YMAEDA_OPENTOOL_DIR/winv/src/winv_sub の下に置いてある。 ymaeda_opentools全体の共通ヘッダファイルと同様に 「特殊なヘッダファイル」と「通常のヘッダファイル」がある。
In addition, winv command uses header files exclusively used by this program. These header files are located under $YMAEDA_OPENTOOL_DIR/winv/src/winv_sub. There are two classes of header files, “special” and “normal” ones; this feature is same as header files common to the entire ymaeda_opentools.

winvコマンド専用の関数や構造体は名前が全て「TF_」から始まる。 これはThis Fileの頭文字を取ったものであり、 ymaeda_opentools全体で共通に使用する関数や構造体との 名前の重複を避けるために付けている。
The names of all functions and structures exclusively used by winv command begin with “TF_”, which means “This File”, to avoid confliction of the names against functions and structures that are used commonly in the entire ymaeda_opentools.


2. 個々のヘッダファイルのマニュアル (Documentations for individual header files)

以下はwinvコマンド専用のヘッダファイルのマニュアルである。 ヘッダファイル名は全て $YMAEDA_OPENTOOL_DIR/winv/src の下での相対パスを表す。 リンクをクリックすると各ヘッダファイルのマニュアルを閲覧できる。
The documentations for header files exclusively used winv command are shown below. All header files represent relative paths under $YMAEDA_OPENTOOL_DIR/winv/src. Documentations for individual header files are available from the links.

◆特殊なヘッダファイル (Special header files)

ヘッダファイル名
Header file name
機能・用途
Purpose
winv_sub/index.h 他のwinvコマンド専用ヘッダファイル一式を インクルードするためのヘッダファイル。
A header file to include all other header files exclusively used by winv command.
winv_sub/structure.h winvコマンド専用の構造体の定義。
Definitions of structures exclusively used by winv command.
winv_sub/grobal.h winvコマンド専用のグローバル変数の定義。
Definitions of grobal variables exclusively used by winv command.
winv_sub/prototype.h winvコマンド専用の関数のプロトタイプ。
Prototypes of functions exclusively used by winv command.

◆通常のヘッダファイル (Normal header files)

ヘッダファイル名
Header file name
機能・用途
Purpose
winv_sub/allocate.h 配列の動的メモリを確保する関数。
Functions to allocate dynamic memories for arrays.
winv_sub/fft.h フーリエ変換を行う関数。
Functions to perform Fourier transformations.
winv_sub/gridsearch.h グリッドサーチを補助する関数。
Functions to support grid searches.
winv_sub/inversion.h 逆解析を行う関数。
Functions to conduct the inverse analysis.
winv_sub/make_data_seq.h 観測波形の時系列データやフーリエスペクトルを作成する関数。
Functions to create time series data and Fourier spectra of observed waveforms.
winv_sub/make_green_seq.h 実用グリーン関数の時系列データを合成する関数。
Functions to synthesize time series data of practical Green's functions.
winv_sub/polezero.h 地震計の応答特性をファイルから読み込んで処理する関数。
Functions to read and process the responses of seismometers from files.
winv_sub/set_parameters.h コマンドライン引数やファイルから設定を読み込んで処理する関数。
Functions to read and process configurations from command-line arguments or a file.
winv_sub/spectrum.h フーリエスペクトルを計算する関数。
Functions to compute Fourier spectra.
winv_sub/write.h 解析結果や関連するデータを出力する関数。
Functions to output the analysis results and related data.


3. 関数の呼び出し構造 (A structure of function call)

winvコマンドのソースコードにおいて、関数は以下のように呼び出される。 これは関数の索引にもなっており、 関数名をクリックすると直接その関数のマニュアルを閲覧できる。
In the source code of winv command, functions are called with the tree shown below. This tree can be used for an index of functions; documentations of individual functions are available from the links of the function names.

関数mainで用いられている各変数が処理のどの段階で変化するのかを把握することは ソースコードの理解の助けになる。 そこで、各関数内で変更される変数を緑で示した。
Understanding when each variable in function main changes would facilitate understanding the source code. Therefore, the variables that change in each function are shown by green.

main (winv.c)


4. 主な変数 (Important variables)

上で緑色で示した変数の値の変化についてより詳しく整理すると以下の通りである。
Changes in the variables, summarized briefly by green colors above, are described in more detail below.


●struct TF_parameters parameters


●struct TF_dataInfo ∗dataInfo


●struct TF_modelInfo ∗modelInfo


●struct TF_focalParam focalParam


●struct TF_data_obs obs


●struct TF_kernel kernel


●struct TF_model model


●struct TF_data_syn syn