|
| 1 | +""" |
| 2 | +Linearisation, unionisation and resonance reconstruction |
| 3 | +""" |
| 4 | +from __future__ import annotations |
| 5 | +import njoy.dryad |
| 6 | +__all__: list[str] = ['calculate_summation_cross_sections', 'unionise_cross_sections'] |
| 7 | +def calculate_summation_cross_sections(pt: njoy.dryad.ProjectileTarget, tolerance: njoy.dryad.ToleranceConvergence = ...) -> None: |
| 8 | + """ |
| 9 | + This function recalculates the cross section of all summation reactions of |
| 10 | + a ProjectileTarget instance. It does so by linearising the cross sections of |
| 11 | + the partials (if required) and summing them together. |
| 12 | + |
| 13 | + Arguments: |
| 14 | + pt the projectile-target data to be modified |
| 15 | + tolerance the linearisation tolerance |
| 16 | + """ |
| 17 | +def unionise_cross_sections(pt: njoy.dryad.ProjectileTarget, exclude_summation: bool = False) -> None: |
| 18 | + """ |
| 19 | + Unionise cross section data in a ProjectileTarget instance |
| 20 | + |
| 21 | + This function takes all cross section data in the ProjectileTarget |
| 22 | + instance and unionises the cross section grids. It does not linearise |
| 23 | + the data but reevaluates the data using the proper interpolation types |
| 24 | + of the cross section data. |
| 25 | + |
| 26 | + By default, summation cross sections are included in the unionisation process. |
| 27 | + unless explicitly excluded by the user. Switching on the exclusion of summation |
| 28 | + cross sections may be useful when the user is going to recalculate the summation |
| 29 | + cross sections after unionisation. |
| 30 | + |
| 31 | + pt the projectile-target data to be modified |
| 32 | + exclude_summation option to exclude summation reactions in the |
| 33 | + unionisation (default: false) |
| 34 | + """ |
0 commit comments