Metadata-Version: 2.1
Name: pywerami
Version: 0.2.8
Summary: pywerami is a stand-alone program to make an countour/3D plot from a contour data file generated by the Perple_X program WERAMI.
Home-page: https://github.com/ondrolexa/pywerami
Author: Ondrej Lexa
Author-email: lexa.ondrej@gmail.com
License: MIT
Project-URL: Documentation, https://pywerami.readthedocs.io/
Project-URL: Source Code, https://github.com/ondrolexa/pywerami/
Project-URL: Bug Tracker, https://github.com/ondrolexa/pywerami/issues/
Keywords: pywerami
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Utilities
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: AUTHORS.md
Requires-Dist: PyQt5
Requires-Dist: numpy
Requires-Dist: matplotlib
Requires-Dist: scipy

# pywerami

[![GitHub version](https://badge.fury.io/gh/ondrolexa%2Fpywerami.svg)](https://badge.fury.io/gh/ondrolexa%2Fpywerami)
[![Documentation Status](https://readthedocs.org/projects/pywerami/badge/?version=latest)](https://readthedocs.org/projects/pywerami/?badge=latest)
[![DOI](https://zenodo.org/badge/46796466.svg)](https://zenodo.org/badge/latestdoi/46796466)

## What is pywerami

pywerami is a stand-alone program to make an countour/3D plot from data
file generated by the Perple_X program WERAMI or tci file generated by
TCInvestigator.

## Installation

pywerami can be installed as a Python package on Windows, Linux, Mac OS X, and Mac OS Apple Silicon.

You need Python 3.6 or later to run pywerami. The package requires [NumPy](https://numpy.org/) and [SciPy](https://www.scipy.org/), and the plotting routines require [Matplotlib](https://matplotlib.org/), so we **strongly** recommend using [Miniforge](https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html) to install it in its own isolated environment.

The newest version of pywerami can always be found in the [Releases page](https://github.com/ondrolexa/pywerami/releases).

Installation requires entering commands in a terminal. To open one:

   **Windows:** Open the *Start menu* and search for the *Miniforge Prompt* (if using Miniforge) or the *Command Prompt* if not.

   **Linux:** Launch a new terminal by pressing <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>T</kbd>.

   **Mac:** Launch a new terminal by pressing <kbd>Cmd</kbd> + <kbd>Space</kbd> and searching for _Terminal_.


## Installing Miniforge

**Miniforge** is the minimal installers for [Conda](https://conda.io/) and [Mamba](https://github.com/mamba-org/mamba) specific to [conda-forge](https://conda-forge.org/), with the pre-configured conda-forge channel as the default (and only) channel.

If you already have Anaconda on your computer, then you can set the solver to `libmamba` in the `base` environment (and skip the Miniforge installation):

```bash
conda update -n base conda
conda install -n base conda-libmamba-solver
conda config --set solver libmamba
```

Otherwise, to install Mamba:

**On Windows**, just click through the installation steps.

1.  Go to: https://github.com/conda-forge/miniforge#download
2.  Download the latest version for your OS.
3.  Follow the installer instructions.

We recommend using the following settings:

- Install for: All Users (requires admin privileges)
- Destination folder: e.g. `C:\mambaforge`, do not use folders with space character on the path like `C:\Program Files\mambaforge` or containing special national characters.

**On Linux**, it might be easier to do this straight from the terminal (<kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>T</kbd>) with this one-liner:

```bash
wget -nc https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh && bash Mambaforge-Linux-x86_64.sh -b && ~/mambaforge/bin/conda init bash
```

Restart the terminal after running this command.

For other Linux architectures (arm64 and POWER8/9), replace the `.sh` filenames above with the correct installer name for your architecture. See the Download column in [this table](https://github.com/conda-forge/miniforge#mambaforge) for the correct filename.


**On Macs (pre-M1)**, you can run the installer using this terminal command:

```bash
wget -nc https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-x86_64.sh && bash Miniforge3-MacOSX-x86_64.sh -b && ~/mambaforge/bin/conda init zsh
```

**On Macs (Apple Silicon)**, use this terminal command:

```bash
curl -fsSL --compressed https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh -o Miniforge3-MacOSX-arm64.sh && chmod +x Miniforge3-MacOSX-arm64.sh && ./Miniforge3-MacOSX-arm64.sh -b -p ~/mambaforge && rm Miniforge3-MacOSX-arm64.sh && ~/mambaforge/bin/conda init "$(basename "${SHELL}")" && source "$HOME/.$(basename "${SHELL}")rc"
```

## Installation methods

pywerami could be installed using pip two different ways:

### Using `pip` package

Although you do not need Mambaforge installed to perform a `pip install`, we recommend {ref}`installing Mambaforge<mambaforge>` to create a new environment where we can isolate the `pip install`. Alternatively, you can use a venv if you have an existing python installation.

1. Create the environment to isolate the `pip install` from other environments on your computer:

   ```bash
   mamba create -y -n pywerami python=3 pyqt=5 numpy matplotlib scipy
   ```

2. Activate the environment:

   ```bash
   mamba activate pywerami
   ```

   Refrain from installing anything into the `base` environment. Always create a new environment to install new packages.

3. Finally, we can perform the `pip install`:

   ```bash
   pip install pywerami
   ```

   This is the **recommended installation method**.

### Using `pip` from source

1. Download zip source from [Releases page](https://github.com/ondrolexa/pywerami/releases) or download [master version](https://github.com/ondrolexa/pywerami/archive/refs/heads/master.zip). Unzip the folder, open terminal and change directory to unzipped folder.

2. Create separate environment with all requirements:

   ```bash
   mamba env create -f environment.yml
   ```

3. Finally, we can perform the `pip install`:

   ```bash
   pip install .
   ```

   This is the **recommended method for development**.

## Testing that things are working

If you installed using `mamba`, first activate the `pywerami` environment by opening a terminal and typing:

```bash
mamba activate pywerami
```

Not sure what `mamba` environments you already installed? You can get a list of the environments on your system with:

```bash
mamba env list
```

to start pywerami, simply type:

```bash
pywerami
```

### Upgrading and uninstalling

We **strongly recommend** installing pywerami in a fresh environment when updating. This is because dependency versions might change, and depending on the state of your previous environment, directly updating might break compatibility with some of them.

To uninstall an existing environment named `sleap`:

```bash
mamba env remove -n pywerami
```

Once the environment has been removed, you are free to install pywerami using any of the installation methods above into an environment of the same name.

## Getting help

If you get any errors [open a new Issue](https://github.com/ondrolexa/pywerami/issues) providing the versions from either command above, as well as any errors you saw in the console during the installation.

## Donate

pywerami is an open-source project, available for you for free. It took a lot of time and resources to build this software. If you find this software useful and want to support its future development please consider donating me.

[![Donate via PayPal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=QTYZWVUNDUAH8&item_name=pywerami+development+donation&currency_code=EUR&source=url)

## License

pywerami is free software: you can redistribute it and/or modify it under the terms of the MIT License. A copy of this license is provided in ``LICENSE`` file.


# History

### 0.2.8 (2024-12-05)

* NumPy>=2.0 compatibility fix
* pkg_resources depreceation fix

### 0.2.7 (2023-09-01)

* Option to change T(K) and T(C) added

### 0.2.6 (2021-04-08)

* Added colorbar option
* Github workflows implemented

### 0.2.5 (2017-12-05)

* Deployment fixes

### 0.2.4 (2017-03-03)

* Changed default cmap to viridis
* Fix of contours min max
* Default formatter of contour labels changed to general format
* Added setting to define number of digits for contour levels
  for nicer formatting
* Fix for duplicates in tab file

### 0.2.3 (2017-02-03)

* Added support for TCInvestigator tci files
* Fix for selection behaviour when component checked
* Project files implemented

### 0.2.2 (2017-01-13)

* Minimum number of levels is 2
* For single contour set Minimum and Maximum to same value

## 0.2 (2017-01-03)

* Setup and conda fixes
* Changed to PyQt5

## 0.1 (2015-01-11)

* First release on PyPI
