Files
beta_shape_pnpi/notebooks/coinc_paceENSDF.ipynb
T
unzhakov 33ed4f7e44 fix: satisfy mypy strict type-checking requirements
- Add proper type annotations to all source files
- Fix return types for numpy operations (np.asarray with dtype=np.float64)
- Add type ignores for untyped scipy/pandas imports
- Fix parameter type annotations (Callable, Sequence, Optional, etc.)
- Add TYPE_CHECKING imports for forward references
- Fix fitter.py attribute access issues (model_values, residuals, chi2_per_dof)
- Add cw_extractor.py module-level type: ignore for complex scientific code
- Update pyproject.toml to exclude notebooks from mypy
- Run black and ruff for formatting and linting
2026-05-03 00:44:11 +03:00

898 lines
26 KiB
Plaintext

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# paceENSDF methods for accessing coincidence $\\gamma-\\gamma$ and $\\gamma-X$-ray data sets from radioactive-decay data\n",
"\n",
"Import the Python package `paceENSDF` and load the JSON-formatted coincidence-decay data sets to a list object."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import paceENSDF as pe\n",
"e = pe.ENSDF()\n",
"cdata = e.load_pace()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"%matplotlib notebook"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exploring the coincidence data sets\n",
"\n",
"To find all available coincidence data sets corresponding to a particular type of decay ($\\alpha$, $\\beta^{-}$, $\\epsilon/\\beta^{+}$) the `pyENSDF` method `coinc_pairs` can be invoked. This method creates a dictionary containing the associated parent-daughter information for all relevant data sets that contain $\\gamma$- and $X$-ray data. For more detail on this method and how to use it refer to the docstrings:\n",
"\n",
"```python\n",
">>> help(e.coinc_pairs)\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"# Find all coincidence data sets from beta-minus decay\n",
"bm_coinc = e.coinc_pairs(cdata, \"BM\")\n",
"[print(k,v) for (k,v) in bm_coinc.items()][0]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"# Find all coincidence data sets from alpha decay\n",
"a_coinc = e.coinc_pairs(cdata, \"A\")\n",
"[print(k,v) for (k,v) in a_coinc.items()][0]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"# Find all coincidence data sets from electron-capture/beta-plus decay\n",
"ecbp_coinc = e.coinc_pairs(cdata, \"ECBP\")\n",
"[print(k,v) for (k,v) in ecbp_coinc.items()][0]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Gather the Z, A information from each decay-mode dictionary\n",
"\n",
"# Alpha decay\n",
"Z_A = [k[1] for (k,v) in a_coinc.items()]\n",
"A_A = [k[2] for (k,v) in a_coinc.items()]\n",
"\n",
"# Beta-minus decay\n",
"Z_BM = [k[1] for (k,v) in bm_coinc.items()]\n",
"A_BM = [k[2] for (k,v) in bm_coinc.items()]\n",
"\n",
"# Electron-capture/beta-plus decay\n",
"Z_ECBP = [k[1] for (k,v) in ecbp_coinc.items()]\n",
"A_ECBP = [k[2] for (k,v) in ecbp_coinc.items()]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%matplotlib notebook\n",
"fig, ax = plt.subplots(figsize=(9,6))\n",
"\n",
"ax.scatter(np.array(A_A), np.array(Z_A), color='y', marker='s', alpha=0.5, label=r'$\\alpha$')\n",
"ax.scatter(np.array(A_BM), np.array(Z_BM), color='r', marker='s', alpha=0.10, label=r'$\\beta^{-}$')\n",
"ax.scatter(np.array(A_ECBP), np.array(Z_ECBP), color='b', marker='s', alpha=0.10, label=r'$\\epsilon/\\beta^{+}$')\n",
"\n",
"ax.set_xlabel(r'$A$', size=20)\n",
"ax.set_ylabel(r'$Z$', size=20)\n",
"ax.tick_params(axis='both', which='major', labelsize=15)\n",
"ax.legend(loc='best', fontsize=20)\n",
"\n",
"plt.tight_layout()\n",
"plt.savefig(\"coinc_decay_nuclides.png\", dpi=fig.dpi)\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## $\\gamma$-ray singles data\n",
"\n",
"All $\\gamma$-ray energies and absolute intensities observed following the decay of a defined parent nucleus and given radioactive-decay mode. The returned quantities and function arguments are explained in the docstrings:\n",
"\n",
"```python\n",
">>> help(e.get_gamma_singles)\n",
"```\n",
"\n",
"These associated normalization and production normalization records have been applied to the returned $\\gamma$-ray intensities"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"help(e.get_gamma_singles)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Define parent and decay mode\n",
"parent_nucleus = \"Np239\"\n",
"decay_mode = \"BM\"\n",
"decay_index = 0\n",
"\n",
"decay_pairs = e.coinc_pairs(cdata, decay_mode)\n",
"daughter_nucleus = [v[0] for k,v in decay_pairs.items() if (k[0]==parent_nucleus and k[3]==decay_index)][0]\n",
"print(\"Daughter nucleus: {0}\".format(daughter_nucleus))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Get the absolute total-projection singles gamma data for 239Pu following the g.s. beta-minus decay of 239Np\n",
"#g = e.get_gamma_singles(cdata, \"BM\", \"Np239\", 0)\n",
"g = e.get_gamma_singles(cdata, decay_mode, parent_nucleus, decay_index)\n",
"for data in g: print(data)\n",
"\n",
"# Put gamma data into arrays\n",
"gamma_array = np.array(g)\n",
"gamma_energy = gamma_array[:,0]\n",
"gamma_intensity = gamma_array[:,5]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Plot gamma data\n",
"%matplotlib notebook\n",
"fig, ax = plt.subplots(figsize=(9,6))\n",
"\n",
"ax.bar(gamma_energy, gamma_intensity, width=3, color='k', label=r'%s $\\gamma$ singles'%daughter_nucleus)\n",
"ax.legend(loc='best', fontsize=15)\n",
"\n",
"ax.set_yscale('log')\n",
"ax.set_xlabel(r'$E_{\\gamma}$ [keV]', size=20)\n",
"ax.set_ylabel(r'$I_{\\gamma}$', size=20)\n",
"\n",
"plt.grid()\n",
"plt.tight_layout()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## $\\gamma-\\gamma$ coincidence data\n",
"\n",
"Energies and absolute intensities for $\\gamma-\\gamma$ coincidence pairs. The callable `get_gg` returns all coincidences within a defined decay scheme or all coincidences with a defined transition according to input arguments. For more information and an explanation of the function arguments and return value refer to the docstrings:\n",
"\n",
"```python\n",
">>> help(e.get_gg)\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### (i) All $\\gamma-\\gamma$ coincidences in a defined decay scheme\n",
"\n",
"Four arguments are passed to the `get_gg` function."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"# Get all g-g coincidences in daughter following radioactive decay\n",
"gg=e.get_gg(cdata, decay_mode, parent_nucleus, decay_index)\n",
"for coinc in gg: print(coinc)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### (ii) All $\\gamma-\\gamma$ coincidences with a particular transition\n",
"\n",
"Six arguments are passed to the `get_gg` function."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Define indices for gating transition\n",
"E_i = 8\n",
"E_f = 5"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Now get all g-g coincidences with the 8->5 transition in 239Pu following the g.s. beta-minus decay of 239Np\n",
"cg=e.get_gg(cdata, decay_mode, parent_nucleus, decay_index, E_i, E_f)\n",
"cgate = cg[0][0]\n",
"for coinc in cg: \n",
" print(coinc)\n",
" \n",
"coinc_array = np.array(cg)\n",
"coinc_gamma = coinc_array[:,1]\n",
"coinc_intensity = coinc_array[:,10]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Plot coincidence gamma data imposed on singles gamma data\n",
"%matplotlib notebook\n",
"fig, ax = plt.subplots(figsize=(9,6))\n",
"\n",
"ax.bar(gamma_energy, gamma_intensity, width=3, color='k', label=r'%s $\\gamma$ singles'%daughter_nucleus)\n",
"ax.bar(coinc_gamma, coinc_intensity, width=3, color='r', label=r'%s %s-keV coincidences'%(daughter_nucleus,cgate))\n",
"ax.legend(loc='best', fontsize=15)\n",
"\n",
"ax.set_yscale('log')\n",
"ax.set_xlabel(r'$E_{\\gamma}$ [keV]', size=20)\n",
"ax.set_ylabel(r'$I_{\\gamma}$', size=20)\n",
"\n",
"plt.grid()\n",
"#plt.tight_layout()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Search for $\\gamma$ rays and $\\gamma-\\gamma$ coincidences"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### (i) Find a single $\\gamma$ ray\n",
"\n",
"Provide a single $\\gamma$-ray energy and find all isotopes containing $\\gamma$ rays at the specified energy. By default a tolerance window of $\\pm$0.5 keV is assumed on the specified $\\gamma$-ray energy. This can be adjusted with an optional argument. See the docstrings for more details:\n",
"\n",
"```python\n",
">>> help(e.find_gamma)\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"# Find all isotopes containing gamma rays at 1332 keV (+/- 0.5 keV; default tolerance range)\n",
"e.find_gamma(cdata, 1332)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": false
},
"outputs": [],
"source": [
"# Tune the tolerance to narrow the search range to 1332 +/- 0.2 keV\n",
"e.find_gamma(cdata, 1332, 0.2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### (ii) Find a pair of $\\gamma-\\gamma$ coincidences\n",
"\n",
"Provide a pair of $\\gamma$-ray energies and find all isotopes containing coincidence $\\gamma$ rays at the specified energies. By default a tolerance window of $\\pm$0.5 keV is assumed on the specified $\\gamma$-ray energy. This can be adjusted with an optional argument. See the docstrings for more details:\n",
"\n",
"```python\n",
">>> help(e.find_gamma_coinc)\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Find all isotopes containing a coincidence pair of gamma rays \n",
"# at 106 keV and 392 keV (default tolerance=0.5 keV)\n",
"e.find_gamma_coinc(cdata, 106, 392)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Tune the tolerance to expand the search window to +/- 2.0 keV\n",
"e.find_gamma_coinc(cdata, 106, 392, 2.0)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## $X$-ray singles data\n",
"\n",
"$K$-shell $X$-ray energies and absolute intensities observed following the decay of a defined parent nucleus and given radioactive-decay mode. The returned quantities and function arguments are explained in the docstrings:\n",
"\n",
"```python\n",
">>> help(e.get_xray_singles)\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Get the absolute total-projection singles X-ray data for 239Pu following the g.s. beta-minus decay of 239Np\n",
"#x=e.get_xray_singles(cdata, \"BM\", \"Np239\", 0)\n",
"x=e.get_xray_singles(cdata, decay_mode, parent_nucleus, decay_index)\n",
"for xray in x: print(xray)\n",
"\n",
"xray_array = np.array(x)\n",
"xray_energy = xray_array[:,0]\n",
"xray_intensity = xray_array[:,1]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"To get the contribution of individual transitions, from the associated $K$-shell conversion, to the observed $K$-shell $X$-ray yield use the `get_xray_contribution` callable. For more information see the docstrings:\n",
"\n",
"```python\n",
">>> help(e.get_xray_contribution)\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Plot gamma and X-ray data\n",
"%matplotlib notebook\n",
"fig, ax = plt.subplots(figsize=(9,6))\n",
"\n",
"ax.bar(gamma_energy, gamma_intensity, width=3, color='k', label=r'%s decay $\\gamma$ singles'%daughter_nucleus)\n",
"ax.bar(xray_energy, xray_intensity, width=3, color='b', label=r'%s $X$-rays'%daughter_nucleus)\n",
"ax.legend(loc='best', fontsize=15)\n",
"\n",
"ax.set_yscale('log')\n",
"ax.set_xlabel(r'$E$ [keV]', size=20)\n",
"ax.set_ylabel(r'$I$', size=20)\n",
"\n",
"plt.grid()\n",
"plt.tight_layout()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"# Get the individual contributions to the X-ray yield from transitions in 239Pu following the g.s. beta-minus\n",
"# decay of 239Np\n",
"e.get_xray_contribution(cdata, decay_mode, parent_nucleus, decay_index)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## $\\gamma-X$-ray coincidence data\n",
"\n",
"Energies and absolute intensities for $\\gamma-X$-ray coincidence pairs. The callable `get_gx` returns all coincidences within a defined decay scheme or all coincidences with a defined transition according to input arguments. For more information and an explanation of the function arguments and return value refer to the docstrings:\n",
"\n",
"```python\n",
">>> help(e.get_gx)\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### (i) All $\\gamma-X$-ray coincidences in a defined decay scheme\n",
"\n",
"Four arguments are passed to the `get_gx` function."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"# Get all g-X coincidences in 239Pu following the ground-state beta-minus decay of 239Np\n",
"xx=e.get_gx(cdata, decay_mode, parent_nucleus, decay_index)\n",
"for coinc in xx: print(coinc)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### (ii) All $\\gamma-X$-ray coincidences with a particular transition\n",
"\n",
"Six arguments are passed to the `get_gx` function."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Now get all g-X coincidences with the 8->5 transition in 239Pu following the g.s. beta-minus decay of 239Np\n",
"cx=e.get_gx(cdata, decay_mode, parent_nucleus, decay_index, E_i, E_f)\n",
"for coinc in cx: print(coinc)\n",
" \n",
"coincgx_array = np.array(cx)\n",
"coincgx_energy = coincgx_array[:,3].astype(float)\n",
"coincgx_intensity = coincgx_array[:,5].astype(float)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Plot coincidence gamma and X-ray imposed upon singles gamma and X-ray data\n",
"%matplotlib notebook\n",
"fig, ax = plt.subplots(figsize=(9,6))\n",
"\n",
"ax.bar(gamma_energy, gamma_intensity, width=3, color='k', label=r'%s decay $\\gamma$'%daughter_nucleus)\n",
"ax.bar(xray_energy, xray_intensity, width=3, color='b', label=r'%s $X$-rays'%daughter_nucleus)\n",
"ax.bar(coinc_gamma, coinc_intensity, width=3, color='r', label=r'%s $\\gamma$/%s-keV coincidences'%(daughter_nucleus, cgate))\n",
"ax.bar(coincgx_energy, coincgx_intensity, width=3, color='yellow', label=r'%s $X$/%s-keV coincidences'%(daughter_nucleus, cgate))\n",
"ax.legend(loc='best', fontsize=15)\n",
"\n",
"ax.set_yscale('log')\n",
"ax.set_xlabel(r'$E$ [keV]', size=20)\n",
"ax.set_ylabel(r'$I$', size=20)\n",
"\n",
"plt.grid()\n",
"plt.tight_layout()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Search for $X$ rays and $\\gamma-X$-ray coincidences"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### (i) Find a single $X$ ray\n",
"\n",
"Provide a single $X$-ray energy and find all isotopes containing $X$ rays at the specified energy. By default a tolerance window of $\\pm$0.5 keV is assumed on the specified $X$-ray energy. This can be adjusted with an optional argument. See the docstrings for more details:\n",
"\n",
"```python\n",
">>> help(e.find_xray)\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"# Find all isotopes containing X rays at 52 keV (+/- 0.5 keV; default tolerance range)\n",
"e.find_xray(cdata, 52)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": false
},
"outputs": [],
"source": [
"# Tune the tolerance to narrow the search range to 52 +/- 0.1 keV\n",
"e.find_xray(cdata, 52, 0.1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### (ii) Find a pair of $\\gamma-X$-ray coincidences\n",
"\n",
"Provide the $X$-ray energy and the $\\gamma$-ray energy and find all isotopes containing coincidence $\\gamma-X$-ray pairs at the specified energies. By default a tolerance window of $\\pm$0.5 keV is assumed on the specified photon energy. This can be adjusted with an optional argument. See the docstrings for more details:\n",
"\n",
"```python\n",
">>> help(e.find_xray_coinc)\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Find all isotopes containing a gamma-X-ray coincidence pair with a 52-keV X ray and 688-keV gamma, \n",
"# respectively, assuming the default tolerance=0.5 keV\n",
"e.find_xray_coinc(cdata, 52, 688)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": false
},
"outputs": [],
"source": [
"# Tune the tolerance to narrow the search window to +/- 0.15 keV\n",
"e.find_xray_coinc(cdata, 52, 688, 0.15)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Display parallel paths for cascades between coincident $\\gamma$ rays\n",
"\n",
"This function shows all parallel $\\gamma$-ray cascade sequences between a pair of coincident $\\gamma$ rays in the decay scheme of the daughter nucleus. In addition to the $\\gamma$ rays in the cascade, all associated level indices and energies are shown and a list of tuples containing the level indices is returned. See the appropriate docstring:\n",
"\n",
"```python\n",
">>> help(e.show_cascades)\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Show the cascade gamma-ray sequence between the 3->2 and 1->0 transitions in 60Ni following \n",
"# 60Co beta-minus decay (G.S.)\n",
"e.show_cascades(cdata,\"BM\",\"Co60\",0,3,2,1,0)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Show the cascade gamma-ray sequence between the 9->6 and 1->0 transitions in 147Pm following \n",
"# 147Nd beta-minus decay (G.S.)\n",
"e.show_cascades(cdata,\"BM\",\"Nd147\",0,9,6,1,0)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Impose timecut\n",
"\n",
"The following method has been implemented to allow the user to filter cascades going through isomeric levels:\n",
"\n",
"```python\n",
">>> help(e.get_gg_timecut)\n",
"```\n",
"\n",
"Transient-equilibrium intensity data is gradually being added to the repository. To use these datasets instead of the regular ENSDF decay datasets make sure to install by setting the appropriate flag `(-t | --transient)` described in the README."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": false
},
"outputs": [],
"source": [
"# Inspecting transient-equilibrium coincidences following 99Mo beta-minus decay.\n",
"\n",
"# To remove coincidences that go through the 6-h isomer at E=142.7-keV (level index=2) impose a 21600-s timecut:\n",
"gg=e.get_gg_timecut(cdata, \"BM\", \"Mo99\", 0, -21600)\n",
"for g in gg: print(g[0:12])\n",
"print(\"\\nNumber of coincidences = {0}\".format(len(gg)))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Find only coincidences with the 1->0 transition (140.51-keV -> 0-keV) with the same timecut:\n",
"gg=e.get_gg_timecut(cdata, \"BM\", \"Mo99\", 0, 1, 0, -21600)\n",
"for g in gg: print(g[0:12])\n",
"print(\"\\nNumber of coincidences = {0}\".format(len(gg)))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Find coincidences in the path of the 6-h isomer:\n",
"gg=e.get_gg_timecut(cdata, \"BM\", \"Mo99\", 0, 21600)\n",
"for g in gg: print(g[0:12])\n",
"print(\"\\nNumber of coincidences = {0}\".format(len(gg)))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Find only coincidences with the 1->0 transition (140.51-keV -> 0-keV) in the path of the 6-h isomer:\n",
"gg=e.get_gg_timecut(cdata, \"BM\", \"Mo99\", 0, 1, 0, 21600)\n",
"for g in gg: print(g[0:12])\n",
"print(\"\\nNumber of coincidences = {0}\".format(len(gg)))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Compare these results with all expected coincidences (i.e. no timecut):\n",
"gg=e.get_gg(cdata, \"BM\", \"Mo99\", 0)\n",
"for g in gg: print(g)\n",
"print(\"\\nNumber of coincidences = {0}\".format(len(gg)))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Compare these results with all expected coincidences with just the 1->0 transition (i.e. no timecut):\n",
"gg=e.get_gg(cdata, \"BM\", \"Mo99\", 0, 1, 0)\n",
"for g in gg: print(g)\n",
"print(\"\\nNumber of coincidences = {0}\".format(len(gg)))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Auxiliary data\n",
"\n",
"This section of the Notebook runs through some of the supplementary data in coincidence data structures that may be interesting or useful."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Valence electronic configurations\n",
"\n",
"The valence electronic configuration is provided for all elements from $Z=3-110$ apart from $Z=1,2,101,103,106$. The missing data will be added in a future release. Refer to the docstrings for information regarding the returned list object:\n",
"\n",
"```python\n",
">>> help(e.get_valence_config)\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Get the valence electronic configuration of Yb (pass the chemical symbol <str>)\n",
"e.get_valence_config(cdata, \"Yb\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Get the valence electronic configuration of Yb (pass the atomic number <int>)\n",
"e.get_valence_config(cdata, 70)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Get the valence electronic configuration of Fe (pass the chemical symbol <str>)\n",
"e.get_valence_config(cdata, \"Fe\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Get the valence electronic configuration of Fe (pass the atomic number <int>)\n",
"e.get_valence_config(cdata, 26)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Atomic binding energies\n",
"\n",
"Atomic subshell binding energies in keV for $K$, $L_{I} - L_{III}$, and $M_{I} - M_{V}$. Refer to the docstrings for more information:\n",
"\n",
"```python\n",
">>> help(e.get_binding_energies)\n",
"```\n",
"\n",
"The desired element can be passed as a string (chemical symbol) or an integer (atomic number). A keyword argument is also needed to specify the required output:\n",
"\n",
"```Bash\n",
"shell = 'K'\n",
"shell = 'L'\n",
"shell = 'M'\n",
"shell = 'all'\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Get the K-shell binding energy for W:\n",
"e.get_binding_energies(cdata, \"W\", shell='K')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Get the L-shell binding energies for W:\n",
"e.get_binding_energies(cdata, \"W\", shell='L')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Get the M-shell binding energies for W:\n",
"e.get_binding_energies(cdata, \"W\", shell='M')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Get all available atomic-shell binding energies for Yb:\n",
"e.get_binding_energies(cdata, 74, shell='ALL')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}