Commit ae88d904 authored by thomas.forbriger's avatar thomas.forbriger
Browse files

croposp [WP]: add test case

parent ac710862
......@@ -147,6 +147,12 @@ cross%.ps: Makefile.crosscorrelation
#----------------------------------------------------------------------
# test cross power spectral density (croposp)
cpsd%.ps: Makefile.croposp
$(MAKE) -f $< $@
#----------------------------------------------------------------------
%.psp: %.ps; gv $<; /bin/rm -fv $<
%.pdf: %.ps; ps2pdf $<
%.rw.ps: %.ps; gs -sDEVICE=pswrite -dNOPAUSE -dBATCH -sOutputFile=$@ $<
......
# this is <Makefile.croposp>
# ----------------------------------------------------------------------------
#
# Copyright (c) 2019 by Thomas Forbriger (BFO Schiltach)
#
# provide test cases for proposp
#
# REVISIONS and CHANGES
# 01/01/2019 V1.0 Thomas Forbriger
#
# ============================================================================
#
all: cpsd1.bin cpsd2.bin cpsd3.bin
CPSD_NSAMPLESRAW=10000
CPSD_DT=0.1
CPSD_DUR=8640.
# create raw time series
CPSD_SIGGENOPT=-v -o -n $(CPSD_NSAMPLESRAW) -d $(CPSD_DT) -T $(CPSD_DUR) -ot bin
CPSD_AMP1=1.e-3
CPSD_AMP2=1.e-4
CPSD_AMP3=3.e-3
CPSD_AMPBG=4.
cpsd1raw.bin:
siggenx 12 $@ $(CPSD_SIGGENOPT) -a $(CPSD_AMP1)
cpsd2raw.bin:
siggenx 12 $@ $(CPSD_SIGGENOPT) -a $(CPSD_AMP2)
cpsd3raw.bin:
siggenx 12 $@ $(CPSD_SIGGENOPT) -a $(CPSD_AMP3)
# create time series for common noise signal
cpsdbgraw.bin:
siggenx 12 $@ $(CPSD_SIGGENOPT) -a $(CPSD_AMPBG)
# modify white noise to channel specific frequency characteristic
cpsd1mod.bin: cpsd1raw.bin
printf "lpb 1.,2.\ndif 0\nend\n" \
| tidofi -type bin -Type bin -v -o -cs $@ $<
cpsd2mod.bin: cpsd2raw.bin
printf "int 0\navg 0end\n" \
| tidofi -type bin -Type bin -v -o -cs $@ $<
cpsd3mod.bin: cpsd3raw.bin
printf "lpb 10.,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" \
| tidofi -type bin -Type bin -v -o -cs $@ $<
# add common noise signal to channel specific noise floor
cpsd%add.bin: cpsd%mod.bin cpsdbgraw.bin
teseco -v -o -a -type bin -Type bin $@ $^
# set header fields to reasonable time an channel identifiers
CPSD_DATE=2018/12/16_14:24:16
cpsd%hd.bin: cpsd%add.bin
sehefixx $< $@ -verbose -overwrite -itype bin -otype bin \
-st $(CPSD_DATE) -ss TST -sa XX -sc BHZ \
-si SYN$(patsubst cpsd%hd.bin,%,$@)
# extract inconsistent time windows
CPSD_TOPT1=-samplesf 3 -samplesl 7
CPSD_TOPT2=-samplesf 25
CPSD_TOPT3=-samplesl 81
cpsd1.bin: cpsd1hd.bin
tijerasxx -verbose -overwrite -iformat bin -oformat bin \
$(CPSD_TOPT1) $@ $<
cpsd2.bin: cpsd2hd.bin
tijerasxx -verbose -overwrite -iformat bin -oformat bin \
$(CPSD_TOPT2) $@ $<
cpsd3.bin: cpsd3hd.bin
tijerasxx -verbose -overwrite -iformat bin -oformat bin \
$(CPSD_TOPT3) $@ $<
# ----- END OF Makefile.croposp -----
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