Closed moukaddam closed 8 years ago
agreed - will swap these in soon.
Alright, updated with new masses; couple of points:
dataStore.masses[8]['16']
at the console prompt; this is keyed as Z, A, so the above should print the mass of oxygen 16 in amu. edit: there's now a test suite, see below; please add checks there.data/parseMass.py
; feel free to have a look and double check the parsing logic (it's very short).parseMass.py
into a full parser for this format, if it is popular enough.oh also - do let me know when you're happy with this new data; I'd like to stamp a release and DOI so we can start using this for real calculations.
update: there is now a mini test suite to go with the mass table parsing, in data/test-parse.py
. Run it with nosetests test-parse.py
, and follow the examples in there to add any additional checks you'd like to see in order to confirm the parsing is correct.
All good from this end, added some extra tests.
1/ test in console, passed 2/ script checked, all good. 3/ For the mass table mass.masxx, the format should be the same, however the publication has other files that unfortunately doesn't follow the same field lengths. cf https://www-nds.iaea.org/amdc/ame2012/rct1.mas12 for reaction data for example, the field used for the mass quantity in mass.mas12 comprises two quantities.
concerning the contaminant tool itself, the results were crossed check with the old masses one, values match.
3/ sure, but what I was more asking is is parsing the mass.masxx format a common problem - the parser I wrote for this issue is a quick hack to get this tool working, but if mass.masxx is really popular, it might be worth making a more formal, stand-alone parser for it, since it is a bit ugly as-is. Anyway, not an emergency - just thinking about holiday side-projects :)
We can use the new Atomic Mass Evaluation by Audi et al. Although I doubt it will lead to any important changes.
http://amdc.impcas.ac.cn/evaluation/data2012/ame.html