Commit 9202aaa2 authored by thomas.forbriger's avatar thomas.forbriger
Browse files

timeseries [WP]: use new assignment operators

parent a8df5ca0
......@@ -28,6 +28,8 @@
*
* REVISIONS and CHANGES
* - 01/02/2005 V1.0 Thomas Forbriger
* - 22/11/2016 V1.1 use new assignment operators of time series
* containers
*
* ============================================================================
*/
......@@ -169,16 +171,17 @@ int main(int iargc, char* argv[])
Tts data;
Tts::Tseries samples;
is >> samples >> data.header;
data.series()=samples;
data=samples;
sff::INFO info;
is >> info;
if (opt.verbose) { cout << data.header.line() << endl; }
Tts result=ts::correlate(data,data)/Tts::Tvalue(data.size());
Tts result(ts::correlate(data,data));
result /= Tts::Tvalue(data.size());
result.header=data.header;
result.header.auxid="corr";
result.header.date=srce.date
+(result.first()*libtime::double2time(result.header.dt));
os << result.series() << result.header;
os << Tts::Tseries(result) << result.header;
if (is.hasinfo()) { os << info; }
}
++I;
......
......@@ -478,7 +478,7 @@ int main(int iargc, char* argv[])
tracefree.append("read from file " + infile->name);
os << tracefree;
}
os << outseries.series();
os << Tseries(outseries);
TFXX_debug(opt.debug, "main",
"trace #" << itrace << " successfully processed");
}
......
......@@ -405,7 +405,7 @@ int main(int iargc, char* argv[])
Tbundle synsignal;
synsignal.header=signal.header;
synsignal=Tseries(signal.shape());
synsignal.series()=opt.ampoffset;
synsignal=opt.ampoffset;
synsignal.header.station="NSP";
synsignal.header.channel="off";
synsignal.header.auxid="NSP";
......@@ -596,7 +596,7 @@ int main(int iargc, char* argv[])
// set up synthetics
Tbundle synthetics;
synthetics=Tseries(signal.shape());
synthetics.series()=0.;
synthetics=0.;
for (int i=1; i<=N; ++i)
{ synthetics += coeff(i) * bundlevec[i-1]; }
synthetics.header=signal.header;
......@@ -605,7 +605,7 @@ int main(int iargc, char* argv[])
// set up correction
Tbundle correction;
correction=Tseries(signal.shape());
correction.series()=0.;
correction=0.;
if (ntracesread<bundlevec.size())
{
for (int i=ntracesread; i<N; ++i)
......
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