avica 0.3.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. avica-0.3.1.0/.github/workflows/build_wheels.yml +69 -0
  2. avica-0.3.1.0/.gitignore +140 -0
  3. avica-0.3.1.0/.gitmodules +3 -0
  4. avica-0.3.1.0/.readthedocs.yaml +23 -0
  5. avica-0.3.1.0/CHANGELOG +26 -0
  6. avica-0.3.1.0/CMakeLists.txt +68 -0
  7. avica-0.3.1.0/CONTRIBUTING +0 -0
  8. avica-0.3.1.0/PKG-INFO +212 -0
  9. avica-0.3.1.0/README.md +177 -0
  10. avica-0.3.1.0/docs/Makefile +20 -0
  11. avica-0.3.1.0/docs/make.bat +35 -0
  12. avica-0.3.1.0/docs/requirements.txt +5 -0
  13. avica-0.3.1.0/docs/source/_static/images/pipeline-workflow.svg +5 -0
  14. avica-0.3.1.0/docs/source/api/fitsidiutil.rst +62 -0
  15. avica-0.3.1.0/docs/source/api/ms.rst +18 -0
  16. avica-0.3.1.0/docs/source/api/pipe.rst +18 -0
  17. avica-0.3.1.0/docs/source/api/plotting.rst +10 -0
  18. avica-0.3.1.0/docs/source/api.rst +20 -0
  19. avica-0.3.1.0/docs/source/conf.py +56 -0
  20. avica-0.3.1.0/docs/source/examples.rst +93 -0
  21. avica-0.3.1.0/docs/source/index.rst +157 -0
  22. avica-0.3.1.0/docs/source/pipeline.rst +109 -0
  23. avica-0.3.1.0/environments.yml +4 -0
  24. avica-0.3.1.0/pyproject.toml +94 -0
  25. avica-0.3.1.0/src/avica/__init__.py +406 -0
  26. avica-0.3.1.0/src/avica/cli_new.py +183 -0
  27. avica-0.3.1.0/src/avica/clibkup.py +441 -0
  28. avica-0.3.1.0/src/avica/config.py +29 -0
  29. avica-0.3.1.0/src/avica/core.py +112 -0
  30. avica-0.3.1.0/src/avica/external/jive/README.md +117 -0
  31. avica-0.3.1.0/src/avica/external/jive/append_gc.py +42 -0
  32. avica-0.3.1.0/src/avica/external/jive/append_tsys.py +42 -0
  33. avica-0.3.1.0/src/avica/external/jive/append_wx.py +377 -0
  34. avica-0.3.1.0/src/avica/external/jive/casavlbitools/__init__.py +0 -0
  35. avica-0.3.1.0/src/avica/external/jive/casavlbitools/casa.py +232 -0
  36. avica-0.3.1.0/src/avica/external/jive/casavlbitools/fitsidi.py +762 -0
  37. avica-0.3.1.0/src/avica/external/jive/casavlbitools/key.py +206 -0
  38. avica-0.3.1.0/src/avica/external/jive/doc/requirements.tex +985 -0
  39. avica-0.3.1.0/src/avica/external/jive/eop.py +354 -0
  40. avica-0.3.1.0/src/avica/external/jive/fix_idi.py +68 -0
  41. avica-0.3.1.0/src/avica/external/jive/flag.py +41 -0
  42. avica-0.3.1.0/src/avica/external/jive/gc.py +47 -0
  43. avica-0.3.1.0/src/avica/external/jive/gc2.py +219 -0
  44. avica-0.3.1.0/src/avica/external/jive/importtsys.py +420 -0
  45. avica-0.3.1.0/src/avica/external/jive/model.py +504 -0
  46. avica-0.3.1.0/src/avica/fitsidiutil/.gitignore +7 -0
  47. avica-0.3.1.0/src/avica/fitsidiutil/CHANGELOG +61 -0
  48. avica-0.3.1.0/src/avica/fitsidiutil/README.md +95 -0
  49. avica-0.3.1.0/src/avica/fitsidiutil/__init__.py +10 -0
  50. avica-0.3.1.0/src/avica/fitsidiutil/__init__.pyi +49 -0
  51. avica-0.3.1.0/src/avica/fitsidiutil/bindings.cpp +144 -0
  52. avica-0.3.1.0/src/avica/fitsidiutil/chk +0 -0
  53. avica-0.3.1.0/src/avica/fitsidiutil/cli.py +166 -0
  54. avica-0.3.1.0/src/avica/fitsidiutil/core.py +36 -0
  55. avica-0.3.1.0/src/avica/fitsidiutil/extrabyte.h +50 -0
  56. avica-0.3.1.0/src/avica/fitsidiutil/fitsidi_io.h +1130 -0
  57. avica-0.3.1.0/src/avica/fitsidiutil/fitsidi_lib.h +293 -0
  58. avica-0.3.1.0/src/avica/fitsidiutil/io.py +895 -0
  59. avica-0.3.1.0/src/avica/fitsidiutil/obs.py +217 -0
  60. avica-0.3.1.0/src/avica/fitsidiutil/op.py +948 -0
  61. avica-0.3.1.0/src/avica/fitsidiutil/split.py +182 -0
  62. avica-0.3.1.0/src/avica/fitsidiutil/test +0 -0
  63. avica-0.3.1.0/src/avica/fitsidiutil/test.cpp +81 -0
  64. avica-0.3.1.0/src/avica/fitsidiutil/validation.py +628 -0
  65. avica-0.3.1.0/src/avica/helpers/__init__.py +92 -0
  66. avica-0.3.1.0/src/avica/ms/__init__.py +1551 -0
  67. avica-0.3.1.0/src/avica/ms/fringefit.py +642 -0
  68. avica-0.3.1.0/src/avica/ms/fringefitdepc.py +1285 -0
  69. avica-0.3.1.0/src/avica/ms/meta.py +197 -0
  70. avica-0.3.1.0/src/avica/ms/mpiclient.py +52 -0
  71. avica-0.3.1.0/src/avica/ms/tables.py +509 -0
  72. avica-0.3.1.0/src/avica/pipe/__init__.py +139 -0
  73. avica-0.3.1.0/src/avica/pipe/_core.py +0 -0
  74. avica-0.3.1.0/src/avica/pipe/config.py +512 -0
  75. avica-0.3.1.0/src/avica/pipe/core.py +1824 -0
  76. avica-0.3.1.0/src/avica/pipe/data/rfc_2024a_cat.txt +22129 -0
  77. avica-0.3.1.0/src/avica/pipe/data/smile_complete_table.txt +5208 -0
  78. avica-0.3.1.0/src/avica/pipe/data/vlba_gains.key +12931 -0
  79. avica-0.3.1.0/src/avica/pipe/helpers.py +1404 -0
  80. avica-0.3.1.0/src/avica/pipe/input_template/array.inp +71 -0
  81. avica-0.3.1.0/src/avica/pipe/input_template/array_finetune.inp +446 -0
  82. avica-0.3.1.0/src/avica/pipe/input_template/constants.inp +404 -0
  83. avica-0.3.1.0/src/avica/pipe/input_template/flagging.inp +106 -0
  84. avica-0.3.1.0/src/avica/pipe/input_template/observation.inp +108 -0
  85. avica-0.3.1.0/src/avica/pipe/main.py +21 -0
  86. avica-0.3.1.0/src/avica/pipe/mpicasa_worker.py +64 -0
  87. avica-0.3.1.0/src/avica/pipe/perl/__init__.py +0 -0
  88. avica-0.3.1.0/src/avica/pipe/perl/phaseshift.pl +98 -0
  89. avica-0.3.1.0/src/avica/pipe/perl/run_mpicasa.pl +118 -0
  90. avica-0.3.1.0/src/avica/pipe/steps.py +1298 -0
  91. avica-0.3.1.0/src/avica/pipe/tasks/__init__.py +3 -0
  92. avica-0.3.1.0/src/avica/pipe/tasks/fringefit.py +278 -0
  93. avica-0.3.1.0/src/avica/sources/__init__.py +458 -0
  94. avica-0.3.1.0/src/avica/util.py +690 -0
  95. avica-0.3.1.0/src/avica/vasco.meta/refants_fits.out +13 -0
  96. avica-0.3.1.0/src/avica/vasco.meta/refants_fits.vasco +1 -0
  97. avica-0.3.1.0/src/avica/vasco.meta/sources_fits.vasco +1 -0
  98. avica-0.3.1.0/tests/alfrd.last +1 -0
  99. avica-0.3.1.0/tests/importfitsidi.last +6 -0
  100. avica-0.3.1.0/tests/mstransform.last +56 -0
  101. avica-0.3.1.0/tests/smile_complete_table.txt +5208 -0
  102. avica-0.3.1.0/tests/test1.py +21 -0
  103. avica-0.3.1.0/tests/test2.py +19 -0
  104. avica-0.3.1.0/tests/test3.py +32 -0
  105. avica-0.3.1.0/tests/test_pipeline.py +134 -0
  106. avica-0.3.1.0/tests/vasco.logs/vasco_crash_fits_to_ms.json +33 -0
  107. avica-0.3.1.0/tests/vasco.logs/vasco_crash_phaseshift.json +33 -0
  108. avica-0.3.1.0/tests/vasco.logs/vasco_crash_preprocess_fitsidi.json +33 -0
  109. avica-0.3.1.0/tests/vasco.logs/vasco_crash_rpicard.json +33 -0
  110. avica-0.3.1.0/tests/vasco.logs/vasco_crash_vasco_avg.json +33 -0
  111. avica-0.3.1.0/tests/vasco.logs/vasco_crash_vasco_fill_input.json +33 -0
  112. avica-0.3.1.0/tests/vasco.logs/vasco_crash_vasco_snr.json +33 -0
  113. avica-0.3.1.0/tests/vasco.logs/vasco_crash_vasco_split_ms.json +46 -0
  114. avica-0.3.1.0/tests/vasco.logs/vasco_crash_vascometa_ms.json +33 -0
@@ -0,0 +1,69 @@
1
+ name: Build Wheels
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ release:
6
+ types: [published]
7
+ push:
8
+ tags:
9
+ - "v*"
10
+
11
+ jobs:
12
+ build_wheels:
13
+ name: Build wheels on ${{ matrix.os }}
14
+ runs-on: ${{ matrix.os }}
15
+ strategy:
16
+ matrix:
17
+ os: [ubuntu-latest, macos-latest]
18
+
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+ # with:
22
+ # submodules: recursive # for jive scripts
23
+
24
+ - name: Build wheels
25
+ uses: pypa/cibuildwheel@v3.4.1
26
+ env:
27
+ CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* cp313-*"
28
+
29
+ - uses: actions/upload-artifact@v4
30
+ with:
31
+ name: cibw-wheels-${{ matrix.os }}
32
+ path: ./wheelhouse/*.whl
33
+
34
+ build_sdist:
35
+ name: Build source distribution
36
+ runs-on: ubuntu-latest
37
+ steps:
38
+ - uses: actions/checkout@v4
39
+ # with:
40
+ # submodules: recursive # for jive scripts
41
+
42
+ - name: Build sdist
43
+ run: pipx run build --sdist
44
+
45
+ - uses: actions/upload-artifact@v4
46
+ with:
47
+ name: sdist
48
+ path: dist/*.tar.gz
49
+
50
+ upload_pypi:
51
+ name: Upload to PyPI
52
+ needs: [build_wheels, build_sdist]
53
+ runs-on: ubuntu-latest
54
+ environment: pypi
55
+ permissions:
56
+ id-token: write
57
+ steps:
58
+ - uses: actions/download-artifact@v4
59
+ with:
60
+ pattern: wheels-*
61
+ merge-multiple: true
62
+ path: dist
63
+
64
+ - uses: actions/download-artifact@v4
65
+ with:
66
+ name: sdist
67
+ path: dist
68
+
69
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,140 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.ms/
6
+ *.ms
7
+ table.f*_TSM1
8
+ casa*log_*
9
+ diag*/
10
+ wheelhouse/*
11
+ # C extensions
12
+ *.so
13
+
14
+ # Distribution / packaging
15
+ .Python
16
+ build/
17
+ develop-eggs/
18
+ dist/
19
+ downloads/
20
+ eggs/
21
+ .eggs/
22
+ lib/
23
+ lib64/
24
+ parts/
25
+ sdist/
26
+ var/
27
+ wheels/
28
+ pip-wheel-metadata/
29
+ share/python-wheels/
30
+ *.egg-info/
31
+ .installed.cfg
32
+ *.egg
33
+ MANIFEST
34
+
35
+ # PyInstaller
36
+ # Usually these files are written by a python script from a template
37
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
38
+ *.manifest
39
+ *.spec
40
+
41
+ # Installer logs
42
+ pip-log.txt
43
+ pip-delete-this-directory.txt
44
+
45
+ # Unit test / coverage reports
46
+ htmlcov/
47
+ .tox/
48
+ .nox/
49
+ .coverage
50
+ .coverage.*
51
+ .cache
52
+ nosetests.xml
53
+ coverage.xml
54
+ *.cover
55
+ *.py,cover
56
+ .hypothesis/
57
+ .pytest_cache/
58
+
59
+ # Translations
60
+ *.mo
61
+ *.pot
62
+
63
+ # Django stuff:
64
+ *.log
65
+ local_settings.py
66
+ db.sqlite3
67
+ db.sqlite3-journal
68
+
69
+ # Flask stuff:
70
+ instance/
71
+ .webassets-cache
72
+
73
+ # Scrapy stuff:
74
+ .scrapy
75
+
76
+ # Sphinx documentation
77
+ docs/_build/
78
+
79
+ # PyBuilder
80
+ target/
81
+
82
+ # Jupyter Notebook
83
+ .ipynb_checkpoints
84
+
85
+ # IPython
86
+ profile_default/
87
+ ipython_config.py
88
+
89
+ # pyenv
90
+ .python-version
91
+
92
+ # pipenv
93
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
95
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
96
+ # install all needed dependencies.
97
+ #Pipfile.lock
98
+
99
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
100
+ __pypackages__/
101
+
102
+ # Celery stuff
103
+ celerybeat-schedule
104
+ celerybeat.pid
105
+
106
+ # SageMath parsed files
107
+ *.sage.py
108
+
109
+ # Environments
110
+ .env
111
+ .venv
112
+ env/
113
+ venv/
114
+ ENV/
115
+ env.bak/
116
+ venv.bak/
117
+
118
+ # Spyder project settings
119
+ .spyderproject
120
+ .spyproject
121
+
122
+ # Rope project settings
123
+ .ropeproject
124
+
125
+ # mkdocs documentation
126
+ /site
127
+
128
+ # mypy
129
+ .mypy_cache/
130
+ .dmypy.json
131
+ dmypy.json
132
+
133
+ # Pyre type checker
134
+ .pyre/
135
+ src/avica/fits/
136
+ src/avica/fitsio/
137
+ src/avica/idifits/
138
+ docs/source/_static/avica_demo.gif
139
+ docs/source/_static/vasco_demo.gif
140
+ src/avica/fitsioutil/__init__.py
@@ -0,0 +1,3 @@
1
+ [submodule "src/avica/external"]
2
+ path = src/avica/external
3
+ url = https://github.com/jive-vlbi/casa-vlbi.git
@@ -0,0 +1,23 @@
1
+ # Read the Docs configuration file
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
+
4
+ # Required
5
+ version: 2
6
+
7
+ # Set the OS, Python version, and other tools you might need
8
+ build:
9
+ os: ubuntu-24.04
10
+ tools:
11
+ python: "3.10"
12
+
13
+ # Build documentation in the "docs/" directory with Sphinx
14
+ sphinx:
15
+ configuration: docs/source/conf.py
16
+
17
+ # Optionally, but recommended,
18
+ # declare the Python requirements required to build your documentation
19
+ # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
20
+ python:
21
+ install:
22
+ - requirements: docs/requirements.txt
23
+
@@ -0,0 +1,26 @@
1
+ # Changelog
2
+
3
+ ## [0.3.1] - 2026-05-01
4
+
5
+ ### Added
6
+ - Project renamed from **vasco** to **avica**.
7
+ - Added `DeprecationWarning` for users still using the `vasco` package name.
8
+ - Configuration support for `phref` (phase reference) observations.
9
+ - `success_count` tracking for `avicametams`.
10
+ - Vendored `casavlbitools` as plain files for better portability.
11
+
12
+ ### Changed
13
+ - `avica.ms.polars` merged into `avica.ms.table`.
14
+ - Optimized `preprocess_fitsidi` for faster `FREQUENCY` table reading.
15
+ - Improved RFC value parsing using `pd.to_numeric` for better reliability.
16
+
17
+ ### Fixed
18
+ - Fixed ANTAB generation imports and header parsing errors.
19
+ - Handled empty/missing values in RFC catalog searches more gracefully.
20
+
21
+ ### Removed
22
+ - Removed `avica.ms.polars` as a standalone module (merged).
23
+
24
+ [unreleased]: https://github.com/avikhagol/avica/compare/v0.3.1...HEAD
25
+ [0.3.1]: https://github.com/avikhagol/avica/compare/v0.2.0...v0.3.1
26
+ [0.1.2] : https://github.com/avikhagol/avica/compare/v0.1.2...v0.1.5
@@ -0,0 +1,68 @@
1
+ cmake_minimum_required(VERSION 3.18...3.30)
2
+ option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
3
+ set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
4
+ set(CMAKE_POSITION_INDEPENDENT_CODE ON CACHE BOOL "" FORCE)
5
+
6
+ project(${SKBUILD_PROJECT_NAME} LANGUAGES CXX VERSION ${SKBUILD_PROJECT_VERSION})
7
+
8
+ set_property(GLOBAL PROPERTY JOB_POOLS one_jobs=4 two_jobs=8)
9
+
10
+ include(FetchContent)
11
+ set(CMAKE_CXX_STANDARD 17)
12
+ set(CMAKE_C_STANDARD 17)
13
+ set(CFITSIO_VERSION 4.5.0)
14
+
15
+ if(DEFINED ENV{VIRTUAL_ENV})
16
+ set(Python3_EXECUTABLE "$ENV{VIRTUAL_ENV}/bin/python3")
17
+ endif()
18
+ find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)
19
+ find_package(ZLIB REQUIRED)
20
+
21
+ set(PYBIND11_NEWPYTHON ON)
22
+ find_package(pybind11 CONFIG REQUIRED)
23
+
24
+ set(USE_CURL OFF CACHE BOOL "" FORCE)
25
+ set(USE_PTHREADS OFF CACHE BOOL "" FORCE)
26
+ set(SKIP_INSTALL_ALL ON CACHE BOOL "" FORCE)
27
+ set(BUILD_TESTING OFF CACHE BOOL "" FORCE)
28
+ set(CFITSIO_SKIP_PROGRAMS ON CACHE BOOL "" FORCE)
29
+
30
+ FetchContent_Declare(cfitsio
31
+ URL https://github.com/HEASARC/cfitsio/archive/refs/tags/cfitsio-${CFITSIO_VERSION}.tar.gz
32
+ )
33
+ FetchContent_MakeAvailable(cfitsio)
34
+
35
+ if(NOT TARGET cfitsio)
36
+ message(FATAL_ERROR "cfitsio target not found after FetchContent")
37
+ endif()
38
+
39
+ get_target_property(_type cfitsio TYPE)
40
+ message(STATUS "cfitsio TYPE: ${_type}")
41
+ set_target_properties(cfitsio PROPERTIES
42
+ POSITION_INDEPENDENT_CODE ON
43
+ JOB_POOL_COMPILE one_jobs
44
+ JOB_POOL_LINK one_jobs
45
+ )
46
+
47
+ set(FITSIDIUTIL_MODULE _core)
48
+ pybind11_add_module(${FITSIDIUTIL_MODULE} MODULE src/avica/fitsidiutil/bindings.cpp)
49
+ set_target_properties(${FITSIDIUTIL_MODULE} PROPERTIES
50
+ OUTPUT_NAME _core
51
+ JOB_POOL_COMPILE one_jobs
52
+ JOB_POOL_LINK two_jobs
53
+ )
54
+
55
+ target_link_libraries(${FITSIDIUTIL_MODULE} PRIVATE
56
+ $<TARGET_FILE:cfitsio>
57
+ ZLIB::ZLIB
58
+ Python3::Module
59
+ )
60
+ target_include_directories(${FITSIDIUTIL_MODULE} PRIVATE
61
+ ${cfitsio_SOURCE_DIR}
62
+ ${cfitsio_SOURCE_DIR}/include
63
+ )
64
+
65
+ install(TARGETS ${FITSIDIUTIL_MODULE}
66
+ LIBRARY DESTINATION ${SKBUILD_PROJECT_NAME}/fitsidiutil
67
+ RUNTIME DESTINATION ${SKBUILD_PROJECT_NAME}/fitsidiutil
68
+ )
File without changes
avica-0.3.1.0/PKG-INFO ADDED
@@ -0,0 +1,212 @@
1
+ Metadata-Version: 2.2
2
+ Name: avica
3
+ Version: 0.3.1.0
4
+ Summary: AVICA: Automated VLBI pipeline in CASA
5
+ Author-Email: Avinash Kumar <avialxee@gmail.com>
6
+ License: BSD-3-Clause
7
+ Classifier: Programming Language :: Python :: 3.9
8
+ Classifier: Programming Language :: Python :: 3.10
9
+ Classifier: Programming Language :: Python :: 3.11
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Classifier: Programming Language :: Python :: 3.13
12
+ Classifier: License :: OSI Approved :: BSD License
13
+ Classifier: Intended Audience :: Science/Research
14
+ Project-URL: Homepage, https://github.com/avikhagol/avica
15
+ Requires-Python: >=3.9
16
+ Requires-Dist: astropy
17
+ Requires-Dist: numpy
18
+ Requires-Dist: ipython
19
+ Requires-Dist: pandas
20
+ Requires-Dist: scipy
21
+ Requires-Dist: scikit-learn
22
+ Requires-Dist: polars
23
+ Requires-Dist: protobuf==3.20.3
24
+ Requires-Dist: typer
25
+ Requires-Dist: importlib_resources>=5.0; python_version < "3.9"
26
+ Provides-Extra: dev
27
+ Requires-Dist: pytest>=3.8; extra == "dev"
28
+ Provides-Extra: all
29
+ Requires-Dist: casatools; extra == "all"
30
+ Requires-Dist: casatasks; extra == "all"
31
+ Requires-Dist: casampi; extra == "all"
32
+ Provides-Extra: test
33
+ Requires-Dist: pytest; extra == "test"
34
+ Description-Content-Type: text/markdown
35
+
36
+ VLBI and SMILE-based CASA Optimization (VASCO) pipeline has been renamed to AVICA.
37
+
38
+ # avica
39
+ AVICA: Automated VLBI pipeline in CASA
40
+
41
+
42
+ Documentation : https://avica.readthedocs.io/en/latest/
43
+
44
+ > submitted to A&A
45
+
46
+ [![asciicast](https://asciinema.org/a/945113.svg)](https://asciinema.org/a/945113)
47
+ > Demo of the AVICA pipeline running end-to-end.
48
+
49
+
50
+ # Installation
51
+
52
+ > Needs Ubuntu 18.04+, Debian 10+, RHEL/CentOS 8+ \
53
+ > Python >=3.9
54
+
55
+ Since the monolithic version of casa includes its own internal Python 3 installation,
56
+ it is best to install `avica` within a Python environment that matches the casa version.
57
+
58
+ <!--Since the monolithic version of casa includes its own internal Python 3 installation,
59
+ it is best to install avica within a Python environment that matches the casa version.
60
+
61
+ Specifically, if you are not using the "all" installation option,
62
+ you should use the casa Python executable itself to create a virtual environment first. For example, for `casa-6.7.0-31-py3.10.el8/` use a virtual environment created using `Python 3.10`. Conda can be used for creating the environment:
63
+ -->
64
+
65
+ ```bash
66
+
67
+ $ path/to/python3 -m venv MY_ENV_DIR
68
+ $ source MY_ENV_DIR/bin/activate
69
+
70
+ ```
71
+
72
+ ```bash
73
+
74
+ $ pip install avica
75
+
76
+ ```
77
+
78
+ Alternatively, you can use the following installation method,
79
+ which automatically includes the necessary casa dependency for avica's internal operations.
80
+
81
+ ```bash
82
+
83
+ $ pip install avica[all]
84
+
85
+ ```
86
+
87
+ Note that you must still provide the path to your casadir.
88
+ This ensures that the pipeline uses the same monolithic casa version, ideally the one downloaded for
89
+ rPicard to execute specific tasks like mstransform and importfitsidi within an isolated environment.
90
+
91
+ ## Manual
92
+
93
+ 1. Clone the repository to the desired destination.
94
+
95
+ ```
96
+ git clone https://github.com/avikhagol/avica.git
97
+ ```
98
+
99
+ 2. Install using `pip`
100
+
101
+ ```bash
102
+ cd avica/
103
+
104
+ pip install .
105
+
106
+ ```
107
+
108
+
109
+ # Usage
110
+
111
+
112
+ ## Pipeline
113
+
114
+ ```
115
+ Usage: avica pipe run [OPTIONS] [STPS]...
116
+
117
+ _______________________
118
+
119
+ pipeline steps:
120
+
121
+ - preprocess_fitsidi
122
+ - fits_to_ms
123
+ - phaseshift
124
+ - avica_avg
125
+ - avicameta_ms
126
+ - avica_snr
127
+ - avica_fill_input
128
+ - avica_split_ms
129
+ - rpicard
130
+
131
+ ________________________
132
+
133
+
134
+ ╭─ Arguments ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
135
+ │ stps [STPS]... steps for execution [default: preprocess_fitsidi, fits_to_ms, avica_avg, avicameta_ms, avica_snr, avica_fill_input, avica_split_ms, rpicard] │
136
+ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
137
+ ╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
138
+ │ --f,--fitsfilenames TEXT fitsfile names comma separated │
139
+ │ --t,--target TEXT Selected field / sourc name │
140
+ │ --configfile TEXT config file containing key=value [default: avica.inp] │
141
+ │ --help Show this message and exit. │
142
+ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
143
+
144
+
145
+ ```
146
+
147
+ ## Manipulating FITS-IDI
148
+
149
+ To check known FITS-IDI issues run the following:
150
+
151
+ ```
152
+ Usage: avica fitsidi_check [OPTIONS] [FITSFILENAMES]... COMMAND [ARGS]...
153
+
154
+ validate and fix, known FITS-IDI problems
155
+
156
+ ╭─ Arguments ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
157
+ │ fitsfilenames [FITSFILENAMES]... │
158
+ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
159
+ ╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
160
+ │ --fix --no-fix [default: no-fix] │
161
+ │ --desc --no-desc [default: no-desc] │
162
+ │ --help Show this message and exit. │
163
+ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
164
+
165
+
166
+ ```
167
+
168
+
169
+ #### Example
170
+
171
+ ```
172
+ avica fitsidi_check VLBA_VSN005412_file3.uvfits
173
+ +--------------------+---------+-------+-------+----------------+----------+
174
+ | hdu | fixable | total | fixed | problem_code | affected |
175
+ +==========================================================================+
176
+ | ARRAY_GEOMETRY | 0 | 8 | 0 | [] | [] |
177
+ | ANTENNA | 0 | 16 | 0 | [] | [] |
178
+ | FREQUENCY | 0 | 8 | 0 | [] | [] |
179
+ | PHASE-CAL | 0 | 12 | 0 | [] | [] |
180
+ | PRIMARY | 1 | 10 | 0 | ["extra_byte"] | [""] |
181
+ | SOURCE | 0 | 8 | 0 | [] | [] |
182
+ | FLAG | 0 | 12 | 0 | [] | [] |
183
+ | UV_DATA | 0 | 8 | 0 | [] | [] |
184
+ | GAIN_CURVE | 0 | 8 | 0 | [] | [] |
185
+ | SYSTEM_TEMPERATURE | 0 | 8 | 0 | [] | [] |
186
+ +--------------------+---------+-------+-------+----------------+----------+
187
+
188
+ ```
189
+
190
+
191
+ To get the information on the observation run the following:
192
+
193
+ ```
194
+ avica listobs [FITSFILENAMES]...
195
+ ```
196
+
197
+
198
+ # Development
199
+ After you clone the repo
200
+ ```bash
201
+
202
+ $ cd avica
203
+ $ pip install -e .[dev]
204
+ ```
205
+
206
+ # Attribution
207
+
208
+ When using AVICA, please add a link to this repository in a footnote.
209
+
210
+ # Acknowledgement
211
+
212
+ "AVICA was developed within the "Search for Milli-Lenses" (SMILE) project. SMILE has received funding from the European Research Council (ERC) under the HORIZON ERC Grants 2021 programme (grant agreement No. 101040021).