Effects of the magnetic field on the polyaniline film studied by in situ conductivity measurements and X-ray diffraction