<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ppm_idx(f_ppm, lb, ub):
 """ Create a slice object according to the ppm scale Parameters f_ppm : float array The frequency bins (in the ppm scale). Assumed to be descending lb,ub : float The lower/upper bounds for indexing Returns ------- idx : slice object which can be used to index """

    idx0 = np.argmin(np.abs(f_ppm - lb))
    idx1 = np.argmin(np.abs(f_ppm - ub))
    return slice(idx1, idx0)