From 73d97d3d71c7ecf8ead916630c2292b0ac5e6223 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Fri, 29 May 2015 19:50:59 +0000 Subject: [PATCH] added command line arguments to select resolution (defaults to 16) --- examples/SpectralMethod/example_run.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/examples/SpectralMethod/example_run.py b/examples/SpectralMethod/example_run.py index bafc79d11..19b44655e 100755 --- a/examples/SpectralMethod/example_run.py +++ b/examples/SpectralMethod/example_run.py @@ -1,5 +1,17 @@ #!/usr/bin/env python # -*- coding: UTF-8 no BOM -*- +import sys +resolutions = [16,32,64] +resolution = resolutions[0] + +try: + resolution = int(sys.argv[1]) +except: + pass + +if resolution not in resolutions: + resolution = resolutions[0] + from subprocess import call -call('make run16x16x16', shell=True) \ No newline at end of file +call('make run%s'%('x'.join([str(resolution)]*3)), shell=True) \ No newline at end of file