Portability | uses Concurrency |
---|---|
Stability | provisional |
Maintainer | haskell.vivian.mcphail <at> gmail <dot> com |
Signal processing functions, multichannel datatype
link with '-threaded' and run with +RTS -Nn, where n is the number of CPUs
- data Multichannel a
- readMultichannel :: (Binary a, Storable a, Ord a, RealFrac a, Container Vector a, Product a) => FilePath -> IO (Multichannel a)
- writeMultichannel :: (Binary a, Storable a, Ord a, RealFrac a, Container Vector a, Product a) => FilePath -> Multichannel a -> IO ()
- createMultichannel :: Storable a => Int -> Int -> [Vector a] -> Multichannel a
- sampling_rate :: Multichannel a -> Int
- precision :: Multichannel a -> Int
- channels :: Multichannel a -> Int
- samples :: Multichannel a -> Int
- detrended :: Multichannel a -> Bool
- filtered :: Multichannel a -> Maybe (Int, Int)
- getChannel :: Int -> Multichannel a -> Vector a
- getChannels :: Multichannel a -> Array Int (Vector a)
- toMatrix :: Element a => Multichannel a -> Matrix a
- mapConcurrently :: Storable b => (Vector a -> Vector b) -> Multichannel a -> Multichannel b
- detrend :: Int -> Multichannel Double -> Multichannel Double
- filter :: (Filterable a, Double ~ DoubleOf a, Container Vector (Complex a), Convert (Complex a)) => (Int, Int) -> Multichannel a -> Multichannel a
- slice :: Storable a => Int -> Int -> Multichannel a -> Multichannel a
- mi_phase :: (Filterable a, Double ~ DoubleOf a) => Multichannel a -> Matrix Double
Documentation
data Multichannel a Source
data type with multiple channels
readMultichannel :: (Binary a, Storable a, Ord a, RealFrac a, Container Vector a, Product a) => FilePath -> IO (Multichannel a)Source
writeMultichannel :: (Binary a, Storable a, Ord a, RealFrac a, Container Vector a, Product a) => FilePath -> Multichannel a -> IO ()Source
:: 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?
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
:: 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
:: Storable a | |
=> Int | starting sample number |
-> Int | length |
-> Multichannel a | |
-> Multichannel a |
extract a slice of the data
:: (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)