Skip to main content

Package and program that models N-Body problem in galactic evolution application.

Project description

Description

OMT (Open Modeling Tool) is used to numerically solve and visualize N-body problem with huge number of particles. Primary application is galactic evolution.

Prerequisites

It requires following packages to work:

pip install marshmallow marshmallow_jsonschema matplotlib pandas pyyaml argparse astropy py_expression_eval amuse-framework

You also need to install pyfalcon module which makes integration possible.

You might also need:

pip install flake8 isort mypy black types-pyyaml

Usage

Program has three modes: creation, integration and analysis. The semantical difference between them is as follows:

  • [data -> Snapshot] Creation mode creates snapshot from data. This data might be particles specified by their position, velocity and mass or the whole files with particle parameters inside them.

  • [Snapshot -> Snapshot] Integration mode alters existing snapshot. It takes some existing snapshot and performs some operation on it, then takes result and performs operation again and again until some specified condition is not met.

  • [Snapshot -> data] Analysis mode creates data from snapshot. It takes some snapshot and extracts some data (position, velocities, potentials, energies, etc.) then saves it to some form of file (image or log file).

Creation

This module is responsible for initialization of snapshots. You can create configuration YAML file which describes list of objects in the snapshot (single objects and *.csv files are supported for now).

The output is single FITS file which has two HDUs: empty primary one (it is required by FITS standard) and binary table with positions, velocities and masses of each particle in the system. It also stores timestamp T = 0 in the header.

You can start it with

python main.py create /path/to/config/file.yaml

Integration

This module is responsible for actual integration of the model from previous module. It operates similarly: you create configuration file with all the data necessary. Next step is to launch

python main.py integrate /path/to/config/file.yaml

It will print some info into console and gradually produce output FITS file. Each HDU of this file would contain timestamp in the TIME header and table with fields [x, y, z, vx, vy, vz, m]. Be aware that depending on number of particles it can take quite a lot of disk space.

Analysis

This module is responsible for the visualization of file with snapshots (for example, one from previous module). As always, you should create configuration file. The biggest part of it is description of matplotlib’s plots layout. Launch command:

python main.py analize /path/to/config/file.yaml

If done right it should produce a lot of pictures (the same amount as number of timestamps in the input file) similar to this one:

docs/source/images/image.png

This program is under heavy development so some things (or all of them) might work not as expected or not work at all.

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

omtool-0.2.0.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

omtool-0.2.0-py3-none-any.whl (34.9 kB view details)

Uploaded Python 3

File details

Details for the file omtool-0.2.0.tar.gz.

File metadata

  • Download URL: omtool-0.2.0.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.10.5 Darwin/21.3.0

File hashes

Hashes for omtool-0.2.0.tar.gz
Algorithm Hash digest
SHA256 03b86e80be432ef71b2c1ef3ec4ab0882742362c1a8b9747f60589e4c48772ec
MD5 c89f9f4c1651cff4fb59c01c0eb09d18
BLAKE2b-256 cba97bf3a65afe89c7f66a452da533d7a3a25a05d3a60a565e042b5cdb82f67a

See more details on using hashes here.

File details

Details for the file omtool-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: omtool-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 34.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.10.5 Darwin/21.3.0

File hashes

Hashes for omtool-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e8b712e1af36a80dc4ded13e55570ac49410d66531efe215e4342c9166cc14a
MD5 e16337ce213a5bdceabf2e8428d93f70
BLAKE2b-256 ad4b6c69927963a667ef47c86e232594eed2a0d891f3353c09d48825172cfb58

See more details on using hashes here.

Supported by

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