Commit 6e60f2e3 authored by thomas.forbriger's avatar thomas.forbriger
Browse files

[WP] (stf_issue12): implement new mechanism of test case descriptions

HERE documents are cannot be defined within make rules. A work-around are
multi-line make variables exported to the environment and printed to file
within the shell. This way explanatory texts are easier to maintain and are
even easier to read within the Makefile
parent 05c777d5
......@@ -269,21 +269,30 @@ additionalfiltered.sff: additional.sff stf.fil.xxx
# ============================================================================
# 6. Test cases
# =============
#
# test case 1
# -----------
define TESTCASE1
synthetics are calculated with a standard source
time function which is band limited and has a
duration of $(SRCDUR) seconds. The recorded data
is simulated from this by applying low-pass filter
and a time delay.
endef
export TESTCASE1
SOUTIFU1SHIFT=0.4
SOUTIFU1=fdlsq:tshift=$(SOUTIFU1SHIFT)
soutifu1_data.sff: data2lay.sff; /bin/cp -vpd $< $@
soutifu1_synthetic.sff: synthetic2lay.sff; /bin/cp -vpd $< $@
soutifu1_signaldesc.xxx: stf.fil.xxx
echo "synthetics are calculated with a standard source" > $@
echo "time function which is band limited and has a" >> $@
echo "duration of $(SRCDUR) seconds. The recorded data" >> $@
echo "is simulated from this by applying low-pass filter" >> $@
echo "and a time delay:" >> $@
soutifu1_signaldesc.xxx: stf.fil.xxx zforce.xxx
printf "$$TESTCASE1" > $@
printf "\n\nContents of $< are:\n" >> $@
cat $< >> $@
printf "\n\nContents of $(word 2,$^) are:\n" >> $@
cat $(word 2,$^) >> $@
soutifu1_convseis.su soutifu1_stf.su soutifu1_add.su: \
soutifu1_data.su soutifu1_synthetic.su additional.su
......@@ -346,6 +355,14 @@ soutifu1_add_report.pdf: soutifu1_description.ps soutifu1_section.ps\
#----------------------------------------------------------------------
# test case 2
# -----------
define TESTCASE2
We take the same data like in test case 1.
This time, however, data and synthetics are exchanged.
Since synthetics are narrow band with respect to data
an appropriate water level is required.
endef
export TESTCASE2
SOUTIFU2SHIFT=0.4
SOUTIFU2WL=1.
SOUTIFU2=fdlsq:tshift=$(SOUTIFU2SHIFT):waterlevel=$(SOUTIFU2WL)
......@@ -358,14 +375,9 @@ soutifu2x_convseis.su soutifu2x_stf.su: \
--type su $(SOUTIFU2) $^
soutifu2x_description.xxx: soutifu1_signaldesc.xxx
echo "soutifu test case 2: $(SOUTIFU2)" > $@
echo >> $@
echo "We take the same data like in test case 1." >> $@
echo "This time, however, data and synthetics are exchanged." >> $@
echo "Since synthetics are narrow band with respect to data" >> $@
echo "an appropriate water level is required." >> $@
echo >> $@
echo "Signal description from test case 1:" >> $@
printf "soutifu test case 2: $(SOUTIFU2)\n\n" > $@
printf "$$TESTCASE2" >> $@
printf "\n\nSignal description from test case 1:\n" >> $@
cat $< >> $@
soutifu2x_section.ps: soutifu2x_data.su soutifu2x_synthetic.su \
......@@ -398,6 +410,22 @@ soutifu2c_report.pdf:
#----------------------------------------------------------------------
# test case 3
# -----------
define TESTCASE3
The model for which synthetics are calculated is too
slow in its wave propagation properties. Therefore
a compromise has to be made between far and near
offset traces.
Signal description:
Synthetics are calculated with a standard source
time function which is band limited and has a
duration of $(SRCDUR) seconds. The recorded data
is simulated from this by applying low-pass filter
and a time delay. The corner period of the low-pass is
so small that it pracically has no effect:
endef
export TESTCASE3
SOUTIFU3SHIFT=0.4
SOUTIFU3WL=1.e-4
SOUTIFU3EXP=0.
......@@ -410,22 +438,13 @@ soutifu3x_convseis.su soutifu3x_stf.su: \
soutifu -v -o -wc soutifu3x_convseis.su -ws soutifu3x_stf.su \
--type su $(SOUTIFU3) $^
soutifu3x_description.xxx: stf.fil.xxx
echo "soutifu test case 3: $(SOUTIFU3)" > $@
echo >> $@
echo "The model for which synthetics are calculated is too" >> $@
echo "slow in its wave propagation properties. Therefore" >> $@
echo "a compromise has to be made between far and near" >> $@
echo "offset traces." >> $@
echo >> $@
echo "Signal description:" >> $@
echo "Synthetics are calculated with a standard source" >> $@
echo "time function which is band limited and has a" >> $@
echo "duration of $(SRCDUR) seconds. The recorded data" >> $@
echo "is simulated from this by applying low-pass filter" >> $@
echo "and a time delay. The corner period of the low-pass is" >> $@
echo "so small that it pracically has no effect:" >> $@
soutifu3x_description.xxx: stf.fil.xxx zforce.xxx
printf "soutifu test case 3: $(SOUTIFU3)\n\n" > $@
printf "$$TESTCASE3" >> $@
printf "\n\nContents of $< are:\n" >> $@
cat $< >> $@
printf "\n\nContents of $(word 2,$^) are:\n" >> $@
cat $(word 2,$^) >> $@
soutifu3x_section.ps: soutifu3x_data.su soutifu3x_synthetic.su \
soutifu3x_convseis.su
......@@ -459,8 +478,7 @@ soutifu3c_report.pdf:
# ==================
#
%_description.ps: %_description.xxx
a2ps -o $@ -r --center-title=$(patsubst %_description.xxx,%,$<) \
-l 60 $<
a2ps -o $@ --center-title=$(patsubst %_description.xxx,%,$<) $<
%_report.ps: %_description.ps %_section.ps %_stf.ps
gs -sDEVICE=pswrite -dNOPAUSE -dBATCH -sOutputFile=$@ $^
......
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