mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Fixed filename qstring issue. Fixed shebang position. Commented out print statements
This commit is contained in:
parent
e13bf100eb
commit
f085264b7f
1 changed files with 12 additions and 12 deletions
24
src/utils/plot_mesh_tally.py
Normal file → Executable file
24
src/utils/plot_mesh_tally.py
Normal file → Executable file
|
|
@ -1,7 +1,7 @@
|
|||
'''Python script to plot tally data generated by OpenMC.'''
|
||||
|
||||
#!/usr/bin/env python
|
||||
|
||||
'''Python script to plot tally data generated by OpenMC.'''
|
||||
|
||||
import sys
|
||||
from statepoint import *
|
||||
|
||||
|
|
@ -122,7 +122,7 @@ class AppForm(QMainWindow):
|
|||
filename = QFileDialog.getOpenFileName(self, 'Select statepoint file', '.')
|
||||
|
||||
# Create StatePoint object and read in data
|
||||
self.datafile = StatePoint(filename)
|
||||
self.datafile = StatePoint(str(filename))
|
||||
self.datafile.read_results()
|
||||
self.datafile.generate_stdev()
|
||||
|
||||
|
|
@ -153,13 +153,13 @@ class AppForm(QMainWindow):
|
|||
for s in tally.scores:
|
||||
self.score_types.append(s)
|
||||
self.tally_scores.append(self.score_types)
|
||||
print 'self.tally_scores = ', self.tally_scores
|
||||
# print 'self.tally_scores = ', self.tally_scores
|
||||
|
||||
def on_draw(self):
|
||||
""" Redraws the figure
|
||||
"""
|
||||
|
||||
print 'Calling on_draw...'
|
||||
# print 'Calling on_draw...'
|
||||
# Get selected basis, axial_level and stage
|
||||
basis = self.basis.currentIndex() + 1
|
||||
axial_level = self.axial_level.currentIndex() + 1
|
||||
|
|
@ -190,7 +190,7 @@ class AppForm(QMainWindow):
|
|||
for j in range(self.nz):
|
||||
matrix[i,j] = self.datafile.get_value(self.tally.currentIndex(), spec_list + [('mesh', (i, axial_level, j))], self.scoreBox.currentIndex())[0]
|
||||
|
||||
print spec_list
|
||||
# print spec_list
|
||||
|
||||
# Clear the figure
|
||||
self.fig.clear()
|
||||
|
|
@ -210,7 +210,7 @@ class AppForm(QMainWindow):
|
|||
def _update(self):
|
||||
'''Updates widget to display new relevant comboboxes and figure data
|
||||
'''
|
||||
print 'Calling _update...'
|
||||
# print 'Calling _update...'
|
||||
|
||||
self.mesh = self.datafile.meshes[self.datafile.tallies[self.tally.currentIndex()].filters['mesh'].bins[0] - 1]
|
||||
|
||||
|
|
@ -229,7 +229,7 @@ class AppForm(QMainWindow):
|
|||
|
||||
# Determine maximum value from current tally data set
|
||||
self.maxvalue = self.datafile.tallies[self.tally.currentIndex()].results.max()
|
||||
print self.maxvalue
|
||||
# print self.maxvalue
|
||||
|
||||
# Clear and hide old filter labels
|
||||
for item in self.labelList:
|
||||
|
|
@ -243,7 +243,7 @@ class AppForm(QMainWindow):
|
|||
self.update()
|
||||
|
||||
def populate_boxes(self):
|
||||
print 'Calling populate_boxes...'
|
||||
# print 'Calling populate_boxes...'
|
||||
|
||||
n = 4
|
||||
labels = {'cell': 'Cell : ',
|
||||
|
|
@ -266,11 +266,11 @@ class AppForm(QMainWindow):
|
|||
self.grid.addWidget(combobox, n, 1)
|
||||
n += 1
|
||||
|
||||
print element
|
||||
# print element
|
||||
if element in ['cell', 'cellborn', 'surface', 'material', 'universe']:
|
||||
combobox.addItems([str(i) for i in nextFilter.bins])
|
||||
for i in nextFilter.bins:
|
||||
print i
|
||||
# for i in nextFilter.bins:
|
||||
# print i
|
||||
|
||||
elif element == 'energyin' or element == 'energyout':
|
||||
for i in range(nextFilter.length):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue