Commit de0e2721 authored by Maximilian Schanner's avatar Maximilian Schanner
Browse files

Expanded the documentation section

parent fbb7201e
...@@ -40,12 +40,47 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -40,12 +40,47 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
TODO TODO
## Documentation ## Documentation
Use From the command line, you can use pymagglobal to get various results from the models. For example,
```console
$ pymagglobal dipole ARCH10k.1
```
will give a plot of the dipole moment time series for the model ARCH10k.1. In general, pymagglobal is called as
```console
$ pymagglobal command --options model
```
where `command` specifies the quantity you want to get from pymagglobal and `model` is the respective model. You can use
```console
$ pymagglobal -i <path/to/your_model> command --options your.model
```
to parse your own model, if it is in a format similar to gufm1. Use
```console ```console
$ pymagglobal --help $ pymagglobal --help
``` ```
to get info on how to use pymagglobal. TODO: Expand this section to get further information. Each command has its own help, so you may also use
```console
$ pymagglobal dipole --help
```
to get information on the options for the dipole time series.
When using `python` you can import the pymagglobal package and access the models directly:
```python
import pymagglobal
```
Using the function `file2splines` you can get a spline object, representing the model. For example, to get a spline object for gufm1, use
```python
gufm1_splines = pymagglobal.file2splines(pymagglobal.models['gufm1'])
```
This object can be evaluated to get the coefficients for a specific epoch
```python
gufm1_1600 = gufm1_splines(1600)
```
or passed to other routines in pymagglobal. For example, to get the dipole series from above use
```python
import numpy as np
times = np.linspace(1590, 1990, 201)
gufm1_dipoles = pymagglobal.dipole_series(times, gufm1_splines)
```
## Installation ## Installation
pymagglobal is built and installed using [conda](https://www.anaconda.com/). pymagglobal is built and installed using [conda](https://www.anaconda.com/).
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment