Mars_Lightning_Machine - david-macmahon/wiki_convert_test GitHub Wiki
http://www.msss.com/msss_images/subject/weather_reports.html
William Barott (Embry-Riddle)
Geoff Bower (Berkeley)
Tom Kuiper (JPL)
Walid Majid (JPL)
Imke de Pater (Berkeley)
Nilton Renno (U. Michigan)
Chris Ruf (U. Michigan)
Dan Werthimer (Berkeley)
Marin Anderson (Berkeley)
Andrew Siemion (Berkeley)
| Frequency channels: | 1024 |
| Clock input: | usrclk 2x @ 50-75 MHz |
| Signal input: | XAUI dual-pol 8 bit r/i |
| Integration time: | 10 microsec to 10 ms |
| Polyphase filter: | 4taps, Hamming window |
| Output: | 10 Gbit Ethernet, 8 bit x/y power, 16 bit x/y power squared, 8 bit xy r/i |
| Libraries used: | mlib_devel 7.1 |
| hardware: | BEE2 or iBOB, iADC (legacy version) |
Description: bofs/ - compiled bof files init_scripts/ - initialization scripts matlab_scripts/ - matlab scripts for testing mdls/ - model files reg_tools/ - bee2/borph tools
Register |
Data Type |
Description |
Recommended Value |
|---|---|---|---|
reg_sync_period |
UFIx 32.0 |
Period of fiducial sync pulse / vector warning signal. |
131072 |
reg_acclen |
UFix 32.0 |
Accumulation length - 1, in units of number of frames. |
127 |
reg_coeff_stokes1 |
UFix 18.12 |
X-polarization scaling value |
12288 |
reg_coeff_stokes2 |
UFix 18.12 |
XY real scaling value |
12288 |
reg_coeff_stokes3 |
UFix 18.12 |
XY imaginary scaling value |
12288 |
reg_coeff_stokes4 |
UFix 18.12 |
Y-polarization scaling value |
12288 |
kurt_scale_1a |
UFix 18.12 |
X-polarization power^2 scaling value |
12288 |
kurt_scale_1b |
UFix 18.12 |
Y-polarization power^2 scaling value |
12288 |
kurt_output1a |
UFIx 3.0 |
X-pol power^2 short selector |
2 |
kurt_output1b |
UFIx 3.0 |
Y-pol power^2 short selector |
2 |
reg_output_bitselect1 |
UFIx 3.0 |
X-pol power byte selector |
1 |
reg_output_bitselect2 |
UFIx 3.0 |
XY real byte selector |
1 |
reg_output_bitselect3 |
UFIx 3.0 |
XY imag byte selector |
1 |
reg_output_bitselect4 |
UFIx 3.0 |
Y-pol power byte selector |
1 |
Packet_Size |
UFIx 32.0 |
Size of packets in 64 bit words |
1025 |
reg_ip |
UFIx 32.0 |
destination ip address |
10.0.0.4 == 0167772164 |
reg_10GbE_destport0 |
UFIx 32.0 |
Destination port number |
6001 |
xaui_error_reset |
UFIx 32.0 |
Used to reset the xaui error counters, drive high then low |
0,1,0 |
| Register | Data Type | Description | Characteristic Value |
|---|---|---|---|
| rx_valid | indicates reception of valid data | 1 | |
| rx_linkdown | counts every clock rx_linkdown is high | 0, if the link is up | |
| rx_empty | counts every clock rx_empty is high | 0, if the link is properly configured |
iBOB ADC -> XAUI Beamformer Mimicker
total spectral output: 1024 channels * (8 bits X power + 8 bits Y power
- 8 bits XY real + 8 bits XY imag + 16 bits SK X + 16 bits SK Y) + 8 byte counter = 8200 bytes = 5 x 1640 byte packets
It looks like pulsing the 10GbE end-of-frame several times during 1025 clocks of valid data doesn't work. Probably will just dump the entire 8200 bytes in a single jumbo frame. - never mind, this works fine.
Data rate: 8200 bytes / sampling period
Ex: 1 millisecond period -> 8 MB/sec
Diagram of original IBOB design:

Image:qDiSYq2f_kurt_spec_test.png|kurt_spec_test.png
An appropriate 'gulp' command line for capturing all ethernet traffic to interface eth0:
sudo gulp -i eth0 > out.pcap
Separating a two-beamformer capture into individual captures:
/usr/sbin/tcpdump 'src host <beamformer ip address 1>' -r <input file.pcap> -w <output ip 1.pcap>
/usr/sbin/tcpdump 'src host <beamformer ip address 2>' -r <input file.pcap> -w <output ip 2.pcap>
Below are instructions for taking a quick look at a .pcap capture from the MLM
- Setup path (tools used are in ~siemion/bin on pulsar-1)
siemion@pulsar-1:~> export PATH=$PATH:~siemion/bin
siemion@pulsar-1:~> ls -al *.pcap
-rw-r--r-- 1 siemion obs 7507222 2010-02-10 02:12 test.pcap
- Run the MLM pcap processor, meat_pcap, on the test pcap file. 'prefix' is the file prefix for extracted files
siemion@pulsar-1:~> meat_pcap32 test.pcap prefix
Completed Successfully
Spectra count: 908
Dropped packet count: 0
- Note that above the dropped packet count is zero, this is calculated by following the clock cycle counter in each packet. - This will create a series of binary files containing extracted and reordered spectra for each polarization and moment:
siemion@pulsar-1:~> ls -al *.bin
-rw-r--r-- 1 siemion obs 929792 2010-02-10 02:37 prefix_xpower.bin
-rw-r--r-- 1 siemion obs 1859584 2010-02-10 02:37 prefix_xpowersq.bin
-rw-r--r-- 1 siemion obs 929792 2010-02-10 02:37 prefix_ypower.bin
-rw-r--r-- 1 siemion obs 1859584 2010-02-10 02:37 prefix_ypowersq.bin
- Run the 'mkfits.sh' script to create .fits files, syntax is: mkfits.sh <file_prefix>
siemion@pulsar-1:~> mkfits.sh prefix 908
siemion@pulsar-1:~> ls -al *.fits
-rw-r--r-- 1 siemion obs 933120 2010-02-10 02:37 prefix_xpower.fits
-rw-r--r-- 1 siemion obs 1863360 2010-02-10 02:37 prefix_xpowersq.fits
-rw-r--r-- 1 siemion obs 933120 2010-02-10 02:37 prefix_ypower.fits
-rw-r--r-- 1 siemion obs 1863360 2010-02-10 02:37 prefix_ypowersq.fits
- Launch ds9 to view one of the .fits files
siemion@pulsar-1:~> ds9 prefix_ypowersq.fits
- You should see a plot like this (note that I selected the View -> Horizontal Graph option to see the slice plot at bottom. I also zoomed to 1/2):
Image:xFxNO5yg_saods9.png|plot of ypol-squared from a test pcap capture
.pcap captures created on hcro node pulsar-1 should be processed using:
siemion@pulsar-1:~> meat_pcap32 <input pcap file> <output prefix>
The four .bin files output as
<output prefix>_xpower.bin
<output prefix>_ypower.bin
<output prefix>_xpowersq.bin
<output prefix>_ypowersq.bin
are concatenated unsigned binary values with no header information. ...power.bin files are formatted as 8 bit unsigned integers (uint8), ...powersq.bin files are formatted as 16 bit unsigned integers (uint16)
all files contain 1024 point spectra ordered as:
spectra_1, freq_1023, spectra_1, freq_1022, spectra_1, freq_1021 ... spectra_1, freq_0
spectra_2, freq_1023, spectra_2, freq_1022, spectra_2, freq_1021 ... spectra_2, freq_0
...
spectra_N, freq_1023, spectra_N, freq_1022, spectra_N, freq_1021 ... spectra_N, freq_0
Where freq_1023 is the highest frequency channel (upper side of the band), freq_0 is the lowest frequency (lower side of the band)
For example, these files can be read in Matlab using commands like:
power_file = fopen('~/jupiter_on_xpower.bin')
powersq_file = fopen('~/jupiter_on_xpowersq.bin')
power_spectra = fread(power_file, 1024, 'uint8');
powersq_spectra = fread(powersq_file, 1024, 'uint16');Extract 5000 packets from an existing pcap file:
-bash-3.00$ /usr/sbin/tcpdump -r jupiter_on.pcap -c 5000 -w jupiter_on_5000.pcap
-bash-3.00$ zip jupiter_on_5000.pcap.zip jupiter_on_5000.pcap
adding: jupiter_on_5000.pcap (deflated 18%)
-bash-3.00$ ls -alh *.zip
-rw-r--r-- 1 siemion werthimer 25M Mar 26 17:26 jupiter_on_5000.pcap.zip
{{bit|SL2WeyGy_jupiter_on_5000.pcap.zip|jupiter_on_5000.pcap.zip}}
4 pm - 10 pm PST
5 pm - 11 pm PST
5 pm - 11 pm PST
2:45 pm - 10:45 pm PDT
2:45 pm - 10:45 pm PDT