diff options
author | Karl Berry <karl@freefriends.org> | 2016-01-08 00:03:11 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-01-08 00:03:11 +0000 |
commit | e6cd0f91db8da2a477425aeeac70568b3702c6c0 (patch) | |
tree | 416f793db33a7a2a0e40e0e339b6bbfa8f82c76f /Master/texmf-dist/tex/latex/nucleardata | |
parent | 42af20fa9b4836de5fd19cb86d1ac6cc125b8480 (diff) |
nucleardata (7jan16)
git-svn-id: svn://tug.org/texlive/trunk@39306 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/nucleardata')
-rw-r--r-- | Master/texmf-dist/tex/latex/nucleardata/nucleardata.pytxcode | 9 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/nucleardata/nucleardata.sty | 19 |
2 files changed, 14 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/latex/nucleardata/nucleardata.pytxcode b/Master/texmf-dist/tex/latex/nucleardata/nucleardata.pytxcode index 8febc57a607..29f15e528d7 100644 --- a/Master/texmf-dist/tex/latex/nucleardata/nucleardata.pytxcode +++ b/Master/texmf-dist/tex/latex/nucleardata/nucleardata.pytxcode @@ -58,7 +58,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] @@ -142,7 +142,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': @@ -175,7 +175,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': @@ -293,8 +293,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()] 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'. |