Metadata-Version: 2.4
Name: ankflag
Version: 3.0.4
Summary: A package to perform RFI flagging of radio interferometric data
Author-email: Apurba Bera <apurba7777@gmail.com>, Devojyoti Kansabanik <devojyoti96@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/devojyoti96/aNKflag
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.26.4
Requires-Dist: astropy>=6.1.4
Requires-Dist: matplotlib>=3.5.2
Requires-Dist: requests>=2.32.3
Requires-Dist: aiohttp>=3.10.10
Requires-Dist: parfive>=2.1.0
Requires-Dist: psutil>=5.9.8
Requires-Dist: PyYAML>=6.0.1
Requires-Dist: tqdm>=4.66.6
Requires-Dist: pyfiglet>=1.0.4
Provides-Extra: dev
Requires-Dist: sphinx>=7.2.6; extra == "dev"
Requires-Dist: furo>=2024.5.6; extra == "dev"
Requires-Dist: sphinx_rtd_theme>=2.0.0; extra == "dev"
Requires-Dist: sphinx-autodoc-typehints>=2.0.0; extra == "dev"
Requires-Dist: sphinx-copybutton>=0.5.2; extra == "dev"
Requires-Dist: sphinxcontrib-programoutput>=0.17; extra == "dev"
Requires-Dist: sphinx-togglebutton>=0.3.2; extra == "dev"
Requires-Dist: myst-parser>=2.0.0; extra == "dev"
Requires-Dist: sphinxcontrib-apidoc>=0.4.0; extra == "dev"
Requires-Dist: sphinx-automodapi>=0.15.0; extra == "dev"
Requires-Dist: numpydoc>=1.6.0; extra == "dev"
Requires-Dist: sphinxcontrib-mermaid>=0.9.2; extra == "dev"
Requires-Dist: graphviz>=0.20.3; extra == "dev"
Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "dev"
Requires-Dist: pytest==8.3.3; extra == "dev"
Requires-Dist: pytest-mock>=3.14.0; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Dynamic: license-file

<p align="center">
  <img src="https://raw.githubusercontent.com/devojyoti96/aNKflag/refs/heads/master/anklogo.png" alt="aNKflag Logo" width="200"/>
</p>
<p align="center">
  <h1>aNKflag</h1> An intelligent radio frequency interference (RFI) removal tool to work in multi-dimensions radio interferometric data.
</p>

## Background

<!-- start elevator-pitch -->

Radio interferometric observations are generally affected by terrestrial radio emission, known as radio frequency interference (RFI). **aNKflag** is an intelligent tool developed to detect and remove these RFIs both in time-frequency as well as in the Fourier domain, popularly known as **uv-domain** in radio interferometry.

- aNKflag works on UVFITS files
- Before flagging one needs to convert CASA measurement set to UVFITS
- After flagging one needs to convert UVFITS to CASA measurement set and copy the flags to original measurement set.
- These features are not provided in **aNKflag**, as these are readily available in CASA.
- This python version uses precompiled and containersed sourcecode of **aNKflag**, so no need to worry about installing C/C++ libraries.

<!-- end elevator-pitch -->

## Documentation

aNKflag documentation is available at: [ankflag.readthedocs.io]

[ankflag.readthedocs.io]: https://ankflag.readthedocs.io 

## Quickstart

<!-- start quickstart -->

**aNKflag** is distributed on [PyPI]. To use it:

1. Create conda environment with python 3

    ```text
    conda create -n ankflag_env python=3.10
    conda activate ankflag_env
    ```

2. Install aNKflag in conda environment

   ```text
   pip install ankflag
   ```

3. Initiate necessary metadata and containers

    ```text
    run-ankflag init --datadir </full/path/to/data/directory>
    ```
    
    Contaniers will be stored in the data directory.
    
4. Run aNKflag

    ```text
    run-ankflag run </full/path/to/input/uvfits> </full/path/to/output/uvfits> --scratchdir </full/path/to/ankflag/workdir> --flagmode <uvbin/baseline> --npol <num_of_polarisation> --nthreads <num_of_cpu_threads> --target_type <target_type>
    ```    

That's all. You run aNKflag for analysing flagging RFI. It will create a UVFITS file with output file location 🎉.

[pypi]: https://pypi.org/project/meersolar/

<!-- end quickstart -->

## Acknowledgements

aNKflag is developed by Apurba Bera (ASTRON, NL) and Devojyoti Kansabanik (IAA-CSIC, Spain). If you use **aNKflag** for analysing your work, include the following statement in your paper

```text
RFI flagging is perfomed using aNKflag.
```

1. Cite aNKflag software in zenodo: https://doi.org/10.5281/zenodo.20568784

and cite the following papers.

2. [aNKflag paper: Kansabanik et al., ApJS 2023][kansabanik2023]

[Kansabanik2023]: https://doi.org/10.3847/1538-4365/acac79


## License

This project is licensed under the MIT License.
