diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/nucleardata/nucleardata.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/nucleardata/nucleardata.sty | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Master/texmf-dist/tex/latex/nucleardata/nucleardata.sty b/Master/texmf-dist/tex/latex/nucleardata/nucleardata.sty index af4fab435e7..28b811e8755 100644 --- a/Master/texmf-dist/tex/latex/nucleardata/nucleardata.sty +++ b/Master/texmf-dist/tex/latex/nucleardata/nucleardata.sty @@ -17,7 +17,7 @@ %% %% ---------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{nucleardata}[2015/11/18 v1.01 LaTeX package for providing basic nuclear properties to documents efficiently] +\ProvidesPackage{nucleardata}[2015/01/06 v1.01b LaTeX package for providing basic nuclear properties to documents efficiently] \RequirePackage{pythontex} \RequirePackage{siunitx} @@ -81,7 +81,7 @@ class Nucdata(object): "Gy":1e-9} def timeenergy(self,ene): - return hbarev*0.69315/ene/time_dict.get("s") + return hbarev*0.69315/ene/self.time_dict.get("s") def getNuclide(self,EL,A): res=[v for v in nucleardata if v.get('SYM').strip().upper()== EL.upper() and v.get('A') == A] @@ -165,7 +165,7 @@ class Nucdata(object): unit = value[1].strip() if newunit: # user wants to change the unit if unit in ['ev','kev','mev']: - number=timeenergy(number) + number=self.timeenergy(number) if unit=='kev': number=number/1.e3 elif unit=='mev': @@ -198,7 +198,7 @@ class Nucdata(object): unit = value[1].strip() if newunit: # user wants to change the unit if unit in ['ev','kev','mev']: - number=timeenergy(number) + number=self.timeenergy(number) if unit=='kev': number=number/1.e3 elif unit=='mev': @@ -316,8 +316,7 @@ class Nucdata(object): isotopes=[] for v in res: isotopes.append(int(v.get('A'))) - isostring=str(isotopes)[1:-1] - return isostring + return isotopes def getZ(self,name): res=[v for v in elementdata if v.get('SYM').strip().upper()== name.upper() or v.get('NAME').strip().upper()== name.upper()] @@ -430,7 +429,7 @@ nuc=Nucdata() \newcommand{\nucbea}[3][3]{\py{round(nuc.getBea('#2',#3)/1000.,#1)}} -\newcommand{\nucisotopes}[1]{\py{nuc.getIsotopes('#1')}} +\newcommand{\nucisotopes}[1]{\py{str(nuc.getIsotopes('#1'))[1:-1]}} \newcommand{\nucreactionqu}[9][3]{\py{round(nuc.getReaction_u('#2',#3,'#4',#5,'#6',#7,'#8',#9),#1)}} @@ -438,7 +437,7 @@ nuc=Nucdata() \newcommand{\nucreactionqkev}[9][3]{\py{round(nuc.getReaction_kev('#2',#3,'#4',#5,'#6',#7,'#8',#9),#1)}} \endinput -%% Copyright (C) 2015 by Bill Nettles <bnettles@uu.edu> +%% Copyright (C) 2015-2016 by Bill Nettles <bnettles@uu.edu> %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License (LPPL), either @@ -455,6 +454,8 @@ nuc=Nucdata() %% nucleardata.pdf, %% nucleardata.sty, %% elementlist.csv, -%% massdata.csv +%% massdata.csv, +%% nuccommandtest.tex, +%% nuccommandtext.pdf %% %% End of file `nucleardata.sty'. |