Package pylal :: Module CoincInspiralUtils :: Class coincInspiralTable
[hide private]
[frames] | no frames]

Class coincInspiralTable

source code

Table to hold coincident inspiral triggers. Coincidences are reconstructed by making use of the event_id contained in the sngl_inspiral table. The coinc is a dictionary with entries: event_id, numifos, stat, and each available IFO (G1, H1, etc.). The stat is set by default to the snrsq: the sum of the squares of the snrs of the individual triggers.

Nested Classes [hide private]
  row
Instance Methods [hide private]
 
__init__(self, inspTriggers=None, stat=None) source code
 
__len__(self) source code
 
append(self, row) source code
 
extend(self, rows) source code
 
__getitem__(self, i)
Retrieve the value in this column in row i.
source code
 
getstat(self) source code
 
sort(self, descending=True)
Sort the list based on stat value default is to descending
source code
 
calculate_fap(self, stats, use_likelihood=False)
Calculates false alarm probability for each coinc using stats array.
source code
 
getslide(self, slide_num)
Return the triggers with a specific slide number.
source code
 
coincinclude(self, ifolist)
Return the coincs which have triggers from the ifos in ifolist.
source code
 
coinctype(self, ifolist)
Return the coincs which are from ifos.
source code
 
removecoinctype(self, ifolist)
Return the coincs which are NOT from the coinc type made from combining all the ifos in the ifolist.
source code
 
getsngls(self, ifo)
Return the sngls for a specific ifo.
source code
 
vetoed(self, seglist)
Returns a list of coincident triggers that are vetoed entirely by a segment of the segment list.
source code
 
cluster_core(self, cluster_window)
Return the clustered triggers, returning the one with the largest stat in each fixed cluster_window, exactly as in lalapps_coire (in package/tools/CoincInspiralUtils.c:XLALClusterCoincInspiralTable)
source code
 
cluster(self, cluster_window, numSlides=None)
New clustering method working the same way as the clustering method used in lalapps_coire (in package/tools/CoincInspiralUtils.c:XLALClusterCoincInspiralTable)
source code
 
add_sim_inspirals(self, sim_inspiral)
FIXME: We should really store the sim coincidence info in the event_id Method to add simulated injections to a list of coincs
source code
 
add_missed_sims(self, sim_inspiral)
Add missed sim inspirals to the list of coincs, set the stat = -1
source code
 
return_sim_inspirals(self, statistic=None, thresh=0)
Method to return the sim_inspiral table associated to the coincs.
source code
 
partition_by_stat(self, threshold)
Return (triggers with stat < threshold, triggers with stat == threshold, triggers with stat > threshold).
source code
 
getTotalMass(self, mLow, mHigh)
Return triggers with mLow <= mean total mass < mHigh
source code
 
getChirpMass(self, mLow, mHigh)
Return triggers with mLow <= mean chirp mass < mHigh
source code
 
getEThincaValues(self, ifos)
Return ethinca values for the coincidences
source code
 
getSimpleEThincaValues(self, ifos)
Return simple ethinca values for the coincidences of the ifo pair ifos.
source code
 
getTriggersInSegment(self, segment)
Return a new coincInspiralTable with triggers whose end_times lie within segment; always use alphabetically first ifo's end_time.
source code
Method Details [hide private]

__init__(self, inspTriggers=None, stat=None)
(Constructor)

source code 
Parameters:
  • inspTriggers - a metaDataTable containing inspiral triggers from which to construct coincidences
  • stat - an instance of coincStatistic

calculate_fap(self, stats, use_likelihood=False)

source code 

Calculates false alarm probability for each coinc using stats array.

Parameters:
  • stats - array of loudest statistics forund in each of the time slides

getslide(self, slide_num)

source code 

Return the triggers with a specific slide number.

Parameters:
  • slide_num - the slide number to recover (contained in the event_id)

coincinclude(self, ifolist)

source code 

Return the coincs which have triggers from the ifos in ifolist.

Parameters:
  • ifolist - a list of ifos

coinctype(self, ifolist)

source code 

Return the coincs which are from ifos.

Parameters:
  • ifolist - a list of ifos

removecoinctype(self, ifolist)

source code 

Return the coincs which are NOT from the coinc type made from combining all the ifos in the ifolist.

Parameters:
  • ifolist - a list of ifos

getsngls(self, ifo)

source code 

Return the sngls for a specific ifo.

Parameters:
  • ifo - ifo for which to retrieve the single inspirals.

vetoed(self, seglist)

source code 

Returns a list of coincident triggers that are vetoed entirely by a segment of the segment list. A coincident trigger is added to the list only if all triggers lie within a segment. If any trigger lies outside any segment, it is not added.

Parameters:
  • seglist - segment list used to veto coincidences

cluster_core(self, cluster_window)

source code 

Return the clustered triggers, returning the one with the largest stat in each fixed cluster_window, exactly as in lalapps_coire (in package/tools/CoincInspiralUtils.c:XLALClusterCoincInspiralTable)

Parameters:
  • cluster_window - length of time over which to cluster (seconds)

cluster(self, cluster_window, numSlides=None)

source code 

New clustering method working the same way as the clustering method used in lalapps_coire (in package/tools/CoincInspiralUtils.c:XLALClusterCoincInspiralTable)

Parameters:
  • cluster_window - length of time over which to cluster (seconds)
  • numSlides - number of slides if this are time-slide triggers

add_sim_inspirals(self, sim_inspiral)

source code 

FIXME: We should really store the sim coincidence info in the event_id Method to add simulated injections to a list of coincs

Parameters:
  • sim_inspiral - a simInspiralTable

add_missed_sims(self, sim_inspiral)

source code 

Add missed sim inspirals to the list of coincs, set the stat = -1

Parameters:
  • sim_inspiral - a simInspiralTable

return_sim_inspirals(self, statistic=None, thresh=0)

source code 

Method to return the sim_inspiral table associated to the coincs. If thresh is specified, only return sims from those coincs whose stat exceeds thresh (or is under thresh if statistic == far).

Parameters:
  • statistic - the statistic to use
  • thresh - the threshold on the statistic

partition_by_stat(self, threshold)

source code 

Return (triggers with stat < threshold, triggers with stat == threshold, triggers with stat > threshold).

The set of (stat == threshold) is of zero measure, but often, as when doing something like the loudest event statistic, the threshold is taken from a coinc in self.

getTotalMass(self, mLow, mHigh)

source code 

Return triggers with mLow <= mean total mass < mHigh

Parameters:
  • mLow - a float
  • mHigh - a float

getChirpMass(self, mLow, mHigh)

source code 

Return triggers with mLow <= mean chirp mass < mHigh

Parameters:
  • mLow - a float
  • mHigh - a float

getEThincaValues(self, ifos)

source code 

Return ethinca values for the coincidences

Parameters:
  • ifos - a list of the 2 ifos

getSimpleEThincaValues(self, ifos)

source code 

Return simple ethinca values for the coincidences of the ifo pair ifos.

For coincs that do not have both ifos specified, return 0.0.