forked from heeres/qtlab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuserconfig.py
More file actions
78 lines (62 loc) · 2.57 KB
/
userconfig.py
File metadata and controls
78 lines (62 loc) · 2.57 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# This file contains user-specific settings for qtlab.
# It is run as a regular python script.
import os, sys
# Do not change the following line unless you know what you are doing
config.remove([
'datadir',
'startdir',
'scriptdirs',
'user_ins_dir',
'startgui',
'gnuplot_terminal',
])
# QTLab instance name and port for networked operation
config['instance_name'] = 'qtlab_n1'
config['port'] = 12002
# A list of allowed IP ranges for remote connections
config['allowed_ips'] = (
# '130.161.*.*',
# '145.94.*.*',
)
# Start instrument server to share with instruments with remote QTLab?
config['instrument_server'] = False
## This sets a default location for data-storage
# If you want to store your data relative the qtlab folder Use s
# config['datadir'] = os.path.join(config['execdir'], 'YOUR-RELATIVE-PATH-HERE')
config['datadir'] = 'C:\YOUR-DATA-DIRECTORY-PATH'
## This sets a default directory for qtlab to start in
#config['startdir'] = 'd:/scripts'
## A default script (or list of scripts) to run after qtlab started
config['startscript'] = [] #e.g. 'initscript1.py'
## A default script (or list of scripts) to run when qtlab closes
config['exitscript'] = [] #e.g. ['closescript1.py', 'closescript2.py']
# Add directories containing scripts here. All scripts will be added to the
# global namespace as functions.
config['scriptdirs'] = [
'examples/scripts',
]
## This sets a user instrument directory
## Any instrument drivers placed here will take
## preference over the general instrument drivers
#config['user_insdir'] = 'd:/instruments'
## For adding additional folders to the 'systm path'
## so python can find your modules
sys.path.append(os.path.join(config['execdir'], 'modules'))
sys.path.append(os.path.join(config['execdir'], 'examples'))
# Whether to start the GUI automatically
config['startgui'] = True
# Default gnuplot terminal
#config['gnuplot_terminal'] = 'x11'
#config['gnuplot_terminal'] = 'wxt'
#config['gnuplot_terminal'] = 'windows'
# Enter a filename here to log all IPython commands
config['ipython_logfile'] = '' #e.g. 'command.log'
## Data naming
# By defult the data is stored in the "datadir" folder in a subfolder with
# date of the measurement, and herein a subfolder with timestamp and name
# To set an auto-increment filename generator use the following:
import qt
import data
gen = data.DataStorageGenerator(config['datadir'],datesubdir=True, timesubdir=True, incremental=True)
qt.Data.set_filename_generator(gen)
# For more data name generators, check out data.py