AVICA: Automated VLBI pipeline in CASA#
AVICA is a Python package for automated calibration of Very Long Baseline Interferometry (VLBI) data in CASA. It provides tools to ingest, manipulate, and calibrate FITS-IDI and Measurement Set files containing raw visibilities.
Installation#
Requirements:
Ubuntu 18.04+, Debian 10+, or RHEL/CentOS 8+
Python >= 3.9
The avica package is available on PyPI. Use uv or pipx for an
isolated command-line installation.
Using uv:
uv tool install avica --python 3.11
Using pipx:
pipx install avica
Using pip:
pip install avica
Note
If you install with pip, use a virtual environment unless you already
manage Python packages another way.
Setup#
The pipeline calibration steps rely on rPicard. Follow the rPicard setup instructions first. After rPicard is configured, AVICA only needs a minimal configuration file to get started.
Configuration#
The pipeline configuration is a plain-text key=value file. By default,
AVICA looks for avica.inp in the current working directory.
Pass a custom configuration file with --configfile:
avica pipe run --configfile <path/to/config/file>
Minimal configuration:
# required
# folder_for_fits is a folder containing the raw visibility FITS files.
# casadir is the path to the monolithic CASA installation used for CASA tasks.
folder_for_fits = /path/to/source/folder/with/raw/visibility/fitsfiles
casadir = "path/to/monolithic-casa/casa-6.x.x-xx-py3.xx.xxx/"
# optional-1
# picard_input_template the folder containing the rPicard input file.
# target_dir is where pipeline output will be saved.
# accor_solint is the number of solint partitions to use.
target_dir = "reductions"
picard_input_template = "path/to/rpicard"
accor_solint = 4
mpi_cores_rpicard = 10
mpi_cores_snrating = 5
mpi_cores_importfitsidi = 5
hi_freq_ref = 11
snr_threshold_phref = 7
flux_threshold_phref = 0.15
min_channel_flagging = 32
n_calib = 5
n_refant = 4
minsnr = 3.2
apply_flag_from_idi = True
size_limit = 2000.0
# EXPERIMENTAL -------------------------
# configure google sheet
sheet_url = None
worksheet = None
# configure below if using CSV or google sheet to save all the result in a common sheet.
primary_colname = TARGET_NAME
primary_value = None
filename_col = FILENAMES
targetname_col = TARGET_NAME
# sheet configurations
working_col = None
working_col_only = False
do_pcol_validation = False
sci_solints = manual
solint_max_scan_partitions= 8
use_casadir_pythonpath = False
separation_thres = 850.0
source_extract_multi_fitsfiles = False
To store defaults persistently in ~/.avica/avica.inp, pass an existing
configuration file:
avica pipe config --default --inpfile <path/to/avica.inp>
You can also set default values directly:
avica pipe config --default key=value key2=value2 key3=value3
To set global defaults in AVICA’s installed directory, use --global in the
same way:
avica pipe config --global --inpfile <path/to/avica.inp>
avica pipe config --global key=value key2=value2 key3=value3
Usage#
Run the default pipeline from the terminal:
avica pipe run --target <target-name> --fitsfilenames <file1.uvfits,file2.uvfits>
Run selected steps by passing step names:
avica pipe run preprocess_fitsidi fits_to_ms --fitsfilenames <file.uvfits>
The default pipeline executes these steps:
preprocess_fitsidifits_to_msavica_avgavicameta_msavica_snravica_fill_inputavica_split_msrpicard
Common options:
Option |
Description |
|---|---|
|
Comma-separated FITS-IDI file names. |
|
Selected field or source name. |
|
Configuration file containing |
|
Show the full command help. |
Output Layout#
The output folder structure follows this convention:
CWD/
|-- avica.inp
`-- reductions/
`-- PROJECT_CODE/
`-- wd/
`-- wd_{BAND}/
`-- wd_{BAND}_{TARGET_NAME}/
More Documentation#
See the dedicated pages for deeper usage notes and API reference: