From 78e0efb06fc2571058315d0f7c23bab8d72c0b88 Mon Sep 17 00:00:00 2001 From: Craig Warren Date: Tue, 22 Mar 2016 18:04:07 +0000 Subject: [PATCH] Cleaned up use of filename input argument. --- tools/plot_Ascan.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/plot_Ascan.py b/tools/plot_Ascan.py index c3c94eef..850d336a 100644 --- a/tools/plot_Ascan.py +++ b/tools/plot_Ascan.py @@ -35,8 +35,7 @@ parser.add_argument('-fft', action='store_true', default=False, help='plot FFT ( args = parser.parse_args() # Open output file and read some attributes -file = args.outputfile -f = h5py.File(file, 'r') +f = h5py.File(args.outputfile, 'r') nrx = f.attrs['nrx'] dt = f.attrs['dt'] iterations = f.attrs['Iterations'] @@ -45,7 +44,7 @@ time *= (iterations * dt) # Check there are any receivers if nrx == 0: - raise CmdInputError('No receivers found in {}'.format(file)) + raise CmdInputError('No receivers found in {}'.format(args.outputfile)) # Check for single output component when doing a FFT if args.fft: