Permalink
Browse files

avgProcess: get the data, as a list, of the averages to be plotted fo…

…r a specific track and summary level
  • Loading branch information...
1 parent 5cf155d commit 8967f14c8eb52aed9f871dae7280ae517d8de60c @alang9 committed Oct 19, 2011
Showing with 11 additions and 0 deletions.
  1. +11 −0 tools/zoom-cache-gnuplot.hs
@@ -105,3 +105,14 @@ main = do
let (s, l) = candlePlots streams lvl
return $ Just (s, l)
Nothing -> return Nothing
+ avgProcess :: (FilePath, TrackNo, Int) -> IO (Maybe (PlotStyle, [(TimeStamp, Double)]))
+ avgProcess (fp, tn, lvl) = do
+ cf <- getCacheFile fp
+ case getTrackType tn cf of
+ Just ZInt -> do
+ streams <- getStreams fp tn :: IO [Stream Int]
+ return . Just $ avgPlots streams lvl
+ Just ZDouble -> do
+ streams <- getStreams fp tn :: IO [Stream Double]
+ return . Just $ avgPlots streams lvl
+ Nothing -> return Nothing

0 comments on commit 8967f14

Please sign in to comment.