User Tools

Site Tools



Program difx2fits creates a FITS output file from the DIFX (also known as SWIN) format visibilities created by mpifxcorr and several other files carrying information about the observation. When run, difx2fits requires the following files to be present:

  1. baseFilename.difx/
  2. baseFilename.input
  3. baseFilename.uvw
  4. baseFilename.delay

This minimal requirement means that difx2fits can be used for correlator jobs not created with the job2difx or vex2difx, though it is possible that certain combinations of different configurations within the .input file will not be properly supported at this time. Several other files are optional and are typically used to populate calibration and ancillary tables:

  1. baseFilename.calc/
  2. baseFilename.rates/
  4. baseFilename.flag/
  5. flags
  6. pcal
  7. tsys
  8. weather

With the exception of the gain curve files, all the input files to difx2fits are expected to be in the current working directory. As the visibility file (.difx) is read, any records that are all zero are omitted. The number count of these dropped records is reported as invalid records when difx2fits finishes writing the UV table. With difx2fits versions since 2.0 multiple correlator output files can be combined into a single destination FITS file; this feature is still new, so please check the results carefully!


difx2fits should be invoked from the command line as follows:

difx2fits [ options ] [ baseFilename1 [ … baseFilenameN ]] [ outFile ]

options can include:

  • -a chanavg or –average chanavg : average chanavg spectral channels
  • -b chan or –beginchan chan : convert channels starting at zero-based channel chan
  • -h or –help : print usage information and exit
  • -n or –no-model : don't write model (ML) table
  • -o nchan or –outchans nchan : write a total of nchan channels to FITS
  • -s scale or –scale scale : scale visibility data by scale
  • -t interval or –deltat interval : set the time interval (in seconds) of jobmatrix files
  • -v or –verbose : increase verbosity of output; use twice or thrice to get even more
  • -d or –difx : run on all .difx files found in the directory
  • -k or –keep-order : don't sort the antennas by name
  • -1 or –dont-combine : make a separate FITS file for each input job
  • -x or –dont-sniff : don't generate sniffer output files
  • –override-version : ignore difx version clashes

baseFilenameX is the prefix of a jobfile to convert; it is OK to use the .difx filename instead

outFile is the name of the FITS file to produce; if not provided one will be made based on the project code

Usage examples

  • Explicitly convert one job output into one fits file:
difx2fits job9020.000 9020.FITS
  • Convert all job outputs found in the current directory and give extra verbose messages
difx2fits -v -v -d

Unless disabled with the –dont-sniff or -x flag, four sniffer output files (with suffixes .acb, .apd, .wts and .xcb) will be written for each FITS file produced. These files are used by difxsniff and its associated programs to produce data plots that are used to assess data quality.

Unless disabled by setting interval to a non-positive number with the -t or –deltat option, an output file with suffix .jobmatrix will be produced. This file contains an ASCII art diagram of which jobs contributed to each .FITS file produced as a function of both time and antenna.

Some potential new features to add

  • a “sniff-only” mode


  • Does not work with some stations dual pol, some single pol.
difx/difx2fits.txt · Last modified: 2015/10/21 10:08 by