Metadata-Version: 2.4
Name: cosmicPAHmfit
Version: 1.1.1
Summary: cosmicPAHmfit provides a multi-component spectral fit and a graphical interface to derive area-weighted peak position and width of selected infrared features.
Home-page: https://gitlab.in2p3.fr/ovgso/cosmic-pah/cosmic-pah-mfit
Author: Louan de Bentzmann
Author-email: christine.joblin@cnrs.fr
License: GPLv3
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Astronomy
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: asteval==1.0.8
Requires-Dist: contourpy==1.3.3
Requires-Dist: cycler==0.12.1
Requires-Dist: dill==0.4.1
Requires-Dist: fonttools==4.61.1
Requires-Dist: kiwisolver==1.4.9
Requires-Dist: lmfit==1.3.4
Requires-Dist: matplotlib==3.10.8
Requires-Dist: numpy==2.4.1
Requires-Dist: packaging==26.0
Requires-Dist: pandas==3.0.0
Requires-Dist: pillow==12.1.0
Requires-Dist: pyparsing==3.3.2
Requires-Dist: python-dateutil==2.9.0.post0
Requires-Dist: scipy==1.17.0
Requires-Dist: six==1.17.0
Requires-Dist: uncertainties==3.2.4
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# cosmicPAHmfit
**version** : 1.1

**Authors** : Louan de Bentzmann (CNRS, IRAP), Karine Demyk (CNRS, IRAP), Axel Pérignon (CNRS, IRAP), Vincent Marty (CNRS, IRAP), Jean-Michel Glorian (CNRS, IRAP), Christine Joblin (CNRS, IRAP)

**Licence** : [GPLv3](LICENSE)

## Description
CosmicPAHmfit is a python fitting tool. It performs a multi-component fit of the selected spectral feature using pseudo-Voigt functions (linear combination of a Gaussian curve and of a Lorentzian curve possibly modified by an asymmetry factor). It has a graphical interface to select the spectral feature of interest as well as the number of components to be included in the fit. For each component, it provides the evolution of the position, width (FWHM) and integrated intensity as a function of temperature.
User manual is available through [User manuel](https://gitlab.in2p3.fr/ovgso/cosmic-pah/cosmic-pah-mfit/-/wikis/uploads/e15e6afc169937235e6060f1bdc3e518/Manuel_d_utilisation_CosmicPAH-1.pdf)
Full code is available from [gitlab](https://gitlab.com/YOUR_USERNAME/cosmicPAHmfit/)

## Citation
[How to cite cosmicPAHmfit](https://gitlab.com/YOUR_USERNAME/cosmicPAHmfit/-/blob/main/CITATION.cff)

## Installation
```
pip install cosmicPAHmfit
python3 -m cosmicPAHmfit
```

-It is recommanded to use a virtual environment **copy/paste** The pyenv version can be above 3.12 if preferred. (On **windows** pyenv is not working, proceed to installation of a compatible python (3.12-3.15). A virtual environment is not mandatory.)
```
pyenv install 3.12.3
pyenv virtualenv 3.12.3 venv
pyenv activate venv
```


If the previous lines doesn't work. Install pyenv:
-On **Linux** To create a **pyenv virtualenv** for running an other python in a venv run the following blocks (**copy/paste**);
```
curl https://pyenv.run | bash
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
exec "$SHELL"
sudo apt-get update; sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python3-openssl git
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
```

-On **MAC** if the previous install doesn't work **copy/paste** the following:
```
brew install pyenv-virtualenv
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
```

## Usage
**Run the following line**
```
pyenv activate venv; python3 -m cosmicPAHmfit
```
**to exit the pyenv venv you must use:** 
```
pyenv deactivate
```
**If (venv) appears in the terminal, the pyenv venv is running. To run the application you can use directly:**
```
python3 -m cosmicPAHmfit
```
