fudge.gnds.reactionData package

Subpackages

Submodules

fudge.gnds.reactionData.availableEnergy module

class fudge.gnds.reactionData.availableEnergy.XYs1d(**kwargs)[source]

Bases: fudge.gnds.reactionData.availableEnergy.baseAvailableEnergyForm, xData.XYs.XYs1d

mutableYUnit = False
processMultiGroup(style, tempInfo, indent)[source]
class fudge.gnds.reactionData.availableEnergy.baseAvailableEnergyForm[source]

Bases: fudge.gnds.abstractClasses.form

class fudge.gnds.reactionData.availableEnergy.component[source]

Bases: fudge.gnds.abstractClasses.component

moniker = 'availableEnergy'
fudge.gnds.reactionData.availableEnergy.defaultAxes(energyUnit)[source]
class fudge.gnds.reactionData.availableEnergy.gridded1d(**kwargs)[source]

Bases: fudge.gnds.reactionData.availableEnergy.baseAvailableEnergyForm, xData.gridded.gridded1d

fudge.gnds.reactionData.availableEnergy.parseXMLNode(element, xPath, linkData)[source]

Reads an xml <availableEnergy> component element into fudge, including all forms in the component.

fudge.gnds.reactionData.availableMomentum module

class fudge.gnds.reactionData.availableMomentum.XYs1d(**kwargs)[source]

Bases: fudge.gnds.reactionData.availableMomentum.baseAvailableMomentumForm, xData.XYs.XYs1d

mutableYUnit = False
processMultiGroup(style, tempInfo, indent)[source]
class fudge.gnds.reactionData.availableMomentum.baseAvailableMomentumForm[source]

Bases: fudge.gnds.abstractClasses.form

fudge.gnds.reactionData.availableMomentum.calculateMomentumPoints(style, massInE, EMin, EMax, energyUnit, accuracy=0.0001)[source]

This is a temporary function (hopefully) to calculate momentum vs E. What is really needed is a function like rriint in mcfgen.

class fudge.gnds.reactionData.availableMomentum.component[source]

Bases: fudge.gnds.abstractClasses.component

moniker = 'availableMomentum'
fudge.gnds.reactionData.availableMomentum.defaultAxes(energyUnit, momentumUnit)[source]
class fudge.gnds.reactionData.availableMomentum.gridded1d(**kwargs)[source]

Bases: fudge.gnds.reactionData.availableMomentum.baseAvailableMomentumForm, xData.gridded.gridded1d

fudge.gnds.reactionData.availableMomentum.parseXMLNode(element, xPath, linkData)[source]

Reads an xml <availableMomentum> component element into fudge, including all forms in the component.

fudge.gnds.reactionData.base module

fudge.gnds.reactionData.crossSection module

class fudge.gnds.reactionData.crossSection.CoulombPlusNuclearElastic(link=None, root=None, path=None, label=None, relative=False)[source]

Bases: fudge.gnds.reactionData.crossSection.reference

Special type of link: points to doubleDifferentialCrossSection/chargedParticleElastic

moniker = 'CoulombPlusNuclearElastic'
class fudge.gnds.reactionData.crossSection.XYs1d(**kwargs)[source]

Bases: fudge.gnds.reactionData.crossSection.baseCrossSectionForm, xData.XYs.XYs1d

changeInterpolation(interpolation, accuracy, lowerEps=0, upperEps=0, cls=None)[source]
evaluate(xValue)[source]
heat(currentTemperature, newTemperature, massRatio, EMin, lowerlimit=None, upperlimit=None, interpolationAccuracy=0.001, heatAllPoints=False, doNotThin=True, heatBelowThreshold=True, heatAllEDomain=True, setThresholdToZero=False)[source]

Returns a linear version of the cross section heated to ‘newTemperature’. If the current temperature of the cross section, given by ‘currentTemperature’, is greater than ‘newTemperature’ a raise is executed. If lowerlimit is None, it is set to ‘oneOverV’ except when the reaction is determined to be a threshold reaction, then it is set to ‘threshold’. Any cross section with domainMin greater than 2.5e-4 eV is determined to be a threshold reaction. If upperlimit is None it is set to ‘constant’. If heatBelowThreshold is False, then EMin is set to the larger of EMin and self’s domainMin.

The unit of ‘currentTemperature’ and ‘newTemperature’ must be the same as the self’s domain unit.

For more information on EMin, lowerlimit, upperlimit, interpolationAccuracy, heatAllPoints, doNotThin and heatAllEDomain see the module crossSectionAdjustForHeatedTarget.

mutableYUnit = False
processMultiGroup(style, tempInfo, indent)[source]
toPointwise_withLinearXYs(**kwargs)[source]
toXMLList(indent='', **kwargs)[source]
class fudge.gnds.reactionData.crossSection.Ys1d(Ys, interpolation='lin-lin', axes=None, index=None, valueType='Float64', value=None, label=None)[source]

Bases: fudge.gnds.reactionData.crossSection.baseCrossSectionForm, xData.Ys1d.Ys1d

toPointwise_withLinearXYs(**kwargs)[source]
class fudge.gnds.reactionData.crossSection.background(resolvedRegion=None, unresolvedRegion=None, fastRegion=None)[source]

Bases: xData.ancestry.ancestry

ancestryMembers = ('resolvedRegion', 'unresolvedRegion', 'fastRegion')
convertUnits(unitMap)[source]
domainMax
domainMin
domainUnit
fastRegion
moniker = 'background'
classmethod parseXMLNode(element, xPath, linkData)[source]
resolvedRegion
toPointwise_withLinearXYs(**kwargs)[source]
toRegions()[source]

Merge all background terms into a single regions1d :return:

toXMLList(indent='', **kwargs)[source]
unresolvedRegion
class fudge.gnds.reactionData.crossSection.backgroundTerm(data)[source]

Bases: xData.ancestry.ancestry

XYs1d
convertUnits(unitMap)[source]
data
moniker
classmethod parseXMLNode(element, xPath, linkData)[source]
regions1d
toXMLList(indent='', **kwargs)[source]
class fudge.gnds.reactionData.crossSection.baseCrossSectionForm[source]

Bases: fudge.gnds.abstractClasses.form

fudge.gnds.reactionData.crossSection.chargeParticle_changeInterpolationSubFunction(threshold, x, x1, y1, x2, y2)[source]
class fudge.gnds.reactionData.crossSection.component[source]

Bases: fudge.gnds.abstractClasses.component

check(info)[source]

Check cross section data for correct threshold, negative cross sections, etc. Returns a list of any warnings encountered during checking.

Parameters:
  • info (dict) – A Python dictionary containing the parameters that control the cross section checking.
  • CoulombReaction (boolean) – True if target and projectile are both charged particles, or if two or more products are charged particles.
  • Q (float) – a parameter of info: if Q is positive (and CoulombReaction=False), cross section must start at crossSectionEnergyMin, otherwise cross section threshold must agree with Q-value
  • kinematicFactor (float) – a parameter of info: equal to ( (targetMass + projectileMass) / targetMass )
  • dThreshold (string) – a parameter of info: allowable threshold energy mismatch as a string suitable for the PQU class
  • crossSectionEnergyMin (float) – a parameter of info: non-threshold cross section must start at this limit (usually 1e-5 eV)
  • crossSectionEnergyMax (float) – a parameter of info: the cross section must extend up to limit (usually 20 MeV)
domainMax
domainMin
domainUnit
domainUnitConversionFactor(unitTo)[source]
evaluateWithUncertainty(E, useCovariance=True, covariance=None, covarianceSuite=None)[source]
Parameters:
  • E
  • useCovariance (bool) – use this to override covarance usage
  • covariance
  • covarianceSuite
Returns:

findEntity(entityName, attribute=None, value=None)[source]
getMatchingCovariance(covariance=None, covarianceSuite=None)[source]

Retrieve the uncertainty that goes with this cross section, if we can find it :return:

hasLinearForm()[source]
heat(style, EMin, lowerlimit=None, upperlimit=None, interpolationAccuracy=0.001, heatAllPoints=False, doNotThin=True, heatBelowThreshold=True, heatAllEDomain=True, setThresholdToZero=False, addToSuite=False)[source]

Returns the result of self.toPointwise_withLinearXYs( ).heat( … ). See method XYs1d.heat for more information. If setThresholdToZero is True and self’s cross section at the first point is 0., then the heated cross section’s first value will also be 0.

integrateTwoFunctionsWithUncertainty(f2, domainMin=None, domainMax=None, useCovariance=True, covariance=None, covarianceSuite=None, normalize=False)[source]

Computes the spectrum (i.e. weighted) integral of self with the spectrum (i.e. weight) specified by spectrum optionally from Emin to Emax. If the covariance is provided, the uncertainty on the spectrum integral will be computed.

Parameters:
  • f2 (XYs1d instance) – spectrum over which to average
  • domainMin (PQU or None) – Lower integration limit. If None (the default), then the lower limit of self’s domain is used
  • domainMax (PQU or None) – Upper integration limit. If None (the default), then the upper limit of self’s domain is used
  • useCovariance (bool) – use this to override covarance usage
  • covariance (covariance instance or None) – covariance to use when computing uncertainty on the spectral average. If None (default: None), no uncertainty is computed.
  • normalize (bool) – if set to True, normalize integral of the spectrum over the interval so we are doing a spectrum average
Return type:

PQU

How does it work?:
 

Given a weighting spectrum \phi(E), we intend to average the cross section in self as follows:

< \sigma > = \int_{E_{min}}^{E_{max}} dE \phi(E) \sigma(E)

To compute the uncertainty, we resort to the basis function expansion of the covariance as follows:

\Delta^2\sigma(E,E') = \sum_{ij} \Delta^2\sigma_{ij} B_i(E) B_j(E')

In the ENDF format, all covariances are assumed to be grouped in energy so the basis functions are simple window functions. With this,

\delta <\sigma> = \sqrt{ \int dE dE' \phi(E)\phi(E') \Delta^2\sigma(E,E') }
                = \sqrt{ \sum_{ij} \Delta^2\sigma_{ij} <B_i> <B_j> }

moniker = 'crossSection'
processGriddedCrossSections(style, verbosity=0, indent='', incrementalIndent=' ', isPhotoAtomic=False)[source]
fudge.gnds.reactionData.crossSection.defaultAxes(energyUnit)[source]
class fudge.gnds.reactionData.crossSection.fastRegion(data)[source]

Bases: fudge.gnds.reactionData.crossSection.backgroundTerm

moniker = 'fastRegion'
class fudge.gnds.reactionData.crossSection.gridded1d(**kwargs)[source]

Bases: fudge.gnds.reactionData.crossSection.baseCrossSectionForm, xData.gridded.gridded1d

fudge.gnds.reactionData.crossSection.parseXMLNode(crossSectionElement, xPath, linkData)[source]

Reads an xml <crossSection> element into fudge, including all cross section forms (XYs1d, regions1d, etc.) contained inside the crossSection.

class fudge.gnds.reactionData.crossSection.reference(link=None, root=None, path=None, label=None, relative=False)[source]

Bases: xData.link.link, fudge.gnds.reactionData.crossSection.baseCrossSectionForm

This cross section form consists of a reference to another cross section.

check()[source]
convertUnits(unitMap)[source]

See documentation for reactionSuite.convertUnits.

crossSection
domainMax
domainMin
domainUnit
getReference()[source]
moniker = 'reference'
processMultiGroup(style, tempInfo, indent)[source]
setReference(crossSection)[source]
toPointwise_withLinearXYs(**kwargs)[source]
class fudge.gnds.reactionData.crossSection.regions1d(**kwargs)[source]

Bases: fudge.gnds.reactionData.crossSection.baseCrossSectionForm, xData.regions.regions1d

This class stores a cross section in two or more regions, which may have different interpolations. Each region must contain at least two points. Each pair of adjacent regions must overlap at exactly one point.

static allowedSubElements()[source]
processMultiGroup(style, tempInfo, indent)[source]
toLinearXYsClass()[source]
toPointwise_withLinearXYs(**kwargs)[source]
ysMappedToXs(cls, grid, label=None)[source]
class fudge.gnds.reactionData.crossSection.resolvedRegion(data)[source]

Bases: fudge.gnds.reactionData.crossSection.backgroundTerm

moniker = 'resolvedRegion'

Bases: xData.link.link

moniker = 'resonances'
class fudge.gnds.reactionData.crossSection.resonancesWithBackground(label, resonances, background, uncertainty=None)[source]

Bases: fudge.gnds.reactionData.crossSection.baseCrossSectionForm

This class stores cross sections that include resonances along with a background contribution. Contains a link to the resonances, and the ‘background’ which consists of up to three terms:

resolved, unresolved and fast regions.

The full XYs1d cross section can be obtained by first reconstructing resonances and then adding the background contribution (users should use the reactionSuite.reconstructResonances method).

ancestryMembers = ('resonances', 'background', 'uncertainty')
background
convertUnits(unitMap)[source]

See documentation for reactionSuite.convertUnits.

domainMax
domainMin
domainUnit
label
moniker = 'resonancesWithBackground'
classmethod parseXMLNode(element, xPath, linkData)[source]
processMultiGroup(style, tempInfo, indent)[source]
resonances
toPointwise_withLinearXYs(**kwargs)[source]
toXMLList(indent='', **kwargs)[source]
uncertainty
class fudge.gnds.reactionData.crossSection.unresolvedRegion(data)[source]

Bases: fudge.gnds.reactionData.crossSection.backgroundTerm

moniker = 'unresolvedRegion'

Module contents