Metadata-Version: 2.4
Name: almaqso
Version: 1.5.1.post1
Summary: Add your description here
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: astroquery>=0.4.10
Requires-Dist: ipython>=9.0.2
Requires-Dist: numpy>=2.2.4
Requires-Dist: pandas>=2.2.3
Requires-Dist: pyvo>=1.6.1
Requires-Dist: scipy>=1.15.2
Requires-Dist: setuptools>=78.0.2
Requires-Dist: tqdm>=0.0.1
Dynamic: license-file

<a href='https://github.com/skrbcr/almaqso' target="_blank"><img alt='GitHub' src='https://img.shields.io/badge/GitHub_Repository-100000?style=flat&logo=GitHub&logoColor=white&labelColor=black&color=FFFFFF'/></a>
[![Static Badge](https://img.shields.io/badge/docs-GitHub%20Pages-blue?logo=GitHub)](https://skrbcr.github.io/almaqso/)

# almaqso

This repository is a folk of [astroysmr/almaqso](https://github.com/astroysmr/almaqso), which is no longer maintained.
So many bugs are still there, and I am trying to fix them.

**PLEASE REFER TO THE [ISSUE](https://github.com/skrbcr/almaqso/issues) SECTION SINCE IT CONTAINS THE BUGS AND INFORMATION.**

## Pre-requisites

### CASA

- Please use CASA with ALMA pipeline. I am using `CASA version 6.6.1-17-pipeline-2024.1.0.8`.

### CASA Modules

Almaqso uses [analysisUtilites](https://zenodo.org/records/13887809).

**Modification of analysisUtilites is necessary**.
Please read [Pre-requisites](PreRequisites.md).

## Installation

You can install this package by

```shell
pip install almaqso
```

Then you can use the package like this:

```python
import almaqso
```

## Usage

See `sample` folder and [documentation](https://skrbcr.github.io/almaqso/).

## Test

### CASA to use

First, make sure that you have CASA with ALMA pipeline installed e.g., 6.6.1-17-pipeline-2024.1.0.8.

### Prepare the environment

Then please install [uv](https://github.com/astral-sh/uv).

Then, you can reproduce the environment by

```shell
uv sync --dev
```

### Test run

Edit `test/test_download_analysis.py`:

```python
# test/test_download_analysis.py
# Edit the following constants.

...

CASA_PATH = 'casa'  # Path to CASA. Please modify this if necessary.

...

DOWNLOAD = False  # True: Download the tar file, False: Use the existing tar file
MODE = 'aftercal'  # 'all': All Steps, 'calonly': Step 1-4, 'aftercal': Step 5-8 of analysis
```

Then you can run the test by

```
uv run pytest
```

### Usage

To work with this package, you have to download JSON files from [ALMA Calibrator Source Catalogue](https://almascience.nao.ac.jp/sc/).
Explanation on it is [here](https://almascience.nao.ac.jp/alma-data/calibrator-catalogue).

Sample code is at `sample/sample.py`.

### Branches

- `main`: The main branch.
- `with-old-codes`: The branch with old codes (created by original editor). This is for the reference.
