Skip to content

Commit

Permalink
Add docstrings to subpackages (tardis-sn#2204)
Browse files Browse the repository at this point in the history
* add docstring to subpackage grid

* Add docstrings to subpackages

* Change comments to docstrings

* add docstrings to subpackages

* rename gui/__init__.py

* Reformat using black

* add contributor infos to mailmap file

* add extended summary to docstrings

* Add extended summary to plasma/properties

* Update tardis/io/parsers/__init__.py

Co-authored-by: Sona Chitchyan <[email protected]>

---------

Co-authored-by: kim <[email protected]>
Co-authored-by: Sona Chitchyan <[email protected]>
  • Loading branch information
3 people authored and shreyas3156 committed Mar 27, 2023
1 parent 9ea964d commit db2c635
Show file tree
Hide file tree
Showing 23 changed files with 110 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -230,3 +230,8 @@ Youssef Eweis <[email protected]> Youssef Eweis <[email protected]
Rohith Varma Buddaraju <[email protected]>
Rohith Varma Buddaraju <[email protected]> rohithvarma3000 <[email protected]>
Rohith Varma Buddaraju <[email protected]> Rohith <[email protected]>

Le Truong <[email protected]>

Kim Lingemann <[email protected]> kimsina <[email protected]>
Kim Lingemann <[email protected]> kim <[email protected]>
4 changes: 3 additions & 1 deletion tardis/analysis.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# codes to for analyse the model.
"""
Code to analyse the model.
"""

import re
import os
Expand Down
4 changes: 3 additions & 1 deletion tardis/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Functions that are important for the general usage of TARDIS.
"""
Functions that are important for the general usage of TARDIS.
"""

import logging

Expand Down
6 changes: 6 additions & 0 deletions tardis/grid/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
"""
Storing a grid of TARDIS parameters that
facilitates running large numbers of
simulations easily.
"""

from tardis.grid.base import *
Empty file removed tardis/gui/__init.py__
Empty file.
9 changes: 9 additions & 0 deletions tardis/gui/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"""
Creation of the basic framework for the TARDIS GUI.
The data that should be displayed in the GUI is put into
respective data structures (either a tree or a table), such
that they can be used in the widgets. These widgets are
used to form the building blocks of the basic framework for
the GUI.
"""
4 changes: 4 additions & 0 deletions tardis/io/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""
A collection of subpackages and submodules to handle input and output data.
"""

# readin model_data
from tardis.io.model_reader import (
read_simple_ascii_density,
Expand Down
4 changes: 4 additions & 0 deletions tardis/io/atom_data/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
"""
Getting and handling the atomic data.
"""

from tardis.io.atom_data.base import AtomData
from tardis.io.atom_data.atom_web_download import download_atom_data
3 changes: 3 additions & 0 deletions tardis/io/logger/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""
Managing the logging output.
"""
9 changes: 9 additions & 0 deletions tardis/io/parsers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
"""
A collection of parsers to read data of different formats.
Accepted data formats are Arepo snapshots, the Blondin toy-model
format, CSVY files and STELLA files. These are parsed into
either CSV files, YAML files or Pandas DataFrames, which are
data formats interpretable by TARDIS.
"""

from tardis.io.parsers.blondin_toymodel import (
read_blondin_toymodel,
convert_blondin_toymodel,
Expand Down
8 changes: 8 additions & 0 deletions tardis/model/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
"""
Holding information about the TARDIS model.
This includes information about the shell structure,
density, abundance, temperatures and dilution
factor of the model used in the simulation.
"""

from tardis.model.base import *
10 changes: 10 additions & 0 deletions tardis/model/geometry/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""
Holding information about model geometry for radial 1D models.
The information stored about the model are the following attributes:
r_inner : The radius of the inner shell boundaries
r_outer : The radius of the outer shell boundaries
v_inner : The velocity of the inner boundaries of each shell
v_outer : The velocity of the outer boundaries of each shell
volume : Volume of each shell computed from r_outer and r_inner
"""
9 changes: 9 additions & 0 deletions tardis/montecarlo/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
"""
Faciliating the MonteCarlo iterations.
During a simulation run, a number of MonteCarlo iterations specified
in the configuration are run using the numba compiler.
Most of the iterations are used to calculate the steady-state plasma
properties and with the last iteration, the spectrum is determined.
"""

from tardis.montecarlo.base import *
4 changes: 4 additions & 0 deletions tardis/montecarlo/montecarlo_numba/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""
Implements the main loop of the MonteCarlo routine.
"""

from llvmlite import binding

binding.set_option("tmp", "-non-global-value-max-name-size=2048")
Expand Down
4 changes: 4 additions & 0 deletions tardis/plasma/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
"""
Dealing with plasma properties and calculations related to it.
"""

from tardis.plasma.base import BasePlasma
7 changes: 7 additions & 0 deletions tardis/plasma/properties/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
"""
Store and calculate the properties of the plasma.
Each plasma object has an array of properties which are then used to calculate plasma parameter values.
Every property has a calculate function that returns the values of its outputs.
"""

from tardis.plasma.properties.atomic import *
from tardis.plasma.properties.general import *
from tardis.plasma.properties.ion_population import *
Expand Down
4 changes: 3 additions & 1 deletion tardis/plasma/properties/util/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@

"""
Calculating transition probabilities for macro_atom interactions.
"""
3 changes: 3 additions & 0 deletions tardis/scripts/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""
Translate cmfgen format to a format TARDIS can use.
"""
4 changes: 4 additions & 0 deletions tardis/simulation/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
"""
Handling simulation runs.
"""

from tardis.simulation.base import Simulation
4 changes: 3 additions & 1 deletion tardis/stats/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@

"""
Providing Poisson statistics that govern the MonteCarlo processes.
"""
4 changes: 3 additions & 1 deletion tardis/transport/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@

"""
Handling the packet propagation.
"""
4 changes: 3 additions & 1 deletion tardis/transport/geometry/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@

"""
Calculating distances.
"""
4 changes: 3 additions & 1 deletion tardis/util/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# Utilities for TARDIS
"""
Utilities for TARDIS.
"""

0 comments on commit db2c635

Please sign in to comment.