@@ -27,7 +27,7 @@ def __init__(self):
2727 self .full_data = self ._combine_all_data ()
2828 self ._do_indexing ()
2929
30- def _get_nubase_datafile (self , year : int ) -> str :
30+ def _get_nubase_datafile (self , year : int ) -> pathlib . Path :
3131 """Use the given year to locate the nubase mass table file and return the absolute path."""
3232 nubase_mass = self .data_path / pathlib .Path (str (year ))
3333 nubase_mass = nubase_mass .resolve ()
@@ -38,12 +38,12 @@ def _get_nubase_datafile(self, year: int) -> str:
3838 nubase_mass = nubase_mass / "nubtab12.asc"
3939 elif year == 2016 :
4040 nubase_mass = nubase_mass / "nubase2016.txt"
41- elif year == 2020 :
41+ else : # year == 2020:
4242 nubase_mass = nubase_mass / "nubase_1.mas20"
4343
4444 return nubase_mass
4545
46- def _get_ame_datafiles (self , year : int ) -> typing .Tuple [str , str , str ]:
46+ def _get_ame_datafiles (self , year : int ) -> typing .Tuple [pathlib . Path , pathlib . Path , pathlib . Path ]:
4747 """Use the given year to locate the 3 AME data file and return the absolute path."""
4848 data_dir = self .data_path / pathlib .Path (str (year ))
4949 data_dir = data_dir .resolve ()
@@ -60,7 +60,7 @@ def _get_ame_datafiles(self, year: int) -> typing.Tuple[str, str, str]:
6060 ame_mass = data_dir / "mass16.txt"
6161 ame_reaction_1 = data_dir / "rct1-16.txt"
6262 ame_reaction_2 = data_dir / "rct2-16.txt"
63- elif year == 2020 :
63+ else : # year == 2020:
6464 ame_mass = data_dir / "mass.mas20"
6565 ame_reaction_1 = data_dir / "rct1.mas20"
6666 ame_reaction_2 = data_dir / "rct2.mas20"
@@ -107,7 +107,7 @@ def _combine_all_data(self) -> pd.DataFrame:
107107 df .loc [(df .Symbol == "C" ) & (df .A == 12 ), "NubaseRelativeError" ] = 0.0
108108 df .loc [(df .Symbol == "C" ) & (df .A == 12 ), "AMERelativeError" ] = 0.0
109109
110- # 198Au has a typo in it's decay mode in the 2012 table. It is down as '-'
110+ # 198Au has a typo in it's decay mode in the 2012 table. It is recorded as '-'
111111 df .loc [(df .A == 198 ) & (df .Z == 79 ) & (df .TableYear == 2012 ), 'Decay' ] = "B-"
112112
113113 return df
0 commit comments