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

Add IsotopeDecayMode model and data #84

Merged
merged 6 commits into from
Oct 17, 2022
Merged

Conversation

lmmentel
Copy link
Owner

@lmmentel lmmentel commented Oct 15, 2022

Add new model for decay modes of isotopes and populate with data from NUBASE

In [1]: from mendeleev.models import Isotope, IsotopeDecayMode
In [2]: from mendeleev.db import get_session
In [3]: s = get_session()
In [4]: he = s.query(Isotope).filter_by(atomic_number=2, mass_number=6).one()
In [5]: he.decay_modes
Out[5]: 
[<IsotopeDecayMode(id=11, isotope_id=14, mode=B-, intensity=100.0)>,
 <IsotopeDecayMode(id=12, isotope_id=14, mode=B-d, intensity=0.000278)>]

Added new function for accessing isotopes by atomic and mass number or symbol and mass number

from mendeleev import isotope
isotope("Li", 11)

TODO:

  • documentation
  • tests

@lmmentel lmmentel self-assigned this Oct 15, 2022
@lmmentel lmmentel added data Data update enhancement New feature or request labels Oct 15, 2022
@lmmentel lmmentel merged commit 3ddf64c into master Oct 17, 2022
@lmmentel lmmentel deleted the enh/add-isotope-decay-mode branch October 17, 2022 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data Data update enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant