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

work on gui fixing #75

Merged
merged 1 commit into from
Jan 31, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions tardis/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from matplotlib.backends.backend_qt4 import NavigationToolbar2QT as NavigationToolbar
from PyQt4 import QtGui, QtCore
from astropy import units as u
from tardis import analysis, config_reader
from tardis import analysis, util

# def current_ion_index(index, index_list):
# if not index in index_list:
Expand Down Expand Up @@ -311,10 +311,12 @@ def __init__(self, line_interaction_analysis, atom_data, description):
self.atom_data = atom_data
line_interaction_species_group = line_interaction_analysis.last_line_in.groupby(['atomic_number', 'ion_number'])
self.species_selected = sorted(line_interaction_species_group.groups.keys())
species_symbols = [config_reader.species_tuple_to_string(item, atom_data) for item in self.species_selected]
species_symbols = [util.species_tuple_to_string(item, atom_data) for item in self.species_selected]
species_table_model = SimpleTableModel([species_symbols, ['Species']])
species_table_model.addData((line_interaction_species_group.wavelength.count().astype(float) /
line_interaction_analysis.last_line_in.wavelength.count()).tolist())
species_abundances = (line_interaction_species_group.wavelength.count().astype(float) /
line_interaction_analysis.last_line_in.wavelength.count()).astype(float).tolist()
species_abundances = map(float, species_abundances)
species_table_model.addData(species_abundances)
self.species_table.setModel(species_table_model)

line_interaction_species_group.wavelength.count()
Expand Down