-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add phasor_at_harmonic function #65
Conversation
Hi @bruno-pannunzio . This implements the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @cgohlke ! I tested it and works as expected and it also simplifies the workflow compared to only working with phasor_form_lifetime
at multiple frequencies.
I know that it is in the description of the function that works with phasors at the semicircle and that later in the real
parameter it is stated that it must be monoexponential, but I feel it may lead up to some confusion and someone will try to use it for multi-exponential phasors as they may think the function is for other uses due to the given name. Maybe add a short line in the description also that it will only work with single exponential phasors?
Thanks for testing. I think you are right, there should be a sentence or two describing in little more detail. What about the function name, |
I thought about the name of the function but also couldn't think of a better one without it being too long. I think we can use this and maybe add a check to see if the phasor is located at the semicircle and if not raise an error? |
Note that the function only takes the real part of the phasor coordinates as an input. The imaginary part is implied, assumed to be on the semicircle. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. Then I think the users should use it with caution, but now the description is very explicit on the subject, so it should be OK.
Description
This PR adds a convenience function,
phasor_at_harmonic
, which calculates, given the real component of phasor coordinates of a single exponential lifetime at a certain harmonic, the phasor coordinates at other harmonics. It is implemented as a numpy ufunc in Cython.Release note
Summarize the changes in the code block below to be included in the
release notes:
Checklist