Skip to content

Instantly share code, notes, and snippets.

View mgmarino's full-sized avatar

Michael Marino mgmarino

View GitHub Profile
@mgmarino
mgmarino / allan.py
Last active September 10, 2015 12:30 — forked from stefan789/allan.py
allan deviaton
import numpy as np
def allanVar(data, sf=1):
'''
calculates allan variance
according to eq 8.13a in
David W. Allan, John H. Shoaf and Donald Halford: Statistics of Time and Frequency Data Analysis,
NBS Monograph 140, pages 151–204, 1974
'''
@mgmarino
mgmarino / git-completion.tcsh
Created November 9, 2012 08:57 — forked from kohenkatz/git-completion.tcsh
Source this file in your .tcshrc to get git command completion. Original source is http://gtirtha.wordpress.com/2010/05/14/git-autocomplete/ but WordPress's WSYIWYG editor messed it up and I cleaned it up.
# Source this script in tcsh to setup shell completions
# for git. Completions are activated by typing or Control-D
# in the shell after entering a partial command.
#
# Usage:
# source git-completion.tcsh (e.g. in ~/.cshrc)
#
# Supported completions:
# git (lists git commands)
# git help (lists git commands)
import ROOT
ROOT.gSystem.Load("libEXOROOT")
class model:
def __init__(self,RC_tau_1,RC_tau_2,CR_tau_1,CR_tau_2,CR_tau_3,baseline,lower_range,upper_range,size):
self.function = ROOT.TF1('function',self,lower_range,upper_range,size)
self.function.SetParName(0, 'number of signals')
self.cm = ROOT.EXOChannelManager()
self.cm.initialize(RC_tau_1,RC_tau_2,CR_tau_1,CR_tau_2,CR_tau_3)