Plotting Baseband Data

Discussion in 'XeThru Explorer' started by Michael, Sep 23, 2016.

  1. Michael

    Michael New Member

    Hi there,

    I'm looking to plot the baseband data that selected to output from my respiration module. Does anyone know how I can convert the baseband .dat file into a data set that I could plot in something like MATLAB?


  2. Olav Liseth

    Olav Liseth Administrator Staff Member

  3. Michael

    Michael New Member

    Ah, I went looking for something like that on the site but I couldn't find it. Thanks Olav!
  4. Michael

    Michael New Member

    When I try to run the script I get the following errors:

    Insufficient number of outputs from right hand side of equal sign to satisfy assignment.

    Error in readBasebandFile (line 15)
    fsize = f.bytes;

    Error in testBasebandAmplitude (line 5)
    [hdrMat , FrameMat] = readBasebandFile( file );

    I have all of the files in the same directory and the directory is added to MATLAB's path. Any ideas?
  5. Maria

    Maria New Member

    Did you manage to plot the baseband data Michael? In my case I receive a different error that arises because the header data is not being read correctly. The three time I tried to run the script with three different .dat files I get values like these:

    contentID : 567 1065 2551
    frameCtr: 52 52 52
    numBins: 1.0254e9 1.0254e9 1.0254e9
    BinLength: 0.3 0.3 0.3
    Fs: 0.0153 0.1671 0.0070
    Fc: 15.43 15.24 11.77
    RangeOffset: 34.22 36.25 18.67

    It's easy to see that some of them are interchanged, however the script using the example given in works fine for me!

    Any ideas?
  6. Michael

    Michael New Member

    Hey Maria, it's been a while since I worked on this and I don't remember what the error was caused by. I believe it was something about how I was running the code or my MATLAB directory. Hopefully you figure out your troubles.


  7. Nir Regev

    Nir Regev New Member

    Hi Maria

    I didn't understand the problem. Could you post or send me the code so I can take a look?


  8. Olav Liseth

    Olav Liseth Administrator Staff Member

  9. Maria

    Maria New Member

    Hi Nir,

    Thanks for your interest in helping me out. I actually reported it to XeThru support team and, as Olav said, the file format of XeThru Explorer recordings has changed, so the previous program "testBasebandAmplitude.m" doesn't work with data recorded nowadays. Anyways, after some trial and error, I adapted these program to import the data in IQ baseband, convert it to AP and display it for each frame.

    If anyone is interested just let me know through a message in my profile and I'll share it with you. I couldn't share it in this post.

  10. Rathna

    Rathna New Member

    New format seems to be (based on some tinkering):

    Frame counter (uint32)
    Num of bins (uint32)
    Bin length (float)
    Fs (float)
    Fc (float)
    Range offset (float)
    IQ or AP (2*NumBins*float)

    Øystein Bjørndal likes this.