Skip to content

Instantly share code, notes, and snippets.

View restrepo's full-sized avatar

Diego Restrepo restrepo

View GitHub Profile
#!/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============"
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 / doi.ipynb
Created August 28, 2017 14:27
doi api examples
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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:
#include <Servo.h>
Servo myservo;
Servo myservo2;
const int sensor = 2;
const int ledr= 12;
const int ledv = 13;
int pos = 0;
void setup()
@restrepo
restrepo / posgrado.ipynb
Last active January 29, 2016 06:40
Estudiantes de posgrado admitidos y graduados en el Instituto de Física de la UdeA desde 1995
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
def casasibarra(di,ranMnu=False):
"""
di.keys()-> ['MH0','MA0','Mtr01','Mtr02','Mtr03',]
"""
MH0=di['MH0'];MA0=di['MA0'];Mtr01=di['Mtr01'];Mtr02=di['Mtr02'];Mtr03=di['Mtr03']
mnu1in,Dms2,Dma2,ThetSol,ThetAtm,ThetRec=neutrino_data()
#Nupa r= min, best_fit, max
#Thesol=np.array([0.278, 0.323, 0.375])
url='http://inspirehep.net/search?ln=en&ln=en&p=find++d+>+2015-11-07+and+primarch+hep-ph'