diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2013-01-10 16:43:03 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2013-01-10 16:43:03 +0100 |
commit | 0747eefa1b1a6edb71cd6d0073955e39ccbd4858 (patch) | |
tree | 0c5e0faa3c9e6e03ec0767112b52f73940660db1 /scripts | |
parent | 70629b384d8580a3721317c443f996161312e099 (diff) |
scripts: random-muscle-activation: check parameter min/max values
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/random-muscle-activation.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/scripts/random-muscle-activation.py b/scripts/random-muscle-activation.py index fb225cc..a4031fa 100755 --- a/scripts/random-muscle-activation.py +++ b/scripts/random-muscle-activation.py @@ -137,12 +137,22 @@ def main(): if N <= 0: print("Error: invalid number of data points ({}), must be > 0".format(N)) - usage() + sys.exit(-1) + + if not xmin < xmax: + print("Error: xmin must be smaller than xmax") + sys.exit(-1) + + if not ymin < ymax: + print("Error: ymin must be smaller than ymax") + sys.exit(-1) + + if not ydmin <= ydmax: + print("Error: ydmin must be smaller than or equal to ydmax") sys.exit(-1) if len(args) < 1: print("Error: no output file(s) specified") - usage() sys.exit(-1) for a in args: |