Agora  1.2.0
Agora project
hdf5_lib.hdf5_lib Class Reference

Public Member Functions

def __init__ (self, filename, n_frames_to_inspect=0, n_fr_insp_st=0, sub_sample=0)
 
def open_hdf5 (self)
 
def get_data (self)
 
def get_metadata (self)
 

Static Public Member Functions

def samps2csi_large (samps, num_users, chunk_size=1000, samps_per_user=224, fft_size=64, offset=0, bound=94, cp=0, pilot_f=[], legacy=False)
 
def samps2csi (samps, num_users, samps_per_user=224, fft_size=64, offset=0, bound=94, cp=0, pilot_f=[], legacy=False, chunk_id=-1)
 
def load_tx_data (metadata, dirpath, n_users)
 
def demodulate (ul_samps, csi, txdata, metadata, ue_frame_offset, offset, ul_slot_i, noise_samps_f=None, method='zf')
 

Public Attributes

 h5file
 
 filename
 
 dirpath
 
 h5struct
 
 data
 
 metadata
 
 pilot_samples
 
 uplink_samples
 
 n_frm_st
 
 n_frm_end
 
 sub_sample
 

Constructor & Destructor Documentation

◆ __init__()

def hdf5_lib.hdf5_lib.__init__ (   self,
  filename,
  n_frames_to_inspect = 0,
  n_fr_insp_st = 0,
  sub_sample = 0 
)

Member Function Documentation

◆ demodulate()

def hdf5_lib.hdf5_lib.demodulate (   ul_samps,
  csi,
  txdata,
  metadata,
  ue_frame_offset,
  offset,
  ul_slot_i,
  noise_samps_f = None,
  method = 'zf' 
)
static
Here is the call graph for this function:

◆ get_data()

def hdf5_lib.hdf5_lib.get_data (   self)
Parse file to retrieve metadata and data.
HDF5 file has been written in DataRecorder.cpp (in Sounder folder)
Output:
    Data (hierarchy):
-Path
-Pilot_Samples
    --Samples
-UplinkData
    --Samples
Dimensions of input sample data (as shown in DataRecorder.cpp in Sounder):
    - Pilots
dims_pilot[0] = maxFrame
dims_pilot[1] = number of cells
dims_pilot[2] = number of UEs
dims_pilot[3] = number of antennas (at BS)
dims_pilot[4] = samples per symbol * 2 (IQ)
    - Uplink Data
dims_data[0] = maxFrame
dims_data[1] = number of cells
dims_data[2] = uplink symbols per frame
dims_data[3] = number of antennas (at BS)
dims_data[4] = samples per symbol * 2 (IQ)

◆ get_metadata()

def hdf5_lib.hdf5_lib.get_metadata (   self)
-Attributes
        {FREQ, RATE, PREFIX_LEN, POSTFIX_LEN, SLOT_SAMP_LEN, FFT_SIZE, CP_LEN,
        BEACON_SEQ_TYPE, PILOT_SEQ_TYPE, BS_HUB_ID, BS_SDR_NUM_PER_CELL, BS_SDR_ID, BS_NUM_CELLS,
        BS_CH_PER_RADIO, BS_FRAME_SCHED, BS_RX_GAIN_A, BS_TX_GAIN_A, BS_RX_GAIN_B, BS_TX_GAIN_B,
        BS_BEAMSWEEP, BS_BEACON_ANT, BS_NUM_ANT, BS_FRAME_LEN, CL_NUM, CL_CH_PER_RADIO, CL_AGC_EN,
        CL_RX_GAIN_A, CL_TX_GAIN_A, CL_RX_GAIN_B, CL_TX_GAIN_B, CL_FRAME_SCHED, CL_SDR_ID,
        CL_MODULATION, UL_SLOTS}
Here is the call graph for this function:

◆ load_tx_data()

def hdf5_lib.hdf5_lib.load_tx_data (   metadata,
  dirpath,
  n_users 
)
static
Here is the call graph for this function:

◆ open_hdf5()

def hdf5_lib.hdf5_lib.open_hdf5 (   self)
Get the most recent log file, open it if necessary.
Here is the call graph for this function:

◆ samps2csi()

def hdf5_lib.hdf5_lib.samps2csi (   samps,
  num_users,
  samps_per_user = 224,
  fft_size = 64,
  offset = 0,
  bound = 94,
  cp = 0,
  pilot_f = [],
  legacy = False,
  chunk_id = -1 
)
static
Convert an Argos HDF5 log file with raw IQ in to CSI.
Asumes 802.11 style LTS used for trace collection.
    
Args:
    samps: The h5py or numpy array containing the raw IQ samples,
dims = [Frame, Cell, User, Antenna, Sample].
    num_users: Number of users used in trace collection. (Last 'user' is noise.)
    samps_per_user: Number of samples allocated to each user in each frame.
     
Returns:
    csi: Complex numpy array with [Frame, Cell, User, Pilot Rep, Antenna, Subcarrier]
    iq: Complex numpy array of raw IQ samples [Frame, Cell, User, Pilot Rep, Antenna, samples]
     
Example:
    h5log = h5py.File(filename,'r')
    csi,iq = samps2csi(h5log['Pilot_Samples'], h5log.attrs['num_mob_ant']+1, h5log.attrs['samples_per_user'])
Here is the call graph for this function:

◆ samps2csi_large()

def hdf5_lib.hdf5_lib.samps2csi_large (   samps,
  num_users,
  chunk_size = 1000,
  samps_per_user = 224,
  fft_size = 64,
  offset = 0,
  bound = 94,
  cp = 0,
  pilot_f = [],
  legacy = False 
)
static
Wrapper function for samps2csi_main for to speed up large logs by leveraging data-locality. Chunk_size may need to be adjusted based on your computer.
Here is the call graph for this function:

Member Data Documentation

◆ data

hdf5_lib.hdf5_lib.data

◆ dirpath

hdf5_lib.hdf5_lib.dirpath

◆ filename

hdf5_lib.hdf5_lib.filename

◆ h5file

hdf5_lib.hdf5_lib.h5file

◆ h5struct

hdf5_lib.hdf5_lib.h5struct

◆ metadata

hdf5_lib.hdf5_lib.metadata

◆ n_frm_end

hdf5_lib.hdf5_lib.n_frm_end

◆ n_frm_st

hdf5_lib.hdf5_lib.n_frm_st

◆ pilot_samples

hdf5_lib.hdf5_lib.pilot_samples

◆ sub_sample

hdf5_lib.hdf5_lib.sub_sample

◆ uplink_samples

hdf5_lib.hdf5_lib.uplink_samples

The documentation for this class was generated from the following file: