Crystal chemistry and domain structure of rare-earth doped BiFeO3 ceramics