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

Docs/fixdocs #17

Merged
merged 4 commits into from
Nov 15, 2012
Merged
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
46 changes: 43 additions & 3 deletions docs/tardis/atomic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ All atomic data files are stored in an hdf5 file

hdf5
----
All atomic data are stored in hdf5 files, in tables. The atomic data table contains information on atomic number,
symbol, mass; and the ionization data table contains atomic number, ion number, and ionization energy information.
Tables contain attributes which contains units.
All atomic data are stored in hdf5 files.
The atomic data table contains information on atomic number, symbol, and masses.
The ionization data table contains atomic number, ion number, and ionization energy information.
The levels data table contains




Expand Down Expand Up @@ -40,6 +42,44 @@ Ionization Data
| ionization energy | Ionization Energy of atom | eV |
+------------------------+------------------------------+----------+

Levels Data


+------------------------+------------------------------+----------+
|Name | Description | Symbol |
+========================+==============================+==========+
| atomic_number(z) | Atomic Number | 1 |
+------------------------+------------------------------+----------+
| ion number | Ion Number | 1 |
+------------------------+------------------------------+----------+
| level number | Level Number | 1 |
+------------------------+------------------------------+----------+
| energy | | |
+------------------------+------------------------------+----------+
| g | | |
+------------------------+------------------------------+----------+
| metastable | | |
+------------------------+------------------------------+----------+

Lines Data

+------------------------+------------------------------+----------+
|Name | Description | Symbol |
+========================+==============================+==========+
| wavelength | | |
+------------------------+------------------------------+----------+
| atomic_number(z) | Atomic Number | 1 |
+------------------------+------------------------------+----------+
| ion number | Ion Number | 1 |
+------------------------+------------------------------+----------+
| f_ul | | |
+------------------------+------------------------------+----------+
| f_lu | | |
+------------------------+------------------------------+----------+
| level_id_l | | |
+------------------------+------------------------------+----------+
| level_od_l | | |
+------------------------+------------------------------+----------+



Expand Down
2 changes: 0 additions & 2 deletions docs/tardis/plasma.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Plasma
======

.. currentmodule:: tardis.plasma

Level Populations
Expand All @@ -10,7 +9,6 @@ We first calculate the number densities for each atom
:math:`N_{atom} = \rho_\textrm{total} \times \textrm{Abundance fraction} / m_\textrm{atom}`

Next we calculate the partition function (Z) where i is the level number and j the ion number:

:math:`Z_{j} = \sum_{i=0}^{max levels} g_i * e^{-E_i / (k_\textrm{b} T)}`

.. automodapi:: tardis.plasma
9 changes: 5 additions & 4 deletions tardis/atomic.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ def read_ionization_data(fname=None):


def read_levels_data(fname=None):
"""This function reads the atomic number, ion number, and ionization energy from hdf5 file
"""This function reads atomic number, ion number, level_number, energy, g, metastable
information from hdf5 file.

Parameters
----------
Expand All @@ -131,8 +132,7 @@ def read_levels_data(fname=None):
-------

data : `~astropy.table.Table`
table with fields ### FILL IN DATA###

table with fields z[1], ion[1], level_number, energy, g, metastable
"""

data_table = read_hdf5_data(fname, 'levels_data')
Expand All @@ -143,7 +143,8 @@ def read_levels_data(fname=None):


def read_lines_data(fname=None):
"""This function reads the atomic number, ion number, and ionization energy from hdf5 file
"""This function reads the wavelength, atomic number, ion number, f_ul, f_l and level id information
from hdf5 file

Parameters
----------
Expand Down
5 changes: 3 additions & 2 deletions tardis/plasma.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ def _calculate_atom_number_densities(self):
def calculate_partition_functions(self, temperature):
"""
Calculate partition functions for the ions using the following formula:
.. math::
Z_{j} = \sum_{i=0}^{max(levels)} g_i * e^{-E_i / (k_\textrm{b} T)}

:math:`Z_{j} = \\sum_{i=0}^{max levels} g_i \\times e^{-E_i / (k_\\textrm{b} T)}`


Parameters
----------
Expand Down