Coder Social home page Coder Social logo

hidalgo-icf / pbhbeta Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tadeodgaguilar/pbhbeta

0.0 0.0 0.0 4.5 MB

PBHBeta is a Python library for computing abundances of primordial black holes (PBHs) in Early.

Home Page: https://pbhbeta.readthedocs.io/

License: GNU General Public License v2.0

Python 100.00%

pbhbeta's Introduction

PBH-Beta

Warning this project is a beta version

Authors

tadeodaguilar & Luis E. Padilla

Prerequisites

The betaPBH library requires Python 3.10 or later to be installed on your system.

Python 3

pip package manager: The pip package manager is used to install betaPBH and its dependencies. It should be included with your Python installation by default.

In general, when you install betaPBH, the setup.py will install all dependences: matplotlib (v-3.7.1), numpy (v-1.22.4), scipy (v-1.10.1). If this not happend, you need install manually to use betaPBH

  1. Matplotlib

  2. NumPy

  3. SciPy

Note: betaPBH runs both in Python 2.x and 3.x. However, we highly recommend Python 3.x

Example

Abundances of PBHs with Number of e-folds

  from betaPBH import functions, constants, constraints, BfN, BfS
  import matplotlib.pyplot as plt
  import numpy as np
  functions.put_M_array()
  M_tot = np.array(constraints.M_tot)
  plt.loglog(M_tot,BfN.get_betas_reh_tot(10,0,1),label = r"$N_{\rm reh}=10$")
  plt.loglog(M_tot,BfN.get_betas_reh_tot(20,0,1),label = r"$N_{\rm reh}=20$")
  plt.loglog(M_tot,BfN.get_betas_reh_tot(30,0,1),label = r"$N_{\rm reh}=30$")
  plt.ylim([1e-30,1])
  plt.xlim([1,1e20])
  plt.xlabel(r"$M_{\rm PBH}~[\rm{g}]$")
  plt.ylabel(r"$\beta$")
  plt.legend(ncol=2,bbox_to_anchor=(0.85, 1.5))
  plt.show()

Descripción de la imagen

How to cite us

If you use $\beta$-PBH, please cite its pre-print, arXiv:.

Regards

Thanks for use betaPBH

pbhbeta's People

Contributors

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