hsignal-0.2.7.2: Signal processing and EEG data analysis

Copyright(c) Alexander Vivian Hugh McPhail 2010, 2014, 2015
LicenseBSD3
Maintainerhaskell.vivian.mcphail <at> gmail <dot> com
Stabilityprovisional
Portabilityuses Concurrency
Safe HaskellNone
LanguageHaskell98

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

createMultichannel Source

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 -> Int Source

the sampling rate

precision :: Multichannel a -> Int Source

the bits of precision

channels :: Multichannel a -> Int Source

the number of channels

samples :: Multichannel a -> Int Source

the length, in samples

detrended :: Multichannel a -> Bool Source

was the data detrended?

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

was the data filtered?

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

extract one channel

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

extract all channels

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

convert the data to a matrix with channels as rows

mapConcurrently Source

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 Double Source

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 a Source

filter the data with the given passband

slice Source

Arguments

:: Storable a 
=> Int

starting sample number

-> Int

length

-> Multichannel a 
-> Multichannel a 

extract a slice of the data

histograms Source

Arguments

:: (Filterable a, Double ~ DoubleOf a) 
=> Array Int (Vector a) 
-> Int 
-> (Double, Double) 
-> Int 
-> Int 
-> (Double, Double) 
-> (Double, Double)

bins and ranges

-> (Array Int Histogram, Array (Int, Int) Histogram2D) 

calculate histograms

entropy_delta_phase Source

Arguments

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

input data

-> Matrix Double 

calculate the entropy of the phase difference between pairs of channels (fills upper half of matrix)

mi_phase Source

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)