Skip to main content

The KinMS (KINematic Molecular Simulation) package can be used to simulate observations of arbitary molecular/atomic cold gas distributions.

Project description

Documentation Status Python 3.6 PyPI version ASCL

The KinMS (KINematic Molecular Simulation) package can be used to simulate observations of arbitary molecular/atomic cold gas distributions. The routines are written with flexibility in mind, and have been used in various different applications, including investigating the kinematics of molecular gas in early-type galaxies (Davis et al, MNRAS, Volume 429, Issue 1, p.534-555, 2013), and determining supermassive black-hole masses from CO interfermetric observations (Davis et al., Nature, 2013). They are also useful for creating input datacubes for further simulation in e.g. CASA's sim_observe tool.


KinMSpy is designed with Python users in mind. Lots of work has gone into making it lightweight and fast. You can use it in the same way that you would use NumPy or Astropy etc. You can install KinMS with pip install kinms. Alternatively you can download the code, navigate to the directory you unpack it too, and run python install.

It requires the following modules:

  • numpy
  • matplotlib
  • scipy
  • astropy


A simple iPython notebook tutorial on the basics of KinMS can be found here: KinMS simple tutorial

A further suite of examples can be found in examples/, which can be modified and updated for most use cases. To run these tests you can run the following commands from within python:

from kinms.examples.KinMS_testsuite import *

To get you started fitting observations with KinMS, see the walk through here: Example fitting tutorial

NEW! If you want a really simple way to fit observations, check out the new KinMS_fitter, which wraps KinMS and automates many tasks for you! Check it out here: KinMS_fitter.

Upgrading from version 1

Unlike previous generations of KinMS, version 2.0+ uses Python classes for a more modular and adjustable experience. Plotting routines can be changed and cube modelling can be probed at different stages if required. The main change you will need if upgrading from version 1.0 is to change all calls to KinMS(...) to KinMS(...).model_cube(). The tutorial notebooks above have full details of the new features.


If you find any bugs, or wish to be kept up to date when new versions of this software are released, please raise an issue here on github, or email us at DavisT -at-, Zabelnj -at-, Dawsonj5 -at-


KinMSpy is MIT-style licensed, as found in the LICENSE file.

Many thanks,

Dr Timothy A. Davis, Nikki Zabel, and James M. Dawson

Cardiff, UK

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for kinms, version 2.1.0
Filename, size File type Python version Upload date Hashes
Filename, size kinms-2.1.0-py3-none-any.whl (25.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size kinms-2.1.0.tar.gz (24.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page