def send_data(socket, data, scan_parameters={}, name='<STR_LIT>'):
if not scan_parameters:<EOL><INDENT>scan_parameters = {}<EOL><DEDENT>data_meta_data = dict(<EOL>name=name,<EOL>dtype=str(data[<NUM_LIT:0>].dtype),<EOL>shape=data[<NUM_LIT:0>].shape,<EOL>timestamp_start=data[<NUM_LIT:1>],  <EOL>timestamp_stop=data[<NUM_LIT:2>],  <EOL>readout_error=data[<NUM_LIT:3>],  <EOL>scan_parameters=scan_parameters  <EOL>)<EOL>try:<EOL><INDENT>socket.send_json(data_meta_data, flags=zmq.SNDMORE | zmq.NOBLOCK)<EOL>socket.send(data[<NUM_LIT:0>], flags=zmq.NOBLOCK)  <EOL><DEDENT>except zmq.Again:<EOL><INDENT>pass<EOL><DEDENT>
Sends the data of every read out (raw data and meta data) via ZeroMQ to a specified socket