Coder Social home page Coder Social logo

k0dist's Introduction

This is code to model the K0 distribution from Chandra observations of
a set of clusters from the SPT survey.

See "Hydrostatic Chandra X-ray analysis of SPT-selected galaxy
clusters - I. Evolution of profiles and core properties" by Sanders et
al., 2017, MNRAS (arXiv:1705.09299)

Requirements:
 python2, numpy, scipy, emcee and h5py

Usage:
 python K0_dist.py

Input:
 K0_dist_table_PosOnly.hdf5  (input posterior PDFs)

Outputs:
 K0_dist_chain_PosOnly.hdf5  (output MCMC chain)
 K0_dist_meds_PosOnly.hdf5   (median K0 distribution and uncertainties)

The code takes a set of posterior probability distributions taken from
a MCMC analysis of the individual systems. These are stored in the
HDF5 format file K0_dist_table_PosOnly.hdf5 (hdfview can be used to
examine this). The used datasets in the files are:

K0_bin_edges:     edges of the K0 bins the posterior distribution was
                  calculated in
K0_bin_centres:   centres of above bins
K0_marg_pdf:      marginalised posterior PDF for each of the 82 clusters
                  (the Bullet cluster is not included in this dataset)

Also included in the file are:

K0_cuml_prob:     cumulative probability for each cluster with
                  increasing parameter
cluster_names:    names of included clusters for each row in the PDF

In addition, we provide binned marginalised posterior distributions
for the other parameters, logK300 (log entropy at 300 kpc), alphain
(inner slope) and alphaout (outer slope). Similar *_bin_edges,
*_bin_centres, *_marg_pdf and *_cuml_marg_pdf data can be found in the
file.

The marginalised posterior distributions can also be found in the file
posteriors.txt, giving the cluster name, parameter, bin centre, lower
bin value, upper bin value, marginalised PDF and cumulative probability.

The model is a two skewed Gaussians in linear K0 space. Given a
particular model, we multiply the PDF by the K0 posterior probability
distribution for each cluster. These combined PDFs are integrated to
make a likelihood for each system, and combined to give a total
likelihood. The prior is added to make a final likelihood.

emcee is used to sample the likelihood function producing a chain in
K0_dist_chain_PosOnly.hdf5.

Finally median and 1-sigma percentile models are produced for the K0
PDF. These are written into K0_dist_meds_PosOnly.hdf5.

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.