-
Notifications
You must be signed in to change notification settings - Fork 163
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
[BUG] bisect returning ValueError: f(a) and f(b) must have different signs #79
Comments
Thanks for reporting this issue. In this case, the error is caused because the probability of occurrence of this event (attenuation > 30 for the 2.6 km path) is 0. I will correct the code accordingly. |
This has been fixed now in master. |
Thanks! I tried using this function as it an example to obtain the link availabilty (100 - inverse_rain_attenuation). To get the fade depth, this is the formula I used (I'd appreciate if it is correct): fd = TX power + antenna gains (both) - receiver sensitivity - 20log10(4pidistance / wavelength) |
The method returns the probability of the fade due to rain to exceed the value. The value of Ap is not the total fade (including FSPL) but just the attenuation due to rain events. Try small values of Ap (1dB, 2dB) and see if that gives you a non-zero value. |
I tried using Ap small values as you mentioned but the results are the same (0). If Ap value is the attenuation due to rain events, then the resulting value from rain_attenuation (I have to calculate both horizontal and vertical polarization) is a valid value (though that value is not small as im getting 27 and 28 dBm)? |
Im trying to use inverse_rain_attenuation function from ITU-R P.530 but I'm getting this error:
File "./lib/link_budget.py", line 341, in inverse_rain_attenuation return bisect(func_bisect, 0.000001, 100) File ".venv/lib/python3.10/site-packages/scipy/optimize/_zeros_py.py", line 557, in bisect r = _zeros._bisect(f, a, b, xtol, rtol, maxiter, args, full_output, disp) ValueError: f(a) and f(b) must have different signs
Here is an example:
Thanks in advance
The text was updated successfully, but these errors were encountered: