Modulation of whistler mode chorus waves: 2. Role of density variations