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 when dilution factor is greater than one #133

Closed
orbitfold opened this issue Apr 27, 2014 · 4 comments · Fixed by #134
Closed

Error when dilution factor is greater than one #133

orbitfold opened this issue Apr 27, 2014 · 4 comments · Fixed by #134

Comments

@orbitfold
Copy link
Contributor

This configuration http://pastebin.com/XyTnTMN9
Gives the following TARDIS output:

tardis.plasma_array - WARNING - Dilution factor greater than 1.
Traceback (most recent call last):
  File "/usr/local/bin/tardis", line 5, in <module>
    pkg_resources.run_script('tardis-sn==0.9.2.dev0878', 'tardis')
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 528, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1394, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/tardis_sn-0.9.2.dev0878-py2.7-linux-x86_64.egg/EGG-INFO/scripts/tardis", line 64, in <module>
    simulation.run_radial1d(radial1d_mdl)
  File "/usr/local/lib/python2.7/dist-packages/tardis_sn-0.9.2.dev0878-py2.7-linux-x86_64.egg/tardis/simulation.py", line 27, in run_radial1d
    initialize_j_blues=initialize_j_blues)
  File "/usr/local/lib/python2.7/dist-packages/tardis_sn-0.9.2.dev0878-py2.7-linux-x86_64.egg/tardis/model.py", line 335, in simulate
    self.update_plasmas(initialize_nlte=initialize_nlte)
  File "/usr/local/lib/python2.7/dist-packages/tardis_sn-0.9.2.dev0878-py2.7-linux-x86_64.egg/tardis/model.py", line 237, in update_plasmas
    initialize_nlte=initialize_nlte)
  File "/usr/local/lib/python2.7/dist-packages/tardis_sn-0.9.2.dev0878-py2.7-linux-x86_64.egg/tardis/plasma_array.py", line 233, in update_radiationfield
    phis = self.calculate_saha()
  File "/usr/local/lib/python2.7/dist-packages/tardis_sn-0.9.2.dev0878-py2.7-linux-x86_64.egg/tardis/plasma_array.py", line 381, in calculate_saha_nebular
    zeta[np.isnan(zeta)] = 1.0
UnboundLocalError: local variable 'zeta' referenced before assignment
@wkerzendorf
Copy link
Member

@orbitfold can you add the traceback to the description? and maybe the file's pastebin id.

@orbitfold
Copy link
Contributor Author

Yes, I did. I accidentally pushed the button to create the issue too soon :)

@wkerzendorf
Copy link
Member

@orbitfold So I've looked at line 381 in plasma_array.py and it seems to me that it should not end with a finally but an else statement. Nonetheless, this should raise an exception. Can you make the change and try it out?

@orbitfold
Copy link
Contributor Author

If I change it to else the error becomes this:

tardis.plasma_array - WARNING - Dilution factor greater than 1.
Traceback (most recent call last):
  File "/usr/local/bin/tardis", line 5, in <module>
    pkg_resources.run_script('tardis-sn==0.9.2.dev0887', 'tardis')
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 528, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1394, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/tardis_sn-0.9.2.dev0887-py2.7-linux-x86_64.egg/EGG-INFO/scripts/tardis", line 64, in <module>
    simulation.run_radial1d(radial1d_mdl)
  File "/usr/local/lib/python2.7/dist-packages/tardis_sn-0.9.2.dev0887-py2.7-linux-x86_64.egg/tardis/simulation.py", line 27, in run_radial1d
    initialize_j_blues=initialize_j_blues)
  File "/usr/local/lib/python2.7/dist-packages/tardis_sn-0.9.2.dev0887-py2.7-linux-x86_64.egg/tardis/model.py", line 335, in simulate
    self.update_plasmas(initialize_nlte=initialize_nlte)
  File "/usr/local/lib/python2.7/dist-packages/tardis_sn-0.9.2.dev0887-py2.7-linux-x86_64.egg/tardis/model.py", line 237, in update_plasmas
    initialize_nlte=initialize_nlte)
  File "/usr/local/lib/python2.7/dist-packages/tardis_sn-0.9.2.dev0887-py2.7-linux-x86_64.egg/tardis/plasma_array.py", line 233, in update_radiationfield
    phis = self.calculate_saha()
  File "/usr/local/lib/python2.7/dist-packages/tardis_sn-0.9.2.dev0887-py2.7-linux-x86_64.egg/tardis/plasma_array.py", line 377, in calculate_saha_nebular
    raise ValueError('Outside of interpolation area %s' % self.t_rads)
ValueError: Outside of interpolation area [ 47674.02875397  44809.43872883  43480.13644669  42615.63359211
  41824.07749321  41203.94041772  40660.59942057  40218.03888823
  39752.21122867  39381.50635188  38968.17077627  38498.05072774
  38108.9590666   37724.1224215   37296.57103411  36835.96318205
  36448.17285856  36001.16907236  35459.15007064  34566.39234454]

wkerzendorf added a commit to wkerzendorf/tardis that referenced this issue Apr 28, 2014
wkerzendorf added a commit to wkerzendorf/tardis that referenced this issue Apr 28, 2014
@ssim ssim closed this as completed in #134 Apr 28, 2014
wkerzendorf added a commit to wkerzendorf/tardis that referenced this issue Apr 30, 2014
wkerzendorf added a commit to wkerzendorf/tardis that referenced this issue Apr 30, 2014
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

Successfully merging a pull request may close this issue.

2 participants