Inverse beta-decay in magnetic fields