import matplotlib.pyplot as plt from statepoint import StatePoint # Get filename filename = argv[1] # Determine axial level axial_level = int(argv[2]) if len(argv) > 2 else 1 score = int(argv[3]) if len(argv) > 3 else 1 # Create StatePoint object sp = StatePoint(filename) # Read number of realizations for global tallies sp.n_realizations = sp._get_int()[0] # Read global tallies n_global_tallies = sp._get_int()[0] sp.global_tallies = np.array(sp._get_double(2 * n_global_tallies)) sp.global_tallies.shape = (n_global_tallies, 2) # Flag indicating if tallies are present tallies_present = sp._get_int()[0] # Check if tallies are present if not tallies_present: raise Exception("No tally data in state point!") # Loop over all tallies print("Reading data...")
import matplotlib.pyplot as plt from statepoint import StatePoint # Get filename filename = argv[1] # Determine axial level axial_level = int(argv[2]) if len(argv) > 2 else 1 score = int(argv[3]) if len(argv) > 3 else 1 # Create StatePoint object sp = StatePoint(filename) # Read number of realizations for global tallies sp.n_realizations = sp._get_int()[0] # Read global tallies n_global_tallies = sp._get_int()[0] sp.global_tallies = np.array(sp._get_double(2*n_global_tallies)) sp.global_tallies.shape = (n_global_tallies, 2) # Flag indicating if tallies are present tallies_present = sp._get_int()[0] # Check if tallies are present if not tallies_present: raise Exception("No tally data in state point!") # Loop over all tallies print("Reading data...")