Package pylal :: Module fu_writeXMLparams
[hide private]
[frames] | no frames]

Source Code for Module pylal.fu_writeXMLparams

 1  from pylal.fu_utils import * 
 2   
 3  ############################################################################## 
 4  # Function to write the xml of the triggers to an HTML table  
 5  ############################################################################## 
 6   
7 -def getSlots(xml):
8 values = [] 9 for i in xml.__slots__: 10 temp = None 11 try: temp = getattr(xml,i) 12 except: pass 13 if temp: 14 values.append('<i><font color=blue>'+str(i)+'</i></font>=' + str(temp)) 15 return values
16
17 -def writeXMLparams(trig):
18 container = HTMLcontainer(trig,(__prog__).replace("fu_","")) 19 tableFile = open(container.locallink,'w') 20 writeIULHeader(tableFile) 21 #tableFile = open(container.link,'w') 22 tableFile.write('<h3>Follow up of trigger [' +str(trig.eventID) +']</h3>\n') 23 container.text = "click here for a link to the xml parameters" 24 #if trig.is_trigs(): 25 # pass 26 table = HTMLTable() 27 for ifo in trig.gpsTime: 28 if trig.gpsTime[ifo]: 29 xml = getattr(trig.coincs, str(ifo)) 30 table.add_column(getSlots(xml),str(ifo)) 31 table.write(tableFile) 32 tableFile.close() 33 return container
34