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

Module cbc_timeslides

source code


Date: 2017-12-05 15:29:36 +0000

Functions [hide private]
 
parse_lalapps_thinca_slidespec(slidespec)
Accepts a string in the format count:instrument=offset[,instrument=offset...] and returns the tuple (count, {instrument: offset, ...
source code
 
Inspiral_Num_Slides_Iter(count, offsets)
This generator yields a sequence of time slide dictionaries in the style of lalapps_thinca's time slides.
source code
Function Details [hide private]

parse_lalapps_thinca_slidespec(slidespec)

source code 

Accepts a string in the format count:instrument=offset[,instrument=offset...] and returns the tuple (count, {instrument: offset, ...}) Example:

>>> parse_inspiral_num_slides_slidespec("3:H1=0,H2=5,L1=10")
(3, {'H2': 5.0, 'H1': 0.0, 'L1': 10.0})

Inspiral_Num_Slides_Iter(count, offsets)

source code 

This generator yields a sequence of time slide dictionaries in the style of lalapps_thinca's time slides. Each resulting dictionary maps instrument to offset. The input is a count of time slides (an integer), and a dictionary mapping instrument to offset. The output dictionaries describe time slides that are integer multiples of the input time shifts. Example (formatted for clarity):

>>> list(Inspiral_Num_Slides_Iter(3, {"H1": 0.0, "H2": 5.0, "L1": 10.0}))
[{'H2': -15.0, 'H1': -0.0, 'L1': -30.0},
 {'H2': -10.0, 'H1': -0.0, 'L1': -20.0},
 {'H2': -5.0, 'H1': -0.0, 'L1': -10.0},
 {'H2': 0.0, 'H1': 0.0, 'L1': 0.0},
 {'H2': 5.0, 'H1': 0.0, 'L1': 10.0},
 {'H2': 10.0, 'H1': 0.0, 'L1': 20.0},
 {'H2': 15.0, 'H1': 0.0, 'L1': 30.0}]

Output time slides are integer multiples of the input time shift vector in the range [-count, +count], including zero, and are returned in increasing order of multiplier.