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

Problem with stratified models using Decay of isotopes branch #801 #804

Closed
pfreddy opened this issue Nov 14, 2017 · 3 comments
Closed

Problem with stratified models using Decay of isotopes branch #801 #804

pfreddy opened this issue Nov 14, 2017 · 3 comments

Comments

@pfreddy
Copy link
Contributor

pfreddy commented Nov 14, 2017

I've tried to run TARDIS with the new decoy branch #801 according to the tardis_model_format (see tardis/io/tests/data/tardis_configv1_tardis_model_format.yml and tardis_model_format.csv). The code stopped with the error message:

File "/home/barna/Code/tardis/tardis/io/decay.py", line 27, in from_materials
multi_index_tuples, names=['atomic_number', 'mass_number'])
File "/home/barna/anaconda3/envs/tardis/lib/python2.7/site-packages/pandas/core/indexes/multi.py", line 1138, in from_tuples
raise TypeError('Cannot infer number of levels from empty list')
TypeError: Cannot infer number of levels from empty list

However, using uniform abundances (tardis/io/tests/data/tardis_configv1_isotope_uniabund.yml) works fine.

@pfreddy
Copy link
Contributor Author

pfreddy commented Nov 15, 2017

It seems the problem is the half-empty list of 'materials'. It contains information about each of the velocity shells, but each element is the same:

pyne.material.Material({}, nan, -1.0, 0.0, {})

issue_804.tar.gz

@pfreddy
Copy link
Contributor Author

pfreddy commented Nov 15, 2017

The list 'material' always uses the isotope ratio of the last velocity shell. The root of this problem is in the function called 'to_materials(self)' in decay.py (line 47). Here, the abundance storing 'comp_dicts' is a dictionary, thus, the abundances are overwritten in ALL velocity shells whenever the code meets the same nuclear_symbol. As a result, the last abundances appear everywhere.

As a further issue, the code probably cannot handle if there are no isotopes in certain velocity shell (see the error message above).

@pfreddy pfreddy changed the title Problem with stratified models using of Decay of isotopes branch #801 Problem with stratified models using Decay of isotopes branch #801 Nov 15, 2017
@unoebauer
Copy link
Contributor

Presumably fixed by #806. Closing - reopen if error persists

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

2 participants