def set_real(data,v):
    """
    Set real portion of data to a constant.

    Parameters:

    * data  Array of spectral data.
    * v     Constant to set data to (real number).

    """
    data.real = v
    return data