adapted pyr_4_sym.p from Dave's script to compare with nC implementation