change the emission function into a structure
1D correlation function seems working
3D correlation function seems to be working