Fabrication and characterization of rare-earth-doped nanostructures on surfaces.