Optical dephasing of rare earth ions in mixed crystalline and size-restricted systems