Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GPIAG-Software
IFOS2D
Commits
04449613
Commit
04449613
authored
Sep 29, 2016
by
Florian Wittkamp
Browse files
Bugfix: Writing filtered and windowed seismograms
Will write filtered and windowed displacement seismograms to disk.
parent
012efcd9
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/calc_misfit.c
View file @
04449613
...
...
@@ -202,6 +202,14 @@ double calc_misfit(float **sectiondata, float **section, int ntr, int ns, int LN
}
}
for
(
i
=
1
;
i
<=
ntr
;
i
++
){
for
(
j
=
1
;
j
<=
ns
;
j
++
){
sectiondata
[
i
][
j
]
=
intseis_sectiondata
[
i
][
j
];
section
[
i
][
j
]
=
intseis_section
[
i
][
j
];
}
}
l2
=
L2
;
/* printf("\n MYID = %i IN CALC_MISFIT: L2 = %10.12f \n",MYID,l2); */
...
...
src/saveseis_glob.c
View file @
04449613
...
...
@@ -24,7 +24,7 @@
void
saveseis_glob
(
FILE
*
fp
,
float
**
sectionvx
,
float
**
sectionvy
,
float
**
sectionvz
,
float
**
sectionp
,
float
**
sectioncurl
,
float
**
sectiondiv
,
int
**
recpos
,
int
**
recpos_loc
,
int
ntr
,
float
**
srcpos
,
int
ishot
,
int
ns
,
int
iter
,
int
type_switch
){
/* type_switch:
/* type_switch:
* 1== synthetic data
* 2== measured - synthetic data (residuals)
* 3== filtered measured data
...
...
@@ -32,6 +32,7 @@ void saveseis_glob(FILE *fp, float **sectionvx, float **sectionvy,float **sectio
extern
int
SEISMO
,
SEIS_FORMAT
,
RUN_MULTIPLE_SHOTS
,
WAVETYPE
,
VERBOSE
,
FORWARD_ONLY
;
extern
char
SEIS_FILE
[
STRING_SIZE
];
extern
int
VELOCITY
;
char
vxf
[
STRING_SIZE
],
vyf
[
STRING_SIZE
],
vzf
[
STRING_SIZE
],
curlf
[
STRING_SIZE
],
divf
[
STRING_SIZE
],
pf
[
STRING_SIZE
];
int
nsrc
=
1
;
...
...
@@ -60,10 +61,18 @@ void saveseis_glob(FILE *fp, float **sectionvx, float **sectionvy,float **sectio
break
;
case
3
:
sprintf
(
vxf
,
"%s_vx.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
sprintf
(
vyf
,
"%s_vy.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
sprintf
(
vzf
,
"%s_vz.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
if
(
VELOCITY
==
0
){
sprintf
(
vxf
,
"%s_dx.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
sprintf
(
vyf
,
"%s_dy.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
sprintf
(
vzf
,
"%s_dz.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
}
}
else
{
sprintf
(
vxf
,
"%s_vx.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
sprintf
(
vyf
,
"%s_vy.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
sprintf
(
vzf
,
"%s_vz.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
}
}
sprintf
(
pf
,
"%s_p.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
sprintf
(
divf
,
"%s_div.su.measured.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
...
...
@@ -71,10 +80,18 @@ void saveseis_glob(FILE *fp, float **sectionvx, float **sectionvy,float **sectio
break
;
case
4
:
sprintf
(
vxf
,
"%s_vx.su.filtered.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
sprintf
(
vyf
,
"%s_vy.su.filtered.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
sprintf
(
vzf
,
"%s_vz.su.filtered.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
if
(
VELOCITY
==
0
){
sprintf
(
vxf
,
"%s_dx.su.filtered.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
sprintf
(
vyf
,
"%s_dy.su.filtered.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
sprintf
(
vzf
,
"%s_dz.su.filtered.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
}
}
else
{
sprintf
(
vxf
,
"%s_vx.su.filtered.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
sprintf
(
vyf
,
"%s_vy.su.filtered.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
if
(
WAVETYPE
==
2
||
WAVETYPE
==
3
)
{
sprintf
(
vzf
,
"%s_vz.su.filtered.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
}
}
sprintf
(
pf
,
"%s_p.su.filtered.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
sprintf
(
divf
,
"%s_div.su.filtered.shot%d.it%d"
,
SEIS_FILE
,
ishot
,
iter
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment