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
0ab36294
Commit
0ab36294
authored
Jan 14, 2019
by
thomas.forbriger
Browse files
libpsdxx [WP]: provide test plot for LogTaper
parent
efb65cbd
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/libs/libpsdxx/Makefile
View file @
0ab36294
...
...
@@ -55,8 +55,9 @@ SOURCEFILES=$(filter-out %usage.h, $(filter-out %usage.cc, \
EDITFILES
=
Makefile
$(README)
\
$(DOXYTXT)
\
$(SOURCEFILES)
\
$(
wildcard
*
.cfg
)
\
$(
wildcard
*
.cfg
*
.gpt
)
\
COPYING
# ============================================================================
# check for settings expected in the environment
# ----------------------------------------------
...
...
@@ -250,9 +251,19 @@ doxyview: $(DOXYWWWPATH)/html/index.html
# test code
# ---------
testpsdxx
:
testpsdxx.cc
testpsdxx
:
testpsdxx.cc
install
$(CXX)
-o
$@
$<
-I
$(LOCINCLUDEDIR)
-lpsdxx
-ltsxx
-lfourierxx
-laff
\
-ltfxx
-lfftw3
\
-L
$(LOCLIBDIR)
$(CXXFLAGS)
$(FLAGS)
# ----------------------------------------------------------------------
# test LogTaper
LOGTAPERINDEX
=
3
logtaper.xxx
:
testpsdxx
./
$<
-lt
=
$(LOGTAPERINDEX)
>
$@
logtaper.ps
:
testlogtaper.gpt logtaper.xxx
gnuplot
$<
%.psp
:
%.ps; gv $<; /bin/rm -fv $<
# ----- END OF Makefile -----
src/libs/libpsdxx/testlogtaper.gpt
0 → 100644
View file @
0ab36294
#!/usr/bin/gnuplot -persist
#
#
# G N U P L O T
# Version 5.0 patchlevel 0 last modified 2015-01-01
#
# Copyright (C) 1986-1993, 1998, 2004, 2007-2015
# Thomas Williams, Colin Kelley and many others
#
# gnuplot home: http://www.gnuplot.info
# faq, bugs, etc: type "help FAQ"
# immediate help: type "help" (plot window: hit 'h')
#
# Type `load "all.dem"` to display a large number of examples.
# They are located at /usr/share/doc/packages/gnuplot/demo/*
#
# set terminal qt 0 font "Sans,9"
set terminal postscript color solid
set output 'logtaper.ps'
set logscale x
unset logscale y
set mxtics 10
set grid
set title 'LogTaper'
set xlabel 'frequency / Hz'
set ylabel 'taper value'
plot 'logtaper.xxx' skip 12 u 2:3 w l
# EOF
src/libs/libpsdxx/testpsdxx.cc
View file @
0ab36294
...
...
@@ -153,9 +153,10 @@ int main(int iargc, char* argv[])
if
(
opt
.
logtaper
)
{
const
int
nsamples
=
300
;
cout
<<
"test class LogTaper"
<<
endl
;
CODE
(
psd
::
TDseries
linf
=
psd
::
lin_frequency
(
0.1
,
100
)
);
CODE
(
psd
::
TDseries
logf
=
psd
::
log_frequency
(
0.1
,
100
,
6
)
);
CODE
(
psd
::
TDseries
linf
=
psd
::
lin_frequency
(
0.1
,
nsamples
)
);
CODE
(
psd
::
TDseries
logf
=
psd
::
log_frequency
(
0.1
,
nsamples
,
6
)
);
CODE
(
psd
::
helper
::
LogTaper
logt
(
logf
,
opt
.
taperindex
)
);
DUMP
(
logf
);
cout
<<
PSDXX_value
(
logf
(
opt
.
taperindex
)
)
<<
endl
;
...
...
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