• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisãoe716cbc21b8d2c7c5e49f401ddb166b65043fe43 (tree)
Hora2010-10-20 21:49:55
Autorlorenzo
Commiterlorenzo

Mensagem de Log

I added a new filter on the tag IDs (useful when dealing with compartimentized
interactions).

Mudança Sumário

Diff

diff -r cdd2c30a8152 -r e716cbc21b8d Python-codes/t_ab_ac_from_scratch.py
--- a/Python-codes/t_ab_ac_from_scratch.py Wed Oct 20 12:47:00 2010 +0000
+++ b/Python-codes/t_ab_ac_from_scratch.py Wed Oct 20 12:49:55 2010 +0000
@@ -105,6 +105,27 @@
105105
106106 return (all_times,tags_abc)
107107
108+
109+def p_tab_tac_sel(info,selection):
110+ tag_list=s.unique1d(s.ravel(info[:,1:3]))
111+ all_times=s.zeros(0).astype("int64")
112+ tags_abc=s.zeros((0,4)).astype("int64")
113+
114+ for i in xrange(len(tag_list)):
115+ tag_id=tag_list[i]
116+
117+ if (tag_id in selection):
118+
119+ tags_info=single_tag_contact_times(info, tag_id)
120+
121+ delta_t=tags_info[2]
122+ abc=tags_info[3]
123+ all_times=s.hstack((all_times, delta_t))
124+ tags_abc=s.vstack((tags_abc, abc))
125+
126+ return (all_times,tags_abc)
127+
128+
108129
109130
110131 def p_tab_tac_filtered(info):
@@ -168,8 +189,8 @@
168189
169190 #Now I am adding an extra feature (i.e. I am cutting a slice of the data)
170191
171-t_ini=1275283490
172-t_fin=1275456290
192+t_ini= 1257417888 # 1275283490
193+t_fin= 1258104328 # 1275456290
173194
174195 sel=s.where((info[:,0]>=t_ini) & (info[:,0]<=t_fin) )
175196
@@ -184,11 +205,18 @@
184205 #############################################################################################
185206 # Now iterate on all tags
186207
187-results=p_tab_tac(info)
208+# results=p_tab_tac(info)
188209
189210 #results=p_tab_tac_filtered(info)
190211
191212
213+sel_p = s.arange(1400,1500)
214+
215+sel_else = s.arange(1200,1300)
216+
217+results=p_tab_tac_sel(info, sel_else)
218+
219+
192220 n.savetxt("delta_tab_tac.dat",results[0] , fmt='%d')
193221
194222 n.savetxt("tags_ab_ac.dat",results[1] , fmt='%d')