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

RX data missing in pulsed_nmr #1080

Open
pasicl opened this issue Feb 24, 2023 · 0 comments
Open

RX data missing in pulsed_nmr #1080

pasicl opened this issue Feb 24, 2023 · 0 comments

Comments

@pasicl
Copy link

pasicl commented Feb 24, 2023

Description of the setup:

  • Device: 125-14-Z7020-LN
  • SD card image: red-pitaya-alpine-3.14-armv7-20220322
  • Application: pulsed_nmr

Description of the problem:

I am testing the emitted pulses and I have realized that there is some data lost in the recieving process. I am interested in sending long pulses (>50.000 us) and I have encountered with two problems:
1-Pulse length: I set the A pulse length to a certain width, and the width of the recieved pulse (shortcircuiting the TX and RX) is not the expected. I used an 8 GHz oscilloscope and it did recieve the pulse correctly, which means that the pulse is transmitted correctly. In the following image you can see the pulse, which is supposed to be 100 ms long, but it actually is less. I only had to modify the UI file to increase the maximum value for A pulse duration.
image
The odd thing is that every pulse has a different duration, it is never an exact length.
2- I have inspected the raw data recieved, and there are some discontinuities in the oscillations. It makes me think that some of the transfers from the server running in the Stemlab to the Client in the PC are not performed, and thus there is this abrupt discontinuity, and also shortens the pulse.
image

I have been inspecting the codes and cannot find what is wrong.

Steps to reproduce the problem:

  1. Load the FPGA image in the Stemlab and run the pulsed-nmr.c server
  2. Run the pulsed_nmr.py client sending long pulses

I have used panda dataframe to store the data into a .csv file with the following code at the end of the read_data(self) function:

  data = self.data.astype(np.float32).view(np.complex64)[0::2] / (1 << 30)
  self.accumulated_data = np.array(data)
  data_corrected = np.abs(self.accumulated_data)
  my_array = np.array([data_corrected])
  self.df = pd.DataFrame(my_array)
  print(type(self.df))
  print(self.df)
  self.df.to_csv('test1.csv', index=False)

In addition, at the beginning I imported the panda package and changed the self.size to 200.000 samples

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

1 participant