import math


def _single_circle_shift(shift_matrix, spectral_lines, w):
    """ Create shifts using a single spectral line. """

    sl = spectral_lines[0]
    for x in range(shift_matrix.y.size):
        xx = x - sl.circ_cntr_y
        theta = math.asin(xx / sl.circ_r)
        py = (1 - math.cos(theta)) * math.copysign(sl.circ_r, sl.circ_cntr_x)
        for l in range(w):
            shift_matrix.values[x, l] = py

    return shift_matrix