Code Monkey home page Code Monkey logo

light-curve-gbm-sampler's Introduction

light-curve-GBM-sampler

Sample random GRBs from GBM Burst Archive, write its spectral parameters and light curve into a .source file for MEGALib.

The sampler is a python script sampler.py, that works in the gbm conda environment.

Put some info and links on how to create the environment.

Workflow: Prepare a formatted Catalog of GBM Bursts.

You can use the GBM_bursts_flnc_band.fits file in the repository.

I created it by formatting the online ASCII Catalog of GBM Bursts:

  1. Go to NASA HEASARC's Archive ASCII Catalogs
  2. Download heasarc_fermigbrst.tdat.gz
  3. Unzip it.
  4. Run the script format_archive_gbm.py to create GBM_bursts_flnc_band.fits and GBM_bursts_flnc_band.fits_flux15. It can run in any environment with pandas and astropy. Note: the gbm environment does not have pandas.

Workflow: Create light curves from the data of the strongest transients.

  1. Run lightcurvemaker.py in the gbm environment.

Workflow: Run the script to create the source files.

  1. Run sampler.py in the gbm environment.

Some caveats

To produce the source files we use several independent random numbers from uniform distributions:

  1. The first is a random integer in [0; catalog_length]; we use it as an index to select one entry of the GBM GRB catalog. Then we write down the GRB name, l, b, flux, low index, high index, break energy, but NOT the light curve (usually too noisy). P.S: instead of choosing a random GRB we can also request one, if we are interested in simulating a particular GRB.
  2. The second is a random float in [0; 1], the third in [0; 180]. Those are the polarization values. They have nothing to do with GBM.
  3. The fourth is a random integer in [1; N_light_curves]. It selects one of the pre-produced light curves. The GRB used for the spectrum and the one used for the light curve are different.

light-curve-gbm-sampler's People

Contributors

gabriele-panebianco-inaf avatar

Watchers

 avatar

light-curve-gbm-sampler's Issues

script to download archive

Find the link at heasarc website, download the archive, open it and make it into a QTable, save to fits the entire catalog and the flagged one.

script to get empirical light curves

Write a script in the environment of the GBM Data Tools to download the burst selected from the archive and extract the empirical light curve.

create-script

Create a script that loads the GBM catalog, samples a GRB from it and writes its spectral parameters and gaussian shape in an apposite folder.

add COMP

Add the possibility to use the Comptonized function.

faint grbs

  • Use Argparser to define arguments.

-Faint GRBs:
Modify script to plot proper time intervals.

Study the GBM lIght Curves to understand what we should plot.

Make reasonable plots for faint GRBs.

sum all the light curves

Sum all the light curves as suggested by Eric to improve SNR.

Check data availability for long GRBs as requested by Giancarlo.

bayesian blocks

Group bins by using bayesian blocks, then clip.
Does it help with the background?

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.