}t2      !"#$%&'()*+,-./01uses Concurrency provisional+haskell.vivian.mcphail <at> gmail <dot> comNone1/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> comNone2conver 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 7filters the signal 8filters the signal 9OHilbert transform with original vector as real value, transformed as imaginary :5Welch (1967) power spectrum density using periodogram/ FFT method ;!coefficients of a Hamming window <!coefficients of a Hamming window =-determine the frequency response of a filter >=evaluate a real coefficient polynomial for complex arguments ?(the complex power : real $ v * (conj v) @(the complex power : real $ v * (conj v) A:resample, take one sample every n samples in the original B:resample, take one sample every n samples in the original C8the difference between consecutive elements of a vector D8the difference between consecutive elements of a vector EAunwrap the phase of signal (input expected to be within (-pi,pi) FAunwrap the phase of signal (input expected to be within (-pi,pi) G,compute the cross covariance of two signals H,compute the cross covariance of two signals D23zero coefficients pole coefficients  input signal output signal $ | coefficients of a Hamming window Ilength the Hamming coeffficents + | the complex power : real $ v * (conj v) Jinput output = | resample, take one sample every n samples in the original K456the real coefficients $the points at which to be evaluated  the values ' | the cross covariance of two signals Lmaximum delay  time series  time series (sd_x,sd_y,cross_covariance) " | the cumulative sum of a signal M time series result NOPQRSTUVWXYZ[\]^_`abcdefghi7zero coefficients pole coefficients  input signal output signal 8zero coefficients pole coefficients  input signal output signal 9:window size (multiple of 2)  input signal power density ;length the Hamming coeffficents <length the Hamming coeffficents =zero coefficients pole coefficients points (between 0 and 2*pi)  response j>the real coefficients $the points at which to be evaluated  the values ?input output @input output ABCDEFGHklmnopqr23IJK456LM9:=9 23IJK456LMNOPQRSTUVWXYZ[\]^_`abcdefghi789:;<=j>?@ABCDEFGHklmnopqruses FFI provisional+haskell.vivian.mcphail <at> gmail <dot> comNonefilters 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 s /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 tuvwxy 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      s tuvwxy uses Concurrency provisional+haskell.vivian.mcphail <at> gmail <dot> comNone!data type with multiple channels zsampling rate {bits of precision |number of channels }length in samples ~was the data detrended? if filtered the passband data  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 *%map a function executed concurrently map a function +.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) "z{|}~ sampling rate bits of precision data  datatype !"#$%&'()function to map input output *the function to be mapped  input data  output data the function to be mapped  input data  output data +,-starting sample number length .bins and ranges / input data 0 input data  !"#$%&'()*+,-./0 !"#$()%&'*+,-./0z{|}~ !"#$%&'()*+,-./0EEG BDF data file functions  provisional ,haskell.vivian.mcphail <at> gmail <dot> com None2111EEG functions  provisional ,haskell.vivian.mcphail <at> gmail <dot> com None11      !"#$%&'()*+,-./01 23456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~*+hsignal-0.2.4.3Numeric.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_filterDfilterFhilberthammingDhammingFfreqzpolyEvalcomplex_powerDcomplex_powerF downsampleD downsampleFderivDderivFunwrapDunwrapFcrossCovarianceDcrossCovarianceFhamming_complex_power_ downsample_cross_covariance_cumulative_sum_PFPCPDsignal_cum_sum_floatsignal_cum_sum_doublesignal_cross_covariance_floatsignal_cross_covariance_doublesignal_unwrap_floatsignal_unwrap_doublesignal_diff_floatsignal_diff_doublesignal_downsample_floatsignal_downsample_doublesignal_complex_power_floatsignal_complex_power_doublesignal_real_poly_complex_evalsignal_hamming_floatsignal_hamming_double signal_pwelchsignal_hilbertsignal_filter_floatsignal_filter_doublesignal_vector_complex_convolvesignal_vector_float_convolvesignal_vector_double_convolveconvolve_vector_doubleconvolve_vector_floatconvolve_vector_complexpostpadcumSumDcumSumF$fFilterableFloat$fFilterableDouble$fConvolvableVector$fConvolvableVector0$fConvolvableVector1$fConvolvableVector2 calc_grid floor_zeroceil_onediff interpolate interpolate' interpolate''_sampling_rate _precision _channels_length _detrended _filtered_datamapArrayConcurrentlymapMCMC$fBinaryMultichannel$fBinaryMultichannel0$fBinaryMultichannel1$fBinaryMultichannel2BDFid_type_subject recordingdatetime head_bytes data_version num_recordsduration chan_labels tran_type dimensionsphys_minphys_maxdig_mindig_max prefilterreserveddata_TimehourminutesecondDatedaymonthyearBSMgetN getStringgetIntgetDate strToDate'getTime strToTime' reverseBitsget24Bit readRecordreadRecordBlockconvertreadDatareadBDF