Getting Started¶
Set-Up¶
The MATS package was developed and tested using the Anaconda python environment. Example scripts have typically been written and run using jupyter notebooks (run in jupyter lab), as this allows for code to be run in segments and for iteration on certain code segments. Any python package distribution should work with the code as long as the dependent packages are installed.
Main Packages¶
HITRAN Application Programming Interface (HAPI) The v1.2.2.1 was tested and is available in the MATS repository.
Dependent Packages¶
MATS is not written as a basic package, meaning that there are several dependent packages that need to be installed.
If a desired package is not installed then the following command will install it. Many python package distributions have integrated package managers and required packages can also be installed through that mechanism.
pip install package_name
There is commonly a delay in the most recent package releases available in python package distribution package managers compared to that available through pip install. The following command line script will update to the newest release if a package is already installed. This should only be necessary if there is an error when running MATS with the currently installed version.
python -m pip install --upgrade package_name --user
Below are a list of the packages used in MATS.
numpy - python’s fundamental scientific computing package
pandas - python data structure package
os, sys - system variables
lmfit - non-linear least-squares minimization and curve-fitting for python
matplotlib - python plotting
seaborn - pretty plotting
scipy.fftpack - provides fft functionality
jupyter lab - web-based user interface for Project Jupyter
Install¶
Taken from the INSTALL.md file
Basic MATS installation instructions. Note that development is alpha. In the future, full pypi/conda installs will be made available.
Create a conda environment with MATS dependencies
Download the [environment](environment.yml) file. Note that without setting the environment name below, by default an evironment MATS-env will be created.
conda env create -n {optional-name-of-environment} -f environment.yml
Alternatively, we provide a conda metapackage mats-dependencies, which includes all dependencies for MATS` (excluding python). This can be installed using
conda install -n {optional-name-of-environment} -c wpk-nist mats-dependencies
From source
After cloning the repo, you can do the following.
pip install .
To install an editable version, use option -e. To exclude dependencies, use option –no-deps
With pip from github
This requires git also be installed. Downside is that the whole repo (including all examples) are clones.
pip install git+https://github.com/wpk-nist-gov/MATS.git@feature/master-reformat
With pip from github using wheel Note, this is experimental. Do the following
pip install https://raw.githubusercontent.com/wpk-nist-gov/MATS/feature/master-reformat/wheel/MATS-3-py3-none-any.whl
(Note that the actual version will not be 3)
Alternatively, download the wheel and run
pip install path-to-wheel.whl