Mina Sameh Posted June 21, 2022 Share Posted June 21, 2022 How to measure frequency of analog signal using python APIs provided ? Link to comment Share on other sites More sharing options...
0 Mina Sameh Posted June 21, 2022 Author Share Posted June 21, 2022 Hi @attila , Is there any APIs provided for frequency measurment of an analog input signal ? Link to comment Share on other sites More sharing options...
0 attila Posted June 21, 2022 Share Posted June 21, 2022 Hi @Mina Sameh See the following post: Mina Sameh 1 Link to comment Share on other sites More sharing options...
0 Mina Sameh Posted June 22, 2022 Author Share Posted June 22, 2022 @attila Thanks a lot! attila 1 Link to comment Share on other sites More sharing options...
0 abia Posted July 30, 2022 Share Posted July 30, 2022 @Mina Sameh Hey mina Im trying to do the same thing here, measure the freq of input signal through python sdk. Did u have any luck? I checked the spectrum analyzer link thats in this thread but couldn't seem to figure it out. Link to comment Share on other sites More sharing options...
0 attila Posted August 1, 2022 Share Posted August 1, 2022 Hi @Mina Sameh @abia See the updated example: AnalogIn_FFT.py iPeak1 = 0 vMax = float('-inf') for i in range(5, nBins): # skip DC if rgBins1[i] < vMax: continue vMax = rgBins1[i] iPeak1 = i print("C1 peak: ", hzTop*iPeak1/(nBins-1)/1000,"MHz") if iPeak1 < nBins: # weighted average s = 0 m = 0 for i in range(-2,3): t = pow(10,rgBins1[iPeak1+i]) s += (iPeak1+i)*t m += t iPeak1 = s/m print("C1 peak weighted: ",hzTop*iPeak1/(nBins-1)/1000,"MHz") Link to comment Share on other sites More sharing options...
Question
Mina Sameh
How to measure frequency of analog signal using python APIs provided ?
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now