In [1]:
import matplotlib.pyplot as plt
import matplotlib
import numpy as np
matplotlib.rcParams['figure.figsize']=[12,8]
matplotlib.rcParams['font.size']=20

import medusa.chem.chem_lib as chem_lib
from medusa.chem.chem_lib import ISOTOPE_DATA
from medusa.const.const_lib import *

chem Module

The chem module provides a simple interface to read isotope data and metal abundance files. In particular, the ISOTOPE_DATA variable contains a dictionary with masses (in AMU), atomic numbers and mass numbers of multiple isotopes.


In [2]:
ISOTOPE_DATA


Out[2]:
{'ac227': {'am': 227.0277523, 'an': 89, 'mn': 227},
 'ag107': {'am': 106.9050916, 'an': 47, 'mn': 107},
 'ag109': {'am': 108.9047553, 'an': 47, 'mn': 109},
 'al27': {'am': 26.98153853, 'an': 13, 'mn': 27},
 'am241': {'am': 241.0568293, 'an': 95, 'mn': 241},
 'am243': {'am': 243.0613813, 'an': 95, 'mn': 243},
 'ar36': {'am': 35.967545105, 'an': 18, 'mn': 36},
 'ar38': {'am': 37.96273211, 'an': 18, 'mn': 38},
 'ar40': {'am': 39.9623831237, 'an': 18, 'mn': 40},
 'as75': {'am': 74.92159457, 'an': 33, 'mn': 75},
 'at210': {'am': 209.9871479, 'an': 85, 'mn': 210},
 'at211': {'am': 210.9874966, 'an': 85, 'mn': 211},
 'au197': {'am': 196.96656879, 'an': 79, 'mn': 197},
 'b10': {'am': 10.01293695, 'an': 5, 'mn': 10},
 'b11': {'am': 11.00930536, 'an': 5, 'mn': 11},
 'ba130': {'am': 129.9063207, 'an': 56, 'mn': 130},
 'ba132': {'am': 131.9050611, 'an': 56, 'mn': 132},
 'ba134': {'am': 133.90450818, 'an': 56, 'mn': 134},
 'ba135': {'am': 134.90568838, 'an': 56, 'mn': 135},
 'ba136': {'am': 135.90457573, 'an': 56, 'mn': 136},
 'ba137': {'am': 136.90582714, 'an': 56, 'mn': 137},
 'ba138': {'am': 137.905247, 'an': 56, 'mn': 138},
 'be9': {'am': 9.012183065, 'an': 4, 'mn': 9},
 'bh272': {'am': 272.13826, 'an': 107, 'mn': 272},
 'bi209': {'am': 208.9803991, 'an': 83, 'mn': 209},
 'bk247': {'am': 247.0703073, 'an': 97, 'mn': 247},
 'bk249': {'am': 249.0749877, 'an': 97, 'mn': 249},
 'br79': {'am': 78.9183376, 'an': 35, 'mn': 79},
 'br81': {'am': 80.9162897, 'an': 35, 'mn': 81},
 'c12': {'am': 12.0, 'an': 6, 'mn': 12},
 'c13': {'am': 13.00335483507, 'an': 6, 'mn': 13},
 'c14': {'am': 14.0032419884, 'an': 6, 'mn': 14},
 'ca40': {'am': 39.962590863, 'an': 20, 'mn': 40},
 'ca42': {'am': 41.95861783, 'an': 20, 'mn': 42},
 'ca43': {'am': 42.95876644, 'an': 20, 'mn': 43},
 'ca44': {'am': 43.95548156, 'an': 20, 'mn': 44},
 'ca46': {'am': 45.953689, 'an': 20, 'mn': 46},
 'ca48': {'am': 47.95252276, 'an': 20, 'mn': 48},
 'cd106': {'am': 105.9064599, 'an': 48, 'mn': 106},
 'cd108': {'am': 107.9041834, 'an': 48, 'mn': 108},
 'cd110': {'am': 109.90300661, 'an': 48, 'mn': 110},
 'cd111': {'am': 110.90418287, 'an': 48, 'mn': 111},
 'cd112': {'am': 111.90276287, 'an': 48, 'mn': 112},
 'cd113': {'am': 112.90440813, 'an': 48, 'mn': 113},
 'cd114': {'am': 113.90336509, 'an': 48, 'mn': 114},
 'cd116': {'am': 115.90476315, 'an': 48, 'mn': 116},
 'ce136': {'am': 135.90712921, 'an': 58, 'mn': 136},
 'ce138': {'am': 137.905991, 'an': 58, 'mn': 138},
 'ce140': {'am': 139.9054431, 'an': 58, 'mn': 140},
 'ce142': {'am': 141.9092504, 'an': 58, 'mn': 142},
 'cf249': {'am': 249.0748539, 'an': 98, 'mn': 249},
 'cf250': {'am': 250.0764062, 'an': 98, 'mn': 250},
 'cf251': {'am': 251.0795886, 'an': 98, 'mn': 251},
 'cf252': {'am': 252.0816272, 'an': 98, 'mn': 252},
 'cl35': {'am': 34.968852682, 'an': 17, 'mn': 35},
 'cl37': {'am': 36.965902602, 'an': 17, 'mn': 37},
 'cm243': {'am': 243.0613893, 'an': 96, 'mn': 243},
 'cm244': {'am': 244.0627528, 'an': 96, 'mn': 244},
 'cm245': {'am': 245.0654915, 'an': 96, 'mn': 245},
 'cm246': {'am': 246.0672238, 'an': 96, 'mn': 246},
 'cm247': {'am': 247.0703541, 'an': 96, 'mn': 247},
 'cm248': {'am': 248.0723499, 'an': 96, 'mn': 248},
 'cn285': {'am': 285.17712, 'an': 112, 'mn': 285},
 'co59': {'am': 58.93319429, 'an': 27, 'mn': 59},
 'cr50': {'am': 49.94604183, 'an': 24, 'mn': 50},
 'cr52': {'am': 51.94050623, 'an': 24, 'mn': 52},
 'cr53': {'am': 52.94064815, 'an': 24, 'mn': 53},
 'cr54': {'am': 53.93887916, 'an': 24, 'mn': 54},
 'cs133': {'am': 132.905451961, 'an': 55, 'mn': 133},
 'cu63': {'am': 62.92959772, 'an': 29, 'mn': 63},
 'cu65': {'am': 64.9277897, 'an': 29, 'mn': 65},
 'db268': {'am': 268.12567, 'an': 105, 'mn': 268},
 'ds281': {'am': 281.16451, 'an': 110, 'mn': 281},
 'dy156': {'am': 155.9242847, 'an': 66, 'mn': 156},
 'dy158': {'am': 157.9244159, 'an': 66, 'mn': 158},
 'dy160': {'am': 159.9252046, 'an': 66, 'mn': 160},
 'dy161': {'am': 160.9269405, 'an': 66, 'mn': 161},
 'dy162': {'am': 161.9268056, 'an': 66, 'mn': 162},
 'dy163': {'am': 162.9287383, 'an': 66, 'mn': 163},
 'dy164': {'am': 163.9291819, 'an': 66, 'mn': 164},
 'er162': {'am': 161.9287884, 'an': 68, 'mn': 162},
 'er164': {'am': 163.9292088, 'an': 68, 'mn': 164},
 'er166': {'am': 165.9302995, 'an': 68, 'mn': 166},
 'er167': {'am': 166.9320546, 'an': 68, 'mn': 167},
 'er168': {'am': 167.9323767, 'an': 68, 'mn': 168},
 'er170': {'am': 169.9354702, 'an': 68, 'mn': 170},
 'es252': {'am': 252.08298, 'an': 99, 'mn': 252},
 'eu151': {'am': 150.9198578, 'an': 63, 'mn': 151},
 'eu153': {'am': 152.921238, 'an': 63, 'mn': 153},
 'f19': {'am': 18.99840316273, 'an': 9, 'mn': 19},
 'fe54': {'am': 53.93960899, 'an': 26, 'mn': 54},
 'fe56': {'am': 55.93493633, 'an': 26, 'mn': 56},
 'fe57': {'am': 56.93539284, 'an': 26, 'mn': 57},
 'fe58': {'am': 57.93327443, 'an': 26, 'mn': 58},
 'fl289': {'am': 289.19042, 'an': 114, 'mn': 289},
 'fm257': {'am': 257.0951061, 'an': 100, 'mn': 257},
 'fr223': {'am': 223.019736, 'an': 87, 'mn': 223},
 'ga69': {'am': 68.9255735, 'an': 31, 'mn': 69},
 'ga71': {'am': 70.92470258, 'an': 31, 'mn': 71},
 'gd152': {'am': 151.9197995, 'an': 64, 'mn': 152},
 'gd154': {'am': 153.9208741, 'an': 64, 'mn': 154},
 'gd155': {'am': 154.9226305, 'an': 64, 'mn': 155},
 'gd156': {'am': 155.9221312, 'an': 64, 'mn': 156},
 'gd157': {'am': 156.9239686, 'an': 64, 'mn': 157},
 'gd158': {'am': 157.9241123, 'an': 64, 'mn': 158},
 'gd160': {'am': 159.9270624, 'an': 64, 'mn': 160},
 'ge70': {'am': 69.92424875, 'an': 32, 'mn': 70},
 'ge72': {'am': 71.922075826, 'an': 32, 'mn': 72},
 'ge73': {'am': 72.923458956, 'an': 32, 'mn': 73},
 'ge74': {'am': 73.921177761, 'an': 32, 'mn': 74},
 'ge76': {'am': 75.921402726, 'an': 32, 'mn': 76},
 'h1': {'am': 1.00782503223, 'an': 1, 'mn': 1},
 'h2': {'am': 2.01410177812, 'an': 1, 'mn': 2},
 'h3': {'am': 3.0160492779, 'an': 1, 'mn': 3},
 'he3': {'am': 3.0160293201, 'an': 2, 'mn': 3},
 'he4': {'am': 4.00260325413, 'an': 2, 'mn': 4},
 'hf174': {'am': 173.9400461, 'an': 72, 'mn': 174},
 'hf176': {'am': 175.9414076, 'an': 72, 'mn': 176},
 'hf177': {'am': 176.9432277, 'an': 72, 'mn': 177},
 'hf178': {'am': 177.9437058, 'an': 72, 'mn': 178},
 'hf179': {'am': 178.9458232, 'an': 72, 'mn': 179},
 'hf180': {'am': 179.946557, 'an': 72, 'mn': 180},
 'hg196': {'am': 195.9658326, 'an': 80, 'mn': 196},
 'hg198': {'am': 197.9667686, 'an': 80, 'mn': 198},
 'hg199': {'am': 198.96828064, 'an': 80, 'mn': 199},
 'hg200': {'am': 199.96832659, 'an': 80, 'mn': 200},
 'hg201': {'am': 200.97030284, 'an': 80, 'mn': 201},
 'hg202': {'am': 201.9706434, 'an': 80, 'mn': 202},
 'hg204': {'am': 203.97349398, 'an': 80, 'mn': 204},
 'ho165': {'am': 164.9303288, 'an': 67, 'mn': 165},
 'hs270': {'am': 270.13429, 'an': 108, 'mn': 270},
 'i127': {'am': 126.9044719, 'an': 53, 'mn': 127},
 'in113': {'am': 112.90406184, 'an': 49, 'mn': 113},
 'in115': {'am': 114.903878776, 'an': 49, 'mn': 115},
 'ir191': {'am': 190.9605893, 'an': 77, 'mn': 191},
 'ir193': {'am': 192.9629216, 'an': 77, 'mn': 193},
 'k39': {'am': 38.9637064864, 'an': 19, 'mn': 39},
 'k40': {'am': 39.963998166, 'an': 19, 'mn': 40},
 'k41': {'am': 40.9618252579, 'an': 19, 'mn': 41},
 'kr78': {'am': 77.92036494, 'an': 36, 'mn': 78},
 'kr80': {'am': 79.91637808, 'an': 36, 'mn': 80},
 'kr82': {'am': 81.91348273, 'an': 36, 'mn': 82},
 'kr83': {'am': 82.91412716, 'an': 36, 'mn': 83},
 'kr84': {'am': 83.9114977282, 'an': 36, 'mn': 84},
 'kr86': {'am': 85.9106106269, 'an': 36, 'mn': 86},
 'la138': {'am': 137.9071149, 'an': 57, 'mn': 138},
 'la139': {'am': 138.9063563, 'an': 57, 'mn': 139},
 'li6': {'am': 6.0151228874, 'an': 3, 'mn': 6},
 'li7': {'am': 7.0160034366, 'an': 3, 'mn': 7},
 'lr262': {'am': 262.10961, 'an': 103, 'mn': 262},
 'lu175': {'am': 174.9407752, 'an': 71, 'mn': 175},
 'lu176': {'am': 175.9426897, 'an': 71, 'mn': 176},
 'lv293': {'am': 293.20449, 'an': 116, 'mn': 293},
 'md258': {'am': 258.0984315, 'an': 101, 'mn': 258},
 'md260': {'am': 260.10365, 'an': 101, 'mn': 260},
 'mg24': {'am': 23.985041697, 'an': 12, 'mn': 24},
 'mg25': {'am': 24.985836976, 'an': 12, 'mn': 25},
 'mg26': {'am': 25.982592968, 'an': 12, 'mn': 26},
 'mn55': {'am': 54.93804391, 'an': 25, 'mn': 55},
 'mo100': {'am': 99.9074718, 'an': 42, 'mn': 100},
 'mo92': {'am': 91.90680796, 'an': 42, 'mn': 92},
 'mo94': {'am': 93.9050849, 'an': 42, 'mn': 94},
 'mo95': {'am': 94.90583877, 'an': 42, 'mn': 95},
 'mo96': {'am': 95.90467612, 'an': 42, 'mn': 96},
 'mo97': {'am': 96.90601812, 'an': 42, 'mn': 97},
 'mo98': {'am': 97.90540482, 'an': 42, 'mn': 98},
 'mt276': {'am': 276.15159, 'an': 109, 'mn': 276},
 'n14': {'am': 14.00307400443, 'an': 7, 'mn': 14},
 'n15': {'am': 15.00010889888, 'an': 7, 'mn': 15},
 'na23': {'am': 22.989769282, 'an': 11, 'mn': 23},
 'nb93': {'am': 92.906373, 'an': 41, 'mn': 93},
 'nd142': {'am': 141.907729, 'an': 60, 'mn': 142},
 'nd143': {'am': 142.90982, 'an': 60, 'mn': 143},
 'nd144': {'am': 143.910093, 'an': 60, 'mn': 144},
 'nd145': {'am': 144.9125793, 'an': 60, 'mn': 145},
 'nd146': {'am': 145.9131226, 'an': 60, 'mn': 146},
 'nd148': {'am': 147.9168993, 'an': 60, 'mn': 148},
 'nd150': {'am': 149.9209022, 'an': 60, 'mn': 150},
 'ne20': {'am': 19.9924401762, 'an': 10, 'mn': 20},
 'ne21': {'am': 20.993846685, 'an': 10, 'mn': 21},
 'ne22': {'am': 21.991385114, 'an': 10, 'mn': 22},
 'ni58': {'am': 57.93534241, 'an': 28, 'mn': 58},
 'ni60': {'am': 59.93078588, 'an': 28, 'mn': 60},
 'ni61': {'am': 60.93105557, 'an': 28, 'mn': 61},
 'ni62': {'am': 61.92834537, 'an': 28, 'mn': 62},
 'ni64': {'am': 63.92796682, 'an': 28, 'mn': 64},
 'no259': {'am': 259.10103, 'an': 102, 'mn': 259},
 'np236': {'am': 236.04657, 'an': 93, 'mn': 236},
 'np237': {'am': 237.0481736, 'an': 93, 'mn': 237},
 'o16': {'am': 15.99491461957, 'an': 8, 'mn': 16},
 'o17': {'am': 16.9991317565, 'an': 8, 'mn': 17},
 'o18': {'am': 17.99915961286, 'an': 8, 'mn': 18},
 'os184': {'am': 183.9524885, 'an': 76, 'mn': 184},
 'os186': {'am': 185.953835, 'an': 76, 'mn': 186},
 'os187': {'am': 186.9557474, 'an': 76, 'mn': 187},
 'os188': {'am': 187.9558352, 'an': 76, 'mn': 188},
 'os189': {'am': 188.9581442, 'an': 76, 'mn': 189},
 'os190': {'am': 189.9584437, 'an': 76, 'mn': 190},
 'os192': {'am': 191.961477, 'an': 76, 'mn': 192},
 'p31': {'am': 30.97376199842, 'an': 15, 'mn': 31},
 'pa231': {'am': 231.0358842, 'an': 91, 'mn': 231},
 'pb204': {'am': 203.973044, 'an': 82, 'mn': 204},
 'pb206': {'am': 205.9744657, 'an': 82, 'mn': 206},
 'pb207': {'am': 206.9758973, 'an': 82, 'mn': 207},
 'pb208': {'am': 207.9766525, 'an': 82, 'mn': 208},
 'pd102': {'am': 101.9056022, 'an': 46, 'mn': 102},
 'pd104': {'am': 103.9040305, 'an': 46, 'mn': 104},
 'pd105': {'am': 104.9050796, 'an': 46, 'mn': 105},
 'pd106': {'am': 105.9034804, 'an': 46, 'mn': 106},
 'pd108': {'am': 107.9038916, 'an': 46, 'mn': 108},
 'pd110': {'am': 109.9051722, 'an': 46, 'mn': 110},
 'pm145': {'am': 144.9127559, 'an': 61, 'mn': 145},
 'pm147': {'am': 146.915145, 'an': 61, 'mn': 147},
 'po209': {'am': 208.9824308, 'an': 84, 'mn': 209},
 'po210': {'am': 209.9828741, 'an': 84, 'mn': 210},
 'pr141': {'am': 140.9076576, 'an': 59, 'mn': 141},
 'pt190': {'am': 189.9599297, 'an': 78, 'mn': 190},
 'pt192': {'am': 191.9610387, 'an': 78, 'mn': 192},
 'pt194': {'am': 193.9626809, 'an': 78, 'mn': 194},
 'pt195': {'am': 194.9647917, 'an': 78, 'mn': 195},
 'pt196': {'am': 195.96495209, 'an': 78, 'mn': 196},
 'pt198': {'am': 197.9678949, 'an': 78, 'mn': 198},
 'pu238': {'am': 238.0495601, 'an': 94, 'mn': 238},
 'pu239': {'am': 239.0521636, 'an': 94, 'mn': 239},
 'pu240': {'am': 240.0538138, 'an': 94, 'mn': 240},
 'pu241': {'am': 241.0568517, 'an': 94, 'mn': 241},
 'pu242': {'am': 242.0587428, 'an': 94, 'mn': 242},
 'pu244': {'am': 244.0642053, 'an': 94, 'mn': 244},
 'ra223': {'am': 223.0185023, 'an': 88, 'mn': 223},
 'ra224': {'am': 224.020212, 'an': 88, 'mn': 224},
 'ra226': {'am': 226.0254103, 'an': 88, 'mn': 226},
 'ra228': {'am': 228.0310707, 'an': 88, 'mn': 228},
 'rb85': {'am': 84.9117897379, 'an': 37, 'mn': 85},
 'rb87': {'am': 86.909180531, 'an': 37, 'mn': 87},
 're185': {'am': 184.9529545, 'an': 75, 'mn': 185},
 're187': {'am': 186.9557501, 'an': 75, 'mn': 187},
 'rf267': {'am': 267.12179, 'an': 104, 'mn': 267},
 'rg280': {'am': 280.16514, 'an': 111, 'mn': 280},
 'rh103': {'am': 102.905498, 'an': 45, 'mn': 103},
 'rn211': {'am': 210.9906011, 'an': 86, 'mn': 211},
 'rn220': {'am': 220.0113941, 'an': 86, 'mn': 220},
 'rn222': {'am': 222.0175782, 'an': 86, 'mn': 222},
 'ru100': {'am': 99.9042143, 'an': 44, 'mn': 100},
 'ru101': {'am': 100.9055769, 'an': 44, 'mn': 101},
 'ru102': {'am': 101.9043441, 'an': 44, 'mn': 102},
 'ru104': {'am': 103.9054275, 'an': 44, 'mn': 104},
 'ru96': {'am': 95.90759025, 'an': 44, 'mn': 96},
 'ru98': {'am': 97.9052868, 'an': 44, 'mn': 98},
 'ru99': {'am': 98.9059341, 'an': 44, 'mn': 99},
 's32': {'am': 31.9720711744, 'an': 16, 'mn': 32},
 's33': {'am': 32.9714589098, 'an': 16, 'mn': 33},
 's34': {'am': 33.967867004, 'an': 16, 'mn': 34},
 's36': {'am': 35.96708071, 'an': 16, 'mn': 36},
 'sb121': {'am': 120.903812, 'an': 51, 'mn': 121},
 'sb123': {'am': 122.9042132, 'an': 51, 'mn': 123},
 'sc45': {'am': 44.95590828, 'an': 21, 'mn': 45},
 'se74': {'am': 73.922475934, 'an': 34, 'mn': 74},
 'se76': {'am': 75.919213704, 'an': 34, 'mn': 76},
 'se77': {'am': 76.919914154, 'an': 34, 'mn': 77},
 'se78': {'am': 77.91730928, 'an': 34, 'mn': 78},
 'se80': {'am': 79.9165218, 'an': 34, 'mn': 80},
 'se82': {'am': 81.9166995, 'an': 34, 'mn': 82},
 'sg271': {'am': 271.13393, 'an': 106, 'mn': 271},
 'si28': {'am': 27.97692653465, 'an': 14, 'mn': 28},
 'si29': {'am': 28.9764946649, 'an': 14, 'mn': 29},
 'si30': {'am': 29.973770136, 'an': 14, 'mn': 30},
 'sm144': {'am': 143.9120065, 'an': 62, 'mn': 144},
 'sm147': {'am': 146.9149044, 'an': 62, 'mn': 147},
 'sm148': {'am': 147.9148292, 'an': 62, 'mn': 148},
 'sm149': {'am': 148.9171921, 'an': 62, 'mn': 149},
 'sm150': {'am': 149.9172829, 'an': 62, 'mn': 150},
 'sm152': {'am': 151.9197397, 'an': 62, 'mn': 152},
 'sm154': {'am': 153.9222169, 'an': 62, 'mn': 154},
 'sn112': {'am': 111.90482387, 'an': 50, 'mn': 112},
 'sn114': {'am': 113.9027827, 'an': 50, 'mn': 114},
 'sn115': {'am': 114.903344699, 'an': 50, 'mn': 115},
 'sn116': {'am': 115.9017428, 'an': 50, 'mn': 116},
 'sn117': {'am': 116.90295398, 'an': 50, 'mn': 117},
 'sn118': {'am': 117.90160657, 'an': 50, 'mn': 118},
 'sn119': {'am': 118.90331117, 'an': 50, 'mn': 119},
 'sn120': {'am': 119.90220163, 'an': 50, 'mn': 120},
 'sn122': {'am': 121.9034438, 'an': 50, 'mn': 122},
 'sn124': {'am': 123.9052766, 'an': 50, 'mn': 124},
 'sr84': {'am': 83.9134191, 'an': 38, 'mn': 84},
 'sr86': {'am': 85.9092606, 'an': 38, 'mn': 86},
 'sr87': {'am': 86.9088775, 'an': 38, 'mn': 87},
 'sr88': {'am': 87.9056125, 'an': 38, 'mn': 88},
 'ta180': {'am': 179.9474648, 'an': 73, 'mn': 180},
 'ta181': {'am': 180.9479958, 'an': 73, 'mn': 181},
 'tb159': {'am': 158.9253547, 'an': 65, 'mn': 159},
 'tc97': {'am': 96.9063667, 'an': 43, 'mn': 97},
 'tc98': {'am': 97.9072124, 'an': 43, 'mn': 98},
 'tc99': {'am': 98.9062508, 'an': 43, 'mn': 99},
 'te120': {'am': 119.9040593, 'an': 52, 'mn': 120},
 'te122': {'am': 121.9030435, 'an': 52, 'mn': 122},
 'te123': {'am': 122.9042698, 'an': 52, 'mn': 123},
 'te124': {'am': 123.9028171, 'an': 52, 'mn': 124},
 'te125': {'am': 124.9044299, 'an': 52, 'mn': 125},
 'te126': {'am': 125.9033109, 'an': 52, 'mn': 126},
 'te128': {'am': 127.90446128, 'an': 52, 'mn': 128},
 'te130': {'am': 129.906222748, 'an': 52, 'mn': 130},
 'th230': {'am': 230.0331341, 'an': 90, 'mn': 230},
 'th232': {'am': 232.0380558, 'an': 90, 'mn': 232},
 'ti46': {'am': 45.95262772, 'an': 22, 'mn': 46},
 'ti47': {'am': 46.95175879, 'an': 22, 'mn': 47},
 'ti48': {'am': 47.94794198, 'an': 22, 'mn': 48},
 'ti49': {'am': 48.94786568, 'an': 22, 'mn': 49},
 'ti50': {'am': 49.94478689, 'an': 22, 'mn': 50},
 'tl203': {'am': 202.9723446, 'an': 81, 'mn': 203},
 'tl205': {'am': 204.9744278, 'an': 81, 'mn': 205},
 'tm169': {'am': 168.9342179, 'an': 69, 'mn': 169},
 'u233': {'am': 233.0396355, 'an': 92, 'mn': 233},
 'u234': {'am': 234.0409523, 'an': 92, 'mn': 234},
 'u235': {'am': 235.0439301, 'an': 92, 'mn': 235},
 'u236': {'am': 236.0455682, 'an': 92, 'mn': 236},
 'u238': {'am': 238.0507884, 'an': 92, 'mn': 238},
 'uuo294': {'am': 294.21392, 'an': 118, 'mn': 294},
 'uup288': {'am': 288.19274, 'an': 115, 'mn': 288},
 'uus292': {'am': 292.20746, 'an': 117, 'mn': 292},
 'uut284': {'am': 284.17873, 'an': 113, 'mn': 284},
 'v50': {'am': 49.94715601, 'an': 23, 'mn': 50},
 'v51': {'am': 50.94395704, 'an': 23, 'mn': 51},
 'w180': {'am': 179.9467108, 'an': 74, 'mn': 180},
 'w182': {'am': 181.94820394, 'an': 74, 'mn': 182},
 'w183': {'am': 182.95022275, 'an': 74, 'mn': 183},
 'w184': {'am': 183.95093092, 'an': 74, 'mn': 184},
 'w186': {'am': 185.9543628, 'an': 74, 'mn': 186},
 'xe124': {'am': 123.905892, 'an': 54, 'mn': 124},
 'xe126': {'am': 125.9042983, 'an': 54, 'mn': 126},
 'xe128': {'am': 127.903531, 'an': 54, 'mn': 128},
 'xe129': {'am': 128.9047808611, 'an': 54, 'mn': 129},
 'xe130': {'am': 129.903509349, 'an': 54, 'mn': 130},
 'xe131': {'am': 130.90508406, 'an': 54, 'mn': 131},
 'xe132': {'am': 131.9041550856, 'an': 54, 'mn': 132},
 'xe134': {'am': 133.90539466, 'an': 54, 'mn': 134},
 'xe136': {'am': 135.907214484, 'an': 54, 'mn': 136},
 'y89': {'am': 88.9058403, 'an': 39, 'mn': 89},
 'yb168': {'am': 167.9338896, 'an': 70, 'mn': 168},
 'yb170': {'am': 169.9347664, 'an': 70, 'mn': 170},
 'yb171': {'am': 170.9363302, 'an': 70, 'mn': 171},
 'yb172': {'am': 171.9363859, 'an': 70, 'mn': 172},
 'yb173': {'am': 172.9382151, 'an': 70, 'mn': 173},
 'yb174': {'am': 173.9388664, 'an': 70, 'mn': 174},
 'yb176': {'am': 175.9425764, 'an': 70, 'mn': 176},
 'zn64': {'am': 63.92914201, 'an': 30, 'mn': 64},
 'zn66': {'am': 65.92603381, 'an': 30, 'mn': 66},
 'zn67': {'am': 66.92712775, 'an': 30, 'mn': 67},
 'zn68': {'am': 67.92484455, 'an': 30, 'mn': 68},
 'zn70': {'am': 69.9253192, 'an': 30, 'mn': 70},
 'zr90': {'am': 89.9046977, 'an': 40, 'mn': 90},
 'zr91': {'am': 90.9056396, 'an': 40, 'mn': 91},
 'zr92': {'am': 91.9050347, 'an': 40, 'mn': 92},
 'zr94': {'am': 93.9063108, 'an': 40, 'mn': 94},
 'zr96': {'am': 95.9082714, 'an': 40, 'mn': 96}}

using this information we can calculate the binding energy of an atom $\rm X$,

$$E_{\rm bind,X}=\left(M_{\rm X}-M_{\rm p}Z-M_{\rm n}(A-Z)\right)m_{\rm u}c^2$$

where $M_{\rm X}$, $M_{\rm p}$, $M_{\rm e}$ and $M_{\rm n}$ are the masses in amu of atom X, a proton, an electron and a neutron, and $m_{\rm u}$ is the atomic mass unit. Plotting binding energy per nucleon shows that it peaks for iron, indication that energy can only be produced through fusion up to that point. Including the main isotopes involved in different nuclear burning stages, shows that the energy obtained per baryion of material burnt decreases significantly after hydrogen is depleted.


In [3]:
keys = [key for key in ISOTOPE_DATA.keys()]
#get some isotope indexes to plot then independently
ih1 = keys.index("h1")
ihe4 = keys.index("he4")
ic12 = keys.index("c12")
io16 = keys.index("o16")
ine22 = keys.index("ne22")
isi28 = keys.index("si28")
ife56 = keys.index("fe56")

atomic_nums = np.array([ISOTOPE_DATA[key]["an"] for key in keys])
atomic_masses = np.array([ISOTOPE_DATA[key]["am"] for key in keys])
mass_numbers = np.array([ISOTOPE_DATA[key]["mn"] for key in keys])

binding_energies = np.array([AMU*atomic_masses[i] - (MP+ME)*atomic_nums[i] - MN*(mass_numbers[i]-atomic_nums[i])
                    for i in range(len(atomic_nums))])*CLIGHT**2/(1e6*EV2ERG)
plt.gca().set_xlabel("Mass number")
plt.gca().set_ylabel("Binding energy per nucleon (MeV)")

plt.scatter(mass_numbers,-binding_energies/mass_numbers, label="All isotopes",alpha=0.1)
plt.scatter(mass_numbers[ih1],-binding_energies[ih1]/mass_numbers[ih1],
            marker="s", s=60, label="$^{1}$H")
plt.scatter(mass_numbers[ihe4],-binding_energies[ihe4]/mass_numbers[ihe4],
            marker="s", s=60, label="$^{4}$He")
plt.scatter(mass_numbers[ic12],-binding_energies[ic12]/mass_numbers[ic12],
            marker="s", s=60, label="$^{12}$C")
plt.scatter(mass_numbers[io16],-binding_energies[io16]/mass_numbers[io16],
            marker="s", s=60, label="$^{16}$O")
plt.scatter(mass_numbers[ine22],-binding_energies[ine22]/mass_numbers[ine22],
            marker="s", s=60, label="$^{22}$Ne")
plt.scatter(mass_numbers[isi28],-binding_energies[isi28]/mass_numbers[isi28],
            marker="s", s=60, label="$^{28}$Si")
plt.scatter(mass_numbers[ife56],-binding_energies[ife56]/mass_numbers[ife56],
            marker="s", s=60, label="$^{56}$Fe")

plt.legend(loc=4)
plt.show()


An additional simple exercise is to estimate the lifetime of the sun, given its mass and luminosity. Assuming a hydrogen mass fraction of $X=0.7$ at the zero age main sequence, and that through the main sequence the star burns $10\%$ of its hydrogen into helium, the lifetime is approximately given by

$$t_{\rm MS}=\frac{XM_{\odot}(4M_{\rm p}+2M_{\rm e}-M_{\rm He})c^2}{4M_{\rm p}L_\odot}.$$

Where $M_{\rm He}$ is the atomic weight of $^4$He. Let's calculate this.


In [4]:
0.1*0.7*MSUN*(4*MP+2*ME-ISOTOPE_DATA["he4"]["am"]*AMU)*CLIGHT**2/(4*MP*LSUN)/(1e9*SECYER)


Out[4]:
7.071694610560818

So the lifetime of the sun is expected to live close to $10~\rm Gyrs$. Note that atomic weights correspond to neutral atoms, so this should be equivalent to the following (barring small differences due to inconsistencies in the definition of MP and the atomic data)


In [5]:
0.1*0.7*MSUN*(4*ISOTOPE_DATA["h1"]["am"]*AMU-2*ME-ISOTOPE_DATA["he4"]["am"]*AMU)*CLIGHT**2/(4*MP*LSUN)/(1e9*SECYER)


Out[5]:
7.070777085786519

Reading abundance data

The method chem_lib.get_chem_data() reads in a data file containing abundance information, either in 12+log(na/nh) format or mass fractions. A set of default abundance files are stored in $MEDUSA_DIR/chem/data. Files stored in the current directory will take precedence, but if no file with the given name is found, it looks for it in the data folder.


In [15]:
abundances_data = chem_lib.get_chem_data('ags09.yaml')["abundances"]
keys = [key for key in abundances_data.keys()]
#get some isotope indexes to plot then independently
ili7 = keys.index("li7")
ic12 = keys.index("c12")
io16 = keys.index("o16")
isi28 = keys.index("si28")
ife56 = keys.index("fe56")

mass_numbers = np.array([ISOTOPE_DATA[key]["mn"] for key in keys])
abundances = [abundances_data[key] for key in keys]

plt.gca().set_xlabel("Mass number")
plt.gca().set_ylabel("Abundance")

plt.scatter(mass_numbers,abundances, label="All isotopes",alpha=0.3)
plt.scatter(mass_numbers[ili7],abundances[ili7],
            marker="s", s=60, label="$^{7}$Li")
plt.scatter(mass_numbers[ic12],abundances[ic12],
            marker="s", s=60, label="$^{12}$C")
plt.scatter(mass_numbers[io16],abundances[io16],
            marker="s", s=60, label="$^{16}$O")
plt.scatter(mass_numbers[isi28],abundances[isi28],
            marker="s", s=60, label="$^{28}$Si")
plt.scatter(mass_numbers[ife56],abundances[ife56],
            marker="s", s=60, label="$^{56}$Fe")

plt.legend(loc=1)
plt.show()