From 361d978921690a7c26a63b933b502d5d2fc3e3d5 Mon Sep 17 00:00:00 2001 From: Mac Mollison Date: Sun, 14 Mar 2010 03:17:40 -0400 Subject: Refactor to get rid of various frontend scripts Now, unit-trace.py can control all functionality. --- scripts/visualize.py | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100755 scripts/visualize.py (limited to 'scripts/visualize.py') diff --git a/scripts/visualize.py b/scripts/visualize.py deleted file mode 100755 index 2899b43..0000000 --- a/scripts/visualize.py +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/python - -################################################################################ -# Description -################################################################################ -# This scriipt demonstrates the visualizer submodule. - -# This script should be invoked with the names of the trace files you want to -# use. For example, `gedf_test.py ../sample_traces/*.bin`. -# You probably want to redirect the (normally lengthy) output to a file! -# Otherwise, speed is greatly decreased b/c terminal printing is slow. - -################################################################################ -# Setup -################################################################################ - -# Import the modules we need. You should not need to know about -# their internals. -import unit_trace -from unit_trace import trace_reader -from unit_trace import sanitizer -from unit_trace import gedf_test -from unit_trace import stats -from unit_trace import stdout_printer -from unit_trace import visualizer - -# Get trace files from command line arguments -from optparse import OptionParser -usage = "usage: %prog " -parser = OptionParser(usage=usage) -(options, traces) = parser.parse_args() -traces = list(traces) -if len(traces) < 1: - parser.print_help() - exit() - -################################################################################ -# Pipeline -################################################################################ - -# Read events from traces -stream = trace_reader.trace_reader(traces) - -# Filter out garbage events -stream = sanitizer.sanitizer(stream) - -# Note: You could include other submodules, to further modify -# the event stream (e.g. produce G-EDF error records that could be -# drawn by the visuazlier in future versions). - -# Print the records to stdout -visualizer.visualizer(stream) -- cgit v1.2.2