Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
IFOS2D
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Environments
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
GPIAG-Software
IFOS2D
Commits
fadfcc1b
Commit
fadfcc1b
authored
Mar 07, 2016
by
niklas.thiel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaned up pup.c file
parent
1e085c34
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
src/pup.c
src/pup.c
+7
-5
No files found.
src/pup.c
View file @
fadfcc1b
...
...
@@ -50,14 +50,14 @@ void pup(float **data_p, float **data_vy, FILE *fp, int ntr_glob, int **recpos,
nx_pot
*=
2
;
/* double columns to avaoid filtering artefacts*/
/* test: write filter to file*/
sprintf
(
pf1
,
"%s_data_p_
output.bin"
,
SEIS_FILE
);
sprintf
(
pf1
,
"%s_data_p_
.shot%i.it%i.bin"
,
SEIS_FILE
,
ishot
,
iter
);
file
=
fopen
(
pf1
,
"wb"
);
for
(
i
=
1
;
i
<=
ntr_glob
;
i
++
)
for
(
j
=
1
;
j
<=
ns
;
j
++
)
fwrite
(
&
data_p
[
i
][
j
],
sizeof
(
float
),
1
,
file
);
fclose
(
file
);
/* test: write filter to file*/
sprintf
(
pf1
,
"%s_data_vz_
output.bin"
,
SEIS_FILE
);
sprintf
(
pf1
,
"%s_data_vz_
.shot%i.it%i.bin"
,
SEIS_FILE
,
ishot
,
iter
);
file
=
fopen
(
pf1
,
"wb"
);
for
(
i
=
1
;
i
<=
ntr_glob
;
i
++
)
for
(
j
=
1
;
j
<=
ns
;
j
++
)
fwrite
(
&
data_vy
[
i
][
j
],
sizeof
(
float
),
1
,
file
);
...
...
@@ -129,12 +129,14 @@ void pup(float **data_p, float **data_vy, FILE *fp, int ntr_glob, int **recpos,
}
/* test: write filter to file*/
sprintf
(
pf1
,
"%s_spectrum.filt.shot%i.it%i.bin"
,
SEIS_FILE
,
ishot
,
iter
);
if
(
iter
==
1
&&
ishot
==
1
)
{
sprintf
(
pf1
,
"%s_spectrum.filter.bin"
,
SEIS_FILE
);
file
=
fopen
(
pf1
,
"wb"
);
for
(
i
=
1
;
i
<=
nx_pot
;
i
++
)
for
(
j
=
1
;
j
<=
ny_pot
;
j
++
)
fwrite
(
&
filtwk_full
[
j
][
i
],
sizeof
(
float
),
1
,
file
);
fclose
(
file
);
}
/* copy data to temp array */
for
(
k
=
1
;
k
<=
ntr_glob
;
k
++
)
{
for
(
i
=
1
;
i
<=
ns
;
i
++
)
{
...
...
@@ -190,7 +192,7 @@ void pup(float **data_p, float **data_vy, FILE *fp, int ntr_glob, int **recpos,
fprintf
(
FP
,
"
\n
Write PUP data to file...
\n
"
);
/* write spectrum to file */
sprintf
(
pf2
,
"%s_
pup.hand
.shot%i.it%i.bin"
,
SEIS_FILE
,
ishot
,
iter
);
sprintf
(
pf2
,
"%s_
data_pup
.shot%i.it%i.bin"
,
SEIS_FILE
,
ishot
,
iter
);
file
=
fopen
(
pf2
,
"wb"
);
for
(
i
=
1
;
i
<=
nx_pot
;
i
++
)
for
(
j
=
1
;
j
<=
ny_pot
;
j
++
)
fwrite
(
&
data_pup
[
j
][
i
],
sizeof
(
float
),
1
,
file
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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