...
 
Commits (3)
......@@ -30,7 +30,25 @@
#
# run with all time series being white noise
#
# make all UNIFORM=yes
# make all WHITENOISE=yes
#
# to demonstrate the effect of averaging in computing coherence
# (run 'make clean' in between two of them):
#
# make whitecoherence.pdf whitepsd.pdf \
# CPSD_NSEGMENTS=10 WHITE_LOG="--log 20" CPSD_DIVISOR=1
# make whitecoherence.pdf whitepsd.pdf \
# CPSD_NSEGMENTS=100 WHITE_LOG="--log 20" CPSD_DIVISOR=1
# make whitecoherence.pdf whitepsd.pdf \
# CPSD_NSEGMENTS=1000 WHITE_LOG="--log 20" CPSD_DIVISOR=1
# make whitecoherence.pdf whitepsd.pdf \
# CPSD_NSEGMENTS=1000 WHITE_LOG="" CPSD_DIVISOR=1
# make whitecoherence.pdf whitepsd.pdf \
# CPSD_NSEGMENTS=100 WHITE_LOG="--log 100" CPSD_DIVISOR=1
# make whitecoherence.pdf whitepsd.pdf \
# CPSD_NSEGMENTS=100 WHITE_LOG="--log 10" CPSD_DIVISOR=1
# make whitecoherence.pdf whitepsd.pdf \
# CPSD_NSEGMENTS=100 WHITE_LOG="--log 2" CPSD_DIVISOR=1
#
# REVISIONS and CHANGES
# 06/02/2019 V1.0 Thomas Forbriger
......@@ -187,7 +205,7 @@ rawsig.ps: cpsd1raw.bin cpsd2raw.bin cpsd3raw.bin cpsd4raw.bin cpsdbgraw.bin
# and the bg-sequence as a representation of background ground noise to be
# common in all reacordings.
#
ifdef UNIFORM
ifdef WHITENOISE
# set amplitudes
CPSD_AMP1=1.
CPSD_AMP2=0.1
......@@ -491,6 +509,65 @@ crosscompilation.pdf: $(addprefix cross,$(addsuffix psd.pdf,$(CPSD_SET)))
--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 quick plots
......