Davor Krajnović's Software

All my software is freely available for any non-commercial purposes. However, if you use it for published research, please cite the relevant scientific paper.

Here you can find the following routines:


Kinemetry analyses 2D maps of the moments of the line-of-sight velocity distribution (LOSVD). It was original written in IDL programming language, which you can download from links below. There is also a python version of the code, which you can get from here .

For a python implementation go here .

This software implements the Kinemetry method developed by Krajnović et al. (2006 MNRAS, 366, 787) to analyse maps of kinematic moments. This method is a generalisation of surface photometry to all moments of the LOSVD. It performs harmonic expansion of 2D maps of observed moments (surface brightness, velocity, velocity dispersion, h3, h4...) along the best fitting ellipses (either fixed or free to change along the radii). Its purpose is to robustly quantify maps of the LOSVD moments, describe trends in structures and detect morphological and kinematic sub-components. If you are interested in determining global position angle of velocity maps, as described in the Appendix C of Krajnović et al. (2006), please follow this link for an IDL implementation of the code. A python implementation is available here.

The source code of the IDL program KINEMETRY, with instructions and examples, can be downloaded from here (13.6 MB). If you have an access to the IDL Virtual Machine only, there are also .sav files which allow you to run kinemetry examples. In this release the kinemetry software was expanded to work also on images of galaxies and to perform isophotometric analysis. Please note there is a small change in terms of backward compatibility regarding reconstruction of moment maps which is documented. This version of kinemetry was last updated on 04 April 2016.

Also required is the following IDL routine, which must be downloaded separately:

And if you just started using IDL and still do not have the IDL Astronomy User's Library installed, or if you have an old version, you should immediately get it from here.


An IDL program to derive tangential and radial velocity components in the equatorial plane of a barred stellar disc from the observed line-of-sight velocity, assuming geometry of a thin disc. It implements the method presented in Maciejewski, Emsellem & Krajnović (2012, MNRAS accepted, arXiv:1209.4873) applied to integral-field spectroscopic data.

The method is based on assumptions that the bar is close to steady state (i.e. does not evolve fast) and that both morphology and kinematics are symmetrical with respect to the major axis of the bar. For the derivation it is necessary to have a two-dimensional velocity data (a velocity field v), and one needs to measure with signifiant accuracy
    - the inclination of the galaxy i
    - the position angle of the line-of-nodes (LoN) PA
    - the position angle of the bar PAbar
    - the systemic velocity vsys
Systemic velocity and the inclination from the kinematics can be obtained using kinemetry.

Image on the right shows the steps for preparation of the data (based on the example in Maciejewski, Emsellem & Krajnović 2012). The data used are the SAURON observations of barred galaxy NGC0936 (Emsellem et al. 2012). From top to bottom (left/right):
    - observed flux/velocity map (velocity map is corrected for systemic velocity by plotting vLoS = v - vsys),
    - flux/velocity map rotated such that the LoN is horizontal with positive velocities on the right (the maps are rotated by 270o - PA),
    - de-projected flux/velocity map (the vertical coordinate stretched by 1/cos(i), and in the velocity map the y-velocity in the disc plane is plotted vy = vLOS/sin(i) ),
    - deprojected flux/velocity map rotated such that the bar is horizontal (the rotation angle is calculated in the following way: in the sky plane, the angle between the positive half of the LoN and the bar (αsky ≡ PAbar - PA) can be anything between 0 and 180. The corresponding angle α in the disc plane is such that tan(α) = tan(αsky)/cos(i). Then the de-projected flux/velocity maps are rotated by ),
    - the part of the full map used in the method, ( i.e. for which data on both sides of the major axis of the bar exist).

Image below show the main output of the code. This is the same as the top row of Fig.6 of Maciejewski, Emsellem & Krajnović 2012).

The source code of the IDL program disc2vel, with instructions and examples, can be downloaded from here (24 KB).


Comments and suggestions are welcome and appreciated. If you have any questions, feel free to contact me:

Last modified: 18 Oct 2021