fudge.gnds package¶
Subpackages¶
Submodules¶
fudge.gnds.alias module¶
fudge.gnds.baseClasses module¶
fudge.gnds.channels module¶
In GNDS, a channel class contains all outgoing products from either a reaction (also called an interaction), from a decay or from a collection of interactions. Since products may subsequently decay, a decay channel may be nested within a product of another channel. Channels have the following genre:
output: The output channel resulting from an interaction. All products, except gammas, must be present. The ZA of the output channel must match the input channel’s ZA. decay: The output channel resulting from the decay of a particle. All decay products, except gammas, must be present. The ZA of the output channel must match the parent’s ZA. fission: A pseudo output channel resulting from fission. Only prompt neutrons must be present. sumOfRemainingOutputChannels: A pseudo output channel giving product data for all output channels not explicitly given. production: A pseudo output channel representing a product not fully covered in other output channels.
For example, consider the following nuclear interaction:
n + O16 –> n + ( O16_e6 -> He4 + C12 )
This interaction represents a neutron hitting an Oxygen-16 target producing a n and Oxygen-16 in the 6th excited. The excited Oxygen-16 subsequently decays into He4 and C12. The output channel for this interaction is “n + O16_e6” and the “O16_e6” contains the decay channel “He4 + C12”.
Output and decay channels can be further divided into twoBody or NBody channels.
twoBody: The channel initially has two products whose angular and energy correlates are known. Only the center-of-mass angular data for one of the products is needed. The products’ outgoing energies can be calculated from their center-of-mass angular information and other data like the masses of the products involved in a reaction or decay. NBody: The channel has two or more products whose angular and energy correlates are not known. The full double differential data for each product must be given.
This module contains the following channel classes:
channel : the base class for all other classes.
outputChannel : the base class for the following outout channels,
twoBodyOutputChannel : twoBody output channel.
NBodyOutputChannel : NBody output channel.
fissionChannel :
sumOfRemainingOutputChannels :
productionChannel :
-
class
fudge.gnds.channels.
NBodyOutputChannel
(process=None)[source]¶ Bases:
fudge.gnds.channels.outputChannel
This is a N-body class version of channel. It is for all output channels that do not fit under the twoBodyOutputChannel class. In particular, the going energy/angular information for each particle is not correlated with the other products. Any of the bodies may decay/breakup.
-
class
fudge.gnds.channels.
channel
(genre, numberOfAllowedParticles='many', fissionGenre=None, process=None)[source]¶ Bases:
xData.ancestry.ancestry
This is the class for a gnds channel which is a list of products (i.e., product class objects).
-
ancestryMembers
= ('Q', 'products')¶
-
calculateAverageProductData
(style, indent='', **kwargs)[source]¶ Calculate average product data.
Parameters: - style – The style to use.
- indent – string; The amount to indent and verbose output.
- kwargs – string; All other parameters.
Returns:
-
getFinalProductList
()[source]¶ Returns a list of [ multiplicity, name ] in order for the final products of this channel.
-
getProductWithName
(name)[source]¶ Return the product with given name. If no such product is found, or if more than one are found, raise an Exception.
-
getProductsWithName
(name)[source]¶ Returns a list of all the channel’s products with given name (‘gamma’,’n’, etc).
-
moniker
= 'outputChannel'¶
-
toStandardString
()[source]¶ Returns a more standard nuclear, but less informative, string representation for the channel. For output channel it is “list of products)Residual” (e.g., “2n)Pu_238”).
-
-
class
fudge.gnds.channels.
fissionChannel
(fissionGenre)[source]¶ Bases:
fudge.gnds.channels.channel
-
class
fudge.gnds.channels.
outputChannel
(genre, numberOfAllowedParticles='many', process=None)[source]¶ Bases:
fudge.gnds.channels.channel
-
fudge.gnds.channels.
parseXMLNode
(channelElement, xPath, linkData)[source]¶ Translate ‘<outputChannel>’ from xml.
-
class
fudge.gnds.channels.
productionChannel
[source]¶ Bases:
fudge.gnds.channels.channel
This is a production channel version of the channel class. A production channel is one that contains information about the production of outgoing products for various outgoing channels (that is, independent of the actual outgoing channel).
-
class
fudge.gnds.channels.
sumOfRemainingOutputChannels
[source]¶ Bases:
fudge.gnds.channels.channel
This channel is a catchall for all output channels not described for a given input channel.
-
class
fudge.gnds.channels.
twoBodyOutputChannel
(process=None)[source]¶ Bases:
fudge.gnds.channels.outputChannel
This is a two-body class version of channel. In particular, two-body is an output channel where only the angular information is needed to calculate the outgoing angle/energy for the two-bodies. Either of the bodies may subsequently decay/breakup.
-
moniker
= 'outputChannel'¶
-
fudge.gnds.documentation module¶
This module contains the documentation class.
fudge.gnds.link module¶
fudge.gnds.miscellaneous module¶
fudge.gnds.product module¶
This module contains the product class.
GNDS classes store reaction data in a hierarchical format. At the top is the product class. Next is the channel, representing the reaction output channels. An output channel contains the Q-value and a list of outgoing products (some of which may decay into other particles). The channel is stored inside the reaction class, which consists of an input and output channel together, (e.g. n_1 + O_16 –> H_1 + N_16). Finally, the reactionSuite class is used to store a list of reaction for a given input channel (that is, for the incoming particles that come together in the reaction). The following outline summarizes the classes.
product: | Outgoing particle, including multiplicity and distribution information. |
---|---|
channel: | A Q-value plus a list of products. |
reaction: | Contains a cross section (defined in the gnds.reactionData.crossSection module), along with an outgoing channel which must be one of the classes defined in gnds.channels (e.g., 2n + Pu239). |
reactionSuite: | Contains all reactions sharing the same input channel (e.g. n + Pu239)
|
-
class
fudge.gnds.product.
product
(id, label=None, attributes=None, outputChannel=None)[source]¶ Bases:
xData.ancestry.ancestry
This is the class for a gnds product. If the product can decay (e.g. for breakup reactions), the resulting decay information is defined in the product outputChannel
-
ancestryMembers
= ('multiplicity', 'distribution', 'outputChannel', 'energyDeposition', 'momentumDeposition')¶
-
checkProductFrame
()[source]¶ Calls checkProductFrame for self’s distributions and if present for its outputChannel.
-
distribution
¶
-
domainMax
¶
-
domainMin
¶
-
domainUnit
¶
-
energyDeposition
¶
-
id
¶
-
label
¶ Returns self’s label.
-
momentumDeposition
¶
-
moniker
= 'product'¶
-
multiplicity
¶
-
static
parseXMLNode
(productElement, xPath, linkData)[source]¶ Translate a <product> element from xml.
-
particle
¶
-
pid
¶
-
fudge.gnds.reactionSuite module¶
-
class
fudge.gnds.reactionSuite.
nullDevice
[source]¶ Bases:
object
For internal use. Used in methods to set logFile when one is not entered.
-
fudge.gnds.reactionSuite.
parseXMLNode
(rsElement)[source]¶ Translates a <reactionSuite> xml node into a reactionSuite instance. Users should use the ‘readXML’ function instead.
-
class
fudge.gnds.reactionSuite.
reactionSuite
(projectile, target, evaluation, GNDS_version='1.9', style=None, documentation=None, projectileFrame='lab', MAT=None, PoPs=None)[source]¶ Bases:
xData.ancestry.ancestry
- This is the main class for a gnds projectile/target object. It contains
- documentation
- a list of all particles encountered in the file
- resonance data
- a list of reactions
-
PoPs
¶
-
addResonances
(resonances)[source]¶ Add resonance parameter data (gnds.resonances.resonances instance) to the reactionSuite.
-
ancestryMembers
= ('styles', 'reactions', 'orphanProducts', 'sums', 'productions', 'fissionComponents')¶
-
applicationData
¶
-
calculateAverageProductData
(style, indent='', **kwargs)[source]¶ Calculate average energy and momentum data for all products of all reactions. Resulting data are stored within each product. Example usage is:
from fudge.gnds import reactionSuite as reactionSuiteModule from fudge.gnds import styles as stylesSuiteModule reactionSuite = reactionSuiteModule.readXML( “16.xml” )
style = stylesModule.averageProductData( label = ‘productData’, ‘eval’ ) reactionSuite.calculateAverageProductData( style )
Parameters: - style – The style to use.
- indent – string; The amount to indent and verbose output.
- kwargs – string; All other parameters.
Returns:
-
check
(**kwargs)[source]¶ Check all data in the reactionSuite, returning a gnds.warning.context object with list of warnings.
- Currently supported options:
- ‘branchingRatioSumTolerance’ 1e-6 # branching ratios must sum to 1 (within this tolerance) ‘dQ’ ‘1e-3 MeV’ # tolerance for comparing tabulated / calculated Q values ‘dThreshold’ ‘1e-3 MeV’ ‘crossSectionEnergyMax’ ‘20 MeV’ # warn if cross section ends before this energy ‘crossSectionOnly’: False ‘crossSectionMaxDiff’: 1e-3 # for comparing crossSectionSum to summands ‘multiplicityMaxDiff’: 1e-3 # for comparing multiplicitySum to summands ‘transportables’ (‘n’,) # distribution required for these products ‘normTolerance’: 1e-5 # for checking distribution normalization ‘checkEnergyBalance’ True ‘reconstructResonances’ True ‘dEnergyBalanceRelative’ 1e-3 ‘dEnergyBalanceAbsolute’ ‘1 eV’ ‘fissionEnergyBalanceLimit’ 0.15 # at least 85% of available energy should go to fission products ‘failOnException’ False # if True, crash instead of converting exceptions to warnings ‘cleanUpTempFiles’ True # remove derived data that was produced during checking
- Currently unused options:
- ‘checkForEnDepData’ False ‘allowZeroE’ False ‘xCloseEps’ None ‘maxAbsFloatValue’ None ‘checkEMin’ True ‘checkMissing’ True ‘maxGammaMultiplicity’ 100.
-
compound_nucleus
¶ Compute the compound nucleus id corresponding to this reaction.
Note, we don’t check to see if the compound nucleus is a valid concept, so this will fail on electro-atomic, photo-atomic and natural element target data
-
convertUnits
(unitMap)[source]¶ unitMap is a dictionary with old/new unit pairs where the old unit is the key (e.g., { ‘eV’ : ‘MeV’, ‘b’ : ‘mb’ }).
-
cullStyles
(styleName, removeDocumentation, removeApplicationData)[source]¶ Removes all forms from each component except for the requested style or, if it is not present its nearest derived from style.
-
evaluation
¶ Returns self’s evaluation.
-
externalFiles
¶
-
findEntity
(entityName, attribute=None, value=None)[source]¶ Overrides ancestry.findEntity. reactionSuite contains several different lists, so may need to descend into those to find desired entity.
-
fissionComponents
¶
-
getIsotopeName
(*args)[source]¶ Return name of compound nucleus formed by nuc1+nuc2+… if a nucleus in ‘args’ starts with ‘-‘, subtract instead.
-
getReaction
(channel)[source]¶ Search list of reactions for a specified channel. The ‘channel’ argument should be either a reaction type (‘elastic’,’capture’,’fission’, etc) or the list of outgoing particles (‘n + Pu239’ for example).
If ‘channel’ is an int, then we assume it’s an ENDF MT
Raises ‘KeyError’ if specified channel can’t be found.
-
heatCrossSections
(style, lowerlimit=None, upperlimit=None, interpolationAccuracy=0.001, heatAllPoints=False, doNotThin=True, heatBelowThreshold=True, heatAllEDomain=True, setThresholdToZero=False)[source]¶
-
incompleteReactions
¶
-
moniker
= 'reactionSuite'¶
-
orphanProducts
¶
-
processGriddedCrossSections
(style, verbosity=0, indent='', incrementalIndent=' ')[source]¶ Generate a union grid for all cross sections, spanning the same domain as elastic scattering.
-
processMultiGroup
(style, verbosity=0, indent='', incrementalIndent=' ', logFile=None, workDir=None)[source]¶
-
productions
¶
-
reactions
¶
-
reconstructResonances
(style, accuracy=None, thin=True, significantDigits=None, verbose=False)[source]¶ Turn resonance parameters into pointwise cross sections, then merge the results with tabulated pointwise cross sections. Resulting pointwise cross sections are stored alongside the original ‘resonancesWithBackground’ data in the reactionSuite.
@:param styleName: string - label for reconstructed cross section style @:param accuracy: float - target accuracy during reconstruction. For example, 0.001 @:param thin: boolean - enable/disable thinning after reconstruction
Disabling thinning makes it easier to check for consistency of summed cross sections.- @:param significantDigits: int - energy grid will only include points that can be exactly represented using
- specified number of significant digits
@:param verbose: boolean - turn on/off verbosity
-
reconstructResonancesAngularDistributions
(styleName, overwrite=False, accuracy=None, thin=False, verbose=False)[source]¶ Turn resonance parameters into Legendre-expanded angular distributions, then merge the results with tabulated angular distributions (overwriting original values in the resonance region). Resulting pointwise angular distributions are stored alongside the original angular distributions in the reactionSuite.
@:param styleName: string - label for reconstructed distribution style @:param overwrite: boolean - if style already in use for another distribution, overwrite it with the reconstructed distribution @:param accuracy: float - giving target accuracy during reconstruction. For example, 0.001 @:param thin: boolean - enable/disable thinning after reconstruction @:param verbose: boolean - turn on/off verbosity
-
removeStyle
(style)[source]¶ Remove the given style everywhere it appears in this reactionSuite :param style: may be a style instance or its name :return:
-
saveToFile
(fileName, **kwargs)[source]¶ Save the reactionSuite in GNDS/xml structure to specified file. To suppress extra messages, change the ‘verbosity’ flag:
>>>self.saveToFile( “output.xml”, flags={‘verbosity’:0} )
-
styles
¶
-
sums
¶
fudge.gnds.referredData module¶
fudge.gnds.resonances module¶
This module contains the resonances, resolved and unresolved classes.
class hierarchy:
resonances contains one or more of scatteringRadius, resolved and unresolved
resolved and unresolved contain a list of energy regions. In each region,
- resolved may have SLBW, MLBW, RM, RML formats
- unresolved has L-dependant or E-dependant format
each of these subsections has a list of resonances and attributes
-
class
fudge.gnds.resonances.
BreitWigner
(label, approximation, resonanceParameters=None, scatteringRadius=None, **kwargs)[source]¶ Bases:
xData.ancestry.ancestry
-
moniker
= 'BreitWigner'¶
-
multiLevel
= 'multiLevel'¶
-
optAttrList
= ('calculateChannelRadius', 'computeAngularDistribution', 'LvaluesNeededForConvergence', 'useForSelfShieldingOnly')¶
-
scatteringRadius
¶
-
singleLevel
= 'singleLevel'¶
-
-
class
fudge.gnds.resonances.
RMatrix
(label, resonanceReactions_, spinGroups_, **kwargs)[source]¶ Bases:
xData.ancestry.ancestry
RMatrix is a general container for resolved resonance parameters. It can handle standard Lane & Thomas R-Matrix, but can also use various approximations (Single- and Multi-level Breit Wigner plus Reich-Moore).
Internally, resonances are sorted into spin groups, each with a conserved total angular momentum and parity.
-
moniker
= 'RMatrix'¶
-
optAttrList
= ('approximation', 'boundaryCondition', 'relativisticKinematics', 'supportsAngularReconstruction', 'reducedWidthAmplitudes', 'calculatePenetrability', 'calculateShift', 'calculateChannelRadius', 'useForSelfShieldingOnly')¶
-
resonanceReactions
¶
-
spinGroups
¶
-
-
class
fudge.gnds.resonances.
URR_Jsection
(label, J, levelSpacing_, widths_)[source]¶ Bases:
xData.ancestry.ancestry
Unresolved average parameters for a specific L/J. Contains interpolation tables for the level spacing and widths, plus degrees of freedom for each open channel (degrees of freedom are typically 1 or 2 indicating how many channel spins contribute)
-
levelSpacing
¶
-
moniker
= 'J'¶
-
value
¶
-
widths
¶
-
-
class
fudge.gnds.resonances.
URR_Lsection
(label, L, Js)[source]¶ Bases:
xData.ancestry.ancestry
unresolved average widths, grouped by L. Contains list of J-values:
-
Js
¶
-
moniker
= 'L'¶
-
value
¶
-
-
class
fudge.gnds.resonances.
URR_Lsections
[source]¶ Bases:
fudge.gnds.suites.suite
tabulated widths contains a list of ‘L’ sections, each of which contains a list of ‘J’ sections
-
moniker
= 'Ls'¶
-
-
class
fudge.gnds.resonances.
URR_interpolationTable
(data)[source]¶ Bases:
xData.ancestry.ancestry
Base class for unresolved level spacing and widths Data are stored as XYs1d or regions1d.
-
allowedSubclasses
= (<class 'xData.XYs.XYs1d'>, <class 'xData.regions.regions1d'>)¶
-
data
¶
-
-
class
fudge.gnds.resonances.
URR_width
(resonanceReaction, data, degreesOfFreedom=0)[source]¶ Bases:
fudge.gnds.resonances.URR_interpolationTable
Stores the average width and number of degrees of freedom for a single channel
Degrees of freedom are typically 0, 1 or 2 depending on how many channel spins contribute, but it may be non-integer for a reaction that has a threshold somewhere inside the unresolved region.
Average width is stored as XYs1d or regions1d.
-
label
¶
-
moniker
= 'width'¶
-
-
class
fudge.gnds.resonances.
URR_widths
[source]¶ Bases:
fudge.gnds.suites.suite
Contains all average channel widths for an L/J combination.
-
moniker
= 'widths'¶
-
-
class
fudge.gnds.resonances.
channel
(label, resonanceReaction, columnIndex, L=None, channelSpin=None, scatteringRadius=None, hardSphereRadius=None, penetrability=None, shiftFactor=None, phaseShift=None, boundaryConditionOverride=None)[source]¶ Bases:
xData.ancestry.ancestry
Use if necessary to override the true scattering radius, effective radius, etc. for a single spin-group / channel combination.
-
moniker
= 'channel'¶
-
-
class
fudge.gnds.resonances.
energyInterval
(index, data, domainMin, domainMax, domainUnit)[source]¶ Bases:
xData.ancestry.ancestry
single energy interval, for use inside energyIntervals
-
BreitWigner
¶
-
RMatrix
¶
-
moniker
= 'energyInterval'¶
-
-
class
fudge.gnds.resonances.
energyIntervals
(label)[source]¶ Bases:
xData.ancestry.ancestry
Resonance region may be broken up into multiple energy intervals (deprecated)
-
moniker
= 'energyIntervals'¶
-
useForSelfShieldingOnly
¶
-
-
fudge.gnds.resonances.
getAttrs
(element, exclude=(), required=())[source]¶ Convert attributes to proper type (float, bool, int, etc), returning a dictionary. Anything in the ‘exclude’ list is omitted, anything in the ‘required’ list is automatically set to False if not present.
-
class
fudge.gnds.resonances.
hardSphereRadius
(form=None)[source]¶ Bases:
fudge.gnds.resonances.scatteringRadius
-
moniker
= 'hardSphereRadius'¶
-
-
class
fudge.gnds.resonances.
levelSpacing
(data)[source]¶ Bases:
fudge.gnds.resonances.URR_interpolationTable
Contains the average level spacing, stored in XYs1d or regions1d.
-
moniker
= 'levelSpacing'¶
-
-
class
fudge.gnds.resonances.
parity
(parity)[source]¶ Bases:
object
Store parity for a collection of resonances. Allowed values for the parity are +1 or -1.
-
class
fudge.gnds.resonances.
resolved
(domainMin, domainMax, domainUnit)[source]¶ Bases:
fudge.gnds.abstractClasses.component
class for resolved resonances
-
moniker
= 'resolved'¶
-
-
class
fudge.gnds.resonances.
resonanceParameters
(table)[source]¶ Bases:
xData.ancestry.ancestry
Light-weight wrapper around a table.
-
moniker
= 'resonanceParameters'¶
-
-
class
fudge.gnds.resonances.
resonanceReaction
(label, reactionLink, ejectile, Q=None, scatteringRadius=None, hardSphereRadius=None, computeShiftFactor=False, eliminated=False)[source]¶ Bases:
xData.ancestry.ancestry
Describes one reaction channel that opens up in the resonance region. In an R-Matrix section, all open reaction channels should be described in the list of resonanceReaction elements
-
ejectile
¶
-
fission
= 'fission'¶
-
fissionProduct
= 'fissionProduct'¶
-
moniker
= 'resonanceReaction'¶
-
residual
¶
-
scatteringRadius
¶
-
-
class
fudge.gnds.resonances.
resonanceReactions
[source]¶ Bases:
fudge.gnds.suites.suite
-
moniker
= 'resonanceReactions'¶
-
-
class
fudge.gnds.resonances.
resonances
(scatteringRadius_, resolved_=None, unresolved_=None)[source]¶ Bases:
xData.ancestry.ancestry
This is the top-level class for storing resonance parameters. For light targets it may contain only a scattering radius. For heavier targets it typically contains a resolved and/or unresolved section.
resonances also has a boolean flag ‘reconstructCrossSection’. If False, either the cross section has already been reconstructed, or the parameters are given for information only and no reconstruction should be performed.
-
children
= ('scatteringRadius', 'resolved', 'unresolved')¶
-
convertUnits
(unitMap)[source]¶ unitMap is a dictionary with old/new unit pairs where the old unit is the key (e.g., { ‘eV’ : ‘MeV’, ‘b’ : ‘mb’ }).
-
domain
(unitTo=None, asPQU=False)[source]¶ Return resonance region domain as a tuple of floats: (lowest edge, highest edge).
- options:
- unitTo: convert output to specified unit (given as a string). asPQU = True: return a tuple of PhysicalQuantityWithUncertainty instances instead of floats.
-
moniker
= 'resonances'¶
-
reconstructCrossSection
¶
-
-
class
fudge.gnds.resonances.
scatteringRadius
(form=None)[source]¶ Bases:
xData.ancestry.ancestry
The scatteringRadius determines scattering length. May be constant or energy-dependent. Each resonances section contains a scatteringRadius. The resolved / unresolved regions may also provide their own copy that overrides the top-level definition. The RMatrix class also provides a way of defining channel-specific radii (deprecated but necessary to handle ENDF evaluations)
-
check
(info)[source]¶ Checks that the scattering radius is within a factor of 3 of the expected scattering radius of AP = 0.123 * self.target.getMass(‘amu’)**(1./3.) + 0.08
This default AP is roughly the nuclear radius, so getting within a factor of 3 of the default shouldn’t be a problem.
A similar test is included in PSYCHE, but PSYCHE’s cannot handle LRF=7 :param info: :return:
-
moniker
= 'scatteringRadius'¶
-
-
class
fudge.gnds.resonances.
spin
(*args)[source]¶ Bases:
fractions.Fraction
Store spins for a collection of resonances. Check denominator (must be integer or half-integer)
-
class
fudge.gnds.resonances.
spinGroup
(label, spin, parity, channels, resonanceParameters)[source]¶ Bases:
xData.ancestry.ancestry
Single group with same Jpi (conserved). Each spin group contains an AP (scattering radius), along with 1 or more resonance widths.
-
channels
¶
-
moniker
= 'spinGroup'¶
-
resonanceParameters
¶
-
-
class
fudge.gnds.resonances.
spinGroups
[source]¶ Bases:
fudge.gnds.suites.suite
Contains a list of spinGroup nodes
-
moniker
= 'spinGroups'¶
-
-
class
fudge.gnds.resonances.
unresolved
(domainMin, domainMax, domainUnit)[source]¶ Bases:
fudge.gnds.abstractClasses.component
-
moniker
= 'unresolved'¶
-
fudge.gnds.thermalScattering module¶
-
class
fudge.gnds.thermalScattering.
DebyeWaller
(*args, **kwargs)[source]¶ Bases:
xData.XYs.XYs1d
For incoherent elastic sections, all we need is a characteristic cross section and a temperature-dependent list of the Debye-Waller integral
-
moniker
= 'DebyeWaller'¶
-
mutableYUnit
= False¶
-
-
class
fudge.gnds.thermalScattering.
S_alpha_beta
(gridded3d)[source]¶ Bases:
xData.ancestry.ancestry
Inelastic incoherent section contains S as a function of (alpha,beta,T). Currently supports gridded3d, other options may be supported later.
-
moniker
= 'S_alpha_beta'¶
-
-
class
fudge.gnds.thermalScattering.
S_table
(gridded2d)[source]¶ Bases:
xData.ancestry.ancestry
For elastic coherent, cumulative structure factor ‘S’ is given as function of incident energy and temp.
-
moniker
= 'S_table'¶
-
-
class
fudge.gnds.thermalScattering.
T_effective
(*args, **kwargs)[source]¶ Bases:
xData.XYs.XYs1d
In incoherent inelastic sections, each scattering atom using the short collision time (SCT) approximation needs an effective temperature.
-
moniker
= 'T_effective'¶
-
mutableYUnit
= False¶
-
-
class
fudge.gnds.thermalScattering.
characteristicCrossSection
(value, unit, label=None)[source]¶ Bases:
xData.physicalQuantity.physicalQuantity
-
moniker
= 'characteristicCrossSection'¶
-
-
class
fudge.gnds.thermalScattering.
coherentElastic
(S_table)[source]¶ Bases:
xData.ancestry.ancestry
-
moniker
= 'coherentElastic'¶
-
-
class
fudge.gnds.thermalScattering.
cutoffEnergy
(value, unit, label=None)[source]¶ Bases:
xData.physicalQuantity.physicalQuantity
-
moniker
= 'cutoffEnergy'¶
-
-
class
fudge.gnds.thermalScattering.
e_critical
(value, unit, label=None)[source]¶ Bases:
xData.physicalQuantity.physicalQuantity
-
moniker
= 'e_critical'¶
-
-
class
fudge.gnds.thermalScattering.
e_max
(value, unit, label=None)[source]¶ Bases:
xData.physicalQuantity.physicalQuantity
-
moniker
= 'e_max'¶
-
-
class
fudge.gnds.thermalScattering.
freeAtomCrossSection
(value, unit, label=None)[source]¶ Bases:
xData.physicalQuantity.physicalQuantity
-
moniker
= 'freeAtomCrossSection'¶
-
-
class
fudge.gnds.thermalScattering.
incoherentElastic
(characteristicCrossSection, DebyeWaller)[source]¶ Bases:
xData.ancestry.ancestry
-
moniker
= 'incoherentElastic'¶
-
-
class
fudge.gnds.thermalScattering.
incoherentInelastic
(S_alpha_beta, calculatedAtThermal=False, asymmetric=False, atoms=None)[source]¶ Bases:
xData.ancestry.ancestry
-
moniker
= 'incoherentInelastic'¶
-
-
class
fudge.gnds.thermalScattering.
mass
(value, unit, label=None)[source]¶ Bases:
xData.physicalQuantity.physicalQuantity
-
moniker
= 'mass'¶
-
-
fudge.gnds.thermalScattering.
readXML
(gndsFile)[source]¶ Read a GNDS/xml file and create a new reactionSuite instance from the result.
Parameters: gndsFile – path to a GNDS file, as a string. Returns: reactionSuite instance containing all data from the file.
-
class
fudge.gnds.thermalScattering.
scatteringAtom
(label, numberPerMolecule, mass, freeAtomCrossSection, e_critical=None, e_max=None, functionalForm=None, T_effective=None)[source]¶ Bases:
xData.ancestry.ancestry
Inelastic incoherent scattering requires a description of each atom that is scattered off
-
moniker
= 'scatteringAtom'¶
-
-
class
fudge.gnds.thermalScattering.
scatteringAtoms
[source]¶ Bases:
fudge.gnds.suites.suite
-
moniker
= 'scatteringAtoms'¶
-
-
class
fudge.gnds.thermalScattering.
thermalScattering
(cutoffEnergy, material=None, MAT=None, mass=None, documentation=None, coherentElastic=None, incoherentElastic=None, incoherentInelastic=None)[source]¶ Bases:
xData.ancestry.ancestry
-
ancestryMembers
= ('mass', 'cutoffEnergy', 'coherentElastic', 'incoherentElastic', 'incoherentInelastic')¶
-
moniker
= 'thermalScattering'¶
-
fudge.gnds.tokens module¶
fudge.gnds.version module¶
Define the version number for the GNDS format (not the same as the Fudge version number).
fudge.gnds.warning module¶
Store and report warnings and errors in GNDS data, in order to discover problems in the library. The reactionSuite.check() function returns a nested list of warning objects:
>>> warnings = reactionSuite.check()
>>> print warnings
May include or exclude specific classes of warning using the filter command. filter() returns a new context instance:
>>> warnings2 = warnings.filter( exclude=[warning.energyImbalance] )
Or, for easier searching you may wish to flatten the list (to get warnings alone without context messages):
>>> flat = warnings.flatten()
cmattoon, Jan 2012
-
exception
fudge.gnds.warning.
Coulomb_threshold_mismatch
(threshold, thresholdCalc, obj=None)[source]¶
-
exception
fudge.gnds.warning.
ExceptionRaised
(Exception_String, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
if we run into an exception when running check(), try to exit gracefully and return this warning
-
exception
fudge.gnds.warning.
MadlandNixBadParameters
(EFL, EFH, minTm, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
NotImplemented
(form, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
Q_mismatch
(Qcalc, Qactual, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
RRmultipleRegions
(obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
SkippedCoulombElasticEnergyDeposition
(obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
URRdomainMismatch
(Lval, Jval, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
URRinsufficientEnergyGrid
(Lval, Jval, eLow, eHigh, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
UnorthodoxParticleNotImplemented
(particleId, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
WicksLimitError
(percentErr, energy_in, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
ZAbalanceWarning
(obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
badCrossSectionReference
(obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
badEigenvalueRatio
(ratio, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
badFissionEnergyRelease
(worstCase, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
badScatteringRadius
(factor=3.0, gotAP=None, expectedAP=None, L=None, E=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
badSpinStatisticalWeights
(L, gJ, expectedgJ, reaction=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
class
fudge.gnds.warning.
context
(message='', warningList=None)[source]¶ Bases:
object
Store warnings in context. This class contains location information (reactionSuite, reaction, etc) plus a nested list of warnings or other context instances
-
filter
(include=None, exclude=None)[source]¶ Filter warning list to only include (or exclude) specific classes of warning. For example:
>>> newWarnings = warnings.filter( exclude=[warning.energyImbalance, warning.Q_mismatch] )
Note that if both ‘include’ and ‘exclude’ lists are provided, exclude is ignored.
-
-
exception
fudge.gnds.warning.
cyclicDependency
(cycle, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
domain_mismatch
(lowBound, highBound, xscLowBound, xscHighBound, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
energyDistributionBadU
(obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
energyImbalance
(energy_in, index, availableEnergy, deposition_per_product, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
extraOutgoingEnergy
(energy_in, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
If an outgoing energy distribution ends with more than one energy with probability=0, proper unitbase treatment is unclear. Distribution should end with exactly one P=0 point.
-
exception
fudge.gnds.warning.
fissionEnergyImbalance
(energy_in, index, availableEnergy, deposition_per_product, obj=None)[source]¶
-
exception
fudge.gnds.warning.
flatIncidentEnergyInterpolation
(obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
gapInCrossSection
(minGapEnergy, maxGapEnergy, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
incompleteDistribution
(energy_in, lowerMu, upperMu, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
incorrectCoulombIdenticalParticlesFlag
(projectile, target, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
invalidAngularMomentaCombination
(L, S, J, name)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
invalidParity
(L, S, J, Pi, name)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
invalidShortRangeVarianceData
(matrixType, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
invalidSpinCombination
(Ia, Ib, S, name)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
missingCoulombIdenticalParticlesFlag
(obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
missingDistribution
(productName, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
missingRecoilDistribution
(obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
missingResonanceChannel
(L, S, J, name)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
negativeCrossSection
(energy_in, index, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
negativeDiscreteGammaEnergy
(obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
negativeEigenvalues
(negativeCount, worstCase, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
negativeMultiplicity
(value, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
negativeProbability
(energy_in, energy_out=None, mu=None, value=None, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
nonZero_crossSection_at_threshold
(value, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
potentialScatteringNotConverged
(L, E, fom, fomTarget)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
primaryGammaEnergyTooLarge
(energy, fraction, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
Primary gamma energy at threshold should be <= available energy (depending on which discrete level it ends up in)
-
exception
fudge.gnds.warning.
summedCrossSectionDomainMismatch
(obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
summedCrossSectionMismatch
(maxPercentDiff, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
summedCrossSectionZeroDivision
(obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
summedMultiplicityDomainMismatch
(obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
summedMultiplicityMismatch
(maxPercentDiff, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
summedMultiplicityZeroDivision
(obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
testSkipped
(testName, reason, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
indicate if test was skipped due to missing information
-
exception
fudge.gnds.warning.
threshold_mismatch
(threshold, thresholdCalc, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
unknownSpinParity
(reaction)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
unnormalizedDistribution
(energy_in, index, integral, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
unnormalizedKMDistribution
(energy_in, index, integral, obj=None)[source]¶
-
exception
fudge.gnds.warning.
unresolvedLink
(link)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
valueOutOfRange
(contextMessage, value, lowerBound, upperBound, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
varianceTooLarge
(index, variance, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
varianceTooSmall
(index, variance, obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
warning
(obj=None)[source]¶ Bases:
exceptions.BaseException
General warning class. Contains link to problem object, xpath in case the object leaves memory, and information about the warning or error.
-
exception
fudge.gnds.warning.
weightsDontSumToOne
(obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
wrong2BodyFrame
(obj=None)[source]¶ Bases:
fudge.gnds.warning.warning
-
exception
fudge.gnds.warning.
wrongDistributionComponent
(component, reactionType='2-body', obj=None)[source]¶ Bases:
fudge.gnds.warning.warning