LALBurst 2.0.7.1-eeff03c
lalburst.snglcoinc.coincgen_doubles Class Reference

Detailed Description

Using a pair of singlesqueue objects, constructs pairs of coincident events from streams of partially time-ordered events.

Searches must subclass this. The .singlesqueue class attribute must be set to the search-specific singlesqueue implementation to be used, i.e., a subclass of singlesqueue with an appropriate .event_time() override. The internally-defined .get_coincs class must be overridden with an implementation that provides the required .__init__() and .__call__() methods.

Definition at line 578 of file snglcoinc.py.

Inherits object.

Inherited by lalburst.burca.ep_coincgen_doubles.

Data Structures

class  get_coincs
 This class defines the coincidence test. More...
 

Public Member Functions

def __init__ (self, offset_vector, coinc_windows)
 offset_vector must be a two-instrument offset vector. More...
 
def age (self)
 The earliest of the internal queues' .age. More...
 
def t_coinc_complete (self)
 The earliest of the internal queues' .t_coinc_complete. More...
 
def push (self, instrument, events, t_complete)
 Push new events from some instrument into the internal queues. More...
 
def doublesgen (self, eventsa, offset_a, eventsb, singles_ids)
 For internal use only. More...
 
def pull (self, t, singles_ids)
 Generate a sequence of 2-element tuples of Python IDs of coincident event pairs. More...
 

Data Fields

 offset_vector
 
 coinc_window
 
 queues
 
 index
 
 instrumentb
 
 offset_a
 

Static Public Attributes

 singlesqueue = singlesqueue
 

Constructor & Destructor Documentation

◆ __init__()

def lalburst.snglcoinc.coincgen_doubles.__init__ (   self,
  offset_vector,
  coinc_windows 
)

offset_vector must be a two-instrument offset vector.

This sets which two instruments' events are to be processed by this object, and the offsets that should be applied to their events when searching for coincidences. coinc_windows is a dictionary mapping pairs of instruments (as sets) to the largest time that can separate events from those pairs of instruments (after applying the required time offsets) and they still be considered coincident.

Definition at line 662 of file snglcoinc.py.

Member Function Documentation

◆ age()

def lalburst.snglcoinc.coincgen_doubles.age (   self)

The earliest of the internal queues' .age.

Definition at line 697 of file snglcoinc.py.

◆ t_coinc_complete()

def lalburst.snglcoinc.coincgen_doubles.t_coinc_complete (   self)

The earliest of the internal queues' .t_coinc_complete.

Definition at line 704 of file snglcoinc.py.

◆ push()

def lalburst.snglcoinc.coincgen_doubles.push (   self,
  instrument,
  events,
  t_complete 
)

Push new events from some instrument into the internal queues.

The iterable of events need not be time-ordered. With self.singlesqueue.event_time() defining the time of events, t_complete sets the time up-to which the collection of events is known to be complete. That is, in the future no new events will be pushed whose times are earlier than t_complete. t_complete is not permitted to decrease.

Definition at line 716 of file snglcoinc.py.

◆ doublesgen()

def lalburst.snglcoinc.coincgen_doubles.doublesgen (   self,
  eventsa,
  offset_a,
  eventsb,
  singles_ids 
)

For internal use only.

Definition at line 722 of file snglcoinc.py.

◆ pull()

def lalburst.snglcoinc.coincgen_doubles.pull (   self,
  t,
  singles_ids 
)

Generate a sequence of 2-element tuples of Python IDs of coincident event pairs.

Calling code is assumed to be in the process of constructing all possible n-tuple coincidences such that at least one time-shifted event in the n-tuple is before t, and so we construct and return all pairs required to decide that set, meaning we will construct and return pairs that might contain only events after t so that the calling code can test them for coincidence with events from other instruments that precede t. The internal queues are flushed of events that cannot be used again assuming that t never goes backwards. If t is the special value None then all coincident pairs that can be constructed from the internal queues are constructed and returned, the queues are emptied and returned to their initial state.

The order of the IDs in each tuple is alphabetical by instrument.

The Python IDs of events that are not reported in a coincident pair are placed in the singles_ids set.

NOTE: the singles_ids parameter passed to this function must a set or set-like object. It must support Python set manipulation methods, like .clear(), .update(), and so on.

Definition at line 791 of file snglcoinc.py.

Field Documentation

◆ singlesqueue

lalburst.snglcoinc.coincgen_doubles.singlesqueue = singlesqueue
static

Definition at line 582 of file snglcoinc.py.

◆ offset_vector

lalburst.snglcoinc.coincgen_doubles.offset_vector

Definition at line 665 of file snglcoinc.py.

◆ coinc_window

lalburst.snglcoinc.coincgen_doubles.coinc_window

Definition at line 667 of file snglcoinc.py.

◆ queues

lalburst.snglcoinc.coincgen_doubles.queues

Definition at line 684 of file snglcoinc.py.

◆ index

lalburst.snglcoinc.coincgen_doubles.index

Definition at line 686 of file snglcoinc.py.

◆ instrumentb

lalburst.snglcoinc.coincgen_doubles.instrumentb

Definition at line 689 of file snglcoinc.py.

◆ offset_a

lalburst.snglcoinc.coincgen_doubles.offset_a

Definition at line 691 of file snglcoinc.py.