source: ETALON/CLIO/control/clio_constants.py @ 691

Last change on this file since 691 was 691, checked in by delerue, 7 years ago

CLIO control updated

File size: 2.6 KB
Line 
1"""
2Sets the constants for the CLIO data acquisition code
3March 2017
4"""
5
6__author__ = 'delerue'
7
8
9import glob
10import time
11
12global basedir
13global FILE_STOP
14global FILE_PAUSE
15global data_directory
16global data_dir
17global motor_controller_IP
18global motor_controller_port
19global write_to_motor_dated_log
20global motor_position_info
21#global motor_position_save
22global motor_position_request
23global code_directory
24
25# detecting on which computer the code is running
26computer=0
27COMPUTER_SP_CLIO=1
28COMPUTER_ND_MAC=2
29
30if (len(glob.glob("/home/etalon-admin/"))==1):
31    print "Running on SP@CLIO's DAQ computer"
32    computer=COMPUTER_SP_CLIO
33elif (len(glob.glob("/Users/delerue/"))==1):
34    print "Running on Nicolas'Mac"
35    computer=COMPUTER_ND_MAC
36
37
38today_str = time.strftime("%Y%m%d")
39
40
41# setting the correct directories
42if computer==COMPUTER_SP_CLIO:
43    basedir="/home/etalon-admin/"
44    code_directory=basedir+"control/"
45    FILE_PAUSE=basedir+'acquisition_data/pause_acquisition';
46    FILE_STOP=basedir+'acquisition_data/stop_acquisition';
47    motor_position_info=basedir+'acquisition_data/motor_position.txt';
48    motor_position_request=basedir+'acquisition_data/motor_requested_position.txt';
49    data_directory_base="/var/www/html/CLIO/"
50#    data_dir="/home/etalon-admin/acquisition_data"   
51
52elif computer==COMPUTER_ND_MAC:
53    basedir="/Users/delerue/"
54#    data_dir="/home/etalon-admin/acquisition_data"   
55    code_directory=basedir+"control/"
56    FILE_PAUSE=basedir+'acquisition_data/pause_acquisition';
57    FILE_STOP=basedir+'acquisition_data/stop_acquisition';
58    motor_position_info=basedir+'acquisition_data/motor_position.txt';
59    motor_position_request=basedir+'acquisition_data/motor_requested_position.txt';
60#    data_directory_base="/var/www/html/CLIO/"
61    data_directory_base='/Users/delerue/Downloads/CLIO_tmp/'
62    today_str="20170227"
63    FILE_STOP='/Users/delerue/Downloads/CLIO_tmp/20170227/stop_acquisition';
64
65#    data_dir="/home/etalon-admin/acquisition_data"
66
67data_directory=data_directory_base+today_str+"/"
68
69
70#Scope IPs
71SCOPE1_IP='129.175.202.193'
72SCOPE2_IP='129.175.202.14'
73
74motor_controller_IP='129.175.202.187'
75motor_controller_port=30000
76
77#Cameras [top, upstream, downstream]
78CAMERA_1_ON=1
79CAMERA_2_ON=0
80CAMERAS_ON=[CAMERA_1_ON, CAMERA_2_ON]
81
82CAMERA_1_TYPE=1
83CAMERA_2_TYPE=0
84CAMERAS_TYPE=[CAMERA_1_TYPE, CAMERA_2_TYPE]
85
86
87CAMERA_1_PORT='129.175.202.189:80'
88CAMERA_2_PORT='129.175.202.190:80'
89CAMERAS_PORT=[CAMERA_1_PORT, CAMERA_2_PORT]
90
91write_to_motor_dated_log = data_directory + "clio_write_to_motor_dated_log"
92#motor_position_save=data_directory + "motor_position.txt';
93
94data_dir=data_directory
Note: See TracBrowser for help on using the repository browser.