Density gradients in spherical tokamak plasmas