-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpca.py
More file actions
26 lines (21 loc) · 763 Bytes
/
pca.py
File metadata and controls
26 lines (21 loc) · 763 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
import configparser
config = configparser.ConfigParser()
config.read('data/Alligator_Hatchling_1_.pca')
def parse_config(config, section):
dict1 = {}
options = config.options(section)
for option in options:
try:
dict1[option] = config.get(section, option)
if dict1[option] == -1:
print("skip: %s" % option)
except:
print("exception on %s!" % option)
dict1[option] = None
return dict1
averaging = parse_config('CalibValue')['averaging']
skip = parse_config('CalibValue')['skip']
timingVal = parse_config('Detector')['timingval']
current = parse_config('Xray')['current']
voxX = parse_config('Geometry')['voxelsizex']
voxY = parse_config('Geometry')['voxelsizey']