 Usage: [C,phi,S12,confC,phierr,Cerr]=cohmathelper(J,err,Nsp)
 Inputs:
 J   : Fourier transforms of data
 err : [0 p] or 0 for no errors; [1 p] for theoretical confidence level, 
       [2 p] for Jackknife (p - p value)
 Nsp : pass the number of spikes in each channel if finite size corrections are desired

 Outputs:

 C   : coherence
 phi : phase of coherency
 S12 : cross spectral matrix
 confC : confidence level for coherency - only for err(1)&gt;=1
       phierr - standard deviation for phi 