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¶
-
-
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'¶
-
-
class
fudge.gnds.reactionData.availableEnergy.
gridded1d
(**kwargs)[source]¶ Bases:
fudge.gnds.reactionData.availableEnergy.baseAvailableEnergyForm
,xData.gridded.gridded1d
fudge.gnds.reactionData.availableMomentum module¶
-
class
fudge.gnds.reactionData.availableMomentum.
XYs1d
(**kwargs)[source]¶ Bases:
fudge.gnds.reactionData.availableMomentum.baseAvailableMomentumForm
,xData.XYs.XYs1d
-
mutableYUnit
= False¶
-
-
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'¶
-
-
class
fudge.gnds.reactionData.availableMomentum.
gridded1d
(**kwargs)[source]¶ Bases:
fudge.gnds.reactionData.availableMomentum.baseAvailableMomentumForm
,xData.gridded.gridded1d
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
-
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¶
-
-
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
-
class
fudge.gnds.reactionData.crossSection.
background
(resolvedRegion=None, unresolvedRegion=None, fastRegion=None)[source]¶ Bases:
xData.ancestry.ancestry
-
ancestryMembers
= ('resolvedRegion', 'unresolvedRegion', 'fastRegion')¶
-
domainMax
¶
-
domainMin
¶
-
domainUnit
¶
-
fastRegion
¶
-
moniker
= 'background'¶
-
resolvedRegion
¶
-
unresolvedRegion
¶
-
-
class
fudge.gnds.reactionData.crossSection.
backgroundTerm
(data)[source]¶ Bases:
xData.ancestry.ancestry
-
XYs1d
¶
-
data
¶
-
moniker
¶
-
regions1d
¶
-
-
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
¶
-
evaluateWithUncertainty
(E, useCovariance=True, covariance=None, covarianceSuite=None)[source]¶ Parameters: - E –
- useCovariance (bool) – use this to override covarance usage
- covariance –
- covarianceSuite –
Returns:
-
getMatchingCovariance
(covariance=None, covarianceSuite=None)[source]¶ Retrieve the uncertainty that goes with this cross section, if we can find it :return:
-
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: How does it work?: Given a weighting spectrum
, we intend to average the cross section in self as follows:
To compute the uncertainty, we resort to the basis function expansion of the covariance as follows:
In the ENDF format, all covariances are assumed to be grouped in energy so the basis functions are simple window functions. With this,
-
moniker
= 'crossSection'¶
-
-
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.
-
crossSection
¶
-
domainMax
¶
-
domainMin
¶
-
domainUnit
¶
-
moniker
= 'reference'¶
-
-
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.
-
class
fudge.gnds.reactionData.crossSection.
resolvedRegion
(data)[source]¶ Bases:
fudge.gnds.reactionData.crossSection.backgroundTerm
-
moniker
= 'resolvedRegion'¶
-
-
class
fudge.gnds.reactionData.crossSection.
resonanceLink
(link=None, root=None, path=None, label=None, relative=False, **attributes)[source]¶ 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
¶
-
domainMax
¶
-
domainMin
¶
-
domainUnit
¶
-
label
¶
-
moniker
= 'resonancesWithBackground'¶
-
resonances
¶
-
uncertainty
¶
-
-
class
fudge.gnds.reactionData.crossSection.
unresolvedRegion
(data)[source]¶ Bases:
fudge.gnds.reactionData.crossSection.backgroundTerm
-
moniker
= 'unresolvedRegion'¶
-