def make_constant_data_ts(d, t0=0.0, dt=0.1, nsamp=5, val=1.0):
    """
    Fills TimeSeries (or _CoreTimeSeries) data vector with
    a constant value of a specified length and start time.
    Used for testing arithmetic operators.

    Parameters
    ----------
    d : TYPE
        DESCRIPTION.  TimeSeries or _CoreTimeSeries skeleton to build upon
    t0 : TYPE, optional
        DESCRIPTION. The default is 0.0. data start time
    dt : TYPE, optional
        DESCRIPTION. The default is 0.1.  sample interval
    nsamp : TYPE, optional
        DESCRIPTION. The default is 5.  length of data vector to generate

    Returns
    -------
    None.

    """
    d.npts = nsamp
    d.t0 = t0
    d.dt = dt
    d.set_live()
    for i in range(nsamp):
        d.data[i] = val
    return d