This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import couchdbkit | |
import operator | |
import pywt | |
import numpy as np | |
import string, os, sys | |
import KDataPy.util as kutil | |
import ROOT | |
import matplotlib.pyplot as plt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step 1 - Install XCode on your mac. Go to the app store on your computer (or click here: https://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12). You might have to sign up for an Apple Developer's ID, which is free. | |
Step 1b - Install XQuartz. http://xquartz.macosforge.org/landing/ | |
Step 2 - Install Enthought's Python distribution (includes Numpy/SciPy/MatplotLib). http://www.enthought.com/products/epd_free.php. Install the 64-bit distribution (assuming that your mac is relatively new...) | |
Step 3 - Install Homebrew (this makes it easy to install FFTW and other tools! Homebrew is awesome... ) | |
type this in your command line: | |
$> ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)" | |
... this will do a bunch of stuff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import KDataPy.util as kut | |
import ROOT | |
ROOT.gSystem.Load('libkds') | |
ROOT.gSystem.Load('libkpta') | |
chainHeat =ROOT.KPulseAnalysisChain() | |
chainHeat.AddProcessor(ROOT.KBaselineRemoval() ) | |
chainIon1 =ROOT.KPulseAnalysisChain() | |
chainIon1.AddProcessor(ROOT.KBaselineRemoval() ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import KDataPy.database as kdb | |
import datetime, time | |
db = kdb.radon('http://10.0.1.11:5984') | |
startTime = datetime.datetime(2010, 10, 18, 13, 0, 0) | |
endTime = startTime + datetime.timedelta(hours=-5) | |
endTime_epoch = time.mktime(endTime.timetuple()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "measurement", | |
"grouping": "EXO(2008)", | |
"sample": { | |
"m_name": "Norddeutsche Affinerie, NSOV copper", | |
"m_description": "Norddeutsche Affinerie, NSOV copper made May 2002", | |
"m_id": "1", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#you'll need to easy_install jsonschema and couchdbkit | |
# | |
# -- download the schema description by | |
# running this from your terminal | |
# | |
# wget https://raw.github.com/gadamc/persephone/schema/_attachments/schema/data.schema.ietf_draft_v3.aarm_spec_v1.01.json -O schema.json | |
# | |
import json, cPickle, jsonschema, couchdbkit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
gSystem.Load("libkds"); | |
Int_t nEvents = 500; | |
Int_t nBolos = 3; | |
Int_t nPulses = 4; | |
Int_t pulseSize = 512; | |
Int_t nMuonModules = 5; | |
UInt_t totSize; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import datetime | |
import re | |
from ROOT import TH1D, TFile | |
fname = 'mylog' | |
tlf = open(fname,'r') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, glob | |
flist = glob.glob("i*") | |
for f in flist: | |
os.symlink(os.path.join(os.getcwd(), f), os.path.join('/usr/local/bin/', f)) | |