Longitudinal spatial response of a dual-polarization fiber laser to magnetic field based on faraday effect