def exit_on_error(maestro): PL.p_log_errorno("ERROR: we've had either a camera or network error; exiting prematurely and signalling PolonatorImager to retry the current scan") maestro.status() PC.camera_close() net.py_network_stopserver() maestro.stop() PL.p_log_errorno("ERROR: exiting") sys.exit(10)
if array_string == "0" or array_string == "1": PL.p_log(array_string) send_initial_raw_images(1) else: log_string = "STATUS:\tPolonator-acquirer: running autoexposure, server sending filename %s to processor, port %d..." % (argv[1], proc_portnum) PL.p_log_simple(log_string) # now send the filename for the current image set log_string = "STATUS:\tPolonator-acquirer: server sending filename %s to processor, port %d..." % (argv[1], proc_portnum) PL.p_log(log_string) net.py_network_sendfilename(array_string) # close connection, then re-open for flowcell number net.py_network_stopserver() net.py_network_startserver(proc_portnum) autoe_gain = send_FL_images(array_string,15) PC.setGain(autoe_gain) log_string = "STATUS:\tPolonator-acquirer: using the auto-exposure gain %d..." % (autoe_gain) PL.p_log_simple(log_string) # end else net.py_network_stopserver() # end if PL.p_log_simple("STATUS:\tPolonator-acquirer: server waiting for processor to connect...")