  (Abridged) The CASA software suite, can now reduce very long baseline
interferometry (VLBI) data with the recent addition of a fringe fitter. Here,
we present the Radboud PIpeline for the Calibration of high Angular Resolution
Data (rPICARD), which is an open-source VLBI calibration and imaging pipeline
built on top of the CASA framework. The pipeline is capable of reducing data
from different VLBI arrays. It can be run non-interactively after only a few
non-default input parameters are set and delivers high-quality calibrated data.
CPU scalability based on a message-passing interface (MPI) implementation
ensures that large bandwidth data from future arrays can be processed within
reasonable computing times. Phase calibration is done with a Schwab-Cotton
fringe fit algorithm. For the calibration of residual atmospheric effects,
optimal solution intervals are determined based on the signal-to-noise ratio
(S/N) of the data for each scan. Different solution intervals can be set for
different antennas in the same scan to increase the number of detections in the
low S/N regime. These novel techniques allow rPICARD to calibrate data from
different arrays, including high-frequency and low-sensitivity arrays. The
amplitude calibration is based on standard telescope metadata, and a robust
algorithm can solve for atmospheric opacity attenuation in the high-frequency
regime. Standard CASA tasks are used for CLEAN imaging and self-calibration. In
this work we demonstrate the capabilities of rPICARD by calibrating and imaging
7 mm VLBA data of the central radio source in the M87 galaxy. The reconstructed
jet image reveals a complex collimation profile and edge-brightened structure.
A potential counter-jet is detected that has 10 % of the brightness of the
approaching jet. This constrains jet speeds close to the radio core to about
half the speed of light for small inclination angles.
