Skip to content
Snippets Groups Projects
Commit 63faa799 authored by Arash Rezaei Nevisi's avatar Arash Rezaei Nevisi
Browse files

maximum allowed offset added - TW:3 details added to inv-all-parameter and logfile

parent 902bff9f
No related branches found
No related tags found
No related merge requests found
......@@ -135,6 +135,14 @@
"TW_EXP_END" : "500",
"TW_SIN_START" : "0.008",
"TW_SIN_END" : "0.012",
"lta_length" : "0.2",
"sta_length" : "0.05",
"TW_TOP" : "0.2",
"TW_BOT" : "0.2",
"THRESHOLD_STALTA" : "0.1",
"OFFSET_MIN_MUTE" : "300",
"OFFSET_MAX_MUTE" : "1000",
"BAD_TRACE_THRESHOLD" : "1",
"Steplength estimation" : "comment",
"NSHOTS_STEP" : "4",
......
......@@ -102,7 +102,8 @@ void exchange_par(GlobVar *gv)
fdum[65] = gv->TW_BOT;
fdum[66] = gv->THRESHOLD_STALTA;
fdum[67] = gv->OFFSET_MIN_MUTE;
fdum[68] = gv->BAD_TRACE_THRESHOLD;
fdum[68] = gv->OFFSET_MAX_MUTE;
fdum[69] = gv->BAD_TRACE_THRESHOLD;
idum[0] = gv->FDORDER;
idum[1] = gv->NPROCX;
......@@ -266,7 +267,8 @@ void exchange_par(GlobVar *gv)
gv->TW_BOT = fdum[65];
gv->THRESHOLD_STALTA = fdum[66];
gv->OFFSET_MIN_MUTE = fdum[67];
gv->BAD_TRACE_THRESHOLD = fdum[68];
gv->OFFSET_MAX_MUTE = fdum[68];
gv->BAD_TRACE_THRESHOLD = fdum[69];
gv->FDORDER = idum[0];
gv->NPROCX = idum[1];
......
......@@ -233,6 +233,7 @@ typedef struct {
float TW_BOT; // the window length below the detected arrival[s]
float THRESHOLD_STALTA; // ratio that detects the early arrival
float OFFSET_MIN_MUTE; // minimum offset mute around the source [m] (0: off)
float OFFSET_MAX_MUTE; // maximum offset that the data can be used from the source [m] (0: off)
float BAD_TRACE_THRESHOLD; // ratio that detects the bad traces on field data and remove them (0: off)
int NSHOTS_STEP; // number of shots used for estimation of steplength
......
......@@ -693,7 +693,13 @@ void read_par_json(GlobVar *gv)
}
if (get_float_from_objectlist("OFFSET_MIN_MUTE", number_readobjects, &(gv->OFFSET_MIN_MUTE), varname_list, value_list, used_list)) {
log_fatal("Variable OFFSET_MIN_MUTE could not be retrieved from the json input file!\n");
gv->OFFSET_MIN_MUTE = 0;
log_debug("Variable OFFSET_MIN_MUTE is set to default value %.1f.\n", gv->OFFSET_MIN_MUTE);
}
if (get_float_from_objectlist("OFFSET_MAX_MUTE", number_readobjects, &(gv->OFFSET_MAX_MUTE), varname_list, value_list, used_list)) {
gv->OFFSET_MAX_MUTE = 0;
log_debug("Variable OFFSET_MAX_MUTE is set to default value %.1f.\n", gv->OFFSET_MAX_MUTE);
}
} else {
......
......@@ -242,20 +242,22 @@ void time_window(float **sectiondata1, float **sectiondata2, int **recpos_loc, i
for(i=1;i<=ntr_loc;i++){
if (gv->OFFSET_MIN_MUTE > 0) {
if ((gv->OFFSET_MIN_MUTE > 0) || (gv->OFFSET_MAX_MUTE > 0)) {
// Compute receiver physical coordinates.
nxrec = (recpos_loc[1][i] - 1 + gv->POS[1] * gv->NX) * gv->DX;
nzrec = (recpos_loc[3][i] - 1 + gv->POS[3] * gv->NZ) * gv->DZ;
// (Optional) Standard mute: if the receiver is within the offset window around the source.
if ((nxrec >= nxsrc - gv->OFFSET_MIN_MUTE) && (nxrec <= nxsrc + gv->OFFSET_MIN_MUTE) &&
(nzrec >= nzsrc - gv->OFFSET_MIN_MUTE) && (nzrec <= nzsrc + gv->OFFSET_MIN_MUTE)) {
// if the receiver is within the offset window around the source.
if (((nxrec > nxsrc - gv->OFFSET_MIN_MUTE) && (nxrec < nxsrc + gv->OFFSET_MIN_MUTE) &&
(nzrec > nzsrc - gv->OFFSET_MIN_MUTE) && (nzrec < nzsrc + gv->OFFSET_MIN_MUTE)) ||
((nxrec < nxsrc - gv->OFFSET_MAX_MUTE) || (nxrec > nxsrc + gv->OFFSET_MAX_MUTE) ||
(nzrec < nzsrc - gv->OFFSET_MAX_MUTE) || (nzrec > nzsrc + gv->OFFSET_MAX_MUTE))) {
for (int j = 1; j < gv->NT; j++) {
sectiondata1[i][j] = 0;
sectiondata2[i][j] = 0;
}
}
}
}
......
......@@ -458,10 +458,12 @@ void writepar(GlobVar *gv)
log_info("RHOMIN=%.2fkg/m^3, RHOMAX=%.2fkg/m^3\n", gv->RHOMIN, gv->RHOMAX);
log_info("Time windowing: %d\n", gv->USE_TW);
if (1 == gv->USE_TW) {
log_info(" ------------------------- External Mute function -------------.\n");
log_info("Start reading mute file at line: %d\n", gv->TW_START_READING_AT_LINE);
log_info("Exponential factor of top mute: %.2f\n", gv->TW_EXP_START);
log_info("Exponential factor of base mute: %.2f\n", gv->TW_EXP_END);
} else if (2 == gv->USE_TW) {
log_info(" ------------------------- External Mute function -------------.\n");
log_info("Start reading mute file at line: %d\n", gv->TW_START_READING_AT_LINE);
log_info("Size of taper zone for top mute [ms]: %.2f\n", gv->TW_SIN_START);
if (0 <= gv->TW_SIN_START) {
......@@ -475,7 +477,21 @@ void writepar(GlobVar *gv)
} else {
log_info("Base mute will taper to the inside.\n");
}
}
} else if (3 == gv->USE_TW) {
log_info(" ------------------------- Internal Mute function -------------.\n");
log_info("STA/LTA method: length of long window -> %f sec\n", gv->lta_length);
log_info("STA/LTA method: length of short window -> %f sec\n", gv->sta_length);
log_info("STA/LTA method: Threshold -> %f \n", gv->THRESHOLD_STALTA);
log_info("Window length above the first arrival -> %f sec\n", gv->TW_TOP);
log_info("Window length below the first arrival -> %f sec\n", gv->TW_BOT);
if ((gv->OFFSET_MIN_MUTE > 0) || (gv->OFFSET_MAX_MUTE > 0)){
log_info("Offset Mute: minimum offset allowed -> %f meter\n", gv->OFFSET_MIN_MUTE );
log_info("Offset Mute: maximum offset allowed -> %f meter\n", gv->OFFSET_MAX_MUTE);
}
if (gv->BAD_TRACE_THRESHOLD > 0){
log_info("Treshold to detect bad trace from field data: %f\n", gv->BAD_TRACE_THRESHOLD );
}
}
log_info("------------------------- Steplength estimation -------------\n");
log_info("No. of shots per steplength estimation: %d\n", gv->NSHOTS_STEP);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment