acq400_stream_multi

Usage
usage: acq400_stream_multi.py [-h] [--callback CALLBACK] [--burst_on_demand BURST_ON_DEMAND] [--trigger_from_here TRIGGER_FROM_HERE] [--subset SUBSET]
                              [--filesize FILESIZE] [--filesamples FILESAMPLES] [--files_per_cycle FILES_PER_CYCLE] [--force_delete FORCE_DELETE] [--nowrite NOWRITE]
                              [--totaldata TOTALDATA] [--root ROOT] [--runtime RUNTIME] [--verbose VERBOSE] [--display DISPLAY] [--combine COMBINE]
                              uuts [uuts ...]

Positional Arguments

uuts

uuts

Named Arguments

--callback

not for users, client programs can install a callback here

--burst_on_demand

Burst Size in Samples[,./plotjob]

--trigger_from_here

action soft trigger from this application

Default: 0

--subset

subset command if present eg 1,5 :: strips first 5 channels

--filesize

file size in bytes

Default: 1048576

--filesamples

file size in samples (overrides filesize)

--files_per_cycle

files per cycle (directory)

Default: 100

--force_delete

silently delete any existing data files

Default: 0

--nowrite

do not write file

Default: 0

--totaldata

Default: 10000000000

--root

Location to save files. Default dir is UUT name.

Default: “”

--runtime

How long to stream data for

Default: 1000000

--verbose

Prints status messages as the stream is running

Default: 0

--display

Render display

Default: 1

--combine

Combine all cycle files into one

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_stream.py --verbose=1 --filesize=1M --totaldata=4M <module ip or name>

2: Acquire a single file of size 4096kb:

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

3: Acquire files of size 1024 for 10 seconds:

>>> python acq400_stream.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_stream.py --verbose=1 --filesize=9999M --runtime=5 <module ip or name>
make_data_dir(directory, verbose)[source]
remove_stale_data(args)[source]
self_burst_trigger_callback(uut, job)[source]
self_start_trigger_callback(uut)[source]
class StreamsOne[source]

Bases: object

class pipe_conn[source]

Bases: object

__init__(pipe)[source]
send()[source]
set(key, value)[source]
__init__(args, uut_name, halt, pipe, delay)[source]
logtime(t0, t1)[source]
update_status_forever()[source]
stop_proccess(reason)[source]
run(callback=None)[source]
status_cb()[source]
run_stream_run(args)[source]
run_stream_prep(args)[source]
get_parser(parser=None)[source]
run_stream(args)[source]