trim_waveband function

Trim (or expand) head and/or tail