Changes between Version 2 and Version 3 of 802.11/wlan_exp/log/examples/txrx_walkthrough
- Timestamp:
- Mar 22, 2014, 11:01:08 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
802.11/wlan_exp/log/examples/txrx_walkthrough
v2 v3 100 100 Notice the indexing trick in the code above. The variable {{{rx_ap_idx_7}}} contains booleans indicating which elements passed the test, {{{True}}} here for receptions with rate of 7. This boolean array is then used as the slice argument to the {{{timestamp}}} array to select only the rate = 7 entries. Using a boolean array as a slice argument is a very fast way to filter a numpy array for further processing. 101 101 102 Another way to visualize the increasing rates is to plot the cumulative number of bytes received by one node. The rate of bytes-per-time (i.e. throughput) should be faster with increasing rate. 102 103 104 {{{#!python 105 rx_ap_lens_acc = np.cumsum(rx_ap['length']) 106 step(rx_ap['timestamp'], rx_ap_lens_acc) 107 }}} 103 108 104 pattern is clear- each rate was used for about 1 minute. And this explains the distribute of rates above- a higher rate means shorter packet duration, so in a fixed interval (i.e. 1 minute) more packets can be transmitted. 109 This will produce a plot: 110 [[Image(wlan_exp_log_txrx_ex_t_vs_bytes.png)]] 111 112 Clearly the rate of bytes-per-time is increasing with time, consistent with our earlier observation of rates vs. time.