ModuleConnector DataReader: Read X4 Baseband data in Matlab

Discussion in 'Module Connector (MC)' started by Timo Lauteslager (IC), Oct 10, 2017.

  1. Hi!

    I have recorded a .DAT file using an X4M300 and ModuleConnector (Win64 1.4.2) in Matlab(2016b). Now, I want to read the baseband AP data in Matlab, and do subsequent processing. I tried using the ModuleConnector DataReader, but do not understand the output format. I found that if I plot every fourth sample in the returned 'data' field, I get something that resembles Amplitude BB data. But there is a strange quantization problem. And which is my phase data? Is there an example file for the ModuleConnector DataReader?

    Code:
    LIB = ModuleConnector.Library;
    
    metafilename = './Recordings/xethru_recording_20171010_111744_test_recording/xethru_recording_meta.dat';
    reader = ModuleConnector.DataReader();
    status = reader.open(metafilename);
    
    data_type = ModuleConnector.DataRecorderInterface.DataType_BasebandApDataType;
    reader.set_filter(data_type);
    
    d = reader.read_record();
    amp = d.data(4:4:end);
    figure
    plot(amp)
    
    baseband amplitude.png
    I have been able to access the raw data using Matlab function fread, but I am interested in using the ModuleConnector. Thanks for your help!

    Timo
     

    Attached Files:

  2. Charlie Shao

    Charlie Shao Moderator Staff Member

    Hi Timo,
    Please refer to XeThru File Formats page 3 for amplitude / phase baseband data in binary format.