Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Seitosh
Seitosh
Commits
d5809e88
Commit
d5809e88
authored
Apr 15, 2016
by
thomas.forbriger
Browse files
[FIX] (dccal): fix output of residual time series
Use proper libtsioxx output operators.
parent
9d9866d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ts/cal/dccal.cc
View file @
d5809e88
...
...
@@ -33,13 +33,12 @@
* - 24/09/2007 V1.3 gain residual may have a sign
* - 21/01/2011 V1.4 estimate gain precision
* - 01/02/2014 thof: use new libtsioxx
* - 14/04/2016 thof: use proper libtsioxx output operators
*
* ============================================================================
*/
#define DCCAL_VERSION \
"DCCAL V2014-02-01 DC calibration"
#define DCCAL_CVSID \
"$Id$"
"DCCAL V2016-04-14 DC calibration"
#include <string>
#include <iostream>
...
...
@@ -51,9 +50,10 @@
#include <tfxx/misc.h>
#include <sffxx.h>
#include <libtime++.h>
#include <sffostream.h>
#include <datrwxx/readany.h>
#include <datrwxx/writeany.h>
#include <tsioxx/inputoperators.h>
#include <tsioxx/outputoperators.h>
#include <aff/subarray.h>
#include <aff/functions/sum.h>
#include <aff/functions/sqrsum.h>
...
...
@@ -674,14 +674,12 @@ int main(int iargc, char* argv[])
// define full help text
char
help_text
[]
=
{
DCCAL_CVSID
"
\n
"
"
\n
"
"infile SFF data file"
"
\n
"
"tabfile ASCII table that defines calibration input"
"
\n
"
"resfile write residuals to resfile"
"
\n
"
"logfile write results to logfile"
"
\n
"
"-v be verbose"
"
\n
"
"-type t
input
file type"
"
\n
"
"-type t
time series
file type"
"
\n
"
"-units u set data file sample units"
"
\n
"
"-gain g set desired differential mode gain"
"
\n
"
"
\n
"
...
...
@@ -768,17 +766,15 @@ int main(int iargc, char* argv[])
datrw
::
ianystream
ins
(
infs
,
opt
.
inputformat
);
std
::
ifstream
tabfs
(
tabfilename
.
c_str
());
std
::
ofstream
resfs
(
resfilename
.
c_str
());
sff
::
SFFostream
<
Tseries
>
ress
(
resfs
);
datrw
::
oanystream
ress
(
resfs
,
opt
.
inputformat
);
std
::
ofstream
logfs
(
logfilename
.
c_str
());
/*----------------------------------------------------------------------*/
if
(
opt
.
verbose
)
{
cout
<<
DCCAL_VERSION
<<
endl
;
cout
<<
DCCAL_CVSID
<<
endl
;
}
logfs
<<
DCCAL_VERSION
<<
endl
;
logfs
<<
DCCAL_CVSID
<<
endl
;
/*----------------------------------------------------------------------*/
// initialize calibrator
...
...
@@ -804,8 +800,8 @@ int main(int iargc, char* argv[])
Ttimeseries
::
Tconsttimeseries
cts
(
timeseries
,
timeseries
.
header
);
Results
results
=
calibrator
(
cts
,
opt
.
acqpar
);
ress
<<
results
.
residual
;
if
(
opt
.
verbose
)
{
cout
<<
results
;
}
logfs
<<
results
;
if
(
opt
.
verbose
)
{
cout
<<
"
\n
"
<<
results
;
}
logfs
<<
"
\n
"
<<
results
;
}
// end of cycling through all traces
}
...
...
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