Skip to content

Instantly share code, notes, and snippets.

@betatim
Created June 2, 2014 13:19
Show Gist options
  • Save betatim/4b5ecba0fb4c104e07d4 to your computer and use it in GitHub Desktop.
Save betatim/4b5ecba0fb4c104e07d4 to your computer and use it in GitHub Desktop.
from collections import namedtuple
Infos = namedtuple('Infos', ["bias"," threshold", "alignment"])
# information about runs 1234 and 1235
run_info = {1234: Infos(12.3, 2., 42.),
1235: Infos(12.2, 2.1, 42.3)}
# retrieve it
print run_info[1234]
# run 1234 bias voltage
print run_info[1234].bias
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment