Metadata-Version: 2.1
Name: pymultigrid
Version: 0.1.0
Summary: Line-by-line molecular spectra calculations with DSM and multigrid tools
Author: Osama Abdellatif
License: MIT
Project-URL: Homepage, https://github.com
Project-URL: Bug-Tracker, https://github.com/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.22.0
Requires-Dist: numba>=0.58.1
Requires-Dist: scipy>=1.9.0
Requires-Dist: matplotlib>=3.5.0
Requires-Dist: hitran-api>=1.2.2
Requires-Dist: h5py>=3.0.0

# pymultigrid

`pymultigrid` provides line-by-line molecular spectra tools based on DSM and multigrid methods.

## Install

```bash
pip install .
```

## CLI

```bash
pymultigrid --help
pymultigrid demo dsm_demo_1
pymultigrid calc -i CO2.par -o spectrum.txt
pymultigrid calc -m multigrid -i CO2.par -r 2100 2400 -s 0.05 -t 323 -o out.txt -x
```

### Commands

- `demo DEMO` — run a script from `demo/` (e.g. `dsm_demo_1`, `dsm_demo_2`, `multigrid_demo_1`).
- `calc` — compute a spectrum and write a two-column text file (wavenumber, value).

### `calc` options

| Option | Description |
|--------|-------------|
| `-m`, `--method` | `dsm` or `multigrid` (default: `dsm`) |
| `-i`, `--input` | HITRAN `.par` file (required) |
| `-t`, `--temperature` | Temperature in K (default: 296) |
| `-p`, `--pressure` | Pressure in atm (default: 1) |
| `-f`, `--fraction` | Mole fraction of self (default: 0) |
| `-r`, `--range` | Wavenumber range `NU_MIN NU_MAX` (default: from file) |
| `-s`, `--step` | Grid step in cm⁻¹ (default: 0.01) |
| `-o`, `--output` | Output file path (required) |
| `-x`, `--abscoef` | Absorption coefficient; otherwise cross-section |
