Package glue :: Package ligolw :: Module lsctables :: Class ExperimentSummaryTable
[hide private]
[frames] | no frames]

Class ExperimentSummaryTable

source code

     object --+                
              |                
 ligolw.Element --+            
                  |            
ligolw.EmptyElement --+        
                      |        
           ligolw.Table --+    
                          |    
             object --+   |    
                      |   |    
                   list --+    
                          |    
                table.Table --+
                              |
                             ExperimentSummaryTable

Nested Classes [hide private]
  RowType
Helpful parent class for row objects.

Inherited from table.Table: TableName

Instance Methods [hide private]
 
add_nevents(self, experiment_summ_id, num_events, add_to_current=True)
Add num_events to the nevents column in a specific entry in the table.
source code
 
as_id_dict(self)
Return table as a dictionary mapping experiment_id, time_slide_id, veto_def_name, and sim_proc_id (if it exists) to the expr_summ_id.
source code
 
get_expr_summ_id(self, experiment_id, time_slide_id, veto_def_name, datatype, sim_proc_id=None)
Return the expr_summ_id for the row in the table whose experiment_id, time_slide_id, veto_def_name, and datatype match the given.
source code
 
write_experiment_summ(self, experiment_id, time_slide_id, veto_def_name, datatype, sim_proc_id=None)
Writes a single entry to the experiment_summ table.
source code
 
write_non_injection_summary(self, experiment_id, time_slide_dict, veto_def_name, write_all_data=True, write_playground=True, write_exclude_play=True, return_dict=False)
Method for writing a new set of non-injection experiments to the experiment summary table.
source code

Inherited from table.Table: __init__, appendColumn, appendRow, applyKeyMapping, copy, endElement, getColumnByName, removeChild, sync_next_id, unlink, updateKeyMapping

Inherited from ligolw.EmptyElement: appendData

Inherited from ligolw.Element: appendChild, end_tag, getAttribute, getChildrenByAttributes, getElements, getElementsByTagName, hasAttribute, insertBefore, removeAttribute, replaceChild, setAttribute, start_tag, write

Inherited from list: __add__, __contains__, __delitem__, __delslice__, __eq__, __ge__, __getattribute__, __getitem__, __getslice__, __gt__, __iadd__, __imul__, __iter__, __le__, __len__, __lt__, __mul__, __ne__, __new__, __repr__, __reversed__, __rmul__, __setitem__, __setslice__, __sizeof__, append, count, extend, index, insert, pop, remove, reverse, sort

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __str__, __subclasshook__

Class Methods [hide private]

Inherited from table.Table: CheckElement, CheckProperties, getTablesByName, get_next_id, get_table, reset_next_id, set_next_id

Inherited from ligolw.Element: validattributes

Class Variables [hide private]
  constraints = 'PRIMARY KEY (experiment_summ_id)'
hash(x)
  datatypes = ['slide', 'all_data', 'playground', 'exclude_play'...
  how_to_index = {'es_dt_index': ('datatype'), 'es_ei_index': ('...
hash(x)
  next_id = <glue.ligolw.ilwd.experiment_summary_experiment_summ...
hash(x)
  tableName = 'experiment_summary'
  validcolumns = {'datatype': 'lstring', 'duration': 'int_4s', '...
hash(x)

Inherited from table.Table: interncolumns, loadcolumns

Inherited from ligolw.Table: tagName, validchildren

Inherited from list: __hash__

Properties [hide private]

Inherited from table.Table: Name

Inherited from ligolw.Table: Type

Inherited from object: __class__

Method Details [hide private]

add_nevents(self, experiment_summ_id, num_events, add_to_current=True)

source code 

Add num_events to the nevents column in a specific entry in the table. If add_to_current is set to False, will overwrite the current nevents entry in the row with num_events. Otherwise, default is to add num_events to the current value.

Note: Can subtract events by passing a negative number to num_events.

get_expr_summ_id(self, experiment_id, time_slide_id, veto_def_name, datatype, sim_proc_id=None)

source code 

Return the expr_summ_id for the row in the table whose experiment_id, time_slide_id, veto_def_name, and datatype match the given. If sim_proc_id, will retrieve the injection run matching that sim_proc_id. If a matching row is not found, returns None.

write_experiment_summ(self, experiment_id, time_slide_id, veto_def_name, datatype, sim_proc_id=None)

source code 

Writes a single entry to the experiment_summ table. This can be used for either injections or non-injection experiments. However, it is recommended that this only be used for injection experiments; for non-injection experiments write_experiment_summ_set should be used to ensure that an entry gets written for every time-slide performed.

write_non_injection_summary(self, experiment_id, time_slide_dict, veto_def_name, write_all_data=True, write_playground=True, write_exclude_play=True, return_dict=False)

source code 

Method for writing a new set of non-injection experiments to the experiment summary table. This ensures that for every entry in the experiment table, an entry for every slide is added to the experiment_summ table, rather than just an entry for slides that have events in them. Default is to write a 3 rows for zero-lag: one for all_data, playground, and exclude_play. (If all of these are set to false, will only slide rows.)

Note: sim_proc_id is hard-coded to None because time-slides are not performed with injections.


Class Variable Details [hide private]

datatypes

Value:
['slide', 'all_data', 'playground', 'exclude_play', 'simulation']

how_to_index

hash(x)

Value:
{'es_dt_index': ('datatype'), 'es_ei_index': ('experiment_id')}

next_id

hash(x)

Value:
<glue.ligolw.ilwd.experiment_summary_experiment_summ_id_class object a\
t 0x7f39041714b0>

validcolumns

hash(x)

Value:
{'datatype': 'lstring',
 'duration': 'int_4s',
 'experiment_id': 'ilwd:char',
 'experiment_summ_id': 'ilwd:char',
 'nevents': 'int_4u',
 'sim_proc_id': 'ilwd:char',
 'time_slide_id': 'ilwd:char',
 'veto_def_name': 'lstring'}