Skip to content

Boxtheon/EBL_fit_MC

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

132 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EBL_fit_MC

Fits to a simulated absorved blazar spectrum in order to validate EBL models.

The code to run is "EBL_MC_final.py" which is the Toy MC simulation. It has to be run multiple times with different inputs (e.g. "python EBL_MC_final.py 0", "python EBL_MC_final.py 1", ...). Change the "pathstring" variable in "EBL_MC_final.py" and "EBL_MC_final_functions.py" to match the path where you have all the needed files and where you want to store the output. In order to read the output use "EBL_fit_MC_viewer.ipynb" section called "Multiple files with data".

Use "EBL_MC_final_config_creator.ipynb" to generate or modify the needed configuration files depending on your needs. At this moment the CTAN-alpha option in Telescopes has not been implemented yet. Other important options are the intrinsic spectrum shape and the fit unction.

The code first simulates an EBL absorbed spectrum (using Dominguez et al. 2011 EBL model). After that it simulates how the selected telescope would see it (Effective Area, Energy resolution, Background and Angular resolution). After that, the program looks for the best fit for every apha value (deabsorption coefficient) and plots it in a -2logLikelihood vs alpha plot.

In order to run the code with condor, generate the needed config files and modify "EBL_MC_final.sub" (if you want to run a number of realizations different to 50 or 1000, you will have to use txtitercreator.ipynb and change the file in "EBL_MC_final.sub".) You also need to change the path in "EBL_MC_final.sh".

About

Simulated absorved blazar spectrum used to validate an EBL model

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Jupyter Notebook 95.9%
  • Python 4.1%