Metadata-Version: 2.4
Name: pyaraucaria
Version: 2.11.0
Summary: Common Routines of OCA Observatory and Araucaria Project
Project-URL: Homepage, https://github.com/araucaria-project/pyaraucaria
Project-URL: Repository, https://github.com/araucaria-project/pyaraucaria
Author: Araucaria Project
License-Expression: LGPL-3.0-or-later
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Astronomy
Requires-Python: >=3.10
Requires-Dist: astroplan
Requires-Dist: astropy
Requires-Dist: ephem
Requires-Dist: lark
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: scipy
Provides-Extra: dev
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Provides-Extra: yaml
Requires-Dist: pyyaml; extra == 'yaml'
Description-Content-Type: text/markdown

# Common Routines of OCA Observatory and Araucaria Project

This library is intended to group various common routines and commandline tools used in Araucaria Project and OCA observatory software.

Routines of this library should contain external dependencies as limited as possible. Requires Python 3.10+.

## Installation

#### Basic install:

```bash
pip install git+https://github.com/araucaria-project/pyaraucaria.git
```

#### Developer install

```bash
git clone https://github.com/araucaria-project/pyaraucaria.git
cd pyaraucaria
uv sync --all-extras
```

#### Usage in your project

Add to your `pyproject.toml` dependencies:
```toml
dependencies = [
    "pyaraucaria @ git+https://github.com/araucaria-project/pyaraucaria.git",
]
```

## Routines

### Coordinates
`coordinates.py` contains dependency-free fast routines to parse/format sexagesimal coordinates.

### Lookup Objects
Lookup for objects/targets parameters using one of its aliases.
Uses `Objects.database` nad `TAB.ALL` files.

Example

```python
>>> from pyaraucaria.lookup_objects import ObjectsDatabase
>>> od = ObjectsDatabase()
>>> od.lookup_object('lmc105_8_11987')
{'name': 'CEP25', 
 'ra': '05:18:12.8', 
 'dec': '-71:17:15.4', 
 'per': 3.4050955, 
 'hjd0': 2160.55457, 
 'aliases': ['LMC-T2CEP-085', 'lmc105.8_11987', 'lmc105_8_11987', 'cepii_lmc105_8_11987'], 
 'hname': 'LMC-T2CEP-085'
}
```

#### Command Line
```bash
$ lookup_objects -j hd167003
{"hd167003": {"name": "HIP37", "ra": "18:14:43.3", "dec": "-33:08:41.8", "aliases": ["hd_167003", "hd167003"]}}
```
See also
```bash
$ lookup_objects --help
```

#### Optional dependencies
For YAML output (`-y` option), some `yaml` python package should be installed.

### Star Object Data Library
Set of routines for parsing `TAB.ALL`-like files

Example
```python
>>> from pyaraucaria import libobject
>>> ol = libobject.ObjectList('TAB.ALL')
>>> ol.get_object('AL_Dor').data
{'I': None,
 'K': None,
 'V': 7.8,
 'aop': 1.8771,
 'band': 'V',
 'comment': None,
 'dec': '-60:36:14',
 'ecc': 0.1952,
 'file': None,
 'group': 'hipp',
 'hjd0': 2452764.100149,
 'k1': 57.477,
 'k2': 57.253,
 'lc': 'I',
 'obstype': None,
 'per': 14.90519957,
 'phext': None,
 'ra': '04:46:52.2',
 'status': None,
 'v0': 11.836}
```

