Skip to content

Commit

Permalink
notebook added
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnaf-tahmid-chowdhury committed Aug 15, 2023
1 parent ac5986b commit fd23708
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 106 deletions.
File renamed without changes.
5 changes: 2 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@
"sphinx.ext.inheritance_diagram",
"sphinx_autodoc_typehints",
"sphinx_design",
"sphinxext.ipython_console_highlighting",
"sphinxext.notebook_sphinxext",
"sphinxcontrib.bibtex",
"nbsphinx",
"myst_nb",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
8 changes: 0 additions & 8 deletions docs/source/examples/materials-compendium.rst

This file was deleted.

126 changes: 35 additions & 91 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,97 +10,41 @@ resource provided by the esteemed Pacific Northwest National Laboratory
necessary tools to access material properties crucial for accurate
simulation within various radiation transport codes.

.. raw:: html

<script language="javascript">
function pyneToggle(title, showHideDiv, switchTextDiv) {
var ele = document.getElementById(showHideDiv);
var text = document.getElementById(switchTextDiv);
if(ele.style.display == "block") {
ele.style.display = "none";
text.innerHTML = title + " [+]";
}
else {
ele.style.display = "block";
text.innerHTML = title + " [-]";
}
}
</script>

<div id="pynemenuheader">
<a id="startHeader"
href="javascript:pyneToggle('Getting Started', 'startContent', 'startHeader');">
Getting Started [+]</a>
</div>
<div style="clear:both;"></div>
<div id="pynemenucontent">
<div id="startContent" style="display:none;">
<ul>
<li><a href="install/index.html">Install</a></li>
<li><a href="examples/materials-compendium.html">Example</a></li>
</ul>
</div>
</div>

<br />
<div id="pynemenuheader">
<a id="usingHeader"
href="javascript:pyneToggle('Using PyNE', 'usingContent', 'usingHeader');">
Using Materails Compendium [+]</a>
</div>
<div style="clear:both;"></div>
<div id="pynemenucontent">
<div id="usingContent" style="display:none;">
<ul>
<li><a href="usersguide/index.html">User's Guide</a></li>
<li><a href="api/index.html">API Documentation</a></li>
<li><a href="mailto:[email protected]?subject=Subscribe&body=Send this message to subscribe to the list">Join</a> the <a href="https://groups.google.com/forum/#!forum/pyne-users" target="_blank"> Users</a> mailing list.
<li><a href="https://github.com/pyne/materials-compendium/issues">Report an Issue</a></li>
</ul>
</div>
</div>

<br />
<div id="pynemenuheader">
<a id="contributeHeader"
href="javascript:pyneToggle('Contribute', 'contributeContent', 'contributeHeader');">
Contribute [+]</a>
</div>
<div style="clear:both;"></div>
<div id="pynemenucontent">
<div id="contributeContent" style="display:none;">
<ul>
<li><a href="https://pyne.io/devsguide/index.html">Developer's Guide</a></li>
<li><a href="http://github.com/pyne/materials-compendium">Source Code</a></li>
<li><a href="mailto:[email protected]?subject=Subscribe&body=Send this message to subscribe to the list">Join</a> the
<a href="https://groups.google.com/forum/#!forum/pyne-users" target="_blank">Developers</a> mailing list.
<li><a href="https://pyne.io/dev_team.html">The PyNE Team</a></li>
</ul>
</div>
</div>

<br />
<div id="pynemenuheader">
<a id="learnHeader"
href="javascript:pyneToggle('Learn More', 'learnContent', 'learnHeader');">
Learn More [+]</a>
</div>
<div style="clear:both;"></div>
<div id="pynemenucontent">
<div id="learnContent" style="display:none;">
<ul>
<li><a href="https://pyne.io/theorymanual/index.html">Theory Manual</a></li>
<li><a href="https://pyne.io/pubs.html">Publications</a></li>
<li><a href="previous/index.html">Release Notes</a></li>
<li><a href="https://pyne.io/gsoc/index.html">Project Ideas</a></li>
</ul>
</div>
</div>

.. toctree::
:maxdepth: 1

api/index
.. only:: html

.. grid:: 2

.. grid-item-card:: \ :octicon:`book;2em` User's Guide
:text-align: center
:link: user/index
:link-type: doc

The user's guide contains instructions for installing and an overview of
the basic concepts.

.. grid-item-card:: \ :octicon:`repo;2em` Tutorial
:text-align: center
:link: tutorial/materials-compendium
:link-type: doc

The tutorial provides an introduction to using the Materials Compendium package.

.. grid:: 2

.. grid-item-card:: \ :octicon:`terminal;2em` API Reference
:text-align: center
:link: api/index
:link-type: doc

The reference guide provides detailed information on classes, methods,
arguments, return values, etc.

.. grid-item-card:: \ :octicon:`comment-discussion;2em` Getting Help
:text-align: center
:link: https://github.com/pyne/materials-compendium/discussions

Have questions? Click here for our discussions forum.


.. _GitHub project site: https://github.com/pyne

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"In this tutorial, we will access data from the \"Compendium of Material Composition Data for Radiation Transport Modeling\" provided by the Pacific Northwest National Laboratory (PNNL). This data contains material properties, including material density, atom density, elemental and isotopic compositions provided as weight, atom fraction, and atom density. The data file is intended for radiation transport modeling and can be used with various radiation transport codes.\n",
"\n",
"## Accessing the Materials Compendium\n",
"To access the data from the Materials Compendium, we will use the `MaterialsCompendium` module from `pyne.pnnl`. First, let's import the required modules and see how many materials are in the compendium:"
"To access the data from the Materials Compendium, we will use the `MaterialsCompendium` module from `materials_compendium`. First, let's import the required modules and see how many materials are in the compendium:"
]
},
{
Expand All @@ -28,7 +28,7 @@
}
],
"source": [
"from pyne.pnnl import MaterialsCompendium\n",
"from materials_compendium import MaterialsCompendium\n",
"\n",
"# Get the number of materials in the Compendium\n",
"num_materials = len(MaterialsCompendium)\n",
Expand Down Expand Up @@ -89,7 +89,7 @@
}
],
"source": [
"from pyne.pnnl.utils import Material\n",
"from materials_compendium.utils import Material\n",
"\n",
"# Create a Material object from the first material in the Compendium\n",
"material_obj = Material(MaterialsCompendium[0])\n",
Expand Down Expand Up @@ -362,7 +362,7 @@
"source": [
"## Conclusion\n",
"\n",
"In this tutorial, we learned how to access and utilize data from the Materials Compendium using PyNE. With this information, you can perform various analyses and simulations related to radiation transport modeling. PyNE provides powerful tools to extract and manipulate material properties, which can be valuable for researchers and engineers working in the field of nuclear and radiation engineering."
"In this tutorial, we learned how to access and utilize data from the Materials Compendium. With this information, you can perform various analyses and simulations related to radiation transport modeling. PyNE provides powerful tools to extract and manipulate material properties, which can be valuable for researchers and engineers working in the field of nuclear and radiation engineering."
]
}
],
Expand Down
83 changes: 83 additions & 0 deletions docs/source/user/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
.. _user:

Materials Compendium
====================

The **Materials Compendium** package facilitates the parsing of
essential material composition data from the “Compendium of Material
Composition Data for Radiation Transport Modeling,” a comprehensive
resource provided by the esteemed Pacific Northwest National Laboratory
(PNNL). This package equips radiation transport modelers with the
necessary tools to access material properties crucial for accurate
simulation within various radiation transport codes.

Installation
------------

Installation from PyPI
~~~~~~~~~~~~~~~~~~~~~~

To integrate the **Materials Compendium** package seamlessly into your
workflow, you can use the `Python Package
Index <https://pypi.org/project/materials-compendium/>`__ using ``pip``
command:

.. code:: sh
pip install materials-compendium
Installation from Repository
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Alternatively, if you prefer to work directly from the repository,
follow these steps:

.. code:: sh
git clone https://github.com/pyne/materials-compendium.git
cd materials-compendium
pip install .
For running tests, use:

.. code:: sh
pip install .[test]
Disclaimer
----------

- The material composition data enclosed within the JSON file are
meticulously curated and aligned with Revision 2 of the Compendium.
These data are thoughtfully annotated with references for user
assurance. It’s imperative to acknowledge the potential variances in
composition or densities for certain materials, and we’ve diligently
included ranges in references whenever feasible.
- For materials not cataloged in the provided references, users may
find it necessary to supply application-specific impurity
information.
- We stress the importance of meticulously aligning simulation
parameters, such as reaction cross sections, within your selected
radiation transport code to uphold the integrity of simulation
outcomes.

Noteworthy
----------

- While this script is meticulously tailored to JSON file parsing for
radiation transport modeling, its adaptability for other applications
is an avenue worth exploring.

Contributions
-------------

We extend a warm invitation to contribute to the **Materials
Compendium**. We believe that fostering an environment of collaboration
is paramount. Should you wish to contribute, the process is as
straightforward as forking our repository on GitHub, implementing your
modifications, and subsequently initiating a pull request. Should
queries arise or assistance be required during this process, please
don’t hesitate to engage with us through the PyNE mailing list
(https://groups.google.com/forum/#!forum/pyne-dev,
[email protected]). Your involvement will undoubtedly enrich the
package and its utility.

0 comments on commit fd23708

Please sign in to comment.