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
a7e5bb3a
Commit
a7e5bb3a
authored
Jan 31, 2019
by
thomas.forbriger
Browse files
libpsdxx [WP]: add debug output
parent
4b46012f
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/libs/libpsdxx/debug.h
View file @
a7e5bb3a
...
...
@@ -39,6 +39,8 @@
#define PSDXX_DEBUG_H_VERSION \
"PSDXX_DEBUG_H V1.1"
#include
<iostream>
/*! \brief produce debug output
* \ingroup group_debug
*
...
...
src/libs/libpsdxx/dpsdcomputer_processor.cc
View file @
a7e5bb3a
...
...
@@ -123,6 +123,9 @@ namespace psd {
const
Tseries
::
Tcoc
&
inputseries2
=
s2
.
data
;
const
double
&
dt
=
s1
.
interval
;
PSDXX_debug
(
this
->
debug
(),
"DPSDComputer::processor"
,
PSDXX_value
(
dt
));
PSDXX_assert
(
dt
>
0.
,
"illegal sampling interval"
);
if
(
cpsd_flag
)
{
...
...
@@ -155,6 +158,8 @@ namespace psd {
{
nsegsamples
=
2
*
inputseries1
.
size
()
/
(
this
->
Mnsegments
+
1
);
}
PSDXX_debug
(
this
->
debug
(),
"DPSDComputer::processor"
,
PSDXX_value
(
nsegsamples
));
// adjust length of time series
if
(
this
->
Mdivisor
>
1
)
...
...
@@ -175,9 +180,13 @@ namespace psd {
<<
std
::
endl
;
}
}
PSDXX_debug
(
this
->
debug
(),
"DPSDComputer::processor"
,
PSDXX_value
(
nsegsamples
));
// segment stride
int
segstride
=
inputseries1
.
size
()
/
(
this
->
Mnsegments
+
1
);
PSDXX_debug
(
this
->
debug
(),
"DPSDComputer::processor"
,
PSDXX_value
(
segstride
));
if
(
this
->
Mverbose
&&
(
this
->
Mnsegments
>
1
))
{
...
...
@@ -375,7 +384,7 @@ namespace psd {
psd1
*=
scalingfactor
;
PSDXX_debug
(
this
->
debug
(),
"DPSDComputer::processor"
,
"scaled PSD"
);
if
(
this
->
debug
())
{
DUMP
(
psd1
);
}
/*
if (this->debug()) { DUMP(psd1); }
*/
PSDXX_assert
(
aff
::
func
::
min
(
psd1
)
>=
0.
,
"must be positive; this error indicates a bug"
);
if
(
cpsd_flag
)
...
...
src/libs/libpsdxx/dpsdcomputer_psd.cc
View file @
a7e5bb3a
...
...
@@ -34,11 +34,14 @@
"PSDXX_DPSDCOMPUTER_PSD_CC V1.0"
#include
<psdxx/psd.h>
#include
<psdxx/debug.h>
namespace
psd
{
TDISeries
DPSDComputer
::
psd
(
const
TDISeries
::
Tcoc
&
s
)
const
{
PSDXX_debug
(
this
->
debug
(),
"DPSDComputer::psd"
,
PSDXX_value
(
s
.
interval
));
SpectralValues
sv
=
this
->
processor
(
s
,
s
,
false
,
true
);
TDISeries
retval
(
sv
.
psd1
);
return
(
retval
);
...
...
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