Created
April 18, 2012 15:02
-
-
Save gadamc/2414159 to your computer and use it in GitHub Desktop.
get Run12 calibration and voltage constants for ERA / KData analysis
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'] | |
#now you can get the voltage / calibration / correlation values used in Run12 ERA analysis | |
#by calling, for example, | |
#voltageFlag = kboloRecord.GetVoltageFlag() | |
voltageFlag = 1 | |
volts = constantDoc['ID3']['gVolts'][voltageFlag] | |
#To see all of the available information, browse a document for a particular detector | |
#ex: https://edwdbik.fzk.de:6984/_utils/document.html?analysis/run12analysisconstants_ID3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment