Commit 97dabba7 authored by thomas.forbriger's avatar thomas.forbriger
Browse files

croposp [FIX]: properly handle seeding of rng

parent 80e5eaea
......@@ -67,13 +67,14 @@ tsparameters:
# --------------------------------
# Choose:
RNGTYPE=ranlxd2
RNGSEED=0
RNGSEED=-seed 0
RNGSEED=
# create to raw time series
whitenoise.bin:
randomseries -v -o -t bin -rngtype $(RNGTYPE) \
-nsamples $(TS_N) \
-dt $(TS_DT) -seed $(RNGSEED) \
-dt $(TS_DT) $(RNGSEED) \
-std $(TS_RMS) -mean 0. $@
# ----------------------------------------------------------------------
......@@ -143,6 +144,7 @@ psdplot.xxx: psdfoutra.xxx psdcroposp.xxx
echo 'set style line 3 lt 3 lw 2 dt 2 lc "#8888ff"' >> $@
echo 'set ylabel "2*P(f) / counts^{2} Hz^{-1}"' >> $@
echo 'set xlabel "frequency / Hz"' >> $@
echo 'set yrange [0.1*$(PSD2):10.*$(PSD)]' >> $@
echo 'set title "PSD of white noise with rms-amplitude of $(TS_RMS) counts"' >> $@
printf 'set label "sampling interval: %10.5f s"\\\n' $(TS_DT) >> $@
printf ' at graph 0.4,0.4 left\n' >> $@
......@@ -152,9 +154,9 @@ psdplot.xxx: psdfoutra.xxx psdcroposp.xxx
printf ' at graph 0.4,0.3 left\n' >> $@
printf 'set label "Nyquist frequency: f_{Ny}=%10.3f Hz"\\\n' $(FNy) >> $@
printf ' at graph 0.4,0.25 left\n' >> $@
printf 'set label "power spectral density: P(f)=%10.2f counts**2/Hz"\\\n' $(PSD) >> $@
printf 'set label "power spectral density: P(f)=%10.2f counts^{2}/Hz"\\\n' $(PSD) >> $@
printf ' at graph 0.4,0.2 left\n' >> $@
printf 'set label "one-sided PSD: 2*P(f)=%10.2f counts**2/Hz"\\\n' $(PSD2) >> $@
printf 'set label "one-sided PSD: 2*P(f)=%10.2f counts^{2}/Hz"\\\n' $(PSD2) >> $@
printf ' at graph 0.4,0.15 left\n' >> $@
printf 'set label "P(f)=A_{rms}^{2}/(2*f_{Ny}) A_{rms}=sqrt(2*P(f)*f_{Ny})"\\\n' $(PSD2) >> $@
printf ' at graph 0.4,0.1 left\n' >> $@
......
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