Script execution

This commit is contained in:
sfop
2016-08-30 18:50:32 +02:00
parent a90f9150bc
commit 7383c00372
+3 -3
View File
@@ -1,7 +1,7 @@
###################################################################################################
# Using bsearch(Binary Search) and hsearch(Hill Climbing Search) to find optimum
###################################################################################################
"""
if get_device("camtool") is None:
␍run("camtool")
add_device(CamTool("image_stats", prefix = "SINEG01-DSCR190:", latch = True, camera = "SINEG01-DSCR190"), True)
@@ -12,7 +12,7 @@ if get_device("camtool") is None:
laser_on()
image_stats.setNumberOfImages(5)
image_stats.enableBackground␍(True)
"""
def before_sample():
image_stats.update()
@@ -40,7 +40,7 @@ print len(r.getRecords())
#Hill Climbing Search
#r = hsearch([gsx, gsy, gsrx, gsry], fitness,[-1.0,-1.0,-1.0,-1.0], [1.0,1.0,1.0,1.0], [0.1, 0.1, 0.1, 0.1], [0.01, 0.01, 0.01, 0.01], 3, relative = False, maximum=False, latency = 0.01, title = "Hill Climbing")
r = hsearch([gsrx, gsry], fitness,[-1.0,-1.0], [1.0,1.0], [ 0.1, 0.1], [0.01, 0.01], 3, relative = False, maximum=False, latency = 0.01, title = "Hill Climbing")
r = hsearch([gsrx, gsry], fitness,[-1.0,-1.0], [1.0,1.0], [ 0.1, 0.1], [0.01, 0.01], 2, relative = False, maximum=False, latency = 0.01, title = "Hill Climbing")
print "--------------- Hill Climbing Search -----------------"
print r