-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththreshold.py
More file actions
29 lines (22 loc) · 1.07 KB
/
threshold.py
File metadata and controls
29 lines (22 loc) · 1.07 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
import os
output_file = open('Data/threshold.csv', 'w')
file_list = os.listdir('/mnt/raw/cluster_size/threshold/')
number = 0
output_file.write('Number, RawPath, ConfigPath, DataPath, OutputPath, GraphPath\n')
raw_path = '/mnt/raw/cluster_size/threshold/'
config_path = '/mnt/raw/cluster_size/threshold/'
data_path = '/mnt/homes/ychoi/CLUSTER_SIZE/THRESHOLD/ANALYSIS/'
proprecessed_path = '/mnt/homes/ychoi/CLUSTER_SIZE/THRESHOLD/PLOT/'
graph_path = '/mnt/homes/ychoi/entry_test/threshold/'
for file in file_list:
if file.endswith('.dat'):
date_str = file[14:27]
number_str = f'{number:06}'
raw_file = raw_path + 'ThresholdScan_' + date_str + '.dat'
config_file = config_path + 'ScanConfig_' + date_str + '.cfg'
data_file = data_path + 'Threshold_' + date_str + '.root'
proprecessed_file = proprecessed_path + 'Threshold_' + date_str
graph_file = graph_path + 'Threshold_' + date_str + '.root'
line = number_str + ', ' + raw_file + ', ' + config_file + ', ' + data_file + ', ' + proprecessed_file + ', ' + graph_file + '\n'
output_file.write(line)
number = number + 1