An investigation into the origin of the crystalline electric field in rare earth compounds and a study on some aspects of nuclear magnetic resonance