Commit 9828e6ad authored by thomas.forbriger's avatar thomas.forbriger
Browse files

croposp [WP]: work on rng seeding

random number generator returns identical sequences, because it is repeatedly
seeded with them seconds value (execution is too fast to take place at
different wall clock seconds)
parent 4281ab59
......@@ -151,7 +151,7 @@ croposptest croposp: \
# test case
# ---------
alldata: cpsd1.bin cpsd2.bin cpsd3.bin
alldata: cpsd1.bin cpsd2.bin cpsd3.bin cpsd4.bin
CPSD_NSAMPLESRAW=100000
#CPSD_NSAMPLESRAW=1000
......@@ -171,32 +171,45 @@ CPSD_AMPBG=2.
CROPOSPLOT=./croposplot.py
cpsd1raw.bin:
siggenx 12 $@ $(CPSD_SIGGENOPT) -a $(CPSD_AMP1)
/bin/bash -c 'export GSL_RNG_SEED=$$(date +"%N"); \
siggenx 14 $@ $(CPSD_SIGGENOPT); \
echo seed: $$GSL_RNG_SEED'
cpsd2raw.bin:
siggenx 12 $@ $(CPSD_SIGGENOPT) -a $(CPSD_AMP2)
/bin/bash -c 'export GSL_RNG_SEED=$$(date +"%N"); \
siggenx 14 $@ $(CPSD_SIGGENOPT); \
echo seed: $$GSL_RNG_SEED'
cpsd3raw.bin:
siggenx 12 $@ $(CPSD_SIGGENOPT) -a $(CPSD_AMP3)
/bin/bash -c 'export GSL_RNG_SEED=$$(date +"%N"); \
siggenx 14 $@ $(CPSD_SIGGENOPT); \
echo seed: $$GSL_RNG_SEED'
cpsd4raw.bin:
siggenx 12 $@ $(CPSD_SIGGENOPT) -a $(CPSD_AMP4)
/bin/bash -c 'export GSL_RNG_SEED=$$(date +"%N"); \
siggenx 14 $@ $(CPSD_SIGGENOPT); \
echo seed: $$GSL_RNG_SEED'
# create time series for common noise signal
cpsdbgraw.bin:
siggenx 12 $@ $(CPSD_SIGGENOPT) -a $(CPSD_AMPBG)
/bin/bash -c 'export GSL_RNG_SEED=$$(date +"%N"); \
siggenx 14 $@ $(CPSD_SIGGENOPT); \
echo seed: $$GSL_RNG_SEED'
rawsig.ps: cpsd1raw.bin cpsd2raw.bin cpsd3raw.bin cpsd4raw.bin cpsdbgraw.bin
stuplox -d $@/cps -s x -i -ty bin $^
# modify white noise to channel specific frequency characteristic
cpsd1mod.bin: cpsd1raw.bin
printf "lpb 1.,2.\ndif 0\nend\n" \
printf "fac $(CPSD_AMP1)\nlpb 1.,2.\ndif 0\nend\n" \
| tidofi -type bin -Type bin -v -o -cs $@ $<
cpsd2mod.bin: cpsd2raw.bin
printf "int 0\navg 0end\n" \
printf "fac $(CPSD_AMP2)\nint 0\navg 0end\n" \
| tidofi -type bin -Type bin -v -o -cs $@ $<
cpsd3mod.bin: cpsd3raw.bin
printf "lpb 10.,2\nend\n" \
printf "fac $(CPSD_AMP3)\nlpb 10.,2\nend\n" \
| tidofi -type bin -Type bin -v -o -cs $@ $<
cpsd4mod.bin: cpsd4raw.bin
printf "hpb 100.0,2\nend\n" \
printf "fac $(CPSD_AMP4)\nhpb 100.0,2\nend\n" \
| tidofi -type bin -Type bin -v -o -cs $@ $<
cpsdbgmod.bin: cpsdbgraw.bin
printf "lpb 2.,4\navg 0\nhp 200.,2\nend\n" \
printf "fac $(CPSD_AMPBG)\nlpb 2.,4\navg 0\nhp 200.,2\nend\n" \
| tidofi -type bin -Type bin -v -o -cs $@ $<
# add common noise signal to channel specific noise floor
......@@ -303,6 +316,7 @@ PSD.pdf: psd_out.xxx $(CPSD_REFFILES)
$@ $<
%.pdp: %.pdf; evince $<; /bin/rm -fv $<
%.psp: %.ps; gv $<; /bin/rm -fv $<
#
#======================================================================
# documentation part
......
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