Giter Club home page Giter Club logo

galrotpy's Introduction

GalRotpy

A Python3-based tool for parametrizing the rotation curve and the galaxy potential of disk-like galaxies.

GalRotpy allows to model the dynamical mass of disk-like galaxies. It makes a parametric fit of the rotation curve by means the composed gravitational potential of the galaxy. This software is presented as a pedagogical tool for supporting the following research areas: galactic dynamics, cosmology and gravitation.

GalRotpy requires essentially the galpy package and the three fundamental Python3 packages: Numpy, Scipy and Matplotlib. GalRotpy doesn't support Python2.

Available gravitational potentials:

GalRotpy can give a first approximation of the galaxy rotation curve using the following gravitational potential schemas:

  • bulge model uning a Miyamoto-Nagai potential,
  • stellar or gaseous disk:
    • thin or thick disks implementing Miyamoto-Nagai potentials, and/or
    • an exponential disk model
  • and finally the Dark Halo with a Navarro-Frenk-White (NFW) or with a Burkert potential.

How to use GalRotpy

GalRotpy can be used in the following ways:

$ python3 GalRotpy.py rot_curve.txt [ bulge halo | bulge disk halo | disk halo ]  [--outfolder=<folderForOutput>]

or

$ python3 GalRotpy.py rot_curve.txt --guess=init_guess_params.txt  [--outfolder=<folderForOutput>]
  • rot_curve.txt it is mandatory to specify this parameter because it is the file that contains the rotation curve. There must be three columns separated by tabulation character:
    • r (galactocentric distance in )
    • vel (the circular speed in at each distance r )
    • e_vel (the uncertainty for the circular speed in at each distance r )
r vel e_vel
0.24 37.3 6.2
0.28 37.9 5.5
0.46 47.1 2.8
0.73 55.1 3.3
... ... ...
  • [bulge halo] | [bulge disk halo] | [disk halo] are the available options to make a first guess of the potential composition to reproduce the given rotation curve: bulge and halo or bulge and disk and halo or disk and halo
  • - -outfolder=folderForOutput is the folder name where all the output files will be located. If you do not include this parameter, the output files will be located at the same directory as GalRotpy.py
  • - -guess=init_guess_params.txt if you don't enter any of the options above, GalRotpy needs to specify the guess table where earch component will be used:
component mass a (kpc) b (kpc) checked
'BULGE' 110000000.0 0.0 0.495 True
'THIN DISK' 3900000000.0 5.3 0.25 False
'THICK DISK' 39000000000.0 2.6 0.8 True
'EXP DISK' 500.0 5.3 0.0 False
'DARK HALO' 140000000000.0 13.0 0.0 True
'BURKERT HALO' 8000000.0 20.0 0.0 False
  • where the mass column is in units of for 'BULGE', 'THIN DISK', 'THICK DISK', 'DARK HALO', surface mass density for 'EXP DISK', and for 'BURKERT HALO'.
  • checked column is the boolean value for including that gravitational potential component.

Finally there is shown the graphic composition of rotation curve. This is an interactive user aided tool for include or exclude the available components of the gravitational potential, then graphically recover the dynamic mass composition for the observed rotation curve and ccomputed value:

N|Solid

Once you have setted the initial parameters by the graphical reconstruction, press Start. GalRotpy will allow you to enter some parameters for MCMC fiting of all the dimensions setted previously and to find the dark halo mass. Then, there is required to set the number of times that GalRotpy must iterate (default=1).

N|Solid

When GalRotpy finishes the MCMC processes, it will show up the results in independent plots interactively as is shown below.

N|Solid

N|Solid

N|Solid

Finally, GalRotpy print out all the results of the MCMC parameter fitting including value, the estimations of dark matter halo considering the redshift and cosmological overdensity setted previously.

N|Solid

Conf_Regions.pdf and GalRotpy_fit.pdf files

Model View Controller

Model View Controller

All the results are compiled in the following file called final_params.txt whose content is shown below:

N|Solid

GalRotpy produces the following output files:

  • Conf_Regions.pdf
  • final_params.txt
  • GalRotpy_fit.pdf

GalRotpy is a powerful method to:

  • checking the presence of an assumed mass type component in a observed rotation curve,
  • determine quantitatively the main mass contribution in a galaxy by means of the mass ratios of a given set of five potentials,
  • to bound the contribution of each mass component given its gravitational potential parameters.

The related pre-print reference: GalRotpy: an educational tool to understand and parametrize the rotation curve and gravitational potential of disk-like galaxies

galrotpy's People

Contributors

andresgranadosc avatar jobovy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.