-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5e25005
commit b64c945
Showing
110 changed files
with
86,656 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: a17da35968bb3c2fc3ccd7a4309ac208 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14,824 changes: 14,824 additions & 0 deletions
14,824
pull/406/_sources/development/compare_atomic_files.ipynb.txt
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
*************** | ||
Developer Notes | ||
*************** | ||
|
||
The following pages contain useful information for developers about | ||
testing, debugging, the actual state of the code, etc. | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
notation.rst | ||
units.rst | ||
testing.rst | ||
compare_atomic_files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
****************** | ||
Notation in Carsus | ||
****************** | ||
|
||
* **Use "0" for neutral elements.** | ||
Example: ``Si 0`` is equivalent to :math:`\text{Si I}`, ``Si 1`` to :math:`\text{Si II}`, etc. | ||
|
||
* **Use "-" to grab intervals of consecsutive elements or species.** | ||
Example: ``H-He`` selects :math:`\text{H I}` and :math:`\text{H II}` plus :math:`\text{He I}`, :math:`\text{He II}` and :math:`\text{He III}`, while ``C 0-2`` selects :math:`\text{C I}`, :math:`\text{C II}` and :math:`\text{C III}`. | ||
|
||
* **Use "," to grab non-consecutive species.** | ||
Example: ``Si 0, 2`` selects :math:`\text{Si I}` and :math:`\text{Si III}`. | ||
|
||
* **Use ";" to grab non-consecutive elements.** | ||
Example: ``H; Li`` selects :math:`\text{H I}` and :math:`\text{H II}` plus :math:`\text{Li I}`, :math:`\text{Li II}`, :math:`\text{Li III}` and :math:`\text{Li IV}`. | ||
|
||
* **Finally, mix all the above syntax as needed.** | ||
Example: ``H; C-Si; Fe 1,3``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
************* | ||
Running Tests | ||
************* | ||
|
||
Carsus's tests are based on the | ||
`AstroPy Package Template <https://docs.astropy.org/projects/package-template/en/latest/index.html>`_ | ||
and `pytest <https://pytest.org/en/latest>`_. Then, running simple tests on your machine is | ||
straightforward: | ||
|
||
.. code :: | ||
$ pytest carsus | ||
============== | ||
Optional Flags | ||
============== | ||
|
||
A set of flags can be appended to the above command to run different kinds of tests: | ||
|
||
- `--remote-data` | ||
Run tests marked with the ``@pytest.mark.remote_data`` decorator. Requires an internet connection. | ||
|
||
- `--refdata=/path/to/carsus-refdata` | ||
Run tests marked with the ``@with_refdata`` decorator. Requires the | ||
`tardis-sn/carsus-refdata <https://github.com/tardis-sn/carsus-refdata>`_ repository. | ||
|
||
- `--cov=carsus --cov-report=xml --cov-report=html` | ||
Get code coverage results using the `pytest-cov <https://pytest-cov.readthedocs.io/en/latest/>`_ plugin. | ||
|
||
- `--arraydiff-generate-path=carsus-refdata/arraydiff` | ||
Generate reference files for tests marked with ``@pytest.mark.array_compare`` decorator and save them in the | ||
refdata folder. | ||
|
||
- `--arraydiff --arraydiff-reference-path=carsus-refdata/arraydiff` | ||
Run tests marked with ``@pytest.mark.array_compare`` decorator. | ||
The tests would look for reference files in the refdata folder which can be generated using the above option. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
*************** | ||
Units in Carsus | ||
*************** | ||
|
||
In the recent years, much effort has been made to make Carsus easier to use and develop. | ||
A large piece of code was rewritten to avoid using an intermediate SQL database between | ||
the readers and the final atomic data. | ||
|
||
This resulted in an simpler, faster and more maintainable Carsus codebase. But we lost | ||
some features in the process, being the most important one the tracking of physical | ||
quantities. Currently, we couldn't solve the management of units in a sensible way. | ||
|
||
We need to design and implement a new unit tracking system as soon as possible. In the | ||
meantime, should be enough to document the units used by the GFALL/CHIANTI/CMFGEN readers | ||
and the output module. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
********************************** | ||
Welcome to Carsus's Documentation! | ||
********************************** | ||
|
||
Carsus is a package to manage atomic datasets. It can read data from a variety of sources and output them to file formats readable by radiative transfer codes. | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: Getting Started | ||
|
||
installation.rst | ||
quickstart | ||
development/compare_atomic_files | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Datasets | ||
:hidden: | ||
|
||
io/nist | ||
io/gfall | ||
io/chianti | ||
io/cmfgen | ||
io/zeta | ||
io/nndc | ||
io/vald | ||
io/barklem2016 | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Research with Carsus | ||
:hidden: | ||
|
||
research/publications.rst | ||
research/references.rst | ||
|
||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Contributing to Carsus | ||
:hidden: | ||
|
||
physics/index.rst | ||
development/index.rst | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: API | ||
:hidden: | ||
|
||
api/modules | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Legacy Code | ||
:hidden: | ||
|
||
legacy/index.rst | ||
|
||
|
||
.. seealso:: | ||
Need help? Contact us `on Gitter <https://gitter.im/tardis-sn/carsus/>`_. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
************ | ||
Installation | ||
************ | ||
|
||
============= | ||
Prerequisites | ||
============= | ||
|
||
#. Requires a valid Anaconda `or Miniconda <https://docs.conda.io/projects/conda/en/latest/user-guide/install/download.html>`_ installation. | ||
#. *(optional)*. Download and extract the `Chianti Atomic Database <https://download.chiantidatabase.org/>`_ **v9.0.1** and set the following environment variable in your shell configuration file: | ||
|
||
.. code :: | ||
export XUVTOP=/path/to/chianti/root | ||
#. *(optional)*. Download and extract the `CMFGEN Atomic Data <http://kookaburra.phyast.pitt.edu/hillier/web/CMFGEN.htm>`_. | ||
|
||
==================== | ||
Clone the Repository | ||
==================== | ||
|
||
.. code :: | ||
$ git clone https://github.com/tardis-sn/carsus.git | ||
===================== | ||
Setup the Environment | ||
===================== | ||
|
||
.. code :: | ||
$ cd carsus | ||
If you're using GNU/Linux or Intel-based Mac installation then directly create the environment using the below command: | ||
|
||
.. code :: | ||
$ conda env create -f carsus_env3.yml | ||
However, if you're using M1-based Mac (Apple Silicon), then force conda to install Intel-based packages: | ||
|
||
.. code :: | ||
$ CONDA_SUBDIR=osx-64 conda env create -f carsus_env3.yml | ||
=================== | ||
Install the Package | ||
=================== | ||
|
||
.. code :: | ||
$ conda activate carsus | ||
$ pip install -e . | ||
You are ready! Follow the `Quickstart for Carsus <quickstart.html>`_ guide to continue. |
Oops, something went wrong.