Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Half of ADC data is missing #56

Open
ekurtgl opened this issue Jan 28, 2023 · 7 comments
Open

Half of ADC data is missing #56

ekurtgl opened this issue Jan 28, 2023 · 7 comments

Comments

@ekurtgl
Copy link

ekurtgl commented Jan 28, 2023

When I start framing with mmwave studio and this module, the recorded openradar .bin file is only half of the size of the mmwave file. 50% of ADC samples are missing. Is there a solution for this problem? The data do not look good with the missing samples. Thanks in advance!

@felipeparralejo
Copy link

Maybe you are not converting from binary to int16? If you read from the binary file obtained with mmWave Studio you can use NumPy: np.frombuffer(data, dtype=np.int16) where data is your frame

@ekurtgl
Copy link
Author

ekurtgl commented Apr 11, 2023

I don't think that is the problem. The acquired data have half the size of that is recorded with mmWave Studio. The issue can easily be reproduced by making two recordings: one with mmWave Studio, one with OpenRadar module. OpenRadar recorded data will have half the size of that is recorded with mmWave Studio.

@felipeparralejo
Copy link

This seems weird because I usually make recordings with mmWave Studio and also with OpenRadar, and the data have exactly the same size. I save the frames in Python using Pickle, and the file size obtained is exactly equal to the file recorded with mmWave Studio. Try reinstalling your OpenRadar module.

With respect to my previous answer, I think that originally the OpenRadar module did not convert the binary data from uint16 to int16, which is necessary. Check your data type after recording a frame and use np.frombuffer(frame, dtype=np.int16) if needed.

Hope this helps

@ekurtgl
Copy link
Author

ekurtgl commented Apr 11, 2023

I save the data in the same way: np.frombuffer(frame, dtype=np.int16), but into a .bin file. Are you using real or complex-valued stream? I use complex adc data format in my configuration. I am guessing this module might be optimized for real-valued streams. I will definitely try to implement your method. Thank you for the suggestion.

@felipeparralejo
Copy link

felipeparralejo commented Apr 11, 2023

I use a complex 1x stream. I have just realized that some radar parameters are hard coded in the adc.py file from the OpenRadar module (Ctrl+Click on the DCA1000 module will lead to the file). Parameters like the number of ADC samples, Rx and Tx antennas and the number of chirp loops are written in the dictionary ADC_PARAMS. I changed those values to the ones I configured my device with. Try having a look at this.

You can see what I am talking about here https://github.com/PreSenseRadar/OpenRadar/blob/master/mmwave/dataloader/adc.py (line 45)

@ekurtgl
Copy link
Author

ekurtgl commented Apr 11, 2023

I was using 2x complex stream and changed adc.py accordingly, but will have a look it again and try with 1x complex data as well. Thank you so much for your suggestion!

@ccdcq
Copy link

ccdcq commented Dec 24, 2024

Hello, has your problem been solved? I would like to ask what your solution is, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants