Package mosp_tools :: Package heatmap :: Module logfilereader
[hide private]
[frames] | no frames]

Module logfilereader

source code

Helper funtions to read log files


Author: B. Henne

Contact: henne@dcsec.uni-hannover.de

Copyright: (c) 2011, DCSec, Leibniz Universitaet Hannover, Germany

License: GPLv3

Functions [hide private]
 
read_simple(filename, delimiter, t, x, y)
Reads complete CSV log file with time, x-value and y-value and return only this.
source code
 
read(filename, delimiter, t, x, y, t_start=0, t_end=9223372036854775807, empty=[])
Reads CSV log file with time, x-value and y-value for specified time interval.
source code
 
accumulated_read(filename, delimiter, t, x, y, t_start=0, t_end=9223372036854775807, step=10)
Reads CSV file as read(), but accumulates return values in step size packets.
source code
Variables [hide private]
  __package__ = 'mosp_tools.heatmap'
Function Details [hide private]

read_simple(filename, delimiter, t, x, y)

source code 

Reads complete CSV log file with time, x-value and y-value and return only this.

Author: B. Henne

read(filename, delimiter, t, x, y, t_start=0, t_end=9223372036854775807, empty=[])

source code 

Reads CSV log file with time, x-value and y-value for specified time interval. Return values for all t_start < t < t_end.

Times with no log entries are filled with value of empty. Returns iterable pair of time and list of coordinates

Parameters:
  • filename - name of csv file
  • delimiter - delimiter between columns in csv file
  • t - number of column containing time
  • x - number of column containing x-value
  • y - number of column containing y-value
  • t_start - start of output time interval
  • t_end - end of output time interval
  • empty - value yielded if no log entry exists for a time, default is empty list, maybe use None

Author: B. Henne

accumulated_read(filename, delimiter, t, x, y, t_start=0, t_end=9223372036854775807, step=10)

source code 

Reads CSV file as read(), but accumulates return values in step size packets.

Author: B. Henne