Commit bed0c1bb authored by thomas.forbriger's avatar thomas.forbriger

croposp [FEATURE]: test for approximation errors

The computation of coherence for white gaussian noise is appropriate to
demonstrate the effect of averaging applied to the the numerical
compuation.
parent 0d94e785
...@@ -491,6 +491,65 @@ crosscompilation.pdf: $(addprefix cross,$(addsuffix psd.pdf,$(CPSD_SET))) ...@@ -491,6 +491,65 @@ crosscompilation.pdf: $(addprefix cross,$(addsuffix psd.pdf,$(CPSD_SET)))
--nup 2x2 --landscape --paper a4paper --scale 0.85 -o $@ --nup 2x2 --landscape --paper a4paper --scale 0.85 -o $@
# #
# ====================================================================== # ======================================================================
# coherence computation
# ---------------------
#
white1.seed: ;printf "%s\n" 686293391 > $@
white2.seed: ;printf "%s\n" 448546898 > $@
WHITEN=100
white1.bin white2.bin: \
%.bin: %.seed
/bin/bash -c 'export GSL_RNG_SEED=$$(cat $<); \
export GSL_RNG_TYPE=$(RNGTYPE); \
siggenx 14 RAW$@ -a 7.07 -v -o -d $(CPSD_DT) -T $(WHITEN) -ot bin; \
echo seed: $$GSL_RNG_SEED > $(patsubst %.bin,%seed.xxx,$@)'
sehefixx RAW$@ $@ \
-verbose -overwrite -itype bin -otype bin -ss WHI \
-sc $(patsubst white%.bin,%,$@) -si $(WHITEN)
white%_100.bin:
/bin/rm -fv $(patsubst white%_100.bin,white%.bin,$@)
$(MAKE) $(patsubst white%_100.bin,white%.bin,$@) WHITEN=100
/bin/mv -fv $(patsubst white%_100.bin,white%.bin,$@) $@
white%_1000.bin:
/bin/rm -fv $(patsubst white%_1000.bin,white%.bin,$@)
$(MAKE) $(patsubst white%_1000.bin,white%.bin,$@) WHITEN=1000
/bin/mv -fv $(patsubst white%_1000.bin,white%.bin,$@) $@
white%_10000.bin:
/bin/rm -fv $(patsubst white%_10000.bin,white%.bin,$@)
$(MAKE) $(patsubst white%_10000.bin,white%.bin,$@) WHITEN=10000
/bin/mv -fv $(patsubst white%_10000.bin,white%.bin,$@) $@
WHITE_LOG=--log 20
WHITE_CROPOSP_OPT=--nsegments=$(CPSD_NSEGMENTS) \
--divisor=$(CPSD_DIVISOR) \
--padfactor=$(CPSD_PADFACTOR) \
--overlap=$(CPSD_OVERLAP) \
$(WHITE_LOG)
whitepsd%.xxx whitecoherence%.xxx: white1_%.bin white2_%.bin
croposp $(WHITE_CROPOSP_OPT) \
--verbose --overwrite --itype bin \
--psd $(patsubst white1_%.bin,whitepsd%.xxx,$<) \
--pattern="%S_%C_%I" \
--coherence $(patsubst white1_%.bin,whitecoherence%.xxx,$<) \
$^
# display signal specific coherence
whitecoherence.pdf: $(foreach N,10000 1000 100,whitecoherence$(N).xxx)
$(CROPOSPLOT) --title="$@ \n $(WHITE_CROPOSP_OPT)" \
$(CROPOSPLOT_OPT) --ylabel="coherence" \
--titfontsize='small' -v --grid -o $@ $^
# display signal specific coherence
whitepsd.pdf: $(foreach N,10000 1000 100,whitepsd$(N).xxx)
$(CROPOSPLOT) --title="$@ \n $(WHITE_CROPOSP_OPT)" \
$(CROPOSPLOT_OPT) --ylabel="PSD" \
--titfontsize='small' -v --grid -o $@ $^
#
# ======================================================================
# pattern rules for display # pattern rules for display
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# pattern rules for quick plots # pattern rules for quick plots
......
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