Comparison of tungsten and gold radiation from beam-foil excitation and tokamak-produced plasmas