úÎyGpÄ2      !"#$%&'()*+,-./01uses Concurrency provisional+haskell.vivian.mcphail <at> gmail <dot> com: spectral distribution  0: White noise  -1: Pink noise  -2: Brownian noise matrix dimensions  random seed 1/f scale invariant noise : spectral distribution  0: White noise  -1: Pink noise  -2: Brownian (red) noise samples  random seed %generate noise from a power spectrum the power spectrum  random seed uses FFI provisional+haskell.vivian.mcphail <at> gmail <dot> com:2conver from Vector Double 3filter a signal zero coefficients pole coefficients  input signal output signal $ | coefficients of a Hamming window 4length the Hamming coeffficents + | the complex power : real $ v * (conj v) 5input output = | resample, take one sample every n samples in the original 678the difference between consecutive elements of a vector 8Aunwrap the phase of signal (input expected to be within (-pi,pi) 9=evaluate a real coefficient polynomial for complex arguments the 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 Tconvolve two containers, output is the size of the second argument, no zero padding <=>?@ABCDEFGHIJKLMNOPQRSTUfilters the signal zero coefficients pole coefficients  input signal output signal Vfilters the signal zero coefficients pole coefficients  input signal output signal WOHilbert transform with original vector as real value, transformed as imaginary X5Welch (1967) power spectrum density using periodogram/ FFT method window size (multiple of 2)  input signal power density Y!coefficients of a Hamming window length the Hamming coeffficents Z!coefficients of a Hamming window length the Hamming coeffficents [-determine the frequency response of a filter zero coefficients pole coefficients points (between 0 and 2*pi)  response \=evaluate a real coefficient polynomial for complex arguments the real coefficients $the points at which to be evaluated  the values ](the complex power : real $ v * (conj v) input output ^(the complex power : real $ v * (conj v) input output _:resample, take one sample every n samples in the original `:resample, take one sample every n samples in the original a8the difference between consecutive elements of a vector b8the difference between consecutive elements of a vector cAunwrap the phase of signal (input expected to be within (-pi,pi) dAunwrap the phase of signal (input expected to be within (-pi,pi) e,compute the cross covariance of two signals f,compute the cross covariance of two signals gh23456789:;WX[ 23456789:;23456789:;WX[uses FFI provisional+haskell.vivian.mcphail <at> gmail <dot> comfilters the signal zero coefficients pole coefficients sampling rate  input signal output signal 5Welch (1967) power spectrum density using periodogram/ FFT method sampling rate  window size  input signal "(frequency index,power density) a broadband FIR sampling rate (lower,upper) frequency cutoff filter coefficients a broadband filter sampling rate (lower,upper) frequency cutoff  input signal output signal standard FIR filter J | FIR filter with grid a power of 2 greater than the order, ramp = grid/16, hamming window i produce an FIR filter /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 jklm Ldetermine the frequency response of a filter, given a vector of frequencies zero coefficients pole coefficients sampling rate  frequencies frequency response Ydetermine the frequency response of a filter, given a number of points and sampling rate zero coefficients pole coefficients sampling rate number of points (frequencies,response) 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  window size data to be detrended detrended 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 maximum delay  time series  time series (sd_x,sd_y,cov_xy) !cross correlation of two signals maximum delay  time series  time series result compute the cross spectrum maximum delay  time series  time series result auto covariance of two signals = the auto correlation is computed by dividing the result  by the variance maximum delay  time series  (var,cov_xx)  auto correlation of two signals maximum delay  time series result !coefficients of a Hamming window length the Hamming coeffficents :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))      uses Concurrency provisional+haskell.vivian.mcphail <at> gmail <dot> com!data type with multiple channels nosampling rate pbits of precision qnumber of channels rlength in samples swas the data detrended? tif filtered the passband udata   create a multichannel data type sampling rate bits of precision data  datatype !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? v%map a function executed concurrently function to map input output *%map a function executed concurrently the function to be mapped  input data  output data wmap a function the function to be mapped  input data  output data +.detrend the data with a specified window size ,(filter the data with the given passband -extract a slice of the data starting sample number length .calculate histograms bins and ranges /ecalculate the entropy of the phase difference between pairs of channels (fills upper half of matrix)  input data 0ecalculate the mutual information of the phase between pairs of channels (fills upper half of matrix)  input data  !"#$%&'()*+,-./0 !"#$()%&'*+,-./0 !"#$%&'()*+,-./0EEG BDF data file functions  provisional ,haskell.vivian.mcphail <at> gmail <dot> com 0xyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦111EEG functions  provisional ,haskell.vivian.mcphail <at> gmail <dot> com 11§      !"#$%&'()*+,-./01 23456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{||}~€‚ƒ„…†*‡ˆ‰Š‹ŒŽ+‘‘’“”••–—˜™š›œžŸ ¡¢£¤¥¦hsignal-0.2.3.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_hamming_complex_power_ downsample_deriv_unwrap_ polyEval_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_convolvefilterDfilterFhilberthammingDhammingFfreqzpolyEvalcomplex_powerDcomplex_powerF downsampleD downsampleFderivDderivFunwrapDunwrapFcrossCovarianceDcrossCovarianceFcumSumDcumSumF calc_griddiff interpolate interpolate' interpolate''MC_sampling_rate _precision _channels_length _detrended _filtered_datamapArrayConcurrentlymapMCBDFid_type_subject recordingdatetime head_bytes data_version num_recordsduration chan_labels tran_type dimensionsphys_minphys_maxdig_mindig_max prefilterreserveddata_TimehourminutesecondDatedaymonthyearBSMgetN getStringgetInt strToDate' strToTime' reverseBitsget24Bit readRecordreadRecordBlockconvertreadDatareadBDF