asigma

Atomic reaction data HDF5 IO.

The data consists either of cross-sections or rate coefficients.

a5py.ascot5io.asigma.Asigma_loc

Local atomic data.

class a5py.ascot5io.asigma.Asigma_loc(root, path, **kwargs)

Bases: DataGroup

Local atomic data.

static create_dummy()

Create dummy data that has correct format and is valid, but can be non-sensical.

This method is intended for testing purposes or to provide data whose presence is needed but which is not actually used in simulation.

Returns:
datadict

Input data that can be passed to write_hdf5 method of a corresponding type.

read()

Read data from HDF5 file.

Returns:
datadict

Data read from HDF5 stored in the same format as is passed to write_hdf5().

static write_hdf5(fn, nreac, z1, a1, z2, a2, reactype, nenergy, energymin, energymax, ndensity, densitymin, densitymax, ntemperature, temperaturemin, temperaturemax, sigma, desc=None)

Write input data to the HDF5 file.

Parameters:
fnstr

Path to hdf5 file.

nreacint

Number of available atomic reactions.

z1array_like (nreac,1)

Atomic number of test particle.

a1array_like (nreac,1)

Atomic mass number of test particle.

z2array_like (nreac,1)

Atomic number of bulk particle.

a2array_like (nreac,1)

Atomic mass number of bulk particle.

reactypearray_like (nreac,1)

Type of atomic reaction.

nenergyarray_like (nreac,1)

Number of energy grid points.

energyminarray_like (nreac,1)

Energy grid minimum edge [eV].

energymaxarray_like (nreac,1)

Energy grid maximum edge [eV].

ndensityarray_like (nreac,1)

Number of density grid points.

densityminarray_like (nreac,1)

Density grid minimum edge [m^-3].

densitymaxarray_like (nreac,1)

Density grid maximum edge [m^-3].

ntemperaturearray_like (nreac,1)

Number of temperature grid points.

temperatureminarray_like (nreac,1)

Temperature grid minimum edge [eV].

temperaturemaxarray_like (nreac,1)

Temperature grid maximum edge [eV].

sigmaarray_like (1,sum(nenergy[i]*ndensity[i]*ntemperature[i]))

Reaction cross-section or other probability data [cm^2 or other].

descstr, optional

Input description.

Returns:
namestr

Name, i.e. “<type>_<qid>”, of the new input that was written.

Raises:
ValueError

If inputs were not consistent.