-
-
Notifications
You must be signed in to change notification settings - Fork 409
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
Fixes #830 #832
Fixes #830 #832
Conversation
The Before proceeding, we should discuss our options, @wkerzendorf |
I would suggest the following: def read_density_file(filename, filetype):
file_parsers = {'artis': read_artis_density,
'simple_ascii': read_simple_ascii_density,
'cmfgen_model': read_cmfgen_density}
...
def read_abundances_file(abundance_filename, abundance_filetype,
file_parsers = {'simple_ascii': read_simple_ascii_abundances,
'artis': read_simple_ascii_abundances,
'cmfgen_model': read_cmfgen_composition,
'simple_csv': read_csv_composition} def read_csv_isotope_abundance(self, delimiter="\+s", skip_columns=0):
...
for element_symbol_string in df.index[skip_columns:]:
... def read_cmfgen_composition(self, delimiter="\+s"):
return self.read_csv_isotope_abundance(delimiter=delimiter, skip_columns=4)
def read_csv_composition(self, delimiter="\+s"):
return self.read_csv_isotope_abundance(delimiter=delimiter, skip_columns=0) What do you think, @wkerzendorf ? |
I think we should rename the cmfgen thing. I think it should be standardized input that is useful for us and we can make something that converts it to our model. I'd like to chat on that on skype |
I still think that for now we should go with a quick fix on the lines that I've suggested. The CMFGEN format is quite specific. And standardizing the input is an undertaking that goes beyond the original scope of this PR. |
@unoebauer I think we misunderstand each other - the main thing I'm suggesting is to drop the CMFgen name - as it is not true at the moment. I'll try to catch you online to discuss. |
The tests should pass now (checked in offline on my laptop). If Travis is happy, I'd say that this PR is ready for merging. What do you think, @wkerzendorf ? |
@unoebauer very nice PR (feature; docu + tests - dass ich das noch erleben darf). Doesn't pass - you need to add the file in the package template |
I see, I forgot to update the tests in |
Fixed a few outstanding issues - the complete test suite now passes locally. Hopefully Travis is happy now as well. |
This PR implements changes to the parsers of the various composition files to address #830.