Package dics :: Module gui :: Class gui
[hide private]
[frames] | no frames]

Class gui
source code

First stab at a gui element. To begin with it's just a temperature monitor display. The GTK main loop will block, so to retain ability to use the python console we'll want to make this a seperate thread at some point.

Instance Methods [hide private]
  delete_event(self, widget, event, data=None)
  __init__(self, instrument)
Initialises the gui.
  line_colour(self, number)
Given an integer, returns a matplotlib line colour character.
  line_style(self, number)
Given an integer, returns a matplotlib line style character.
  make_plot(self)
  parse_log(self, temp_log)
Parses a temperature log file, and returns a tuple containing a list of datetime.datetime objects and a one list of temperatures per channel.
  updateDisplay(self)
Callback function that gets the current temperatures from the tc08 objects in self.tc08s and updates the temperature display.
  main(self)

Class Variables [hide private]
colours  
styles  

Method Details [hide private]

delete_event(self, widget, event, data=None)

source code 

__init__(self, instrument)
(Constructor)

source code 
Initialises the gui. Takes a dics.instrument object as an argument, which it scans through for tc08 instances from which it polls temperatures for display.

line_colour(self, number)

source code 
Given an integer, returns a matplotlib line colour character. As the number is increased the line colour cycles through blue, green, red, cyan, magenta, yellow, black.

line_style(self, number)

source code 
Given an integer, returns a matplotlib line style character. As the number is increased the line style cycles through solid line, dashed line, dot-dashed line and dotted line.

make_plot(self)

source code 

parse_log(self, temp_log)

source code 
Parses a temperature log file, and returns a tuple containing a list of datetime.datetime objects and a one list of temperatures per channel.

updateDisplay(self)

source code 
Callback function that gets the current temperatures from the tc08 objects in self.tc08s and updates the temperature display.

main(self)

source code 

Class Variable Details [hide private]

colours

Value:
('b', 'r', 'c', 'm', 'y', 'k')                                         
      

styles

Value:
('-', '--', '-.', ':')