jeremysanders / k0dist Goto Github PK
View Code? Open in Web Editor NEWK0 distribution modelling code
K0 distribution modelling code
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.