Warning

You are reading the documentation related to the development version. Go here if you are looking for the documentation of the stable release.

spectrochempy.stack

stack(*datasets)[source]

Stack of NDDataset objects along a new dimension.

Any number of NDDataset objects can be stacked. For this operation to be defined the following must be true :

  1. all inputs must be valid dataset objects,

  2. units of data and axis must be compatible (rescaling is applied automatically if necessary).

Parameters

*datasets (a series of NDDataset) – The dataset to be stacked to the current dataset.

Returns

out – A NDDataset created from the stack of the datasets datasets.

See also

concatenate

Concatenate NDDataset objects along a given dimension.

Examples

>>> A = scp.read('irdata/nh4y-activation.spg', protocol='omnic')
>>> B = scp.read('irdata/nh4y-activation.scp')
>>> C = scp.stack(A, B)
>>> print(C)
NDDataset: [float64] a.u. (shape: (z:2, y:55, x:5549))