tardis.plasma.properties.util.integrate_array_by_blocks module

tardis.plasma.properties.util.integrate_array_by_blocks.integrate_array_by_blocks(f, x, block_references)[source]

Integrate a function over blocks.

This function integrates a function f defined at locations x over blocks given in block_references.

Parameters
fnumpy.ndarray, dtype float

2D input array to integrate.

xnumpy.ndarray, dtype float

1D array with the sample points corresponding to the f values.

block_referencesnumpy.ndarray, dtype int

1D array with the start indices of the blocks to be integrated.

Returns
numpy.ndarray, dtype float

2D array with integrated values.