forked from ahmadia/bio-pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython_pipeline.ipy
More file actions
47 lines (33 loc) · 808 Bytes
/
Copy pathpython_pipeline.ipy
File metadata and controls
47 lines (33 loc) · 808 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Authored by Aron Ahmadia
# Who is totally awesome
%pylab
import numpy as np
f = open('Lumi.2760.csv')
g = f.readlines()
f.close()
h = np.empty((8,12))
for i in range(8):
h[i] = g[i+1].split(',')[1:]
imshow(h)
colorbar()
f = open('2013-05-24-2760-2763.txt')
g = f.readlines()
f.close()
plate_no = 2760
for idx in range(len(g)):
plate_str = 'Plate:\t'+str(plate_no)
if plate_str in g[idx]:
break
print idx
def get_bgal_data(data, idx):
start_idx = idx + 2
h = np.empty((8,12))
h[0] = data[start_idx].strip().replace('\t',' ').split(' ')[1:]
for i in range(1,8):
h[i] = data[start_idx+i].strip().replace('\t',' ').split(' ')
return h
bgal_data = get_bgal_data(g, idx)
imshow(bgal_data)
colorbar()
norm_data = h/(bgal_data-0.07)
imshow(norm_data)