Test data can be generated using the EmulatorMain class. Using the generateSingleObject
method, one can generate observation data of transients and non-transients.
By passing in a value of True
a transient is generated, while passing in False
causes a non-transient to be generated.
In [1]:
from binaryclassifier import EmulatorMain
em = EmulatorMain.EmulatorMain()
em.generateSingleObject(True)
Out[1]:
In [2]:
from binaryclassifier import EmulatorMain
em = EmulatorMain.EmulatorMain()
em.generateSingleObject(False)
Out[2]:
The observation data returned by using the generateSingleObject
method is formatted as a list of named tuples. Each tuple represents a single observation of the 'object'.
Each observation tuple contains the time the observation was taken at and the light level recorded in the observation of the object.
In [3]:
from binaryclassifier import EmulatorMain
em = EmulatorMain.EmulatorMain()
object1 = em.generateSingleObject(False)
print object1[0]
print "time: " + str(object1[0][0])
print "light: " + str(object1[0][1])