forked from BBN-Q/PyQLab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
30 lines (21 loc) · 856 Bytes
/
config.py
File metadata and controls
30 lines (21 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#Package startup stuff so people can start their iPython session with
#
#run PyQLab /path/to/cfgFile and be up and running
#Package imports
import numpy as np
#Load the configuration from the json file and populate the global configuration dictionary
import json
from os import getenv
PyQLabCfgFile = getenv('PYQLAB_CFGFILE')
if PyQLabCfgFile:
with open(PyQLabCfgFile, 'r') as f:
PyQLabCfg = json.load(f)
#pull out the variables
AWGDir = PyQLabCfg['AWGDir']
channelLibFile = PyQLabCfg['ChannelLibraryFile']
instrumentLibFile = PyQLabCfg['InstrumentLibraryFile']
sweepLibFile = PyQLabCfg['SweepLibraryFile']
measurementLibFile = PyQLabCfg['MeasurementLibraryFile']
quickpickFile = PyQLabCfg['QuickPickFile'] if 'QuickPickFile' in PyQLabCfg else None
else:
raise NameError("Unable to find the PyQLab configuration environment variable")