endf.Tabulated1D#

class endf.Tabulated1D(x, y, breakpoints=None, interpolation=None)[source]#

A one-dimensional tabulated function.

This class mirrors the TAB1 type from the ENDF-6 format. A tabulated function is specified by tabulated (x,y) pairs along with interpolation rules that determine the values between tabulated pairs.

Once an object has been created, it can be used as though it were an actual function, e.g.:

>>> f = Tabulated1D([0, 10], [4, 5])
>>> [f(xi) for xi in numpy.linspace(0, 10, 5)]
[4.0, 4.25, 4.5, 4.75, 5.0]
Parameters:
  • x (Iterable of float) – Independent variable

  • y (Iterable of float) – Dependent variable

  • breakpoints (Iterable of int) – Breakpoints for interpolation regions

  • interpolation (Iterable of int) – Interpolation scheme identification number, e.g., 3 means y is linear in ln(x).

x#

Independent variable

Type:

Iterable of float

y#

Dependent variable

Type:

Iterable of float

breakpoints#

Breakpoints for interpolation regions

Type:

Iterable of int

interpolation#

Interpolation scheme identification number, e.g., 3 means y is linear in ln(x).

Type:

Iterable of int

n_regions#

Number of interpolation regions

Type:

int

n_pairs#

Number of tabulated (x,y) pairs

Type:

int

Methods

from_ace(ace[, idx, convert_units])

Create a Tabulated1D object from an ACE table.

integral()

Integral of the tabulated function over its tabulated range.