Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Seitosh
software-for-seismometry-linux
Commits
c2083552
Commit
c2083552
authored
Oct 19, 2016
by
thomas.forbriger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
calex [FEATURE]: calex.sh control script is operational and tested
parent
669d6e72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
20 deletions
+15
-20
software/calex/calex.sh
software/calex/calex.sh
+15
-20
No files found.
software/calex/calex.sh
View file @
c2083552
...
...
@@ -29,7 +29,7 @@
#
#
# indicate version
VERSION
=
2016-10-1
8
VERSION
=
2016-10-1
9
#
# ============================================================================
# **** define usage functions ****
...
...
@@ -37,10 +37,8 @@ VERSION=2016-10-18
#
usage
()
{
cat
>
&2
<<
HERE
usage: calex.sh [-v|--verbose] [--debug] [-d|--device dev]
[-D|--date date] [-u|--units units] [-b|--outbase basename]
[-i|--iterations n]
[file]
usage: calex.sh [-v|--verbose] [--debug] [-D|--date date] [-u|--units units]
[-b|--outbase basename] [-i|--iterations n] [file]
or: calex.sh --help|-h
HERE
}
...
...
@@ -51,7 +49,7 @@ longusage() {
cat
>
&2
<<
HERE
Run calex with a given control file and produce a report on the results.
file calex control file
file calex control file
(optional; default: calex.par)
-v|--verbose report plot parameters to the terminal
-D|--date date set date of seife data
...
...
@@ -59,10 +57,6 @@ Run calex with a given control file and produce a report on the results.
-b|--outbase basename set basename for output files
-i|--iterations n set the number of iterations to be reported in the
summary
-d|--device dev select other output device than graphics screen
e.g. use '-d plotfile.ps/ps' to plot into Postscript
file 'plotfile.ps'
run 'stuplox -help' for a list of output devices
The shell script expects the following programs/scripts to be installed:
...
...
@@ -95,20 +89,20 @@ eval set -- "$TEMP"
# extract command line options
# ----------------------------
VERBOSE
=
0
DEVICE
=
x11
PARAFILE
=
calex.par
OUTBASE
=
NSP
UNITS
=
"counts"
NLINES
=
6
DATE
=
"1970/01/01"
while
true
;
do
case
"
$1
"
in
--help
|
-h
)
longusage
;
exit
1
;;
--
)
shift
;
break
;;
-v
|
--verbose
)
VERBOSE
=
1
;;
-u
|
--units
)
UNITS
=
"
$2
"
;
shift
;;
-
d
|
--
device
)
DEVIC
E
=
"
$2
"
;
shift
;;
-
b
|
--
outbase
)
OUTBAS
E
=
"
$2
"
;
shift
;;
-
D
|
--
date
)
DATE
=
"
$2
"
;
shift
;;
-v
|
--verbose
)
VERBOSE
=
1
;;
-u
|
--units
)
UNITS
=
"
$2
"
;
shift
;;
-
b
|
--
outbase
)
OUTBAS
E
=
"
$2
"
;
shift
;;
-
D
|
--
date
)
DAT
E
=
"
$2
"
;
shift
;;
-
i
|
--
iterations
)
NLINES
=
"
$2
"
;
shift
;;
--debug
)
set
-x
;;
*
)
echo
>
&2
"ERROR: option
$1
unprocessed!"
;
echo
>
&2
"aborting
$0
..."
;
exit
2
;;
...
...
@@ -133,16 +127,17 @@ echo using parameter file $PARAFILE
COMMENT
=
"
$(
head
-n
1
$PARAFILE
)
"
CALEXBASE
=
$(
basename
$PARAFILE
.par
)
if
test
"
$OUTBASE
"
=
NSP
then
OUTBASE
=
$
(
basename
$PARAFILE
.par
)
OUTBASE
=
$
{
CALEXBASE
}
fi
calex
$PARAFILE
# generate result plot
stuploxx
--dev
=
${
OUTBASE
}
_signals.ps/cps
\
-title
=
"
${
COMMENT
}
"
\
-title
=
"
${
COMMENT
}
"
-tstitle
=
0.6
\
-labh
=
0.22
-labr
-labe
-labc
-labu
\
calex.einf p:1 ci:1 sf:1.1 f:seife:date
=
${
DATE
}
u:
${
UNITS
}
\
n:
"signal proportional to current in calibration coil"
\
...
...
@@ -160,12 +155,12 @@ stuploxx --dev=${OUTBASE}_signals.ps/cps \
n:
"residual"
# result data
calexoutextract.awk
-v
INI
=
8
${
OUT
BASE
}
.out
>
${
OUTBASE
}
_summary.out
calexoutextract.awk
-v
INI
=
${
NLINES
}
${
CALEX
BASE
}
.out
>
${
OUTBASE
}
_summary.out
a2ps
-o
${
OUTBASE
}
_summary.ps
--center-title
=
"
${
COMMENT
}
"
${
OUTBASE
}
_summary.out
echo
results are present
in
:
ls
-1
${
OUT
BASE
}
.out
${
OUTBASE
}
_summary.out
${
OUTBASE
}
_summary.ps
\
ls
-1
${
CALEX
BASE
}
.out
${
OUTBASE
}
_summary.out
${
OUTBASE
}
_summary.ps
\
${
OUTBASE
}
_signals.ps
# ----- END OF calex.sh -----
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment