Makefile.croposp 3.05 KB
Newer Older
thomas.forbriger's avatar
thomas.forbriger committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 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

16
CPSD_NSAMPLESRAW=100000
17
#CPSD_NSAMPLESRAW=1000
thomas.forbriger's avatar
thomas.forbriger committed
18
19
CPSD_DT=0.1
CPSD_DUR=8640.
20
#CPSD_DUR=864.
thomas.forbriger's avatar
thomas.forbriger committed
21
22
23
24
25
26

# 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
27
28
29
30
CPSD_AMPBG=4.e-5

# location of plot tool
CROPOSPLOT=../../../python/visu/croposplot.py
thomas.forbriger's avatar
thomas.forbriger committed
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61

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
62
63
64
CPSD_DATE1=$(CPSD_DATE).010980
CPSD_DATE2=$(CPSD_DATE).011050
CPSD_DATE3=$(CPSD_DATE).010760
thomas.forbriger's avatar
thomas.forbriger committed
65

66
67
68
69
70
71
72
CPSD_HDOPTS=-verbose -overwrite -itype bin -otype bin -ss TST -sa XX -sc BHZ
cpsd1hd.bin: cpsd1add.bin
	sehefixx $< $@ $(CPSD_HDOPTS) -st $(CPSD_DATE1) -si SYN1
cpsd2hd.bin: cpsd2add.bin
	sehefixx $< $@ $(CPSD_HDOPTS) -st $(CPSD_DATE2) -si SYN2
cpsd3hd.bin: cpsd3add.bin
	sehefixx $< $@ $(CPSD_HDOPTS) -st $(CPSD_DATE3) -si SYN3
thomas.forbriger's avatar
thomas.forbriger committed
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87

# 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) $@ $<

88
89
90
91
CPSD_NSEGMENTS=50
CPSD_OVERLAP=0.5
CPSD_DIVISOR=100
CPSD_PADFACTOR=5
92
psd.xxx: cpsd1.bin cpsd2.bin cpsd3.bin
93
	croposp --DEBUG --verbose --overwrite --itype bin --trim \
94
	  --log 10 \
95
96
97
98
	  --nsegments=$(CPSD_NSEGMENTS) \
	  --divisor=$(CPSD_DIVISOR) \
	  --padfactor=$(CPSD_PADFACTOR) \
	  --overlap=$(CPSD_OVERLAP) \
99
100
	  --datetolerance 0.1 -psd $@ $^

101
102
103
104
105
psd.pdf: psd.xxx
	$(CROPOSPLOT) -v --grid -o $@ $<

%.pdp: %.pdf; evince $<; /bin/rm -fv $<

thomas.forbriger's avatar
thomas.forbriger committed
106
# ----- END OF Makefile.croposp -----