In numpy - how do I compute phase and amplitude of a sinusoid by correlating it with a sine and cosine?Frequency domain of a sine wave with frequency 1000HzHow do I use Python's itertools.groupby()?Python progression path - From apprentice to guruPeak detection in a 2D arrayUnderstanding FFT outputWhat is __future__ in Python used for and how/when to use it, and how it worksPhase correlation with Open CvGenerate sine wave modulated with a cosineextracting phase information using numpy fftDetecting Phase and Amplitude of a sine having known frequencyWhy does numerical differentiation with Python changes original signal amplitude for sine wave?
As a GM, is it bad form to ask for a moment to think when improvising?
Copper as an adjective to refer to something made of copper
Is there a reason why Turkey took the Balkan territories of the Ottoman Empire, instead of Greece or another of the Balkan states?
How important are good looking people in a novel/story?
When referring to a person only by their surname, should I keep or omit "von"?
Which version of the Squat Nimbleness feat is correct?
How to preserve a rare version of a book?
Dimmer switch not connected to ground
Do Jedi mind tricks work on Ewoks?
Is it normal for gliders not to have attitude indicators?
Does Thanos's ship land in the middle of the battlefield in "Avengers: Endgame"?
Convert Numbers To Emoji Math
Find the area of the smallest rectangle to contain squares of sizes up to n
Some questions about antistatic wrist strap
Emergency stop in plain TeX, pdfTeX, XeTeX and LuaTeX?
Picking a theme as a discovery writer
Do quaternary sulfur dications exist?
How do I, as a DM, handle a party that decides to set up an ambush in a dungeon?
All of my Firefox add-ons been disabled suddenly, how can I re-enable them?
Ab major 9th chord in Bach
Has the United States ever had a non-Christian President?
Can an Iranian citizen enter the USA on a Dutch passport?
What detail can Hubble see on Mars?
Installing Debian 10, upgrade to stable later?
In numpy - how do I compute phase and amplitude of a sinusoid by correlating it with a sine and cosine?
Frequency domain of a sine wave with frequency 1000HzHow do I use Python's itertools.groupby()?Python progression path - From apprentice to guruPeak detection in a 2D arrayUnderstanding FFT outputWhat is __future__ in Python used for and how/when to use it, and how it worksPhase correlation with Open CvGenerate sine wave modulated with a cosineextracting phase information using numpy fftDetecting Phase and Amplitude of a sine having known frequencyWhy does numerical differentiation with Python changes original signal amplitude for sine wave?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I have an incoming sinusoid with a known frequency. I understand that one can compute it's phase and amplitude by computing it's correlation with a sine and a cosine. How would I do this using numpy?
Or maybe there is a better way to do this. Looking at this here, but I don't know how to do the computation in numpy.
I'm a numpy rookie. I would appreciate some pointers.
python numpy signal-processing
add a comment |
I have an incoming sinusoid with a known frequency. I understand that one can compute it's phase and amplitude by computing it's correlation with a sine and a cosine. How would I do this using numpy?
Or maybe there is a better way to do this. Looking at this here, but I don't know how to do the computation in numpy.
I'm a numpy rookie. I would appreciate some pointers.
python numpy signal-processing
In which form do you have the sinusoid? In the form of points ,I guess ?
– Tojrah
Mar 23 at 5:09
Yes. I have sample values at regular intervals for an entire cycle.
– Ziffusion
Mar 23 at 5:11
Do you have some special points(peak point or zero amplitude points because then it would be easier
– Tojrah
Mar 23 at 5:18
Well, I could scan the samples for zero crossings, or max values, but they are not guaranteed to be present. Take a look at the link I added to the question. I would like to implement the computation described in the article in numpy. Need some help with that.
– Ziffusion
Mar 23 at 5:21
Are you looking for something like stackoverflow.com/questions/55317667/…?
– Reedinationer
Mar 23 at 19:49
add a comment |
I have an incoming sinusoid with a known frequency. I understand that one can compute it's phase and amplitude by computing it's correlation with a sine and a cosine. How would I do this using numpy?
Or maybe there is a better way to do this. Looking at this here, but I don't know how to do the computation in numpy.
I'm a numpy rookie. I would appreciate some pointers.
python numpy signal-processing
I have an incoming sinusoid with a known frequency. I understand that one can compute it's phase and amplitude by computing it's correlation with a sine and a cosine. How would I do this using numpy?
Or maybe there is a better way to do this. Looking at this here, but I don't know how to do the computation in numpy.
I'm a numpy rookie. I would appreciate some pointers.
python numpy signal-processing
python numpy signal-processing
edited Mar 23 at 5:10
Ziffusion
asked Mar 23 at 4:57
ZiffusionZiffusion
6,75211844
6,75211844
In which form do you have the sinusoid? In the form of points ,I guess ?
– Tojrah
Mar 23 at 5:09
Yes. I have sample values at regular intervals for an entire cycle.
– Ziffusion
Mar 23 at 5:11
Do you have some special points(peak point or zero amplitude points because then it would be easier
– Tojrah
Mar 23 at 5:18
Well, I could scan the samples for zero crossings, or max values, but they are not guaranteed to be present. Take a look at the link I added to the question. I would like to implement the computation described in the article in numpy. Need some help with that.
– Ziffusion
Mar 23 at 5:21
Are you looking for something like stackoverflow.com/questions/55317667/…?
– Reedinationer
Mar 23 at 19:49
add a comment |
In which form do you have the sinusoid? In the form of points ,I guess ?
– Tojrah
Mar 23 at 5:09
Yes. I have sample values at regular intervals for an entire cycle.
– Ziffusion
Mar 23 at 5:11
Do you have some special points(peak point or zero amplitude points because then it would be easier
– Tojrah
Mar 23 at 5:18
Well, I could scan the samples for zero crossings, or max values, but they are not guaranteed to be present. Take a look at the link I added to the question. I would like to implement the computation described in the article in numpy. Need some help with that.
– Ziffusion
Mar 23 at 5:21
Are you looking for something like stackoverflow.com/questions/55317667/…?
– Reedinationer
Mar 23 at 19:49
In which form do you have the sinusoid? In the form of points ,I guess ?
– Tojrah
Mar 23 at 5:09
In which form do you have the sinusoid? In the form of points ,I guess ?
– Tojrah
Mar 23 at 5:09
Yes. I have sample values at regular intervals for an entire cycle.
– Ziffusion
Mar 23 at 5:11
Yes. I have sample values at regular intervals for an entire cycle.
– Ziffusion
Mar 23 at 5:11
Do you have some special points(peak point or zero amplitude points because then it would be easier
– Tojrah
Mar 23 at 5:18
Do you have some special points(peak point or zero amplitude points because then it would be easier
– Tojrah
Mar 23 at 5:18
Well, I could scan the samples for zero crossings, or max values, but they are not guaranteed to be present. Take a look at the link I added to the question. I would like to implement the computation described in the article in numpy. Need some help with that.
– Ziffusion
Mar 23 at 5:21
Well, I could scan the samples for zero crossings, or max values, but they are not guaranteed to be present. Take a look at the link I added to the question. I would like to implement the computation described in the article in numpy. Need some help with that.
– Ziffusion
Mar 23 at 5:21
Are you looking for something like stackoverflow.com/questions/55317667/…?
– Reedinationer
Mar 23 at 19:49
Are you looking for something like stackoverflow.com/questions/55317667/…?
– Reedinationer
Mar 23 at 19:49
add a comment |
1 Answer
1
active
oldest
votes
One convenient method would be to take advantage of Euler's formula e^(i phi) = cos phi + i sin phi
:
def get_cos_params(samples):
N = len(samples)
x = np.linspace(-np.pi, np.pi, N, endpoint=False)
template = np.exp(1j * x)
corr = 2 / N * template@samples
R = np.abs(corr)
phi = np.log(corr).imag
return R, phi
Example:
N = np.random.randint(10, 1000)
phi = np.random.uniform(-np.pi, np.pi)
R = np.random.uniform(0.1, 10)
x = np.linspace(-np.pi, np.pi, N, endpoint=False)
signal = R * np.cos(x-phi)
R_recon, phi_recon = get_cos_params(signal)
print(np.isclose(R, R_recon), np.isclose(phi, phi_recon))
# True True
Do you mind explaining what's going on here? I would really appreciate it if you could clarify what you are doing conceptually, and maybe annotate some lines in the answer with comments saying what is happening. Also - I get a syntax error on "template@samples".
– Ziffusion
Mar 23 at 12:46
1
@Ziffusion You must be on an old python version. Either upgrade or replace allx@y
withnp.dot(x, y)
. Re what is happening, conceptually. Going by your question I naturally assumed that you have already grasped the concept and only needed an example implementation in order to get up to speed with numpy. I've mentioned Euler's formula. Once you are aware of that the code should be pretty close to self-explanatory:
– Paul Panzer
Mar 23 at 15:02
1
Step 1 Use Euler's formula to create a combined cosine and sine template with the correct sampling rate. Step 2 Multiply with the signal and compute the "integral". Step 3 translate the integral value to polar coordinates and use the fact that these actually are the amplitude and phase. Please try to identify these steps in the code yourself. If you get stuck in the process I'll be happy to help you out but you are supposed to make some effort yourself first.
– Paul Panzer
Mar 23 at 15:02
Thanks. I am an engineer and should know this better. But been futzing with software for 30 years now, and all of this stuff has kind of faded away. Am diving back into it now. Thanks for the pointers. I think the link that I have in the question actually has some great context.
– Ziffusion
Mar 23 at 15:47
If you have some time (and the inclination), can you chat with me so I can ask you a few questions? You seem to know what you are talking about, and it'll just get me there faster. Stackoverflow has chat I believe.
– Ziffusion
Mar 23 at 16:02
|
show 2 more comments
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55310749%2fin-numpy-how-do-i-compute-phase-and-amplitude-of-a-sinusoid-by-correlating-it%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
One convenient method would be to take advantage of Euler's formula e^(i phi) = cos phi + i sin phi
:
def get_cos_params(samples):
N = len(samples)
x = np.linspace(-np.pi, np.pi, N, endpoint=False)
template = np.exp(1j * x)
corr = 2 / N * template@samples
R = np.abs(corr)
phi = np.log(corr).imag
return R, phi
Example:
N = np.random.randint(10, 1000)
phi = np.random.uniform(-np.pi, np.pi)
R = np.random.uniform(0.1, 10)
x = np.linspace(-np.pi, np.pi, N, endpoint=False)
signal = R * np.cos(x-phi)
R_recon, phi_recon = get_cos_params(signal)
print(np.isclose(R, R_recon), np.isclose(phi, phi_recon))
# True True
Do you mind explaining what's going on here? I would really appreciate it if you could clarify what you are doing conceptually, and maybe annotate some lines in the answer with comments saying what is happening. Also - I get a syntax error on "template@samples".
– Ziffusion
Mar 23 at 12:46
1
@Ziffusion You must be on an old python version. Either upgrade or replace allx@y
withnp.dot(x, y)
. Re what is happening, conceptually. Going by your question I naturally assumed that you have already grasped the concept and only needed an example implementation in order to get up to speed with numpy. I've mentioned Euler's formula. Once you are aware of that the code should be pretty close to self-explanatory:
– Paul Panzer
Mar 23 at 15:02
1
Step 1 Use Euler's formula to create a combined cosine and sine template with the correct sampling rate. Step 2 Multiply with the signal and compute the "integral". Step 3 translate the integral value to polar coordinates and use the fact that these actually are the amplitude and phase. Please try to identify these steps in the code yourself. If you get stuck in the process I'll be happy to help you out but you are supposed to make some effort yourself first.
– Paul Panzer
Mar 23 at 15:02
Thanks. I am an engineer and should know this better. But been futzing with software for 30 years now, and all of this stuff has kind of faded away. Am diving back into it now. Thanks for the pointers. I think the link that I have in the question actually has some great context.
– Ziffusion
Mar 23 at 15:47
If you have some time (and the inclination), can you chat with me so I can ask you a few questions? You seem to know what you are talking about, and it'll just get me there faster. Stackoverflow has chat I believe.
– Ziffusion
Mar 23 at 16:02
|
show 2 more comments
One convenient method would be to take advantage of Euler's formula e^(i phi) = cos phi + i sin phi
:
def get_cos_params(samples):
N = len(samples)
x = np.linspace(-np.pi, np.pi, N, endpoint=False)
template = np.exp(1j * x)
corr = 2 / N * template@samples
R = np.abs(corr)
phi = np.log(corr).imag
return R, phi
Example:
N = np.random.randint(10, 1000)
phi = np.random.uniform(-np.pi, np.pi)
R = np.random.uniform(0.1, 10)
x = np.linspace(-np.pi, np.pi, N, endpoint=False)
signal = R * np.cos(x-phi)
R_recon, phi_recon = get_cos_params(signal)
print(np.isclose(R, R_recon), np.isclose(phi, phi_recon))
# True True
Do you mind explaining what's going on here? I would really appreciate it if you could clarify what you are doing conceptually, and maybe annotate some lines in the answer with comments saying what is happening. Also - I get a syntax error on "template@samples".
– Ziffusion
Mar 23 at 12:46
1
@Ziffusion You must be on an old python version. Either upgrade or replace allx@y
withnp.dot(x, y)
. Re what is happening, conceptually. Going by your question I naturally assumed that you have already grasped the concept and only needed an example implementation in order to get up to speed with numpy. I've mentioned Euler's formula. Once you are aware of that the code should be pretty close to self-explanatory:
– Paul Panzer
Mar 23 at 15:02
1
Step 1 Use Euler's formula to create a combined cosine and sine template with the correct sampling rate. Step 2 Multiply with the signal and compute the "integral". Step 3 translate the integral value to polar coordinates and use the fact that these actually are the amplitude and phase. Please try to identify these steps in the code yourself. If you get stuck in the process I'll be happy to help you out but you are supposed to make some effort yourself first.
– Paul Panzer
Mar 23 at 15:02
Thanks. I am an engineer and should know this better. But been futzing with software for 30 years now, and all of this stuff has kind of faded away. Am diving back into it now. Thanks for the pointers. I think the link that I have in the question actually has some great context.
– Ziffusion
Mar 23 at 15:47
If you have some time (and the inclination), can you chat with me so I can ask you a few questions? You seem to know what you are talking about, and it'll just get me there faster. Stackoverflow has chat I believe.
– Ziffusion
Mar 23 at 16:02
|
show 2 more comments
One convenient method would be to take advantage of Euler's formula e^(i phi) = cos phi + i sin phi
:
def get_cos_params(samples):
N = len(samples)
x = np.linspace(-np.pi, np.pi, N, endpoint=False)
template = np.exp(1j * x)
corr = 2 / N * template@samples
R = np.abs(corr)
phi = np.log(corr).imag
return R, phi
Example:
N = np.random.randint(10, 1000)
phi = np.random.uniform(-np.pi, np.pi)
R = np.random.uniform(0.1, 10)
x = np.linspace(-np.pi, np.pi, N, endpoint=False)
signal = R * np.cos(x-phi)
R_recon, phi_recon = get_cos_params(signal)
print(np.isclose(R, R_recon), np.isclose(phi, phi_recon))
# True True
One convenient method would be to take advantage of Euler's formula e^(i phi) = cos phi + i sin phi
:
def get_cos_params(samples):
N = len(samples)
x = np.linspace(-np.pi, np.pi, N, endpoint=False)
template = np.exp(1j * x)
corr = 2 / N * template@samples
R = np.abs(corr)
phi = np.log(corr).imag
return R, phi
Example:
N = np.random.randint(10, 1000)
phi = np.random.uniform(-np.pi, np.pi)
R = np.random.uniform(0.1, 10)
x = np.linspace(-np.pi, np.pi, N, endpoint=False)
signal = R * np.cos(x-phi)
R_recon, phi_recon = get_cos_params(signal)
print(np.isclose(R, R_recon), np.isclose(phi, phi_recon))
# True True
answered Mar 23 at 5:49
Paul PanzerPaul Panzer
32k21845
32k21845
Do you mind explaining what's going on here? I would really appreciate it if you could clarify what you are doing conceptually, and maybe annotate some lines in the answer with comments saying what is happening. Also - I get a syntax error on "template@samples".
– Ziffusion
Mar 23 at 12:46
1
@Ziffusion You must be on an old python version. Either upgrade or replace allx@y
withnp.dot(x, y)
. Re what is happening, conceptually. Going by your question I naturally assumed that you have already grasped the concept and only needed an example implementation in order to get up to speed with numpy. I've mentioned Euler's formula. Once you are aware of that the code should be pretty close to self-explanatory:
– Paul Panzer
Mar 23 at 15:02
1
Step 1 Use Euler's formula to create a combined cosine and sine template with the correct sampling rate. Step 2 Multiply with the signal and compute the "integral". Step 3 translate the integral value to polar coordinates and use the fact that these actually are the amplitude and phase. Please try to identify these steps in the code yourself. If you get stuck in the process I'll be happy to help you out but you are supposed to make some effort yourself first.
– Paul Panzer
Mar 23 at 15:02
Thanks. I am an engineer and should know this better. But been futzing with software for 30 years now, and all of this stuff has kind of faded away. Am diving back into it now. Thanks for the pointers. I think the link that I have in the question actually has some great context.
– Ziffusion
Mar 23 at 15:47
If you have some time (and the inclination), can you chat with me so I can ask you a few questions? You seem to know what you are talking about, and it'll just get me there faster. Stackoverflow has chat I believe.
– Ziffusion
Mar 23 at 16:02
|
show 2 more comments
Do you mind explaining what's going on here? I would really appreciate it if you could clarify what you are doing conceptually, and maybe annotate some lines in the answer with comments saying what is happening. Also - I get a syntax error on "template@samples".
– Ziffusion
Mar 23 at 12:46
1
@Ziffusion You must be on an old python version. Either upgrade or replace allx@y
withnp.dot(x, y)
. Re what is happening, conceptually. Going by your question I naturally assumed that you have already grasped the concept and only needed an example implementation in order to get up to speed with numpy. I've mentioned Euler's formula. Once you are aware of that the code should be pretty close to self-explanatory:
– Paul Panzer
Mar 23 at 15:02
1
Step 1 Use Euler's formula to create a combined cosine and sine template with the correct sampling rate. Step 2 Multiply with the signal and compute the "integral". Step 3 translate the integral value to polar coordinates and use the fact that these actually are the amplitude and phase. Please try to identify these steps in the code yourself. If you get stuck in the process I'll be happy to help you out but you are supposed to make some effort yourself first.
– Paul Panzer
Mar 23 at 15:02
Thanks. I am an engineer and should know this better. But been futzing with software for 30 years now, and all of this stuff has kind of faded away. Am diving back into it now. Thanks for the pointers. I think the link that I have in the question actually has some great context.
– Ziffusion
Mar 23 at 15:47
If you have some time (and the inclination), can you chat with me so I can ask you a few questions? You seem to know what you are talking about, and it'll just get me there faster. Stackoverflow has chat I believe.
– Ziffusion
Mar 23 at 16:02
Do you mind explaining what's going on here? I would really appreciate it if you could clarify what you are doing conceptually, and maybe annotate some lines in the answer with comments saying what is happening. Also - I get a syntax error on "template@samples".
– Ziffusion
Mar 23 at 12:46
Do you mind explaining what's going on here? I would really appreciate it if you could clarify what you are doing conceptually, and maybe annotate some lines in the answer with comments saying what is happening. Also - I get a syntax error on "template@samples".
– Ziffusion
Mar 23 at 12:46
1
1
@Ziffusion You must be on an old python version. Either upgrade or replace all
x@y
with np.dot(x, y)
. Re what is happening, conceptually. Going by your question I naturally assumed that you have already grasped the concept and only needed an example implementation in order to get up to speed with numpy. I've mentioned Euler's formula. Once you are aware of that the code should be pretty close to self-explanatory:– Paul Panzer
Mar 23 at 15:02
@Ziffusion You must be on an old python version. Either upgrade or replace all
x@y
with np.dot(x, y)
. Re what is happening, conceptually. Going by your question I naturally assumed that you have already grasped the concept and only needed an example implementation in order to get up to speed with numpy. I've mentioned Euler's formula. Once you are aware of that the code should be pretty close to self-explanatory:– Paul Panzer
Mar 23 at 15:02
1
1
Step 1 Use Euler's formula to create a combined cosine and sine template with the correct sampling rate. Step 2 Multiply with the signal and compute the "integral". Step 3 translate the integral value to polar coordinates and use the fact that these actually are the amplitude and phase. Please try to identify these steps in the code yourself. If you get stuck in the process I'll be happy to help you out but you are supposed to make some effort yourself first.
– Paul Panzer
Mar 23 at 15:02
Step 1 Use Euler's formula to create a combined cosine and sine template with the correct sampling rate. Step 2 Multiply with the signal and compute the "integral". Step 3 translate the integral value to polar coordinates and use the fact that these actually are the amplitude and phase. Please try to identify these steps in the code yourself. If you get stuck in the process I'll be happy to help you out but you are supposed to make some effort yourself first.
– Paul Panzer
Mar 23 at 15:02
Thanks. I am an engineer and should know this better. But been futzing with software for 30 years now, and all of this stuff has kind of faded away. Am diving back into it now. Thanks for the pointers. I think the link that I have in the question actually has some great context.
– Ziffusion
Mar 23 at 15:47
Thanks. I am an engineer and should know this better. But been futzing with software for 30 years now, and all of this stuff has kind of faded away. Am diving back into it now. Thanks for the pointers. I think the link that I have in the question actually has some great context.
– Ziffusion
Mar 23 at 15:47
If you have some time (and the inclination), can you chat with me so I can ask you a few questions? You seem to know what you are talking about, and it'll just get me there faster. Stackoverflow has chat I believe.
– Ziffusion
Mar 23 at 16:02
If you have some time (and the inclination), can you chat with me so I can ask you a few questions? You seem to know what you are talking about, and it'll just get me there faster. Stackoverflow has chat I believe.
– Ziffusion
Mar 23 at 16:02
|
show 2 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55310749%2fin-numpy-how-do-i-compute-phase-and-amplitude-of-a-sinusoid-by-correlating-it%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
In which form do you have the sinusoid? In the form of points ,I guess ?
– Tojrah
Mar 23 at 5:09
Yes. I have sample values at regular intervals for an entire cycle.
– Ziffusion
Mar 23 at 5:11
Do you have some special points(peak point or zero amplitude points because then it would be easier
– Tojrah
Mar 23 at 5:18
Well, I could scan the samples for zero crossings, or max values, but they are not guaranteed to be present. Take a look at the link I added to the question. I would like to implement the computation described in the article in numpy. Need some help with that.
– Ziffusion
Mar 23 at 5:21
Are you looking for something like stackoverflow.com/questions/55317667/…?
– Reedinationer
Mar 23 at 19:49