implementing preprocessing ofr stim to lfp phase encoder