summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/nucleardata/nucleardata.pdfbin283374 -> 285048 bytes
-rw-r--r--Master/texmf-dist/source/latex/nucleardata/nucleardata.dtx47
-rw-r--r--Master/texmf-dist/tex/latex/nucleardata/nucleardata.pytxcode2
-rw-r--r--Master/texmf-dist/tex/latex/nucleardata/nucleardata.sty4
4 files changed, 29 insertions, 24 deletions
diff --git a/Master/texmf-dist/doc/latex/nucleardata/nucleardata.pdf b/Master/texmf-dist/doc/latex/nucleardata/nucleardata.pdf
index 69ee8a41c30..5c01c6c0a7e 100644
--- a/Master/texmf-dist/doc/latex/nucleardata/nucleardata.pdf
+++ b/Master/texmf-dist/doc/latex/nucleardata/nucleardata.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/nucleardata/nucleardata.dtx b/Master/texmf-dist/source/latex/nucleardata/nucleardata.dtx
index 10af9baa488..ff41d194079 100644
--- a/Master/texmf-dist/source/latex/nucleardata/nucleardata.dtx
+++ b/Master/texmf-dist/source/latex/nucleardata/nucleardata.dtx
@@ -95,7 +95,7 @@ and the derived files nucleardata.ins,
%
%<*package>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{nucleardata}[2015/11/18 v1.00 LaTeX package for providing basic nuclear properties to documents efficiently]
+\ProvidesPackage{nucleardata}[2015/11/18 v1.01 LaTeX package for providing basic nuclear properties to documents efficiently]
\RequirePackage{pythontex}
\RequirePackage{siunitx}
%</package>
@@ -132,13 +132,13 @@ and the derived files nucleardata.ins,
%
%\maketitle
%
-%\changes{v1.00}{2015/11/18}{First public release}
+%\changes{v1.01}{2015/11/18}{getIsotopes returns an integer list; getHalfLifeValue returns an unformatted float}
%
% The |nucleardata| package provides a method for quickly accessing information about atomic nuclides (isotopes of elements) by referring to the chemical symbol and mass number (A) or to the atomic number (Z) and mass number (A). This information can be inserted and typeset without the user having to search an outside source. The information available in the current version includes chemical symbol or name given Z, Z given the chemical symbol or name, atomic mass, nuclear mass, Q-values for radioactive decay, half-life of ground states, binding energy, mass excess, and list of known isotopes of an element. \par
%~
% The data is contained in two CSV format files: |massdata.csv| and |elementlist.csv|. These files must be installed in the same directory as the |nucleardata.sty| file. They are read during the \LaTeX\ compile process and lookups are done by Python code embedded into the |.sty| file. Initially, the Python code loads all the data from the |CSV| files into Python arrays, |nucleardata| and |elementdata|. \par
%~
-% The \texttt{massdata.csv} file was created by the author (Nettles) from ENSDF data files and the file \texttt{mass.mas03round} from ``The Ame2003 atomic mass evaluation (II)'' by G.Audi, A.H.Wapstra and C.Thibault, \textit{ Nuclear Physics} A729 p. 337-676, December 22, 2003. The \texttt{elementlist.csv} file was created by the author from public sources. \par
+% The \texttt{massdata.csv} file was created by the author (Nettles) from ENSDF data files and the file \texttt{mass.mas03round} from ``The Ame2003 atomic mass evaluation (II)'' by G.Audi, A.H.Wapstra and C.Thibault, \textit{ Nuclear Physics} A729 p. 337-676, December 22, 2003. The \texttt{elementlist.csv} file was created by the author from public sources.
%~
% \subsection*{Using Python\TeX\ }
% Because Python is the basis of the lookup engine, the package |pythontex| is automatically loaded. The user must follow a three-step compiling sequence to get a semifinal/final document. For example, if the user's file is named |carbon.tex|, the sequence will be \par
@@ -147,10 +147,10 @@ and the derived files nucleardata.ins,
% |pythontex carbon.tex| \\
% |pdflatex carbon.tex|
%\end{tabular}\par
-% If the user is familiar with Python\TeX\ this shouldn't seem unusual. \par
+% If the user is familiar with Python\TeX\ this shouldn't seem unusual.
% \subsection*{A Python Class--Nucdata}
% Python functions are called by customized \LaTeX\ commands to extract the data from the |nucleardata| and |elementdata| arrays, so the user has the capability of using these functions to write custom Python routines within the default Python\TeX\ environment. The functions belong to a class defined in this package as |Nucdata|. The class is instantiated in the package Python code as |nuc|.\par
-% The functions will allow the user to use the data for more specific calculations such as Q-values of reactions or decay chain behaviors. Python\TeX\ was designed for tasks such as this. The user can utilize the functions as part of the |nuc| instantiation or can implement their own instance. The data arrays are loaded external to the class.\par
+% The functions will allow the user to use the data for more specific calculations such as Q-values of reactions or decay chain behaviors. Python\TeX\ was designed for tasks such as this. The user can utilize the functions as part of the |nuc| instantiation or can implement their own instance. The data arrays are loaded external to the class.
%~
% \subsection*{Neutron Notation}
% The neutron doesn't have a chemical symbol, but in this package the symbol \textbf{nn} can be used with a mass number, A, of 1. It can also be referenced with Z=0 and A=1 as arguments.
@@ -165,26 +165,26 @@ and the derived files nucleardata.ins,
% \subsection*{Commands}
%\DescribeMacro{\nucsymbol}
% Command form: |\nucsymbol{|\meta{namez}|}|.\par
-% Calls a Python function |getSymbol(|\meta{namez}|)|. The argument can be an unquoted string (the name of the element) or an integer (atomic number, Z). Returns a string with the element symbol.\par
+% The argument can be an unquoted string (the name of the element) or an integer (atomic number, Z). Returns a string with the element symbol. Calls a Python function |getSymbol('|\meta{namez}|')|. \par
%~
%
%\DescribeMacro{\nucname}
%\DescribeMacro{\nucName}
% Command form: |\nucName{|\meta{namez}|}| or |\nucname{|\meta{namez}|}|.\par
-% Calls a Python function |getName(|\meta{namez}|)|. The argument can be an unquoted string (the symbol of the element) or an integer (atomic number, Z). |\nucName| returns a string with the element name capitalized. |\nucname| returns the name in lower case. \par
+% The argument can be an unquoted string (the symbol of the element) or an integer (atomic number, Z). |\nucName| returns a string with the element name capitalized. |\nucname| returns the name in lower case. Calls a Python function |getName('|\meta{namez}|')|. \par
%~
%
%\DescribeMacro{\nucz}
% Command form: |\nucz{|\meta{namez}|}|.\par
-% Calls a Python function |getZ(|\meta{namez}|)|. The argument must be an unquoted string (the symbol or the name of the element). Returns the atomic number, Z.\par
+% The argument must be an unquoted string (the symbol or the name of the element). Returns the atomic number, Z. Calls a Python function |getZ('|\meta{namez}|')|.\par
%~
%
%\DescribeMacro{\nuchalflife}
%\DescribeMacro{\nuchalfvalue}
%\DescribeMacro{\nuchalfunit}
% Command form: |\nuchalflife[|\meta{unit}|]{|\meta{namez}|}{|\meta{A}|}|. \par
-% Calls a Python function |getHalfLife(|\meta{namez}, \meta{A}, \meta{unit}|)|. The optional argument is an unquoted string specifying the time unit to use for the return value. The chart below lists valid arguments. The first required argument can be an unquoted string (the symbol) or an integer (Z). The second required value must be an integer, the mass number, A. Returns a string with the value and units of the halflife of the specific nuclide. \par
-% There are two variations on this command: |\nuchalfvalue| returns the numerical portion of the halflife and |\nuchalfunit| returns the unit portion. They take the same two arguments as |\nuchalflife|. If there is no half life listed, the call returns the None token.\par
+% The optional argument is an unquoted string specifying the time unit to use for the return value. The chart below lists valid arguments. The first required argument can be an unquoted string (the symbol) or an integer (Z). The second required value must be an integer, the mass number, A. Returns a string with the value and units of the halflife of the specific nuclide. Calls a Python function |getHalfLife('|\meta{namez}|'|, \meta{A}, |'|\meta{unit}|')|. \par
+% There are two variations on this command: |\nuchalfvalue| calls |getHalfLifeValue("|\meta{namez}|'|, \meta{A}, |'|\meta{unit}|')| and returns the unformatted numerical portion of the halflife and |\nuchalfunit| calls |getHalfLifeUnit('|\meta{namez}|'|, \meta{A}, |'|\meta{unit}|')| returns a string with the unit portion. They take the same arguments as |\nuchalflife|. If there is no half life listed, the call returns the None token.\par
%~
%\begin{tabular}{ccc}
% argument & unit symbol & unit name \\
@@ -212,43 +212,48 @@ and the derived files nucleardata.ins,
%
%\DescribeMacro{\nucspin}
% Command form: |\nucspin{|\meta{namez}|}{|\meta{A}|}|, etc.\par
-% Calls Python function |getSpin(|\meta{namez}, \meta{A}|)|. The first required argument can be an unquoted string (the symbol) or an integer (Z). The second must be an integer, the mass number, A. Returns the value of the \textbf{spin quantum number and parity} of the ground state of the nuclide. If no value has been assigned, it returns ``None.'' \par
+% The first required argument can be an unquoted string (the symbol) or an integer (Z). The second must be an integer, the mass number, A. Returns the value of the \textbf{spin quantum number and parity} of the ground state of the nuclide. If no value has been assigned, it returns ``None.'' Calls a Python function |getSpin('|\meta{namez}|'|, \meta{A}|)|. \par
%~
%
%\DescribeMacro{\nucamassu}
%\DescribeMacro{\nucamassmev}
%\DescribeMacro{\nucamasskev}
% Command form: |\nucamassu[|\meta{rnd}|]{|\meta{namez}|}{|\meta{A}|}|, |\nucamassmev[|\meta{rnd}|]{|\meta{namez}|}{|\meta{A}|}|, |\nucamasskev[|\meta{rnd}|]{|\meta{namez}|}{|\meta{A}|}|. \par
-% Calls Python function |getMass_u(|\meta{namez}, \meta{A}|)| or |getMass_mev(|$\ldots$|)| or |getMass_kev(|$\ldots$|)|. The optional argument is the number of decimal places for rounding; the default is 6 (or 3 for keV). The first required argument can be an unquoted string (the symbol) or an integer (Z). The second must be an integer, the mass number, A. Returns the value of the \textbf{atomic} mass of the nuclide in atomic mass units (u), MeV/c$^2$ or keV/c$^2$, respectively.\par
+% The optional argument is the number of decimal places for rounding; the default is 6 (or 3 for keV). The first required argument can be an unquoted string (the symbol) or an integer (Z). The second must be an integer, the mass number, A. Returns the value of the \textbf{atomic} mass of the nuclide in atomic mass units (u), MeV/c$^2$ or keV/c$^2$, respectively. Calls Python function |getMass_u('|\meta{namez}|'|, \meta{A}|)| or |getMass_mev(|$\ldots$|)| or |getMass_kev(|$\ldots$|)|.\par
%~
%
%\DescribeMacro{\nuclearmassu}
%\DescribeMacro{\nuclearmassmev}
%\DescribeMacro{\nuclearmasskev}
% Command form: |\nuclearmassu[|\meta{rnd}|]{|\meta{namez}|}{|\meta{A}|}|, etc.\par
-% Calls Python function |getNuclearMass_u(|\meta{namez}, \meta{A}|)|, etc. The optional argument is the number of decimal places for rounding; the default is 6 (or 3 for keV). The first required argument can be a string (the symbol) or an integer (Z). The second must be an integer, the mass number, A. Returns the value of the \textbf{nuclear} mass of the nuclide in atomic mass units (u), MeV/c$^2$ or keV/c$^2$, respectively.\par
+% The optional argument is the number of decimal places for rounding; the default is 6 (or 3 for keV). The first required argument can be a string (the symbol) or an integer (Z). The second must be an integer, the mass number, A. Returns the value of the \textbf{nuclear} mass of the nuclide in atomic mass units (u), MeV/c$^2$ or keV/c$^2$, respectively. Calls Python function |getNuclearMass_u('|\meta{namez}|'|, \meta{A}|)|, etc. \par
%~
%
%\DescribeMacro{\nucexcess}
% Command form: |\nucexcess[|\meta{rnd}|]{|\meta{namez}|}{|\meta{A}|}|.\par
-% Calls Python function |getExcess(|\meta{namez},\meta{A}|)|. The optional argument is the number of decimal places for rounding; the default is 3. The first required argument can be a string (the symbol) or an integer (Z). The second must be an integer, the mass number, A. Returns the mass excess ($\Delta$) in keV/c$^2$. (Atomic mass = A$\times$931502 + $\Delta$, in keV).\par
+% The optional argument is the number of decimal places for rounding; the default is 3. The first required argument can be a string (the symbol) or an integer (Z). The second must be an integer, the mass number, A. Returns the mass excess ($\Delta$) in keV/c$^2$. (Atomic mass = A$\times$931502 + $\Delta$, in keV). Calls Python function |getExcess('|\meta{namez}|'|,\meta{A}|)|. \par
%~
%
%\DescribeMacro{\nucbea}
% Command form: |\nucbea[|\meta{rnd}|]{|\meta{namez}|}{|\meta{A}|}| \par
-% Calls Python function |getBea(|\meta{namez},\meta{A}|)|. The optional argument is the number of decimal places for rounding; the default is 3. The first required argument can be a string (the symbol) or an integer (Z). The second must be an integer, the mass number, A. Returns the binding energy per nucleon in MeV. (Z*atomic mass(\isotope[1]{H})+(A-Z)*mass neutron-atomic mass of nuclide)/A.\par
+% The optional argument is the number of decimal places for rounding; the default is 3. The first required argument can be a string (the symbol) or an integer (Z). The second must be an integer, the mass number, A. Returns the binding energy per nucleon in MeV. (Z*atomic mass(\isotope[1]{H})+(A-Z)*mass neutron-atomic mass of nuclide)/A. Calls Python function |getBea('|\meta{namez}|'|,\meta{A}|)|.\par
%~
%
%\DescribeMacro{\nucisotopes}
% Command form: |\nucisotopes{|\meta{namez}|}| \par
-% Calls Python function |getIsotopes(|\meta{namez}|)|. The argument can be a string (the element symbol) or an integer (Z). Returns a list of all the isotopes of that element which have mass information available in the database.\par
+% The argument can be a string (the element symbol) or an integer (Z). The macro returns a string list of all the isotopes of that element which have mass information available in the database. Calls Python function |getIsotopes('|\meta{namez}|')|.\par
+% The Python function |getIsotopes('|\meta{namez}|')| produces a Python list of integers for the mass numbers, A, found in the data associated with the element. A user can access the individual A values using a direct call in a PythonTex command like this:
+% \begin{center}
+% |The lightest isotope of \nucname{8} is \py{nuc.getIsotopes('8')[0]}| | and the heaviest is \py{nuc.getIsotopes('8')[-1]}.|
+% \end{center}
+% Notice that in the direct call, the class instance, |nuc| is specified, and the argument is enclosed in single quotes. Quotes should NOT be used with the \LaTeX\ macros in this package.\par
%~
%
%\DescribeMacro{\nucQalpha}
%\DescribeMacro{\nucQbeta}
%\DescribeMacro{\nucQposi}
%\DescribeMacro{\nucQec}
-% Command form: |\nucQ-----[|\meta{rnd}|]{|\meta{namez}|}{|\meta{A}|}|\par % Call Python functions |getQ-----(|\meta{namez},\meta{A}|)|. The optional argument is the number of decimal places for rounding; the default is 6. The first required argument can be an unquoted string (the element symbol) or an integer (Z). Returns the Q-value of the chosen decay in MeV. Decay type options are alpha, beta, positron, and electron capture. \par
+% Command form: |\nucQ-----[|\meta{rnd}|]{|\meta{namez}|}{|\meta{A}|}|\par % The optional argument is the number of decimal places for rounding; the default is 6. The first required argument can be an unquoted string (the element symbol) or an integer (Z). Returns the Q-value of the chosen decay in MeV. Decay type options are |alpha|, |beta|, |posi| (for positron), and |ec| for electron capture. Call Python functions |getQ-----('|\meta{namez}|'|,\meta{A}|)|. \par
%~
%
%\DescribeMacro{\nucisalpha}
@@ -256,14 +261,14 @@ and the derived files nucleardata.ins,
%\DescribeMacro{\nucisposi}
%\DescribeMacro{\nucisec}
% Command form: |\nucis-----{|\meta{namez}|}{|\meta{A}|}|.\par
-% Calls Python functions |getQ-----(|\meta{namez},\meta{A}|)| and checks for positive value. The first argument can be an unquoted string (the element symbol) or an integer (Z). Returns the string \textbf{True} or \textbf{False} depending on whether the Q-value of a decay is positive or negative. Decay type options are alpha, beta, positron, and electron capture.\par
+% The first argument can be an unquoted string (the element symbol) or an integer (Z). Returns the string \textbf{True} or \textbf{False} depending on whether the Q-value of a decay is positive or negative. Decay type options are the same as for the |\nucQalpha{-----| macros. Calls Python functions |getQ-----('|\meta{namez}|'|,\meta{A}|)| and checks for positive value.\par
%~
%
%\DescribeMacro{\nucreactionqu}
%\DescribeMacro{\nucreactionqmev}
%\DescribeMacro{\nucreactionqkev}
% Command form: |\nucreactionqu[|\meta{rnd}|]| |{|\meta{namez1}|}| |{|\meta{A1}|}| |{|\meta{namez2}|}| |{|\meta{A2}|}| |{|\meta{namez3}|}| |{|\meta{A3}|}| |{|\meta{namez4}|}| |{|\meta{A4}|}|, etc.\par
-% Calls Python function |getReaction_u(|\meta{namez1}, \meta{A1}, \meta{namez2}, \meta{A2}, \meta{namez3}, \meta{A3}, \meta{namez4}, \meta{A4}|)|, etc. The optional argument is the number of decimal places for rounding; the default is 6 (or 3 for keV). The first required argument can be a string (the symbol) or an integer (Z). The second must be an integer, the mass number, A. The numbers after \meta{name} and \meta{A} represent
+% The optional argument is the number of decimal places for rounding; the default is 6 (or 3 for keV). The first required argument can be a string (the symbol) or an integer (Z). The second must be an integer, the mass number, A. The numbers after \meta{name} and \meta{A} represent
%
%\begin{itemize}
% \item[1]-- the target nucleus/particle
@@ -272,7 +277,7 @@ and the derived files nucleardata.ins,
% \item[4]-- the resultant nucleus/particle
%\end{itemize}
%
-% Returns the Q-value of the reaction in atomic mass units (u), MeV/c$^2$ or keV/c$^2$, respectively.\par
+% Returns the Q-value of the reaction in atomic mass units (u), MeV/c$^2$ or keV/c$^2$, respectively. Calls Python function |getReaction_u('|\meta{namez1}|'|, \meta{A1}, |'|\meta{namez2}|'|, \meta{A2}, |'|\meta{namez3}|'|, \meta{A3}, |'| \meta{namez4}|'|, \meta{A4}|)|, etc. \par
%~
%
%\StopEventually{^^A
@@ -468,7 +473,7 @@ class Nucdata(object):
unit='y'
number=number*self.time_dict.get(newunit)/self.time_dict.get(unit)
unit=newunit
- result= "\\num{" + str(number) + "} "
+ result= number
else:
result=value[0].strip()
return result
diff --git a/Master/texmf-dist/tex/latex/nucleardata/nucleardata.pytxcode b/Master/texmf-dist/tex/latex/nucleardata/nucleardata.pytxcode
index 6aa82ab7180..8febc57a607 100644
--- a/Master/texmf-dist/tex/latex/nucleardata/nucleardata.pytxcode
+++ b/Master/texmf-dist/tex/latex/nucleardata/nucleardata.pytxcode
@@ -183,7 +183,7 @@ class Nucdata(object):
unit='y'
number=number*self.time_dict.get(newunit)/self.time_dict.get(unit)
unit=newunit
- result= "\\num{" + str(number) + "} "
+ result= number
else:
result=value[0].strip()
return result
diff --git a/Master/texmf-dist/tex/latex/nucleardata/nucleardata.sty b/Master/texmf-dist/tex/latex/nucleardata/nucleardata.sty
index 6e431f13533..af4fab435e7 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.00 LaTeX package for providing basic nuclear properties to documents efficiently]
+\ProvidesPackage{nucleardata}[2015/11/18 v1.01 LaTeX package for providing basic nuclear properties to documents efficiently]
\RequirePackage{pythontex}
\RequirePackage{siunitx}
@@ -206,7 +206,7 @@ class Nucdata(object):
unit='y'
number=number*self.time_dict.get(newunit)/self.time_dict.get(unit)
unit=newunit
- result= "\\num{" + str(number) + "} "
+ result= number
else:
result=value[0].strip()
return result