Coder Social home page Coder Social logo

dwarfjfactors's Introduction

ASTROJPY

The Python script ASTROJPY allows to build the (-log) profile Likelihood for the astrophysical factor, J, of Dwarf Spheroidal Satellite Galaxies (dSPhs) of the Milky Way. It uses as input the kinematic data from the dSphs member stars. It also performs a basic statistical analysis, consisting in the determination of the Maximum Likelihood value of J and its Confidence Intervals. This README contains the instructions on how to use it correctly.


FUNCTIONS.PYX MODULE This file contains the definitions of various functions used by the main script (ASTROJPY). For a faster execution, these are written in a format compatible with Python Cythonize package. In order to use it, it must first be compiled with a C++ compiler. A Python script which does this is also included, "setup.py", which should be executed with the following command $ python setup.py build_ext --inplace


DATA INPUT Data should be input into the code as a three-columns datafile consisting of

  1. the distance of a star from the dSphs center projected onto the sky (in units of kpc)
  2. measured line-of-sight velocity of each star (in units of km/s)
  3. measurement error on the line-of-sight velocity in (in units of km/s)

Alternatvely, the user can customize the data input by modifying the function get_data(gal) contained in functions.pyx


DATA OUTPUT The code produces two files:

a) "Like.npy" consists of the 2D, vertically stacked array of the profile likelihood components of the dSphs J factor. Its extension means that it is a python numpy-saved objected, thus loadable with the command np.load inside a python script. J is given in log10 basis and has units of Gev^2/cm^5.

b) "results.yaml" contains a python dictionary with the results of the statistical analysis on the profile Likelihood curve. These consist of: its minimum (corresponfing to the Maximum Likelihood J value); the edges of the 1,2 and 3sigma confidence intervals of the minimum; the velocity anisotropy parameter (r_a in the Osipkov-Merrit case, b in the Charbonnier case)

In order to visualize the likelihood curve, we include a Python plotting script called "plot.py"

dwarfjfactors's People

Contributors

achiappo avatar johannct avatar

Watchers

 avatar  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.