Spin-Torque Oscillator in an Electromagnet Package