filename as optional parameter for plot-scripts

This commit is contained in:
Manuel Domke
2018-02-26 14:08:57 +01:00
parent 2c0c07dc0d
commit 88a8acf84f
2 changed files with 12 additions and 3 deletions

View File

@@ -2,9 +2,13 @@
import numpy as np
import matplotlib.pyplot as plt
import sys
from matplotlib import cm
filename='infnoise.bin'
if sys.argv[1]:
filename=sys.argv[1]
else:
filename='infnoise.bin'
nx = 1000
ny = 1000

View File

@@ -2,8 +2,13 @@
import matplotlib.pyplot as plt
import numpy as np
import sys
if sys.argv[1]:
filename=sys.argv[1]
else:
filename='infnoise.bin'
filename='infnoise.bin'
bp = np.dtype([('byte1',np.uint8),('byte2',np.uint8)]) # 'struct' byte pairs