A study of the precipitation of energetic electrons from the geomagnetic field during magnetic storms