ess.bifrost.detector.merge_triplets#

ess.bifrost.detector.merge_triplets(*triplets)[source]#

Merge BIFROST detector triplets into a single data array.

This function folds the triplets into (arc, channel) dimensions based on the scalar ‘arc’ and ‘channel’ coordinates assigned to each triplet. If the triplets form a regular rectangular subset of the full 5x9 detector array, they will be folded into those dimensions. Otherwise, they are concatenated along a ‘triplet’ dimension.

Parameters:

triplets (DataArray) – Data arrays to merge. Each must have scalar ‘arc’ and ‘channel’ coordinates.

Returns:

DataArray – Input data arrays either folded into (arc, channel) dimensions or stacked along the “triplet” dimension.