Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructuring TARDIS Documentation (Issue #948) #1077

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/configuration/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and pages provide more details concerning the TARDIS configuration process.
.. toctree::
:maxdepth: 2

integrator
configuration
config_validator
read_configuration
6 changes: 3 additions & 3 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ To compile TARDIS for parallel execution::
Installation Troubles (FAQ)
===========================

We highly encourage with any installation problems to try the recommended install
method because this often fix problems. Here are some common problems when
With any installation problems, we highly encourage you to try the recommended
installation method because this often fixes problems. Here are some common problems when
installing and their fixes:

**Problem:** While building tardis via ``python setup.py`` build you
**Problem:** While building tardis via ``python setup.py build`` you
may encounter the following error::

error: tardis/montecarlo/montecarlo.c: Could not find C file tardis/montecarlo/montecarlo.c for Cython file tardis/montecarlo/montecarlo.pyx when building extension tardis.montecarlo.montecarlo. Cython must be installed to build from a git checkout.
Expand Down
2 changes: 1 addition & 1 deletion docs/physics/plasma/plasma.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Here's an example how to instantiate a simple base plasma::
>>> from tardis.io import atomic
>>> atom_data = atomic.AtomData.from_hdf()
>>> my_plasma = plasma.BasePlasma({'Fe':0.5, 'Ni':0.5}, 10000, 1e-13, atom_data)
>>> print my_plasma.abundances
>>> print(my_plasma.abundances)
atomic_number abundance_fraction number_density
------------- ------------------ --------------
28 0.5 513016973.936
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
#Plotting the ion fractions

for ion_number in [0, 1, 2, 3]:
print "w=0.5"
print("w=0.5")
current_ion_density = ion_number_densities.ix[14, ion_number]
ax1.plot(current_ion_density.index, current_ion_density.values, '%s--' % ion_colors[ion_number],
label='Si %s W=0.5' % tardis.util.base.int_to_roman(ion_number + 1).upper())
Expand Down
6 changes: 3 additions & 3 deletions docs/running/index.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
**************
Running TARDIS
**************
*************************
TARDIS Configuration File
*************************

The TARDIS code needs three components to calculate spectra:

Expand Down
40 changes: 14 additions & 26 deletions docs/running/interaction/hdf_writer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"from tardis.io.util import HDFWriterMixin\n",
Expand All @@ -34,9 +32,7 @@
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
Expand Down Expand Up @@ -67,9 +63,7 @@
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"metadata": {},
shreyansjain012 marked this conversation as resolved.
Show resolved Hide resolved
"outputs": [],
"source": [
"obj.to_hdf(file_path='test.hdf', path='test')\n",
Expand All @@ -86,9 +80,7 @@
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand All @@ -104,7 +96,7 @@
"source": [
"#Read HDF file\n",
"with pd.HDFStore('test.hdf','r') as data:\n",
" print data\n",
" print(data)\n",
" #print data['/test/mock_setup/property1']"
]
},
Expand Down Expand Up @@ -157,9 +149,7 @@
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand All @@ -176,7 +166,7 @@
"source": [
"#Read HDF file\n",
"with pd.HDFStore('nested_test.hdf','r') as data:\n",
" print data"
" print(data)"
]
},
{
Expand Down Expand Up @@ -231,9 +221,7 @@
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand All @@ -249,27 +237,27 @@
"obj3 = DemoClass('random_string')\n",
"obj3.to_hdf('demo_class.hdf')\n",
"with pd.HDFStore('demo_class.hdf','r') as data:\n",
" print data"
" print(data)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"display_name": "Python 3",
"language": "python",
"name": "python2"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.13"
"pygments_lexer": "ipython3",
"version": "3.6.7"
}
},
"nbformat": 4,
Expand Down
70 changes: 23 additions & 47 deletions docs/running/interaction/to_hdf.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stderr",
Expand Down Expand Up @@ -62,9 +60,7 @@
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stderr",
Expand Down Expand Up @@ -203,9 +199,7 @@
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stderr",
Expand Down Expand Up @@ -254,7 +248,6 @@
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false,
"scrolled": true
},
"outputs": [
Expand Down Expand Up @@ -328,7 +321,7 @@
"source": [
"import pandas as pd\n",
"data = pd.HDFStore('/tmp/full_example.hdf')\n",
"print data"
"print(data)"
]
},
{
Expand All @@ -341,9 +334,7 @@
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -375,7 +366,7 @@
}
],
"source": [
"print data['/simulation/model/homologous_density/density_0']"
"print(data['/simulation/model/homologous_density/density_0'])"
]
},
{
Expand All @@ -392,9 +383,7 @@
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand All @@ -405,7 +394,7 @@
}
],
"source": [
"print data['/simulation/model/scalars']['t_inner']"
"print(data['/simulation/model/scalars']['t_inner'])"
]
},
{
Expand All @@ -427,9 +416,7 @@
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"simulation.plasma.to_hdf('/tmp/plasma_output.hdf', path='parent')"
Expand All @@ -439,7 +426,6 @@
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false,
"scrolled": true
},
"outputs": [
Expand Down Expand Up @@ -489,7 +475,7 @@
"source": [
"import pandas\n",
"with pandas.HDFStore('/tmp/plasma_output.hdf') as data:\n",
" print data"
" print(data)"
]
},
{
Expand All @@ -502,9 +488,7 @@
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"from tardis.plasma.properties.base import Input\n",
Expand All @@ -514,9 +498,7 @@
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand All @@ -535,7 +517,7 @@
"source": [
"import pandas\n",
"with pandas.HDFStore('/tmp/plasma_input_output.hdf') as data:\n",
" print data"
" print(data)"
]
},
{
Expand All @@ -549,9 +531,7 @@
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"simulation.model.to_hdf('/tmp/model_output.hdf')"
Expand All @@ -568,9 +548,7 @@
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"simulation.runner.to_hdf('/tmp/runner_output.hdf')"
Expand All @@ -579,9 +557,7 @@
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -612,29 +588,29 @@
"source": [
"import pandas\n",
"with pandas.HDFStore('/tmp/runner_output.hdf') as data:\n",
" print data"
" print(data)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"display_name": "Python 3",
"language": "python",
"name": "python2"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.13"
"pygments_lexer": "ipython3",
"version": "3.6.7"
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 1
}