My comment applies to all if-branches. If the output map has two or more 
spatial dimensions, it should usually copy the axistags from the input 
map (e.g. when we pass in a 'yz' slice, we don't want to get out an 'xy' 
slice). For your example of creating a 1-dimensional map from a 
multi-dimensional input the code is ok.