pyhht icon indicating copy to clipboard operation
pyhht copied to clipboard

Clarification of boundary_conditions() example

Open dieterjansen opened this issue 6 years ago • 2 comments

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?

dieterjansen avatar Jan 22 '19 23:01 dieterjansen

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.

jaidevd avatar May 02 '19 09:05 jaidevd

Thanks Jaidev – that would be great.

I’m sorry I didn’t have the skills to suggest a resolution.

Cheers, Dieter.

From: Jaidev Deshpande Sent: Thursday, May 2, 2019 7:28 PM To: jaidevd/pyhht Cc: dieterjansen ; Mention Subject: Re: [jaidevd/pyhht] Clarification of boundary_conditions() example (#59)

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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

dieterjansen avatar May 02 '19 10:05 dieterjansen