acq400_stream2 module

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>])
usage:: [-h] [--filesize FILESIZE] [--totaldata TOTALDATA]
[--root ROOT] [--runtime RUNTIME] [--verbose VERBOSE] uuts [uuts ...]

acq400 stream

positional arguments:
uuts uuts
optional arguments:
-h, --help show this help message and exit
--filesize FILESIZE
 Size of file to store in KB. If filesize > total data then no data will be stored.
--totaldata TOTALDATA
 Total amount of data to store in KB
--root ROOT Location to save files
--runtime RUNTIME
 How long to stream data for
--verbose VERBOSE
 Prints status messages as the stream is running

Some usage examples are included below:

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

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

2: Acquire a single file of size 4096kb:

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

3: Acquire files of size 1024 for 10 seconds:

>>> python --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 --verbose=1 --filesize=9999M --runtime=5 <module ip or name>
acq400_stream2.make_data_dir(directory, verbose)[source]