Helicity decoder for g2p experiment