Giter Club home page Giter Club logo

hmc-ebl's Introduction

HMC-EBL

A simple implementation of Hamiltonian Monte Carlo (HMC) to infer Extragalactic Background Light (EBL) parameters using flux observations of gamma ray sources. The EBL model adopted is the one by Finke et al. (2010), considering the dust fractions of the PAH and Small Grains components as the free parameters. The intrinsic spectra of the sources can be described by three parametrizations: power law (PL), log-parabola (LP) and power law with exponential cut-off (PLC).

A sample of 12 synthetic BL Lac spectra is supplied. In the 'chains' folder, there are also the effective samples from the analysis of IACT data by Genaro et al. (2023, in prep).

Required Python packages

numpy; scipy

Usage

  • The files provided are tunned for running HMC considering 5 synthetic BL Lacs.
  • 'start_hmc.py' defines the intrinsic models for each source, the number of HMC steps, integration steps and size, as well as the inverse mass matrix ('invmass_matrix.dat') and initial positions files ('initialization.py').
  • 'sources_list.txt' lists the data files (flux observations).
  • If you want to renormalize the flux data (recommended for HMC computations), insert in 'normalization.dat' the factors that each spectrum will be multiplied to.
  • For different data file formatting, modifications in the read_data() function in run_hmc.py may be required.

hmc-ebl's People

Contributors

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