forked from erickmartins/autoQC_extras
-
Notifications
You must be signed in to change notification settings - Fork 0
/
collect_data.py
45 lines (39 loc) · 1.26 KB
/
collect_data.py
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
def collect_data_psf(folder):
if (folder == []):
return []
import pandas as pd
import os
if os.path.exists(os.path.join(folder,"summary_PSF.csv")):
data = pd.read_csv(os.path.join(folder,"summary_PSF.csv"))
data = data.dropna()
else:
return []
return data
def collect_data_pow(folder):
import pandas as pd
import os
if (folder == []):
return []
if os.path.exists(os.path.join(folder,"summary_power.csv")):
data = pd.read_csv(os.path.join(folder,"summary_power.csv"))
data = data.dropna()
else:
return []
return data
def collect_limits(folder):
import pandas as pd
import os
if (folder == []):
return []
directory = os.path.dirname(folder)
foldername = folder.split(os.sep)[-1]
if os.path.exists(os.path.join(directory,"resolution_limits.csv")):
data = pd.read_csv(os.path.join(directory,"resolution_limits.csv"))
data = data.dropna()
print(data[data['microscope']==foldername]['lateral'].iloc[0])
lateral = data[data['microscope'] == foldername]['lateral'].iloc[0]
axial = data[data['microscope'] == foldername]['axial'].iloc[0]
else:
lateral = []
axial = []
return lateral,axial