host_demux
Usage
usage: host_demux.py [-h] [--nchan NCHAN] [--nblks NBLKS] [--save SAVE] [--src SRC] [--cycle CYCLE] [--pchan PCHAN] [--pses PSES] [--tai_vernier TAI_VERNIER]
[--egu EGU] [--xdt XDT] [--data_type DATA_TYPE] [--double_up DOUBLE_UP] [--plot_mpl PLOT_MPL] [--plot PLOT] [--stack_480 STACK_480]
[--drive_letter DRIVE_LETTER] [--pcfg PCFG] [--callback CALLBACK] [--traces_per_plot TRACES_PER_PLOT] [--schan SCHAN]
uuts [uuts ...]
Positional Arguments
- uuts
uut - for auto configuration data_type, nchan, egu or just a label
Named Arguments
- --nchan
- --nblks
Default: -1
- --save
save channelized data to dir
- --src
data source root
Default: “/data”
- --cycle
cycle from rtm-t-stream-disk
- --pchan
channels to plot
Default: “:”
- --pses
plot start end stride, default: 0:-1:1
Default: “0:-1:1”
- --tai_vernier
decode this channel as tai_vernier
- --egu
plot egu (V vs s)
Default: 0
- --xdt
0: use interval from UUT, else specify interval
Default: 0
- --data_type
Use int16 or int32 for data demux.
- --double_up
Use for ACQ480 two lines per channel mode
Default: 0
- --plot_mpl
Use MatPlotLib to plot subrate data. (legacy option)
Default: 0
- --plot
plot data when set
Default: 1
- --stack_480
Stack : 2x4, 2x8, 4x8, 6x8
- --drive_letter
Which drive letter to use when on windows.
Default: “D”
- --pcfg
plot configuration file, overrides pchan
- --callback
callback for external automation
- --traces_per_plot
traces_per_plot
Default: 1
- --schan
channels to save ie 1,49,50
Outline:
host_demux.py Demux Data on HOST Computer
data is stored locally, either from mgtdram/ftp or fiber-optic AFHBA404
channelize the data
optionally store file-per-channel
optionally plot in pykst if available
@@todo store to MDSplus as segments.
example usage:
./host_demux.py --save=DATA --nchan=32 --nblks=-1 --pchan=none acq2106_067
# load all blocks, save per channel to subdirectory DATA/data_CC.dat
./host_demux.py --nchan=32 --nblks=4 --pchan=1:8 acq2106_067
# plot channels 1:8, 4 blocks
./host_demux.py --nchan=32 --nblks=-1 --pchan=1,2 acq2106_067
# plot channels 1,2, ALL blocks
# works for 8GB data, best to LIMIT the number of channels ..
./host_demux.py --nchan=96 --src=/data/ACQ400DATA/1 --egu=1 --xdt=2e-6 --cycle=1:4 --pchan=1:2 acq2106_061
# plot AFHBA404 data from PORT1
# plot egu (V vs s), specify interval, plot 4 cycles, plot 2 channels
# uut
use of --src
--src=/data # valid for FTP upload data
--src=/data/ACQ400DATA/1 # valid for SFP data, port 1
--src=afhba.0.log # one big raw file, eg from LLC
./host_demux.py --nchan 128 --pchan 1,33,65,97 --src=/path-to/afhba.0.log acq2106_110
# plot data from LLC, 128 channels, show one "channel" from each site.
# 97 was actually the LSB of TLATCH.
- host_demux.py [-h] [–nchan NCHAN] [–nblks NBLKS] [–save SAVE]
[–src SRC] [–pchan PCHAN] uut
host demux, host side data handling
positional arguments: uut uut
optional arguments: -h, –help show this help message and exit –nchan NCHAN –nblks NBLKS –save SAVE save channelized data to dir –src SRC data source root –pchan PCHAN channels to plot –egu EGU plot egu (V vs s) –xdt XDT 0: use interval from UUT, else specify interval –double_up Use for ACQ480 two lines per channel mode
- if –src is a file, use it directly
dir/nnnn
- if –src is a directory, first check if it has cycles:
dir/NNNNN/nnnnn*
- else iterate files in dir
dir/nnnnn*
- TO DEMUX ON WINDOWS TO STORE CHANNELISED DATA:
python .host_demux.py –save=1 –src=”[dir]” –pchan=none acq2106_114
Make sure that the muxed data is in D:[dir][UUT name]
Where [dir] is the location of the data.
Demuxed data will be written to D:demuxed[UUT name]
- To plot subsampled data on windows:
python .host_demux.py –src=Projects –nchan=8 –pchan 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 –plot_mpl=1:1000:1 acq2106_120