acq400_stream2

Usage
usage: acq400_stream2.py [-h] [-filesize FILESIZE] [--files_per_cycle FILES_PER_CYCLE] [-totaldata TOTALDATA] [--root ROOT] [--runtime RUNTIME] [--es_stream ES_STREAM]
                         [--port PORT] [--verbose VERBOSE]
                         uuts [uuts ...]

Positional Arguments

uuts

uuts

Named Arguments

-filesize, --filesize

Default: 1048576

--files_per_cycle

set files per cycle directory

Default: 100

-totaldata, --totaldata

Default: 9223372036854775807

--root

Location to save files. Default dir is UUT name.

Default: “”

--runtime

How long to stream data for

Default: 9223372036854775807

--es_stream

Stream with ES. New file is used for each ES.

Default: 0

--port

Which port to stream from. STREAM=4210, SPY=53667, other: use number provided.

Default: “STREAM”

--verbose

Prints status messages as the stream is running

Default: 0

Outline:

This is a script intended to connect to a UUT and stream data from port 4210.

The data that has been streamed is not demuxed and so if it is to be used then it has to be demuxed first. Something like:

>>> data = numpy.fromfile("0000", dtype="<datatype>")
>>> plt.plot(data[::<number of channels>])
>>> plt.show()

Some usage examples are included below:

1: Acquire files of size 1024kb up to a total of 4096kb:

>>> python acq400_stream2.py --verbose=1 --filesize=1M --totaldata=4M <module ip or name>

2: Acquire a single file of size 4096kb:

>>> python acq400_stream2.py --verbose=1 --filesize=4M --totaldata=4M <module ip or name>

3: Acquire files of size 1024 for 10 seconds:

>>> python acq400_stream2.py --verbose=1 --filesize=1M --runtime=10 <module ip or name>

4: Acquire data for 5 seconds and write the data all to a single file:

>>> python acq400_stream2.py --verbose=1 --filesize=9999M --runtime=5 <module ip or name>
remove_stale_data(args)[source]
make_data_dir(directory, verbose)[source]
run_stream(args)[source]
get_parser()[source]