Skip to content

Commit

Permalink
Updated RTD
Browse files Browse the repository at this point in the history
  • Loading branch information
Avi committed Dec 15, 2023
1 parent 4f07dfe commit d1e928f
Show file tree
Hide file tree
Showing 14 changed files with 211 additions and 209 deletions.
4 changes: 0 additions & 4 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ build:
sphinx:
configuration: docs/source/conf.py

nav:
Home: 'index.rst'
Getting Started: 'getting_started.md'
Input Deck: 'input_deck.md'
# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
Expand Down
6 changes: 6 additions & 0 deletions docs/source/FAQ.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FAQ
---------------------------------

*Have questions?*

Please reach out and ask, we will add the common ones here.
51 changes: 51 additions & 0 deletions docs/source/best_practice.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
Best Practices for Fitting
================================

This page gives input deck snippets which produce the highest quality fits using TSADAR. It is recomended that
when fitting new data a small region of the data is fit with a small number of lineouts. This can be accomplished
by setting the :code:`lineouts: start` and :code:`lineouts: end` to be close or increasing :code:`lineouts: skip`.
This will allow fast fits that can be used to dial in the starting conditions and the free parameters.
This can also be used to check and adjust the fitting ranges. Once the best inital conditions have been identified
the entire dataset can be fit.

Background and lineout selection
---------------------------------

There are multiple options for background algorithms and types of fitting. These tend to be the best options for
various data types. All of these options are editable in the input deck.

**Best operation for time resolved data:**

.. code-block:: yaml
background:
type: pixel
slice: 900
**Best operation for spatially resolved data:**

.. code-block:: yaml
background:
type: fit
slice: 900 <or background slice for IAW>
**Best operation for lineouts of angular:**

.. code-block:: yaml
background:
type: fit
slice: <background shot number>
**Best operation for full angular:**

.. code-block:: yaml
background:
type: fit
val: <background shot number>
lineouts:
type: range
start: 90
end: 950
33 changes: 0 additions & 33 deletions docs/source/best_prectice.md

This file was deleted.

6 changes: 6 additions & 0 deletions docs/source/contributing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Contributing
---------------------------------

If there are new features you would like to see we encourage you to add to the isssues page on Github
or contribute yourself. To contribute, please fork the reposotory or create your own branch. When its time to merge
please provide an email so we can give you credit and in case we have any questions.
4 changes: 4 additions & 0 deletions docs/source/defaults.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Default options
---------------------------------

*Coming Soon*
4 changes: 4 additions & 0 deletions docs/source/examples.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Examples
---------------------------------

*Coming Soon*
21 changes: 0 additions & 21 deletions docs/source/getting_started.md

This file was deleted.

24 changes: 18 additions & 6 deletions docs/source/usage.rst → docs/source/getting_started.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Installation and Usage
==============================
Getting Started
================

*Only MacOS and Linux supported at this time. It may or may not work on Windows but is not yet tested so YMMV*

1. Clone the repo
1. Clone the repo to the local or remote machine where you will be running analysis

2. Install using below instructions or your own way

Expand All @@ -18,13 +18,19 @@ Installation and Usage
source venv/bin/activate # activate the new environment
pip install -r requirements.txt # install dependencies
**Conda**
**Conda CPU**

.. code-block:: bash
mamba env create -f env.yml
mamba activate ts-cpu
conda env create -f env.yml
conda activate tsadar-cpu
**Conda GPU**

.. code-block:: bash
conda env create -f env-gpu.yml
conda activate tsadar-gpu
**Run command**

Expand All @@ -41,3 +47,9 @@ And the other just performs a forward pass and gives you the spectra given some
.. code-block:: bash
python run_tsadar.py --cfg <path>/<to>/<inputs>/<folder> --mode forward
The inputs for the code are stored in an input deck. The default location for this input deck and therefore
the starting path for running jobs is :code:`inverse_thomson_scattering/config/1d`. These inputs should be
modified to change the specific to fit your analysis needs. More information on the Input deck can be found
on the :ref:`inputs` page.
19 changes: 12 additions & 7 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Welcome to TSADAR!
==================================

TSADAR is a Thomson scattering data analysis software written in Python. It helps determine plasma parameters given
Thomson scattering measurements by fitting the observed spectra to known parameterized functional forms. More detail on
the theory is provided elsewhere [1] and will be added to this documentation soon.
Thomson scattering measurements by fitting the collisionless spectral density function to the observed spectra.
More detail on the theory is provided elsewhere [1] and the specifics of implementation can be found in :doc:`math`.

The fitting is performed via gradient descent. The gradients are acquired using automatic differentiation and JAX [2].
More details on the numerics will be added soon.
Expand All @@ -18,13 +18,18 @@ More details on the numerics will be added soon.
:maxdepth: 2
:caption: Contents:

usage
input
fitting

getting_started
best_practice
examples
inputs
defaults
FAQ
math
contributing

*What does TSADAR stand for?*

TBD
Thomson Scattering with Automatic Differentiation for Analysis and Regression



Expand Down
50 changes: 0 additions & 50 deletions docs/source/input.rst

This file was deleted.

88 changes: 0 additions & 88 deletions docs/source/input_deck.md

This file was deleted.

Loading

0 comments on commit d1e928f

Please sign in to comment.