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

Error using the math.inf in atmosphere.py #86

Open
wiless opened this issue Jan 5, 2018 · 0 comments
Open

Error using the math.inf in atmosphere.py #86

wiless opened this issue Jan 5, 2018 · 0 comments
Assignees
Labels

Comments

@wiless
Copy link

wiless commented Jan 5, 2018

  • SHARC version: (development branch) at commit aba88b7
  • Python version: Python 3.4.2
  • Operating System: Debian 3.16.43

Description

Trying to run through main_cli.py with parameter.ini

What I Did

Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.

~/SHARC/sharc$ python3 main_cli.py parameters/parameters.ini 
Traceback (most recent call last):
  File "main_cli.py", line 54, in <module>
    main(sys.argv[1:])
  File "main_cli.py", line 49, in main
    view_cli.initialize(param_file)
  File "../sharc/gui/view_cli.py", line 27, in initialize
    param_file = param_file)
  File "../sharc/controller.py", line 49, in action
    self.simulation_thread.run()        
  File "/home/ssk/SHARC/sharc/thread_simulation.py", line 53, in run
    self.model.initialize()
  File "../sharc/model.py", line 48, in initialize
    self.simulation = SimulationDownlink(self.parameters)
  File "../sharc/simulation_downlink.py", line 21, in __init__
    super().__init__(parameters)
  File "../sharc/simulation.py", line 48, in __init__
    self.propagation_system = PropagationFactory.createPropagation(self.param_system.channel_model, self.parameters)
  File "../sharc/propagation/propagation_factory.py", line 41, in createPropagation
    return PropagationP619()
  File "../sharc/propagation/propagation_p619.py", line 32, in __init__
    self.scintillation = Scintillation()
  File "../sharc/propagation/scintillation.py", line 21, in __init__
    self.atmosphere = ReferenceAtmosphere()
  File "../sharc/propagation/atmosphere.py", line 17, in __init__
    self.ref_atmosphere_altitude_km = [-math.inf, 11, 20, 32, 47, 51, 71]
AttributeError: 'module' object has no attribute 'inf'

I was able to run by this fix though

@@ -14,7 +14,7 @@ class ReferenceAtmosphere:
     """
     def __init__(self):
         # Table C.1 of ITU-R P619 - Constants for the reference dry atmosphere
-        self.ref_atmosphere_altitude_km = [-math.inf, 11, 20, 32, 47, 51, 71]
+        self.ref_atmosphere_altitude_km = [-float('inf'), 11, 20, 32, 47, 51, 71]
@edgar-souza edgar-souza self-assigned this Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
SHARC development
Awaiting triage
Development

No branches or pull requests

2 participants