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 | |
from couchdbkit import Server, Database | |
s = Server('https://edwdbik.fzk.de:6984') | |
db = s['automat'] | |
vr = db.view('data/bypctime', reduce=False, descending=True, startkey=1318357552, endkey=1318357452, include_docs=True) | |
values = {} | |
ignorekeys = ['_id', '_rev', 'type', 'author', 'ipaddr', 'date', 'utctime'] |
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 | |
s = couchdbkit.Server('https://edwdbik.fzk.de:6984') | |
db = s['pulsetemplates'] | |
vr = db.view('analytical/bychandate', startkey=['chalA FID807', '2012-02-17 13:09:14'], limit=1, reduce=False, descending=True, include_docs=True) | |
doc = vr.first()['doc'] | |
exec(doc['formula']['python']) #defines template function |
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 pickle | |
s = couchdbkit.Server('https://edwdbik.fzk.de:6984') | |
db = s['pulsetemplates'] | |
vr = db.view('analytical/bychandate', startkey=['chalA FID807', '2012-02-17 13:09:14'], limit=1, reduce=False, descending=True, include_docs=True) | |
doc = vr.first()['doc'] |
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 operator | |
from ROOT import * | |
#make sure you $> source /sps/edelweis/kdata/code/dev/config/setup_kdata.sh (or .csh if you use tcsh or csh) | |
gSystem.Load('libkds') | |
gSystem.Load('libkpta') | |
gSystem.Load('libkamping') |
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 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) |
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 | |
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 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 | |
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 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.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 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
-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 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 | |
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 |