| Portability | uses Concurrency |
|---|---|
| Stability | provisional |
| Maintainer | haskell.vivian.mcphail <at> gmail <dot> com |
| Safe Haskell | Safe-Infered |
Numeric.Signal.Multichannel
Description
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 (Multichannel a) => FilePath -> IO (Multichannel a)
- writeMultichannel :: Binary (Multichannel 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
- histograms :: (Filterable a, Double ~ DoubleOf a) => Array Int (Vector a) -> Int -> (Double, Double) -> Int -> Int -> (Double, Double) -> (Double, Double) -> (Array Int Histogram, Array (Int, Int) Histogram2D)
- entropy_delta_phase :: (Filterable a, Double ~ DoubleOf a) => Multichannel a -> Matrix Double
- mi_phase :: (Filterable a, Double ~ DoubleOf a) => Multichannel a -> Matrix Double
Documentation
readMultichannel :: Binary (Multichannel a) => FilePath -> IO (Multichannel a)Source
writeMultichannel :: Binary (Multichannel a) => FilePath -> Multichannel a -> IO ()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 -> 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
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
Arguments
| :: Storable a | |
| => Int | starting sample number |
| -> Int | length |
| -> Multichannel a | |
| -> Multichannel a |
extract a slice of the data
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
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)
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)