Metadata-Version: 2.4
Name: resolvit
Version: 0.1.0
Summary: Improve the PSF of UVIT data products
Project-URL: Homepage, https://github.com/prajwel/resolvit
Project-URL: Issues, https://github.com/prajwel/resolvit/issues
Author-email: Prajwel Joseph <prajwel.pj@gmail.com>
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Requires-Dist: astropy
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: scipy
Description-Content-Type: text/markdown

# Resolvit

Resolvit improves the point spread function (PSF) of UVIT Level2 products by applying sub-pixel corrections to the Level2 events list and generating a new set of derived data products.

The corrected events list is treated as the primary Resolvit product. All other Resolvit products are derived from it.

## Installation

```bash
pip install resolvit
```

## Python usage

```python
from resolvit import process_observation

process_observation(
    "20160101_A01_123T01_0123456789_level2"
)
```

### Custom parameters

```python
from resolvit import process_observation

process_observation(
    "20160101_A01_123T01_0123456789_level2",
    bin_size=50,
)
```

## Command-line usage

Process a UVIT Level2 observation directory:

```bash
resolvit 20160101_A01_123T01_0123456789_level2
```

Specify a custom time bin size:

```bash
resolvit 20160101_A01_123T01_0123456789_level2 \
    --bin-size 50
```

Show the installed version:

```bash
resolvit --version
```

## Output products

Resolvit creates a new directory alongside the original UVIT products:

```text
uvit/
├── data_products/
└── resolvit_data_products/
```

The original UVIT products are never modified.

## Diagnostics

Resolvit generates diagnostic plots and residual tables for each channel-filter-window combination:

```text
resolvit_data_products/
└── diagnostics/
    └── <product_id>/
        ├── resolvit.log
        ├── residuals_iteration_1.txt
        ├── residuals_iteration_1.png
        ├── residuals_iteration_2.txt
        ├── residuals_iteration_2.png
        └── *_correlations.png
```
