This file contains 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 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 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 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 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 | |
from KDataPy.database import kdatadb | |
import KDataPy.util | |
import ROOT | |
import scipy.signal as sig | |
import numpy as np | |
import matplotlib.pyplot as plt | |
plt.ion() | |
#acquire data location from the database |
This file contains 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
-0.264 0.125 2.53 | |
-0.66 0.399 2.2 | |
-0.235 0.31 2.46 | |
-9.14 1.8 0.127 | |
-0.488 0.45 3.07 | |
0.286 -0.0161 -0.509 | |
-0.219 0.358 2.87 | |
-0.317 1.4 1.02 | |
-0.212 2.06 1.05 | |
0.00549 -0.149 -0.802 |
This file contains 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.util | |
import ROOT | |
filename = '/sps/edelweis/kdata/data/raw/ma22a000_000.root' | |
bas = ROOT.KBaselineRemoval() #create a new baseline removal object | |
bas.SetBaselineStart(0) #use the methods of the object to set the characteristics | |
bas.SetBaselineStop(0.4) | |
This file contains 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 | |
from couchdbkit import Server, Database | |
s = Server('http://edwdbik.fzk.de:5984') | |
db = s['analysis'] | |
vr = db.view('constants/run12', include_docs=True) | |
constantDoc = {} | |
for row in vr: | |
constantDoc[row['key']] = row['doc'] | |
This file contains 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 | |
from ROOT import * | |
import sys,os, glob | |
runName = sys.argv[1] | |
fileList = glob.glob(runName+'_0[0-3][0-9].amp.root') | |
ml = TList() | |
for f in fileList: | |
print f |
This file contains 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 operator | |
from ROOT import * | |
import matplotlib.pyplot as plt | |
import numpy as np | |
plt.ion() | |
#make sure you $> source /sps/edelweis/kdata/code/dev/config/setup_kdata.sh (or .csh if you use tcsh or csh) |