rsudp.c_write (write data)

class rsudp.c_write.Write(q, data_dir, testing=False, debug=False, cha='all')

A simple routine to write daily miniSEED data to output_dir/data.

Parameters:
elapse(new=False)

Ticks self variables over into a new day for file naming purposes.

Parameters:new (bool) – If False, the program is starting. If True, the UTC date just elapsed.
getq()

Reads data from the queue and updates the stream.

Return type:bool
Returns:Returns True if stream is updated, otherwise False.
run()

Reads packets and coordinates write operations.

set_sps()

Sets samples per second.

slicestream()

Causes the stream to slice down to the time the last write operation was made.

write(stream=False)

Writes a segment of the stream to disk as miniSEED, and appends it to the file in question. If there is no file (i.e. if the program is just starting or a new UTC day has just started, then this function writes to a new file).

Parameters:stream (obspy.core.stream.Stream or bool) – The stream segment to write. If False, the program has just started.

Back to top ↑