Updated for multi or single channel LSMs

to handle 3 channel lsm files modified to cope with any number of
channels.