You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the Oversampling factor is set to a float with more than one decimal place, or a float less than 1, TLS fails because of an index error in the running_median function because a non-integer kernel is passed into running_median.
This happens when running_median is called through the spectra function, and can be reproduced by running:
fromtransitleastsquaresimporttransitleastsquaresimportnumpyasnp# Random noise timeseriest=np.linspace(0, 30, num=300)
data=np.random.normal(size=t.shape)*0.1+1model=transitleastsquares(t, data)
# Any oversampling factor with more than two decimal places will cause an errorresult=model.power(oversampling_factor=3.14)
Adding something like kernel = int(kernel) to the spectra function to ensure that the median filter kernel is an integer should fix this issue.
After submitting, I'm seeing that this was already discussed in the follow-ups to https://github.com/hippke/tls/issues/88, but it seems the bug is still outstanding.
Install Details:
MacOS, Python 3.10.7, TLS Version 1.0.31
The text was updated successfully, but these errors were encountered:
When the Oversampling factor is set to a float with more than one decimal place, or a float less than 1, TLS fails because of an index error in the
running_median
function because a non-integer kernel is passed intorunning_median
.This happens when
running_median
is called through thespectra
function, and can be reproduced by running:Adding something like
kernel = int(kernel)
to thespectra
function to ensure that the median filter kernel is an integer should fix this issue.After submitting, I'm seeing that this was already discussed in the follow-ups to https://github.com/hippke/tls/issues/88, but it seems the bug is still outstanding.
Install Details:
MacOS, Python 3.10.7, TLS Version 1.0.31
The text was updated successfully, but these errors were encountered: