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

Clarification of boundary_conditions() example #59

Open
dieterjansen opened this issue Jan 22, 2019 · 2 comments
Open

Clarification of boundary_conditions() example #59

dieterjansen opened this issue Jan 22, 2019 · 2 comments
Milestone

Comments

@dieterjansen
Copy link

Thank you for your work on pyhht.

I have been working with the code and do not understand some results I am seeing.

When working through the boundary_conditions() example I got:

>>> from pyhht.utils import boundary_conditions
>>> import numpy as np
>>> signal = np.array([-1, 1, -1, 1, -1])
>>> tmin, tmax, vmin, vmax = boundary_conditions(signal, np.arange(5))
>>> tmin
array([-2,  2,  6])
>>> tmax
array([-3, -1,  1,  3,  5,  7])
>>> vmin
array([-1, -1, -1])
>>> vmax
array([1, 1, 1, 1, 1, 1])

Which agrees with your example.

I would have thought that tmin should be [-2, 0, 2, 4, 6] and vmin should be [-1, -1, -1, -1, -1] - am I misunderstanding?

@jaidevd
Copy link
Owner

jaidevd commented May 2, 2019

Hi @dieterjansen

I'm sorry I couldn't look at this all this time, and thanks for pointing this out. Indeed, this does not make sense. I'll try to find out why I wrote that example, and see how we can fix it.

@dieterjansen
Copy link
Author

dieterjansen commented May 2, 2019 via email

@jaidevd jaidevd added this to the 0.2 Release milestone Jan 11, 2021
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

2 participants