Skip to main content

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 (e.g. Davis et al., Nature, 2013). They are also useful for creating input datacubes for further simulation in e.g. CASA's sim_observe tool.

Note: Most users dont need to install KinMS directly, but likely want KinMS_fitter. Find out more at the KinMS website: https://www.kinms.space.

Install

KinMSpy is designed with Python users in mind. Lots of work has gone into making it lightweight and fast. 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 setup.py install.

It requires the following modules:

  • numpy
  • matplotlib
  • scipy
  • astropy

Documentation

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/KinMS_testsuite.py, 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 *
run_tests()

To get you started fitting observations with KinMS, check out KinMS_fitter, which wraps KinMS and automates many tasks for you! Check it out here: KinMS_fitter.

If you need go through the nuts and bolts of fitting, see the walk through here: Example fitting tutorial

API documentation is available here.

New: KinMS 3.0 is here!

As of August 2022 KinMS 3.0 has been released. This version has subtantial speed improvements, being around 35% faster in my tests. However, to implement this the interface has had to slightly change. Now only the interferometer/observation parameters are passed to the KinMS class at instantiation, while the parameters that can change (e.g. surface brightness/velocity profiles) are passed in the model_cube() call. The tutorial notebooks/examples have been updated to reflect this. If you need to keep using the old version then it can still be imported as from kinms import KinMS2, although this dual support will be removed in future updates.

New non-circular motions capability

As of version 2.2.0 KinMS now has the capability to model lopsided and bisymmetric gas flows, in addition to the pure radial motions included previously. To get started with this you need to add from kinms.radial_motion import radial_motion, and then pass one of the new methods to KinMS with the radial_motion_func keyword. radial_motion.lopsided_flow and radial_motion.bisymmetric_flow both take four arguments (a radial vector, the transverse and radial velocity as a function of that radius, and an angle for the perterbation). radial_motion.pure_radial replicates previous funcationality, and requires two arguments (a radius vector, and a vector for the radial velocity as a function of radius). E.g. if previously you were passing inflowVel=inflowVel then this would now equate to radial_motion_func=radial_motion.pure_radial(radius,inflowVel).

Communication

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- cardiff.ac.uk, Zabelnj -at- cardiff.ac.uk, Dawsonj5 -at- cardiff.ac.uk

License

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

Release files for kinms 3.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kinms 3.0.7
File Size Uploaded
kinms-3.0.7.tar.gz 36.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kinms 3.0.7
File Interpreter ABI Platform
kinms-3.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 74.8 kB

Release files / kinms-3.0.7.tar.gz

Download URL kinms-3.0.7.tar.gz
Size 36.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5fc9b077efa7b8dee28552cd2de745d3960cb9aaf2d15c4b74b55f33bd6d6f92
BLAKE2b-256 checksum
How to use checksums
38eb1608ec05882f80c8d452a2ae739dc4fff0e73e807b305c21ba05bc9ef602
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release files / kinms-3.0.7-py3-none-any.whl

Download URL kinms-3.0.7-py3-none-any.whl
Size 38.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f4ed9a37aad47d7360f7e6e63e28445ac2ce03cb4d55f6bc2a4ccc04195dc751
BLAKE2b-256 checksum
How to use checksums
60353faf8b82d71439cfa9a6e0ce3874f5481abc3f953e8fc51def6030e93b5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release history Release notifications | RSS feed

3.0.14

2 release files

3.0.13

2 release files

3.0.12

2 release files

3.0.11

2 release files

3.0.9

2 release files

3.0.8

2 release files

This release

3.0.7 This release

2 release files

3.0.6

2 release files

3.0.5

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.2.9

2 release files

2.2.8

2 release files

2.2.7

2 release files

2.2.6

2 release files

2.2.5

2 release files

2.2.4

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.9

2 release files

2.0.8

2 release files

2.0.7

2 release files

2.0.6

2 release files

2.0.5

2 release files

2.0.4

1 release file

2.0.3

1 release file

2.0.2

1 release file

2.0.1

1 release file

2.0.0

1 release file

1.0.7

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page