Effectiveness of a pulsed laser in heat-assisted magnetic recording