Makefile.croposp 2.63 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
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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
# 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
57
58
59
CPSD_DATE1=$(CPSD_DATE).010980
CPSD_DATE2=$(CPSD_DATE).011050
CPSD_DATE3=$(CPSD_DATE).010760
thomas.forbriger's avatar
thomas.forbriger committed
60

61
62
63
64
65
66
67
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82

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

83
84
85
86
psd.xxx: cpsd1.bin cpsd2.bin cpsd3.bin
	croposp --verbose --overwrite --itype bin --trim \
	  --datetolerance 0.1 -psd $@ $^

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