TiRiFiC logo

Download and Installation

TiRiFiC is an open source project. We provide the source code on this web page. You can download and modify TiRiFiC to your likings, provided that if you publish a modification, your code is also published as open software (free of charge and open-source). We are happy about any contributors to the project (especially, if we get contacted by them).




TiRiFiC can be obtained from the www pages or, alternatively, from its github repository https://github.com/gigjozsa/tirific. Downloading from github has the advantage that the latest binary, compiled under Ubuntu 16.04, is also included in the repository and can be tried as a working solution before going through the installation steps. Alternatively we describe how to use a packaged version under Ubuntu 16.04.

Using packaged version under Ubuntu 16.04

    Gijs Molenaar was friendly enough to package TiRiFiC and add it to his KERN suite. If you are running Ubuntu 16.04, and you have superuser rights, type:
    > sudo apt-get install software-properties-common
    > sudo add-apt-repository -s ppa:kernsuite/kern-2
    > sudo apt-get update
    > sudo apt-get install tirific
    Then, you can start TiRiFiC by typing:
    > tirific ...

Download from github

  1. With a browser open the github repository https://github.com/gigjozsa/tirific
  2. > firefox https://github.com/gigjozsa/tirific

  3. (Install git)

  4. Get the files using git or by clicking on the .zip archive button. Please take into account that the template settings file (which in case of a local installation you will have edited) will be downloaded as well.
  5. > git clone -b master git@github.com:gigjozsa/tirific.git --single-branch

  6. If your OS is Ubuntu, check if the binary tirific-master/bin/tirific works (see "Test TiRiFiC"). If not, proceed with Fresh Installation omitting download step.

Download from web page

Current version Download full installation Download patch update Changes
2.3.11 tirific_2.3.11.tar.gz tirific_2.3.11.patch.tar.gz Bugfix: drawing of horiontal and vertical lines was not possible and finally got rid of the "got here" message
Previous version Download full installation Download patch update Changes
2.3.10 tirific_2.3.10.tar.gz tirific_2.3.10.patch.tar.gz Bugfixes in plotting routines (Overlay of additional parameters lead to a crash).
2.3.9 tirific_2.3.9.tar.gz tirific_2.3.9.patch.tar.gz Removed several memory leaks (TiRiFiC should run without memory leakage now, apart from something apparently generated within wcs: 4 bytes).
2.3.8 tirific_2.3.8.tar.gz tirific_2.3.8.patch.tar.gz Added RESTARTID parameter.
2.3.7 tirific_2.3.7.tar.gz tirific_2.3.7.patch.tar.gz Changes in tirific build. No functional changes or debugging.
2.3.6 tirific_2.3.6.tar.gz tirific_2.3.6.patch.tar.gz Minor changes in Makefiles to allow seamless compilation of qfits.
2.3.5 tirific_2.3.5.tar.gz tirific_2.3.5.patch.tar.gz Synchronizing with github repository. No functional changes.
2.3.4 tirific_2.3.4.tar.gz tirific_2.3.4.patch.tar.gz Provide defaults for input of fit control parameters.
2.3.3 tirific_2.3.3.tar.gz tirific_2.3.3.patch.tar.gz Bugfix: Wrong direction of velocity axis if cdelt3 is negative. Convenience: Nonstandard keyword FREQ0 treated as RESTFREQ.
2.3.2 tirific_2.3.2.tar.gz tirific_2.3.2.patch.tar.gz Bugfixes.
2.3.1 tirific_2.3.1.tar.gz tirific_2.3.1.patch.tar.gz Bugfix and inclusion of nonlinear interpolation in tirdef output.
2.3.0 tirific_2.3.0.tar.gz tirific_2.3.0.patch.tar.gz Included nonlinear interpolation.
2.2.5 tirific_2.2.5.tar.gz tirific_2.2.5.patch.tar.gz Included PSwarm minimiser.
2.2.4 tirific_2.2.4.tar.gz tirific_2.2.4.patch.tar.gz Changed character of TIRSMO output (now Hanning instead of median filtering), made TIRLEN parameter the length of Hanning window.
2.2.3 tirific_2.2.3.tar.gz tirific_2.2.3.patch.tar.gz Minor bugfixes: i) Output deffile could not have the same name as input deffile. New Feature: Made COOLGAL output fully functional, included COOLBIN parameter.
2.2.2 tirific_2.2.2.tar.gz tirific_2.2.2.patch.tar.gz Minor bugfixes: i) restart capability was broken for SuSE because of delayed read of files. ii) more header items copied across to make a use of model and original data cube in kvis possible.
2.2.1 tirific_2.2.1.tar.gz tirific_2.2.1.patch.tar.gz Minor bugfixes.
2.2.0 tirific_2.2.0.tar.gz tirific_2.2.0.patch.tar.gz Change to standalone version. Input is FITS format now, GIPSY is not used any more. TiRiFiC is a command-line tool. Included parameters DEFFILE, PROMPT, and RESTARTNAME. Minor bugfixes.
2.1.5 tirific_2.1.5.tar.gz tirific_2.1.5.patch.tar.gz Last GIPSY version. Bugfixes harmonic terms in radial and tangential velocity.
2.1.4 tirific_2.1.4.tar.gz tirific_2.1.4.patch.tar.gz Introduced harmonic terms in radial and tangential velocity, introduced onset height above plane for change in velocity with z.
2.1.3 tirific_2.1.3.tar.gz tirific_2.1.3.patch.tar.gz Minor bugfix (before, compilation using PBCORR = NO in settings file failed).
2.1.2 tirific_2.1.2.tar.gz tirific_2.1.2.patch.tar.gz New parameter NDISKS= to determine the number of disks at runtime.
2.1.1 tirific_2.1.1.tar.gz tirific_2.1.1.patch.tar.gz First public version of TiRiFiC 2.1


An installation is in theory possible for every Unix version, since TiRiFiC is written in nearly pure ISO C (some non-ISO but POSIX is used). No other operating system is supported.

Fresh Installation

  1. Install auxiliary libraries
  2. TiRiFiC depends on several external libraries that are not contained in this package. It is very well possible that they already exist for the common user, so we left the installation to the user instead of regenerating them and producing redundant interfering files:
    1. The FFTW library (the 4-Byte version libfftw3f.a, and the 8-byte version libfftw3.a, and the threaded version libfftw3f_threads.a if multicore operation is desired; when installing FFTW run 'configure' with options '--enable-single --enable-threads --enable-openmp [if possible]', then 'make', then 'make install', then run again 'configure' with options '--enable-threads --enable-openmp [if possible]', then 'make', then 'make install'; the package manager installations of Ubuntu and SuSE usually work fine, too).
    2. The The WCS library.
    3. The GNU scientific library (GSL), version 1.15 or later.
    4. The g2c library (should be included when gcc is installed), maybe not necessary, so just proceed if you do not find it.
    5. libreadline.
    6. The pgplot library.
    7. OpenMP-supporting compiler (e.g. gcc > 4.2, required if parallel processing is desired).
    8. (doxygen only for source code and module documentation)
    9. (GIPSY and the GIPSY library only for versions <= 2.1.5, deprecated).
    10. (The g2c library should be included when gcc is installed, maybe not necessary, so just proceed if you do not find it).

  3. Download the source files
    1. Download the source archive file tirific_i.j.k.tar.gz (i.j.k is the version number) and save it into a parent directory pdir
    2. expand the archive
    3. > tar zxvf tirific_i.j.k.tar.gz
      This will result in a directory tirific_i.j.k
    4. Enter the TiRiFiC directory
    5. > cd tirific_i.j.k

  4. Edit the settings file
  5. Edit the settings file according to the location of the auxiliary files and the preferred compiler setup (it worked with the gcc...). If you are not sure about a variable, leave it as it is. Notice that there are some variables set at compile time. NDISKS specifies the default number of independent disks (can be changed with the parameter NDISKS= at runtime), with PBCORR, the possibility of a primary-beam correction (currently only for WSRT) can be included. The settings file is commented and it should be straightforward to set it up.

  6. Compile qfits (only if you have downloaded TiRiFiC from this page, not required when using the github installation)
  7. > make qfits
    should finish successfully. If it does not, try to set the path variable to the local directory:
    > tcsh (if you are not using tcsh)
    > set path = (. $path)
    > make qfits

  8. Compile TiRiFiC
  9. > make
    should finish successfully. If this is not the case, try to solve the issue by editing the settings file.

  10. Clean up
  11. > make clean
    removes unnessessary files.

  12. Test TiRiFiC
  13. A test file is included in the installation. To test TiRiFiC do:
    > cd bin
    > tirific deffile=tirific.def
    Acknowledge the request for the parameter GR_CONT= by pushing the return-key. If there are error messages converning pgplot, you may want to check whether the device driver specified in GR_DEVICE exists in your pgplot installation. (Try e.g. GR_DEVICE = .../ppsfile) No error should occur. Some additional files should be in the directory. Do:
    > tirific deffile=tirific.def[Return]
    > OKAY= [Return]
    > ACTION= 1 [Return]
    Compare the result of the last line on the GIPSY window for each fitting process:
    Finished N:2811414/2811978 F:1.85E+01/1.85E+01 C:6.401249E+05 S:4.222912E+01
    If both show the same results, you are fine. Otherwise Open MP is not correctly installed or linked. Either try to fix that by changing the compiler flags in the settings file or use OPENMP = NO in the settings file. If that helps, it means that in most cases the gcc version does not support OpenMP sufficiently. Especially llvm-gcc 4.2 shipped with Xtools on OSX systems usually does not allow for a parallel installation of TiRiFiC using OMP. In that case a different gcc should be installed (people have succeeded with that using homebrew or macports or similar).
    > cd ../

  14. Link TiRiFiC
  15. Either copy pdir/tirific_i.j.k/bin/tirific to any standard binary place (e.g. /usr/local/bin/)
    > cp pdir/bin/tirific wherever/bin/
    or create a symbolic link
    > ln -s pdir/gipsy/tirific wherever/bin/tirific
    or put the binary in your path > set path = ($path absolute-path-to-tirific-directory/tirific) Alternatively, copy the tirific binary to the directory in which you want to use it.

Update TiRiFiC using the update patch

    If you have installed TiRiFiC from the github pages, please re-install using github. If you have installed TiRiFiC using the version provided here, proceed with the following steps:

  1. Copy the tirific installation
  2. We assume that your latest TiRiFiC installation resides in the directory pdir/tirific_l.m.n, and that the newest version on this web page is i.j.k.
    > cp -r pdir/tirific_l.m.n pdir/tirific_i.j.k

  3. Get the update patch
  4. Download the latest tirific_i_j_k.patch.tar.gz and put it in the copy of the tirific directory (pdir/tirific_i.j.k)

  5. Expand the update patch
  6. > cd pdir/tirific_i.j.k
    > tar zxvf tirific_i_j_k.patch.tar.gz

  7. If you are changing from the GIPSY version to the standalone version, include the following lines in your settings file (adjusting the paths to your machine):
  8. > # This is the directory in which the wcs include files reside
    > WCSDIR = /usr/local/include/wcslib
    > # The wcs library
    > WCSLIB = -L/usr/local/lib/ -lwcs
    > # Readline library
    > READLINELIB= -lreadline

  9. If you want you can remove or comment these in your settings file (they are not used anyway):
  10. > # G2CDIR = ...
    > # G2CLIB = ...
    > # GIPDIR = ...
    > # GIPLIB = ...

  11. Update TiRiFiC
  12. > make virginal
    > make
    > make qfits
    > make clean

  13. Link TiRiFiC
  14. Either copy pdir/tirific_i.j.k/gipsy/tirific to your GIPSY installation (find out which executables you are using, usually this is one directory in the exe directory of your GIPSY installation, which contains all executable files)
    > cp pdir/gipsy/tirific wherever/gipsy/exe/linux64/
    or, if you have created a symbolic link before, you do not need to do anything.
    Alternatively, copy the tirific to the directory in which you want to use it.



  1. Check settings
  2. Most issues can be solved by installing the auxillary libraries (see check dependencies) and pointing to them in the settings file. Especially if the error message indicates that a .h file cannot be found, this often means that its parent directory is not correctly given in the settings file.
  3. Check dependencies
  4. Error messages from the compiler like "could not find blabla" mostly indicate a missing library, or, since many Unix distributions have the include files separated from the actual (runtime) libraries, the corresponding "development" files. Example: is next to libreadline also libreadline-dev installed from your package manager? If not, you should install it.
  5. Add the current directory to your path
  6. E.g.:
    > tcsh
    > set path = (. $path)
  7. Known issues:
    1. Yosemite and gcc 5.1 from homebrew
    2. In some cases, qfits won't compile. Try to change in xxx/tirific_2.3.2/qfits-6.2.0/src/qfits_byteswap.c on line 67,
      "=q" (w) :
      "=Q" (w) :

      > tcsh
      > cd xxx/tirific_2.3.2/qfits-6.2.0/
      > set CURDIR = `pwd`
      > configure --prefix=$(CURDIR)/qloc --enable-shared=no;
      > make
      > cd ..
      > make

      Do not repeat the > make qfits step, because it will rebuild the complete qfits directory and erase your modifications.

If nothing helps

Contact Gyula Józsa.