def split_params(params, ncomps):
    """Split params into amps, fwhms, offsets."""
    amps = params[0:ncomps]
    fwhms = params[ncomps:2*ncomps]
    offsets = params[2*ncomps:3*ncomps]
    return amps, fwhms, offsets