host_demux module

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
  • @@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.

usage:

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 --stack_480="2x8" --plot_mpl=1 acq2106_120

host_demux.calc_stack_480(args)[source]
host_demux.channel_required(args, ch)[source]
host_demux.create_npdata(args, nblk, nchn)[source]
host_demux.double_up(args, d1)[source]
host_demux.get_file_names(args)[source]
host_demux.make_cycle_list(args)[source]
host_demux.make_pc_list(args)[source]
host_demux.plot_data(args, raw_channels)[source]
host_demux.plot_data_kst(args, raw_channels)[source]
host_demux.plot_mpl(args, raw_channels)[source]
host_demux.process_data(args)[source]
host_demux.read_data(args, NCHAN)[source]
host_demux.read_data_file(args, NCHAN)[source]
host_demux.run_main()[source]
host_demux.save_data(args, raw_channels)[source]
host_demux.stack_480_shuffle(args, raw_data)[source]