úÎ_n[±2      !"#$%&'()*+,-./01uses Concurrency provisional+haskell.vivian.mcphail <at> gmail <dot> com Safe-Infered1/f scale invariant noise %generate noise from a power spectrum ²: spectral distribution  0: White noise  -1: Pink noise  -2: Brownian noise matrix dimensions  random seed ²: spectral distribution  0: White noise  -1: Pink noise  -2: Brownian (red) noise samples  random seed the power spectrum  random seed uses FFI provisional+haskell.vivian.mcphail <at> gmail <dot> com Safe-Infered 2conver from Vector Double 3filter a signal 48the difference between consecutive elements of a vector 5Aunwrap the phase of signal (input expected to be within (-pi,pi) 6=evaluate a real coefficient polynomial for complex arguments Tconvolve two containers, output is the size of the second argument, no zero padding 7OHilbert transform with original vector as real value, transformed as imaginary 85Welch (1967) power spectrum density using periodogram/ FFT method 9-determine the frequency response of a filter 23zero coefficients pole coefficients  input signal output signal $ | coefficients of a Hamming window :length the Hamming coeffficents + | the complex power : real $ v * (conj v) ;input output = | resample, take one sample every n samples in the original <456the real coefficients $the points at which to be evaluated  the values ' | the cross covariance of two signals =maximum delay  time series  time series (sd_x,sd_y,cross_covariance) " | the cumulative sum of a signal > time series result 78window size (multiple of 2)  input signal power density 9zero coefficients pole coefficients points (between 0 and 2*pi)  response ?@ABCD23:;<456=>789  23:;<456=>789?@ABCDuses FFI provisional+haskell.vivian.mcphail <at> gmail <dot> com Safe-Inferedfilters the signal 5Welch (1967) power spectrum density using periodogram/ FFT method a broadband FIR a broadband filter standard FIR filter J | FIR filter with grid a power of 2 greater than the order, ramp = grid/16, hamming window produce an FIR filter Ldetermine the frequency response of a filter, given a vector of frequencies Ydetermine the frequency response of a filter, given a number of points and sampling rate aan analytic signal is the original signal with Hilbert-transformed signal as imaginary component =the power (amplitude^2 = v * (conj c)) of an analytic signal  the phase of an analytic signal  remove a linear trend from data ,resize the vector to length n by resampling  cross covariance of two signals > the cross correlation is computed by dividing the result 3 by the product of the two standard deviations !cross correlation of two signals compute the cross spectrum auto covariance of two signals = the auto correlation is computed by dividing the result  by the variance  auto correlation of two signals !coefficients of a Hamming window :resample, take one sample every n samples in the original 8the difference between consecutive elements of a vector cumulative sum of a series Bunwrap the phase of signal (input expected to be within (-pi,pi)) zero coefficients pole coefficients sampling rate  input signal output signal sampling rate  window size  input signal "(frequency index,power density) sampling rate (lower,upper) frequency cutoff filter coefficients sampling rate (lower,upper) frequency cutoff  input signal output signal /order (one less than the length of the filter) :band edge frequency, nondecreasing, [0, f1, ..., f(n-1), 1]  ^ band edge magnitude  grid spacing transition width %smoothing window (size is order + 1) the filter coefficients zero coefficients pole coefficients sampling rate  frequencies frequency response zero coefficients pole coefficients sampling rate number of points (frequencies,response)  window size data to be detrended detrended data maximum delay  time series  time series (sd_x,sd_y,cov_xy) maximum delay  time series  time series result maximum delay  time series  time series result maximum delay  time series  (var,cov_xx) maximum delay  time series result length the Hamming coeffficents      uses Concurrency provisional+haskell.vivian.mcphail <at> gmail <dot> com Safe-Infered!data type with multiple channels  create a multichannel data type !the sampling rate "the bits of precision #the number of channels $the length, in samples %extract one channel &extract all channels '3convert the data to a matrix with channels as rows (was the data detrended? )was the data filtered? *%map a function executed concurrently +.detrend the data with a specified window size ,(filter the data with the given passband -extract a slice of the data .calculate histograms /ecalculate the entropy of the phase difference between pairs of channels (fills upper half of matrix) 0ecalculate the mutual information of the phase between pairs of channels (fills upper half of matrix)  sampling rate bits of precision data  datatype !"#$%&'()*the function to be mapped  input data  output data +,-starting sample number length .bins and ranges / input data 0 input data EFGH !"#$%&'()*+,-./0 !"#$()%&'*+,-./0 !"#$%&'()*+,-./0EFGHEEG BDF data file functions  provisional ,haskell.vivian.mcphail <at> gmail <dot> com  Safe-Infered111EEG functions  provisional ,haskell.vivian.mcphail <at> gmail <dot> com  Safe-Infered11I      !"#$%&'()*+,-./01 23456789:;<=>?@ABCDEFGHIJKLM hsignal-0.2.4Numeric.Signal.NoiseNumeric.SignalNumeric.Signal.MultichannelNumeric.Signal.EEGNumeric.Signal.InternalNumeric.Signal.EEG.BDF spatialNoise pinkNoise powerNoise Filterable Convolvableconvolvefilterpwelch broadband_firbroadband_filter standard_firfirfreqzFfreqzNanalytic_signalanalytic_poweranalytic_phasedetrendresizecross_covariancecross_correlationcross_spectrumauto_covarianceauto_correlationhamming downsamplederivcumulative_sumunwrap MultichannelreadMultichannelwriteMultichannelcreateMultichannel sampling_rate precisionchannelssamples getChannel getChannelstoMatrix detrendedfilteredmapConcurrentlyslice histogramsentropy_delta_phasemi_phaseloadBDF fromDoublefilter_deriv_unwrap_ polyEval_hilbertfreqzhamming_complex_power_ downsample_cross_covariance_cumulative_sum_$fFilterableFloat$fFilterableDouble$fConvolvableVector$fConvolvableVector0$fConvolvableVector1$fConvolvableVector2$fBinaryMultichannel$fBinaryMultichannel0$fBinaryMultichannel1$fBinaryMultichannel2