Package pyvision :: Package analysis :: Module ImageLog :: Class ImageLog
[hide private]
[frames] | no frames]

Class ImageLog

source code

An image log is used to collect data about an experiment. This data can be images, tables, pickled python objects.

Instance Methods [hide private]
 
__init__(self, topdir='/tmp', name='pyvis_log')
Create an image log.
source code
 
__call__(self, item, *args, **kwargs) source code
 
log(self, image, label='NOLABEL', ext='png', **kwargs)
Save a pyvision image to the log.
source code
 
plot(self, plot, label='NOLABEL', ext='png', **kwargs)
Save a pyvision plot to the log.
source code
 
table(self, table, label='NOLABEL')
Save a pyvision table to the log as a csv file.
source code
 
csv(self, data, label='NOLABEL', headers=None)
Save a list of lists or matrix to the log as a csv file.
source code
 
pickle(self, data, label='NOLABEL')
Pickle a python data to the log directory.
source code
 
file(self, data=None, label='NOLABEL', ext='.dat')
Write the buffer data to a file.
source code
 
show(self)
Show any images that are in the directory.
source code
Method Details [hide private]

__init__(self, topdir='/tmp', name='pyvis_log')
(Constructor)

source code 

Create an image log. By default a log is created in the /tmp dir. The name of the log directory start with the date and time the log was created and ends with 'name'.

Parameters:
  • topdir - The location where the log directory will be created.
  • name - a name to append to the directory name.

pickle(self, data, label='NOLABEL')

source code 

Pickle a python data to the log directory. This may not be supported by all objects.

file(self, data=None, label='NOLABEL', ext='.dat')

source code 

Write the buffer data to a file. If data == None then the file object is returned.