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

Overflow Error in core.parameters.FiberParameters #496

Open
akhil-mutike opened this issue Feb 19, 2024 · 0 comments
Open

Overflow Error in core.parameters.FiberParameters #496

akhil-mutike opened this issue Feb 19, 2024 · 0 comments

Comments

@akhil-mutike
Copy link

Describe the bug
FiberParameters takes effective area and Gamma as Keyword arguments(there are many more).Whenever the Effective area and gamma are given as None ,the module uses some default values and doesn't produce any errors.But whenever a value is provided for gamma(for example gamma:1.3) or for effective area, It is producing an Over flow error

To Reproduce
Steps to reproduce the behavior:
Execute the following script

from gnpy.core.parameters import  FiberParams
from gnpy.core.utils import lin2db, db2lin
FiberParams(length=80,length_units='km',con_in=0,con_out=0,dispersion=1.7*(10**-5),dispersion_slope=None,gamma=1.3,pmd_coef=0,loss_coef=db2lin(0.2)``` 
The following output pops out:
```shell
C:\Users\admin\PycharmProjects\gnpy_api_exploration\oopt-gnpy\gnpy\core\parameters.py:210: RuntimeWarning: overflow encountered in scalar power
  self._contrast = 0.5 * (c / (2 * pi * self._ref_frequency * self._core_radius * self._n1) * exp(

Expected behavior
It is supposed to generate a FiberParams object without any error

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

1 participant