Visible spectrometer at the Compact Toroid Injection Experiment and the Alcator C-Mod tokamak for Doppler width and shift measurements