Set STF_FULL to 1 in order to ignore the time window and use the total...

Set STF_FULL to 1 in order to ignore the time window and use the total wavefield to invert for the source time function.
parent 0ce7427d
...@@ -642,7 +642,7 @@ To remove the contribution of the unknown source time function (STF) from the wa ...@@ -642,7 +642,7 @@ To remove the contribution of the unknown source time function (STF) from the wa
"TRKILL_STF" : "0", "TRKILL_STF" : "0",
"TRKILL_FILE_STF" : "./trace_kill/trace_kill", "TRKILL_FILE_STF" : "./trace_kill/trace_kill",
"STF_FULL" : "0",
"TRKILL_STF_OFFSET" : "0", "TRKILL_STF_OFFSET" : "0",
"TRKILL_STF_OFFSET_LOWER" : "10", "TRKILL_STF_OFFSET_LOWER" : "10",
"TRKILL_STF_OFFSET_UPPER" : "20", "TRKILL_STF_OFFSET_UPPER" : "20",
...@@ -654,7 +654,7 @@ Default values are: ...@@ -654,7 +654,7 @@ Default values are:
INV_STF=0 INV_STF=0
\end{verbatim}}} \end{verbatim}}}
INV\_STF should be switched to 1 if you want to invert for the source time function. INV\_STF should be switched to 1 if you want to invert for the source time function. If STF\_FULL is set to 1 then the total wavefield is used to invert for the source time function and the time window is ignored.
\newline \newline
An example for the parameter string provided in PARA is: An example for the parameter string provided in PARA is:
......
...@@ -30,7 +30,7 @@ void exchange_par(void){ ...@@ -30,7 +30,7 @@ void exchange_par(void){
extern float XREC1, XREC2, YREC1, YREC2, FPML; extern float XREC1, XREC2, YREC1, YREC2, FPML;
extern float REC_ARRAY_DEPTH, REC_ARRAY_DIST, MUN, EPSILON, EPSILON_u, EPSILON_rho; extern float REC_ARRAY_DEPTH, REC_ARRAY_DIST, MUN, EPSILON, EPSILON_u, EPSILON_rho;
extern int SEISMO, NDT, NGEOPH, SEIS_FORMAT, FREE_SURF, READMOD, READREC, SRCREC; extern int SEISMO, NDT, NGEOPH, SEIS_FORMAT, FREE_SURF, READMOD, READREC, SRCREC;
extern int BOUNDARY, REC_ARRAY, DRX, FW; extern int BOUNDARY, REC_ARRAY, DRX, FW, STF_FULL;
extern int SNAPSHOT_START,SNAPSHOT_END,SNAPSHOT_INCR; extern int SNAPSHOT_START,SNAPSHOT_END,SNAPSHOT_INCR;
extern float TSNAP1, TSNAP2, TSNAPINC, REFREC[4]; extern float TSNAP1, TSNAP2, TSNAPINC, REFREC[4];
extern char MFILE[STRING_SIZE], SIGNAL_FILE[STRING_SIZE],SIGNAL_FILE_SH[STRING_SIZE], LOG_FILE[STRING_SIZE]; extern char MFILE[STRING_SIZE], SIGNAL_FILE[STRING_SIZE],SIGNAL_FILE_SH[STRING_SIZE], LOG_FILE[STRING_SIZE];
...@@ -377,7 +377,7 @@ void exchange_par(void){ ...@@ -377,7 +377,7 @@ void exchange_par(void){
idum[116]=TRKILL_STF_OFFSET_INVERT; idum[116]=TRKILL_STF_OFFSET_INVERT;
idum[117]=JOINT_EQUAL_WEIGHTING; idum[117]=JOINT_EQUAL_WEIGHTING;
idum[118]=STF_FULL;
} /** if (MYID == 0) **/ } /** if (MYID == 0) **/
MPI_Barrier(MPI_COMM_WORLD); MPI_Barrier(MPI_COMM_WORLD);
...@@ -664,7 +664,7 @@ void exchange_par(void){ ...@@ -664,7 +664,7 @@ void exchange_par(void){
TRKILL_STF_OFFSET_INVERT=idum[116]; TRKILL_STF_OFFSET_INVERT=idum[116];
JOINT_EQUAL_WEIGHTING=idum[117]; JOINT_EQUAL_WEIGHTING=idum[117];
STF_FULL=idum[118];
if ( MYID!=0 && L>0 ) { if ( MYID!=0 && L>0 ) {
FL=vector(1,L); FL=vector(1,L);
} }
......
...@@ -14,7 +14,7 @@ float XREC1, XREC2, YREC1, YREC2; ...@@ -14,7 +14,7 @@ float XREC1, XREC2, YREC1, YREC2;
float REC_ARRAY_DEPTH, REC_ARRAY_DIST; float REC_ARRAY_DEPTH, REC_ARRAY_DIST;
float REFREC[4]={0.0, 0.0, 0.0, 0.0}, FPML; float REFREC[4]={0.0, 0.0, 0.0, 0.0}, FPML;
int SEISMO, NDT, NGEOPH, NSRC=1, SEIS_FORMAT, FREE_SURF, READMOD, READREC, SRCREC, FW=0; int SEISMO, NDT, NGEOPH, NSRC=1, SEIS_FORMAT, FREE_SURF, READMOD, READREC, SRCREC, FW=0;
int NX, NY, NT, SOURCE_SHAPE,SOURCE_SHAPE_SH, SOURCE_TYPE, SNAP, SNAP_FORMAT, REC_ARRAY, RUN_MULTIPLE_SHOTS, NTRG; int NX, NY, NT, SOURCE_SHAPE,SOURCE_SHAPE_SH, SOURCE_TYPE, SNAP, SNAP_FORMAT, REC_ARRAY, RUN_MULTIPLE_SHOTS, NTRG,STF_FULL;
int L, BOUNDARY, DC, DRX, NXG, NYG, IDX, IDY, FDORDER, MAXRELERROR; int L, BOUNDARY, DC, DRX, NXG, NYG, IDX, IDY, FDORDER, MAXRELERROR;
char SNAP_FILE[STRING_SIZE], SOURCE_FILE[STRING_SIZE], SIGNAL_FILE[STRING_SIZE], SIGNAL_FILE_SH[STRING_SIZE]; char SNAP_FILE[STRING_SIZE], SOURCE_FILE[STRING_SIZE], SIGNAL_FILE[STRING_SIZE], SIGNAL_FILE_SH[STRING_SIZE];
char MFILE[STRING_SIZE], REC_FILE[STRING_SIZE]; char MFILE[STRING_SIZE], REC_FILE[STRING_SIZE];
...@@ -147,4 +147,4 @@ int JOINT_EQUAL_WEIGHTING; ...@@ -147,4 +147,4 @@ int JOINT_EQUAL_WEIGHTING;
float JOINT_INVERSION_PSV_SH_ALPHA_VS; float JOINT_INVERSION_PSV_SH_ALPHA_VS;
float JOINT_INVERSION_PSV_SH_ALPHA_RHO; float JOINT_INVERSION_PSV_SH_ALPHA_RHO;
int SNAPSHOT_START,SNAPSHOT_END,SNAPSHOT_INCR; int SNAPSHOT_START,SNAPSHOT_END,SNAPSHOT_INCR;
\ No newline at end of file
...@@ -128,6 +128,7 @@ void read_par_json(FILE *fp, char *fileinp){ ...@@ -128,6 +128,7 @@ void read_par_json(FILE *fp, char *fileinp){
extern float WOLFE_C1_SL; extern float WOLFE_C1_SL;
extern float WOLFE_C2_SL; extern float WOLFE_C2_SL;
extern int STF_FULL;
/* definition of local variables */ /* definition of local variables */
int number_readobjects=0,fserr=0; int number_readobjects=0,fserr=0;
...@@ -763,6 +764,9 @@ void read_par_json(FILE *fp, char *fileinp){ ...@@ -763,6 +764,9 @@ void read_par_json(FILE *fp, char *fileinp){
TRKILL_STF=0; TRKILL_STF=0;
fprintf(fp,"Variable TRKILL_STF is set to default value %d.\n",TRKILL_STF);} fprintf(fp,"Variable TRKILL_STF is set to default value %d.\n",TRKILL_STF);}
else { else {
if (get_int_from_objectlist("STF_FULL",number_readobjects,&STF_FULL,varname_list, value_list)){
STF_FULL=0;
fprintf(fp,"Variable STF_FULL is set to default value %d.\n",STF_FULL);}
if (TRKILL_STF==1) { if (TRKILL_STF==1) {
if (get_int_from_objectlist("TRKILL_STF_OFFSET",number_readobjects,&TRKILL_STF_OFFSET,varname_list, value_list)){ if (get_int_from_objectlist("TRKILL_STF_OFFSET",number_readobjects,&TRKILL_STF_OFFSET,varname_list, value_list)){
TRKILL_STF_OFFSET=0; TRKILL_STF_OFFSET=0;
......
...@@ -28,7 +28,7 @@ void stf(FILE *fp, float **sectionvy, float ** sectionvy_obs, float ** sectionvy ...@@ -28,7 +28,7 @@ void stf(FILE *fp, float **sectionvy, float ** sectionvy_obs, float ** sectionvy
/* declaration of global variables */ /* declaration of global variables */
extern float DT, DH; extern float DT, DH;
extern int SEIS_FORMAT, MYID, NT, SOURCE_SHAPE, TIME_FILT, TIMEWIN, TAPER_STF, ORDER; extern int SEIS_FORMAT, MYID, NT, SOURCE_SHAPE, TIME_FILT, TIMEWIN, TAPER_STF, ORDER, STF_FULL;
extern char PARA[STRING_SIZE], DATA_DIR[STRING_SIZE]; extern char PARA[STRING_SIZE], DATA_DIR[STRING_SIZE];
extern int TRKILL_STF, NORMALIZE, USE_WORKFLOW, WORKFLOW_STAGE; extern int TRKILL_STF, NORMALIZE, USE_WORKFLOW, WORKFLOW_STAGE;
extern char TRKILL_FILE_STF[STRING_SIZE]; extern char TRKILL_FILE_STF[STRING_SIZE];
...@@ -160,10 +160,10 @@ void stf(FILE *fp, float **sectionvy, float ** sectionvy_obs, float ** sectionvy ...@@ -160,10 +160,10 @@ void stf(FILE *fp, float **sectionvy, float ** sectionvy_obs, float ** sectionvy
} }
/* trace killing ends here */ /* trace killing ends here */
if(TIMEWIN==1){ if((TIMEWIN==1)&&(STF_FULL==0)){
time_window_glob(sectionvy, iter, ntr_glob, ns, ishot); time_window_glob(sectionvy, iter, ntr_glob, ns, ishot);
time_window_glob(sectionvy_obs, iter, ntr_glob, ns, ishot); time_window_glob(sectionvy_obs, iter, ntr_glob, ns, ishot);
} }
/* NORMALIZE TRACES */ /* NORMALIZE TRACES */
if(NORMALIZE==1){ if(NORMALIZE==1){
...@@ -358,4 +358,4 @@ void stf(FILE *fp, float **sectionvy, float ** sectionvy_obs, float ** sectionvy ...@@ -358,4 +358,4 @@ void stf(FILE *fp, float **sectionvy, float ** sectionvy_obs, float ** sectionvy
free_imatrix(kill_tmp,1,ntr_glob,1,nshots); free_imatrix(kill_tmp,1,ntr_glob,1,nshots);
free_ivector(kill_vector,1,ntr_glob); free_ivector(kill_vector,1,ntr_glob);
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment