The process module provides utility functions to retrieve data from PINSPEC's C++ classes, in particular, tally data.
More...
The process module provides utility functions to retrieve data from PINSPEC's C++ classes, in particular, tally data.
In addition, the process module includes routines to use tallies to compute resonance integrals and group cross-sections and to print the results to the screen.
- Author
- William Boyd (wboyd.nosp@m.@mit.nosp@m..edu)
-
Samuel Shaner (shane.nosp@m.r@mi.nosp@m.t.edu)
- Date
- March 25, 2013
def pinspec.process.computeMeanNeutronLifetime |
( |
|
coll_times, |
|
|
|
num_neutrons |
|
) |
| |
Computes the mean neutron lifetime (seconds) before absorption.
- Parameters
-
coll_times | INTERCOLLISION_TIME tally |
num_neutrons | the number of neutrons per batch |
- Returns
- the mean neutron lifetime (seconds) before absoprtion
def pinspec.process.computeMeanNumCollisions |
( |
|
coll_rate, |
|
|
|
num_neutrons |
|
) |
| |
Computes the mean number of collisions for a neutron before absorption.
- Parameters
-
coll_rate | a COLLISION_RATE tally |
num_neutrons | the number of neutrons per batch |
- Returns
- the mean number of collisions per neutron before absorption
def pinspec.process.getTallyBatchMu |
( |
|
tally | ) |
|
Returns an array of the batch averages for the tally's bins.
A wrapper function to make it easier to access a tally's tallies data array through SWIG. This would be invoked a PINSPEC Python input file as follows:
- Parameters
-
tally | the tally of interest |
- Returns
- a numpy array with the tally batch averages
def pinspec.process.getTallyBatchRelErr |
( |
|
tally | ) |
|
Returns an array of the batch relative errors for a tally's bins.
A wrapper function to make it easier to access a tally's relative errors data array through SWIG. This would be invoked a PINSPEC Python input file as follows:
- Parameters
-
tally | the tally of interest |
- Returns
- a numpy array with the tally batch relative errors
def pinspec.process.getTallyBatchStatistics |
( |
|
tally | ) |
|
Returns a 2D array of the tally's batch statistics.
This is a wrapper function to make it easier to access a tally's batch-based statistical data through SWIG. The array returned contains the tally bin centers, averages, variances, standard deviations, and relative errors, in that order. This would be invoked a PINSPEC Python input file as follows:
2 bin_centers = tally_data[0][:]
3 tally_avareages = tally_data[1][:]
4 tally_variances = tally_data[2][:]
5 tally_std_dev = tally_data[3][:]
6 tally_rel_err = tally_data[4][:]
- Parameters
-
tally | the tally of interest |
- Returns
- a 2D numpy array with the tally batch statistical data
def pinspec.process.getTallyBatchStdDev |
( |
|
tally | ) |
|
Returns an array of the batch standard deviations for a tally's bins.
A wrapper function to make it easier to access a tally's standard deviations data array through SWIG. This would be invoked a PINSPEC Python input file as follows:
- Parameters
-
tally | the tally of interest |
- Returns
- a numpy array with the tally batch standard deviations
def pinspec.process.getTallyBatchVariances |
( |
|
tally | ) |
|
Returns an array of the batch variances for a tally's bins.
A wrapper function to make it easier to access a tally's variances data array through SWIG. This would be invoked a PINSPEC Python input file as follows:
- Parameters
-
tally | the tally of interest |
- Returns
- a numpy array with the tally batch variances
def pinspec.process.getTallyCenters |
( |
|
tally | ) |
|
Returns an array of the center values for a tally's bins.
A wrapper function to make it easier to access a tally's bin center data array through SWIG. This would be invoked a PINSPEC Python input file as follows:
- Parameters
-
tally | the tally of interest |
- Returns
- a numpy array with the tally bin centers
def pinspec.process.getTallyEdges |
( |
|
tally | ) |
|
Returns an array of the bin edge values for a tally's bins.
A wrapper function to make it easier to access a tally's bin edges data array through SWIG. This would be invoked a PINSPEC Python input file as follows:
- Parameters
-
tally | the tally of interest |
- Returns
- a numpy array with the tally bin edges
def pinspec.process.printRIs |
( |
|
RIs, |
|
|
|
header = '' |
|
) |
| |
Prints a formatted table for an array of true and/or effectrive resonance integrals to the screen.
- Parameters
-
RIs | a list of resonance integrals (RIEff or RITrue objects) |
header | an optional argument string for the table title |
def pinspec.process.printTallies |
( |
|
tallies, |
|
|
|
header = '' , |
|
|
|
types = 'Tallies' |
|
) |
| |
Prints formatted tally batch-averaged data to the screen as a table.
Prints a formatted table of tally data to the screen and can be used for a single tally or for a list of tallies. Since RIEff objects are simply Python wrappers for an underlying DERIVED type tally, this method can also be used to print lists of RIEff objects. It also works for RITrue objects, though RITrue objects are not stored as tallies. A user may invoke this function from a PINSPEC Python input file as follows:
1 printTallies([flux1, flux2, flux3], header=
'Flux Tallies')
- Parameters
-
tallies | a list of the tallies to print to the screen |
header | an optional string to prepend to the title of table. |
types | an optional string of the tally types for the table title |