trim_wl function

Trim head and/or tail of a spectrum