Skip to content

Instantly share code, notes, and snippets.

Diego Restrepo restrepo

Block or report user

Report or block restrepo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Likelihood_tutorial_gammarays.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View installb.sh
#!/usr/bin/env bash
SARAH_VERSION=4.13.0
wget http://www.hepforge.org/archive/sarah/SARAH-${SARAH_VERSION}.tar.gz
tar zxf SARAH-${SARAH_VERSION}.tar.gz
ln -s SARAH-${SARAH_VERSION} SARAH
wget http://www.hepforge.org/archive/spheno/SPheno-4.0.3.tar.gz
tar zxf SPheno-4.0.3.tar.gz
ln -s SPheno-4.0.3 SPHENO
sed -ri 's/(^F90\s*=\s*)ifort/\1gfortran/' SPHENO/Makefile
View install.sh
#!/usr/bin/env bash
# Based on: https://answers.launchpad.net/mg5amcnlo/+question/271396
# Also works with http://home.thep.lu.se/~torbjorn/pythia8/pythia8219.tgz which allows to install madevent
PYTHIA_VERSION=8219 #8212
echo "========= STEP 1: install MadGraph============"
wget https://launchpad.net/mg5amcnlo/2.0/2.6.x/+download/MG5_aMC_v2.6.2.tar.gz
tar zxf MG5_aMC_v2.6.2.tar.gz
echo "========= STEP 2: install hepmc with MadGraph============"
View upmns.py
import numpy as np
def neutrino_data():
'''From arxiv:1405.7540 (table I)
and asumming a Normal Hierarchy:
Output:
mnu1in: laightest neutrino mass
Dms2: \Delta m^2_{12}
Dma2: \Delta m^2_{13}
ThetSol,ThetAtm,ThetRec: in radians
'''
@restrepo
restrepo / master2single.py
Created Dec 4, 2012
Convert a LaTeX master file into a flatten LaTeX with all the files included
View master2single.py
#!/usr/bin/env python
"""Convert a master latex file,
into a single document by including
automatically all the LaTeX documents
which are arguments of
\include or \input
ignoring any \includeonly
"""
import sys
if len(sys.argv)==3:
View Least Action
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@restrepo
restrepo / doi.ipynb
Created Aug 28, 2017
doi api examples
View doi.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View puntaje.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View lfv.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View lfv.py
def Fme(x,xmin=0.996,xmax=1.005,xfit=1.001):
"""Fixing near to one values
xmin: close to 1 from below
xmax: close to 1 from above
xfit: optimized 1 limit
"""
x=np.asarray(x)
if x.shape:
x[np.logical_and(x>xmin,x<xmax)]=xfit
else:
You can’t perform that action at this time.