Reduce the trap_image to 2d.
Images for all the channels associated with a trap
Function to execute the reduction
Axis in which we apply the reduction operation.