code used to create 2d data array for pulsars