hsignal-0.1.3.2: Signal processing and EEG data analysis

Portabilityuses Concurrency
Stabilityprovisional
Maintainerhaskell.vivian.mcphail <at> gmail <dot> com

Numeric.Signal.Multichannel

Description

Signal processing functions, multichannel datatype

link with '-threaded' and run with +RTS -Nn, where n is the number of CPUs

Synopsis

Documentation

data Multichannel a Source

data type with multiple channels

Instances

createMultichannelSource

Arguments

:: Storable a 
=> Int

sampling rate

-> Int

bits of precision

-> [Vector a]

data

-> Multichannel a

datatype

create a multichannel data type

sampling_rate :: Multichannel a -> IntSource

the sampling rate

precision :: Multichannel a -> IntSource

the bits of precision

channels :: Multichannel a -> IntSource

the number of channels

samples :: Multichannel a -> IntSource

the length, in samples

detrended :: Multichannel a -> BoolSource

was the data detrended?

filtered :: Multichannel a -> Maybe (Int, Int)Source

was the data filtered?

getChannel :: Int -> Multichannel a -> Vector aSource

extract one channel

getChannels :: Multichannel a -> Array Int (Vector a)Source

extract all channels

toMatrix :: Element a => Multichannel a -> Matrix aSource

convert the data to a matrix with channels as rows

mapConcurrentlySource

Arguments

:: Storable b 
=> (Vector a -> Vector b)

the function to be mapped

-> Multichannel a

input data

-> Multichannel b

output data

map a function executed concurrently

detrend :: Int -> Multichannel Double -> Multichannel DoubleSource

detrend the data with a specified window size

filter :: (Filterable a, Double ~ DoubleOf a, Container Vector (Complex a), Convert (Complex a)) => (Int, Int) -> Multichannel a -> Multichannel aSource

filter the data with the given passband

sliceSource

Arguments

:: Storable a 
=> Int

starting sample number

-> Int

length

-> Multichannel a 
-> Multichannel a 

extract a slice of the data

mi_phaseSource

Arguments

:: (Filterable a, Double ~ DoubleOf a) 
=> Multichannel a

input data

-> Matrix Double 

calculate the mutual information of the phase between pairs of channels (fills upper half of matrix)