From f6844ed31ce34c6a56e041554ce961c3b0e2c002 Mon Sep 17 00:00:00 2001 From: Craig Warren Date: Mon, 18 Apr 2016 17:51:33 +0100 Subject: [PATCH] Added writing of an attribute with the gprMax version number to the HD5 output file. --- gprMax/writer_hdf5.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gprMax/writer_hdf5.py b/gprMax/writer_hdf5.py index c8ce4b22..8f85b65e 100644 --- a/gprMax/writer_hdf5.py +++ b/gprMax/writer_hdf5.py @@ -19,6 +19,7 @@ import h5py import numpy as np +import gprMax from gprMax.constants import floattype from gprMax.grid import Ix, Iy, Iz @@ -35,6 +36,7 @@ def prepare_hdf5(outputfile, G): """ f = h5py.File(outputfile, 'w') + f.attrs['gprMax'] = gprMax.__version__ f.attrs['Title'] = G.title f.attrs['Iterations'] = G.iterations f.attrs['nx, ny, nz'] = (G.nx, G.ny, G.nz)