Apply subcube selection also to weights cube

In this implementation the weights cube does not need to have the same number of axes as the data cube. It can be a 2D weights array (to be applied to all channels of the original 3D cube) or a 1D array (to be applied to all spectra of the original 3D cube).