When is a truncated covariance function on the line a covariance function on the circle