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 (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

Project details


Download files

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

Source Distribution

kinms-3.0.11.tar.gz (50.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kinms-3.0.11-py3-none-any.whl (52.0 kB view details)

Uploaded Python 3

File details

Details for the file kinms-3.0.11.tar.gz.

File metadata

  • Download URL: kinms-3.0.11.tar.gz
  • Upload date:
  • Size: 50.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for kinms-3.0.11.tar.gz
Algorithm Hash digest
SHA256 482a54dc18cea27071e9d4b90bc7eb4080ee45ad9e936aff587d69a50699ce78
MD5 0f7b4bf04f1f4ea987cce2209c128b5d
BLAKE2b-256 500049ef32082dec7be4f815c0f5f8652305294f5c37933e5fdc721e9069500f

See more details on using hashes here.

File details

Details for the file kinms-3.0.11-py3-none-any.whl.

File metadata

  • Download URL: kinms-3.0.11-py3-none-any.whl
  • Upload date:
  • Size: 52.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for kinms-3.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 d4477fdf7f0bac82086089799907971a4020d4c1a4d2221303473159839cbba0
MD5 d01afa69c4c425cbb8b498c0c3368edc
BLAKE2b-256 c0dc3ff71d877db76c8545eadc258c7fc9115e7ad76d6d4e42947608d47b4d02

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page