Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Seitosh
Seitosh
Commits
9b6fe244
Commit
9b6fe244
authored
Nov 22, 2016
by
thomas.forbriger
Browse files
ts/wf [WP]: make proper use of output operators
parent
82c62733
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/ts/wf/sigfit.cc
View file @
9b6fe244
...
...
@@ -42,11 +42,12 @@
* - 11/02/2011 V1.6 add definition of traces
* - 20/02/2012 V1.7 read and write any file format (damb)
* trace selecttion requires skip trace (thof)
* - 22/11/2016 V1.8 make use of new output facilities in libtsxx
*
* ============================================================================
*/
#define SIGFIT_VERSION \
"SIGFIT V1.
7
fit signal by trial-signals"
"SIGFIT V1.
8
fit signal by trial-signals"
#include
<fstream>
#include
<iostream>
...
...
@@ -63,6 +64,7 @@
#include
<tsxx/tsxx.h>
#include
<tsxx/innerproduct.h>
#include
<tsxx/wid2timeseries.h>
#include
<tsxx/wid2tsio.h>
#include
<aff/array.h>
#include
<aff/dump.h>
#include
<aff/seriesoperators.h>
...
...
@@ -652,31 +654,26 @@ int main(int iargc, char* argv[])
}
os
<<
residualFileFree
;
}
os
<<
signal
.
header
;
os
<<
signal
.
series
();
os
<<
synthetics
.
header
;
os
<<
synthetics
.
series
();
os
<<
residual
.
header
;
os
<<
residual
.
series
();
os
<<
signal
;
os
<<
synthetics
;
os
<<
residual
;
for
(
Tbundlevec
::
const_iterator
i
=
bundlevec
.
begin
();
i
!=
bundlevec
.
end
();
i
++
)
{
os
<<
i
->
header
;
os
<<
*
i
;
}
for
(
int
i
=
1
;
i
<=
N
;
++
i
)
{
Tbundle
psyn
=
bundlevec
[
i
-
1
];
psyn
=
bundlevec
[
i
-
1
].
series
()
*
coeff
(
i
);
psyn
=
bundlevec
[
i
-
1
];
psyn
*=
coeff
(
i
);
char
chan
[
6
];
std
::
sprintf
(
chan
,
"s%1.1d"
,
i
);
psyn
.
header
.
channel
=
std
::
string
(
chan
);
os
<<
psyn
.
header
;
os
<<
psyn
;
}
os
<<
corrsignal
.
header
;
os
<<
corrsignal
.
series
();
os
<<
corrsynthetics
.
header
;
os
<<
corrsynthetics
.
series
();
os
<<
correction
.
header
;
os
<<
correction
.
series
();
os
<<
corrsignal
;
os
<<
corrsynthetics
;
os
<<
correction
;
}
// calculate rms values
...
...
src/ts/wf/soutifu.cc
View file @
9b6fe244
...
...
@@ -32,17 +32,19 @@
* - 08/09/2011 V1.1 support format modifiers
* - 30/09/2011 V1.2 support additional time series pairs
* - 19/10/2015 V1.3 provide full usage information from libstfinv
* - 22/11/2016 V1.4 make proper use of output operators
*
* ============================================================================
*/
#define SOUTIFU_VERSION \
"SOUTIFU V1.
3
inversion for source wavelet correction filter"
"SOUTIFU V1.
4
inversion for source wavelet correction filter"
#include
<iostream>
#include
<fstream>
#include
<tfxx/error.h>
#include
<tfxx/commandline.h>
#include
<tsioxx/inputoperators.h>
#include
<tsioxx/outputoperators.h>
#include
<datrwxx/readany.h>
#include
<datrwxx/writeany.h>
#include
<stfinv/stfinvany.h>
...
...
@@ -312,7 +314,7 @@ int main(int iargc, char* argv[])
// create a time series to be used in the output of convolved synthetics
// based on the input synthetics; copy trace header
Tfile
::
Ttracevector
::
Ttimeseries
cstseries
(
rdtseries
.
shape
());
cstseries
.
M
traceindex
=
sdtseries
.
M
traceindex
;
cstseries
.
set
traceindex
(
sdtseries
.
traceindex
())
;
cstseries
.
header
=
sdtseries
.
header
;
// place reference in a waveform triple
...
...
@@ -436,7 +438,7 @@ int main(int iargc, char* argv[])
// create a time series to be used in the output of convolved synthetics
// based on the input synthetics; copy trace header
Tfile
::
Ttracevector
::
Ttimeseries
cstseries
(
sdtseries
.
shape
());
cstseries
.
M
traceindex
=
sdtseries
.
M
traceindex
;
cstseries
.
set
traceindex
(
sdtseries
.
traceindex
())
;
cstseries
.
header
=
sdtseries
.
header
;
// place reference in a waveform triple
...
...
@@ -496,9 +498,7 @@ int main(int iargc, char* argv[])
os
<<
stffile
.
fileheader
.
srce
();
for
(
unsigned
int
itrace
=
0
;
itrace
<
stffile
.
size
();
++
itrace
)
{
os
<<
stffile
[
itrace
].
header
.
wid2
();
os
<<
stffile
[
itrace
].
header
.
info
();
os
<<
stffile
[
itrace
].
series
();
os
<<
stffile
[
itrace
];
}
}
// if (opt.writestf)
...
...
@@ -522,9 +522,7 @@ int main(int iargc, char* argv[])
os
<<
convolvedsynthetics
.
fileheader
.
srce
();
for
(
unsigned
int
itrace
=
0
;
itrace
<
convolvedsynthetics
.
size
();
++
itrace
)
{
os
<<
convolvedsynthetics
[
itrace
].
header
.
wid2
();
os
<<
convolvedsynthetics
[
itrace
].
header
.
info
();
os
<<
convolvedsynthetics
[
itrace
].
series
();
os
<<
convolvedsynthetics
[
itrace
];
}
}
// if (opt.writeconvolved)
...
...
@@ -548,9 +546,7 @@ int main(int iargc, char* argv[])
os
<<
convolvedseries
.
fileheader
.
srce
();
for
(
unsigned
int
itrace
=
0
;
itrace
<
convolvedseries
.
size
();
++
itrace
)
{
os
<<
convolvedseries
[
itrace
].
header
.
wid2
();
os
<<
convolvedseries
[
itrace
].
header
.
info
();
os
<<
convolvedseries
[
itrace
].
series
();
os
<<
convolvedseries
[
itrace
];
}
}
// if (opt.additionalpairs)
...
...
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