From 0ee4df0f2ab278db919a936fffe30112ce56d3b3 Mon Sep 17 00:00:00 2001 From: Will Boyd Date: Tue, 4 Aug 2015 22:00:07 -0700 Subject: [PATCH] Removed extraneous quotes from Tally.get_pandas_dataframe(...) --- openmc/tallies.py | 10 +++++----- openmc/universe.py | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/openmc/tallies.py b/openmc/tallies.py index 45ce74405a..45cc4f0986 100644 --- a/openmc/tallies.py +++ b/openmc/tallies.py @@ -1036,7 +1036,7 @@ class Tally(object): # Append Mesh ID as outermost index of mult-index mesh_id = filter.mesh.id - mesh_key = 'mesh "{0}"'.format(mesh_id) + mesh_key = 'mesh {0}'.format(mesh_id) # Find mesh dimensions - use 3D indices for simplicity if (len(filter.mesh.dimension) == 3): @@ -1128,7 +1128,7 @@ class Tally(object): # Initialize prefix Multi-index keys counter += 1 - level_key = 'level "{0}"'.format(counter) + level_key = 'level {0}'.format(counter) univ_key = (level_key, 'univ', 'id') cell_key = (level_key, 'cell', 'id') lat_id_key = (level_key, 'lat', 'id') @@ -1335,7 +1335,7 @@ class Tally(object): tally_results = h5py.File(filename, 'w') # Create an HDF5 group within the file for this particular Tally - tally_group = tally_results.create_group('Tally-"{0}"'.format(self.id)) + tally_group = tally_results.create_group('Tally-{0}'.format(self.id)) # Add basic Tally data to the HDF5 group tally_group.create_dataset('id', data=self.id) @@ -1377,8 +1377,8 @@ class Tally(object): tally_results = {} # Create a nested dictionary within the file for this particular Tally - tally_results['Tally-"{0}"'.format(self.id)] = {} - tally_group = tally_results['Tally-"{0}"'.format(self.id)] + tally_results['Tally-{0}'.format(self.id)] = {} + tally_group = tally_results['Tally-{0}'.format(self.id)] # Add basic Tally data to the nested dictionary tally_group['id'] = self.id diff --git a/openmc/universe.py b/openmc/universe.py index a8b2f3a599..1a45d86666 100644 --- a/openmc/universe.py +++ b/openmc/universe.py @@ -1149,13 +1149,13 @@ class HexLattice(Lattice): def __repr__(self): string = 'HexLattice\n' - string += '{0: <16}{1}{2}"\n'.format('\tID', '=\t', self._id) - string += '{0: <16}{1}{2}"\n'.format('\tName', '=\t', self._name) - string += '{0: <16}{1}{2}"\n'.format('\t# Rings', '=\t', self._num_rings) - string += '{0: <16}{1}{2}"\n'.format('\t# Axial', '=\t', self._num_axial) - string += '{0: <16}{1}{2}"\n'.format('\tCenter', '=\t', + string += '{0: <16}{1}{2}\n'.format('\tID', '=\t', self._id) + string += '{0: <16}{1}{2}\n'.format('\tName', '=\t', self._name) + string += '{0: <16}{1}{2}\n'.format('\t# Rings', '=\t', self._num_rings) + string += '{0: <16}{1}{2}\n'.format('\t# Axial', '=\t', self._num_axial) + string += '{0: <16}{1}{2}\n'.format('\tCenter', '=\t', self._center) - string += '{0: <16}{1}{2}"\n'.format('\tPitch', '=\t', self._pitch) + string += '{0: <16}{1}{2}\n'.format('\tPitch', '=\t', self._pitch) if self._outer is not None: string += '{0: <16}{1}{2}\n'.format('\tOuter', '=\t',