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
from couchdbkit import Server, Database | |
import datetime | |
s = Server('https://edelweiss.cloudant.com') | |
db = s['pulsetemplates'] | |
channelName = 'chalA FID807' | |
myDate = datetime.datetime(2012, 1, 23 ) #see python's datetime documentation | |
myDateString = str(myDate) | |
vr = db.view('analytical/bychandate', reduce=False, limit=1, include_docs=True, descending=True, startkey=[ channelName, myDateString], endkey=[channelName, 0]) | |
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 sys, os, subprocess | |
import KDataPy.database as kdb | |
def main(arg): | |
startRunName = arg[0] #like lg23b001 | |
endRunName = arg[1] #something that is alpha-numerically greater than startRunName, like lg24a005 |
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
void runTest(const char* input, const char * out) | |
{ | |
KDataReader f(input); | |
TH1D hAmpHA("hAmpHeatA", "hAmpHeatA", 10000,-5000, 5000); | |
TH1D hAmpHC("hAmpHeatC", "hAmpHeatC", 10000,-5000, 5000); | |
TH1D hAmpIA("hAmpIonA", "hAmpIonA", 10000,-5000, 5000); | |
TH1D hAmpIB("hAmpIonB", "hAmpIonB", 10000,-5000, 5000); | |
TH1D hAmpIC("hAmpIonC", "hAmpIonC", 10000,-5000, 5000); | |
TH1D hAmpID("hAmpIonD", "hAmpIonD", 10000,-5000, 5000); |
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 | |
# -*- coding: utf-8 -*- | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import struct | |
class ipebb21mode(object): | |
def __init__ (self, filename): |
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
//start root. | |
//compile this file | |
// root [0] .L test.C+g | |
//run the program | |
// root [1] test(); | |
//Of course, this won't work because you have to point KDataReader and KDataWriter | |
//to the appropriate files. | |
#ifndef __CINT__ | |
#include "KDataReader.h" |
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
//______________________________________________________________________ | |
// | |
// KCurl.cxx | |
// Author: Adam Cox <mailto:[email protected]> | |
// | |
// *Copyright 2011 Karlsruhe Inst. of Technology. All Rights Reserved. | |
// | |
// | |
// Created Friday 04. February 2011 | |
// |
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
# Q E_recoil sigma_ion sigma_heat voltage_bias | |
0.707166 6.45045 1.02629 1.04127 8 | |
1.01045 8.87014 0.726222 2.31162 8 | |
0.974034 9.7642 0.814962 0.822313 8 | |
1.4773 5.81705 0.666992 2.03295 8 | |
1.10082 9.46519 0.765231 0.803824 6.4 | |
0.738693 27.9404 0.839768 0.838095 8 | |
0.759251 12.9018 0.734915 0.864414 6.4 | |
0.997683 10.3843 0.789633 0.999154 8 | |
1.08581 9.43259 0.80085 0.848234 8 |
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 | |
import sys, os, copy | |
s = Server('http://***:***@127.0.0.1:5984') | |
db = s['edwdb'] | |
vr = db.view('proc/daqdoc', reduce=False) |
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 pypodio2 import api | |
import sys, shutil, os, json | |
c = api.OAuthClient(sys.argv[1],sys.argv[2], sys.argv[3], sys.argv[4]) | |
orginfo = c.transport.get(url = '/org/') | |
def writerawtext(filename, data): | |
try: |
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 | |
from ROOT import TFile, TH1D | |
import numpy as np | |
import sys | |
s = Server(sys.argv[1]) | |
db = s[sys.argv[2]] | |
fout = TFile('tbolo_co_july8to14.root','recreate') |