The RadioAstron dedicated DiFX distribution

DiFX is a software VLBI correlator currently adopted by several main correlation sites around the globe. After the launch of the RadioAstron Space-VLBI mission in 2011, an extension was necessary to handle processing of an orbiting antenna, to be correlated with supporting ground arrays. We present here a branch of the main DiFX distribution (2.4), recently uploaded on the publicly available repository, that MPIfR developed to process data of the three AGN-imaging RadioAstron key science projects. It can account for general relativistic correction of an orbiting antenna with variable position/velocity, providing a routine to covert the native RDF format to the more common M5B one. Also, a fringe-finding algorithm able to manage arbitrary large fringe-search window is included, allowing one to increase the search space normally adopted by common software packages like HOPS.


Introduction
The Distributed FX-architecture (DiFX) software correlator was first introduced in 2007 [1] to offer a versatile alternative to the previous generation of hardware correlators.Designed to run on computer clusters, it was initially adopted by Swinburne University (Australia) for the Long Baseline Array (LBA) correlation.Subsequently, it was also installed at the National Radio Astronomy Observatory (NRAO, USA), as well as by single users.Indeed, due to the exponential improvement of computing facilities, DiFX can now be run also on a single powerful machine, given a modest volume of input data.In 2011, a second version was made available to the community (DiFX-2, [2]), including a number of improvements and new utilities, including multiple phase-center correlation in a single pass, phase-calibration tones extraction for geodetic applications, zoom-mode for correlation of disparate but overlapping sub-bands, full support for VDIF data format, arbitrary-order polynomial clock, and many more.
The RadioAstron space radio telescope was launched in July 2011 by the Russian space agency (Roscosmos) and it is led by Astro Space Center (ASC, Moscow).It is a 10-m single dish, mounted onboard the Spekt-R satellite, and is able to perform interferometry observations with ground arrays of radio telescopes [3].It can reach extreme baselines of ∼25 Earth diameters, thanks to an elliptical orbit with an apogee of ∼330.000km-almost the distance between Earth and the Moon.For the first time since the VSOP mission in the 1990s, a space-VLBI mission required correlation with ground antennas, thus implying a number of complications given by an orbiting (moving) telescope, under the influence of both Earth and Moon gravitational fields.As a contribution to the mission, the Max Planck Institute for Radio Astronomy (MPIfR) developed a dedicated version of the DiFX, named ra-DiFX, implementing the code necessary to deal with RadioAstron [4].It is now running on the MPIfR cluster, and is used to process data from three Key Science Projects (KSPs) aiming at imaging AGN jets at the highest angular resolution possible from space.With this paper, we present the second, improved version of this publicly-available software, branched from DiFX 2.4 in September 2015.

The RadioAstron DiFX Distribution
As described in [4], the ra-DiFX implements, since the first version, additional code that allows the handling of an antenna with an arbitrary position and velocity in time, but still these modifications do not involve the main algorithm used for data correlation of ground antennas by DiFX.Indeed, mainly the delay model server, Calc, from the Calc/Solve package (http://gemini.gsfc.nasa.gov/solve/) was modified in order to take into account the orbit and general relativistic corrections due to Earth and Moon gravitational fields.Additionally, the DiFX metadata system was modified to deal with the changing position and velocity of the spacecraft as a function of time.
In the following, a list of the modifications and capabilities already present in the first branch is given: Calculating the delay for the transmission of the signal from the spacecraft to the tracking station • Calculating the equivalent of parallactic angle correction for the spaceborne antenna from the antenna orientation obtained from the telemetry information, particularly useful for polarization calibration.

•
Enabling the use of wide fringe-search windows, thanks to the customized fringe-fitting software.
Consistency checks with the ASC correlator ( [3]) have been performed at an initial stage (2013), by means of the correlation of a number of experiments with both pieces of software and comparing results.These have shown to be compatible within errors [5].The second ra-DiFX version presented here is based on the same space-VLBI code extension, and thus its validity is still verified.
The main motivation for the production of a second branch was to include all of the DiFX enhancements introduced since 2010, thus improving the efficiency of the KSPs' data processing.Full VDIF compatibility is now available, and moreover, the possibility of introducing a polynomial clock allows for mitigation of the residual fringe rate due to acceleration terms of the spacecraft, especially important for near-perigee observations like the AGN-imaging projects.In Figure 1, an example of this effect is visible from AIPS plots as a steepening of the rate solutions towards the beginning of the experiment, where RadioAstron approaches the perigee (AO-1 observations of BL Lac from the AGN Polarization KSP, [6]).While the applied calibration in AIPS could compensate for this effect, a strong signal-to-noise ratio (SNR) is necessary to obtain solutions close enough in time to properly fit the trend.This might not be the case for faint sources, for which baseline stacking in the data-reduction stage is needed, resulting in a loss of signal.Thus, the polynomial clock feature of this new version of ra-DiFX can help in recovering signal by properly setting the correlation window across the experiment, following the spacecraft delay/rate trend in time.As for the previous branch, the possibility of including the spacecraft orientation information at the correlation stage allows one to properly calibrate polarization with standard data reduction packages.Indeed, the polarimetry capabilities on space-baselines-offered for the first time by RadioAstron-have already demonstrated to be successful for the AGN Polarization KSP, showing stable D-terms of a few percent for the spacecraft [6,7].The ra-DiFX software correlator is regularly used at the MPIfR to correlate RadioAstron KSP and General Observing Time (GOT) projects.Since July 2016, it has also been publicly available on the DiFX repository (https://svn.atnf.csiro.au/difx/master_tags/DiFX-RA-1.0.0) for download and use under the sGPL license.

Figure 1 .
Figure 1.Example of residual acceleration terms for RadioAstron, visible as a steepening of the fringe-rate solutions near to perigee (towards left side of the timeline).