vircampype is a Python data reduction pipeline for infrared imaging data obtained with the VIRCAM instrument on ESO's VISTA telescope. It was originally developed for the VISIONS public survey and covers the full reduction chain from raw calibration frames through science-ready co-added images and photometric source catalogs.
An overview of the survey is given in Meingast et al. 2023a. The algorithms and data processing steps implemented in this pipeline are described in Meingast et al. 2023b.
Python 3.13 or later is required. Python dependencies are listed in requirements.txt and include numpy, scipy, astropy, scikit-learn, scikit-image, matplotlib, astroquery, pyyaml, joblib, and regions.
The following tools must be installed and available in PATH:
| Tool | Purpose |
|---|---|
| SExtractor | Source extraction |
| SCAMP | Astrometric calibration |
| SWarp | Image resampling and coaddition |
| GNU Astro / noisechisel | Source mask generation |
git clone https://github.com/smeingast/vircampype.git
cd vircampype
pip install -r requirements.txt
pip install -e . # development install
# or
pip install . # regular install
A pre-built Docker image is available on Docker Hub and includes all external tools (SExtractor, SCAMP, SWarp, GNU Astro). This is the recommended way to run the pipeline without manually installing dependencies.
docker pull smeingast/vircampype
To build the image locally:
docker build -t vircampype .
Before running the pipeline, raw FITS files need to be sorted into calibration and science sub-folders:
vircampype --sort /path/to/raw/files/*.fits
The pipeline is configured via a YAML file. A minimal science setup looks like this:
name: my_field
path_data: /path/to/sorted/science/data
path_pype: /path/to/pipeline/output
n_jobs: 8
overwrite: false
qc_plots: true
build_tile: true
build_stacks: false
build_phase3: false
build_public_catalog: false
A separate setup file is needed for calibration data (the pipeline detects calibration runs when name contains calibration):
name: calibration_2024
path_data: /path/to/sorted/calibration/data
path_pype: /path/to/pipeline/output
# Run calibration
vircampype --setup /path/to/calibration_setup.yml
# Run science reduction
vircampype --setup /path/to/science_setup.yml
# Reset progress (re-run from the start)
vircampype --reset-progress --setup /path/to/setup.yml
# Remove all generated object and phase3 folders
vircampype --clean --setup /path/to/setup.yml
When installed as a Python package, the vircampype command is available directly. Alternatively, invoke the worker script:
python vircampype/pipeline/worker.py --setup /path/to/setup.yml
process_calibration)Processes a set of raw calibration frames and produces master calibration files:
process_science)Processes raw science frames through to final co-added products:
All parameters below are set in the YAML setup file. Default values are used when a parameter is omitted.
| Parameter | Default | Description |
|---|---|---|
name | — | Pipeline run name (required) |
path_data | — | Path to input FITS files (required) |
path_pype | — | Path for pipeline output (required) |
n_jobs | 8 | Number of parallel threads |
overwrite | false | Overwrite existing output files |
qc_plots | true | Generate QC diagnostic plots |
build_stacks | false | Build per-offset stacks |
build_tile | true | Build final co-added tile |
build_phase3 | false | Build ESO Phase 3 products |
build_public_catalog | false | Build public source catalog |
destripe | true | Apply destriping correction |
subtract_background | true | Subtract 2D background model |
flat_type | twilight | Flat field type: twilight or sky |
scamp_mode | loose | SCAMP mode: loose or fix_focalplane |
illumination_correction_mode | variable | IC mode: variable or constant |
source_mask_method | noisechisel | Source masking: noisechisel or built-in |
resampling_kernel | lanczos3 | SWarp resampling kernel |
mask_bright_galaxies | true | Mask bright galaxies from de Vaucouleurs (1991) |
The pipeline creates the following folder structure under path_pype:
path_pype/
├── master_common/ # Master calibration files (shared across runs)
├── master_object/ # Master sky, source masks, illumination corrections
├── headers/ # SCAMP astrometric headers
├── processed/ # Calibrated pawprint images
├── resampled/ # Resampled pawprint images
├── stacks/ # Per-offset stack images and catalogs
├── tile/ # Final co-added tile image and catalog
├── statistics/ # Statistics images (exptime, nimg, astrms, mjd)
├── phase3/ # ESO Phase 3-compliant products
├── qc/ # Quality control plots
└── temp/ # Temporary files and pipeline status
python -m unittest discover -s tests -p "test_*.py"
If you encounter a bug or unexpected behaviour, please open an issue on GitHub. Include the pipeline log file (found in path_pype/temp/) and a description of the setup if possible.
If you use vircampype in your research, please cite:
Content type
Image
Digest
sha256:e033e788a…
Size
300.8 MB
Last updated
3 months ago
docker pull smeingast/vircampype