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

Module grbsummary

source code

Functions [hide private]
 
directional_horizon(ifos, RA, dec, gps_time, horizons=None)
Return a dictionary of sensitivity numbers for each detector, based on a known sky location and an optional input dictionary of inspiral horizon distances for a reference source of the user's choice.
source code
 
detector_thresholds(horizons, min_threshold, max_threshold=7.5)
Return a set of detector thresholds adjusted for a particular set of inspiral horizon distances (calculated with directional_horizon).
source code
 
sensitivity_cmp(ifo1, ifo2)
Provide a comparison operator for IFOs such that they would get sorted from most sensitive to least sensitive.
source code
 
compute_offsource_segment(analyzable, on_source, padding_time=0, min_trials=None, max_trials=None, symmetric=True)
Compute and return the maximal off-source segment subject to the following constraints:
source code
 
multi_ifo_compute_offsource_segment(analyzable_dict, on_source, **kwargs)
Return the off-source segment determined for multiple IFO times along with the IFO combo that determined that segment.
source code
 
get_segs_from_doc(doc)
Return the segments from a document
source code
 
get_exttrig_trials_from_docs(onsource_doc, offsource_doc, veto_files)
Return a tuple of (off-source time bins, off-source veto mask, index of trial that is on source).
source code
 
get_exttrig_trials(on_segs, off_segs, veto_files)
Return a tuple of (off-source time bins, off-source veto mask, index of trial that is on source).
source code
 
get_mean_mchirp(coinc)
Return the arithmetic average of the mchirps of all triggers in coinc.
source code
 
load_external_triggers(filename) source code
 
write_rows(rows, table_type, filename)
Create an empty LIGO_LW XML document, add a table of table_type, insert the given rows, then write the document to a file.
source code
 
load_cache(xmldoc, cache, sieve_pattern, exact_match=False, verbose=False)
Return a parsed and ligolw_added XML document from the files matched by sieve_pattern in the given cache.
source code
 
get_num_slides(xmldoc)
Return the value of --num-slides found in the process_params table of xmldoc.
source code
 
retrieve_ring_boundaries(xmldoc) source code
Variables [hide private]
  itertools = __import__("itertools")
  sensitivity_dict = {"H1": 1, "L1": 2, "H2": 3, "V1": 4, "G1": 5}
Function Details [hide private]

directional_horizon(ifos, RA, dec, gps_time, horizons=None)

source code 

Return a dictionary of sensitivity numbers for each detector, based on a known sky location and an optional input dictionary of inspiral horizon distances for a reference source of the user's choice. If the horizons dictionary is specified, the returned values are interpreted as inspiral horizons in that direction.

detector_thresholds(horizons, min_threshold, max_threshold=7.5)

source code 

Return a set of detector thresholds adjusted for a particular set of inspiral horizon distances (calculated with directional_horizon). The min_threshold specified the minimum threshold which will be set for all detectors less sensitive than the best one. The most sensitive detector will have its threshold adjusted upward to a maximum of max_threshold.

compute_offsource_segment(analyzable, on_source, padding_time=0, min_trials=None, max_trials=None, symmetric=True)

source code 

Compute and return the maximal off-source segment subject to the
following constraints:

1) The off-source segment is constrained to lie within a segment from the
   analyzable segment list and to contain the on_source segment.  If
   no such segment exists, return None.
2) The off-source segment length is a multiple of the on-source segment
   length.  This multiple (minus one for the on-source segment) is called
   the number of trials.  By default, the number of trials is bounded
   only by the availability of analyzable time.

Optionally:
3) padding_time is subtracted from the analyzable segments, but added
   back to the off-source segment.  This represents time that is thrown
   away as part of the filtering process.
4) max_trials caps the number of trials that the off-source segment
   can contain.  The truncation is performed so that the resulting
   off-source segment is as symmetric as possible.
5) symmetric being True will simply truncate the off-source segment to
   be the symmetric about the on-source segment.

multi_ifo_compute_offsource_segment(analyzable_dict, on_source, **kwargs)

source code 

Return the off-source segment determined for multiple IFO times along with the IFO combo that determined that segment. Calls compute_offsource_segment as necessary, passing all kwargs as necessary.

get_segs_from_doc(doc)

source code 

Return the segments from a document

Parameters:
  • doc - document containing the desired segments

get_exttrig_trials_from_docs(onsource_doc, offsource_doc, veto_files)

source code 

Return a tuple of (off-source time bins, off-source veto mask, index of trial that is on source). The off-source veto mask is a one-dimensional boolean array where True means vetoed.

Parameters:
  • onsource_doc - Document describing the on-source files
  • offsource_doc - Document describing the off-source files
  • veto_files - List of filenames containing vetoes

get_exttrig_trials(on_segs, off_segs, veto_files)

source code 

Return a tuple of (off-source time bins, off-source veto mask, index of trial that is on source). The off-source veto mask is a one-dimensional boolean array where True means vetoed.

Parameters:
  • on_segs - On-source segments
  • off_segs - Off-source segments
  • veto_files - List of filenames containing vetoes

get_num_slides(xmldoc)

source code 

Return the value of --num-slides found in the process_params table of xmldoc. If no such entry is found, return 0.