-
xpipeline.waveform.xinjectsignal.
xinjectsignal
(family, start_time, block_time, detectors, sample_rate, phi, theta, psi=0, **kwargs)[source]¶ Create simulated signals using a file defining the parameters
- Parameters:
- family (str):
waveform family name to be generated
- start_time (int):
Start time of the data being analysed.
- block_time (int):
Duration (s) of the data being analysed.
- channel (str)
channel[j] holds the name of the jth detector channel being analysed. The detector name is inferred from the first character of the channel name, and must be one of the names recognized by LoadDetectorData.
- sample_rate (int):
Sample rates corresponding to channels.
- phi (float):
Earth fixed coordinate
- theta (float):
Earth fixed coordinate
- **kwargs:
- catalog_directory (optional, str):
Path to directory containing pregenerated waveforms
- Returns:
- injection_data:
XTimeSeries
Notes:
The coordinate system is explained in ComputeAntennaResponse. It is assumed that the sky positions in the injection file are supplied in this coordinate system. For glitch injections the reported times and angles are those for the injection into the first detector.
Any portion of any signal which lies outside the interval [start_time, start_time+block_time] will be clipped. Otherwise, XINJECTSIGNAL will inject any signal of duration up to block_time without clipping. The edges of long-duration signals will be tapered with a hann window to avoid turn-on/off transients.
-
xpipeline.waveform.xinjectsignal.
xinjectsignal_fromfile
(start_time, block_time, channels, sample_rate, injection_file_name, rescale_by_antenna_response=False, injection_number=0, **kwargs)[source]¶ Create simulated signals using a file defining the parameters
- Parameters:
- start_time (int):
Start time of the data being analysed.
- block_time (int):
Duration (s) of the data being analysed.
- channel (str)
channel[j] holds the name of the jth detector channel being analysed. The detector name is inferred from the first character of the channel name, and must be one of the names recognized by LoadDetectorData.
- sample_rate (int):
Sample rates corresponding to channels.
- injection_file_name (str):
Name of file specifying simulated signals to be injected.
- injection_number
Array (positive integer). Optional. If given then only the injections specified on rows “injection_number” of the injection file are injected. This over-rides the default behaviour, which is to inject all injections in the file (including those outside the interval [start_time,start_time+block_time]!).
- **kwargs:
- catalog_directory (optional, str):
Path to directory containing pregenerated waveforms
- Returns:
- injection_data:
XTimeSeries
- gps_s:
Vector of peak time (GPS seconds, integer part) of each injection at the center of the Earth.
- gps_ns:
Vector of peak time (GPS seconds, nanosecond part) of each injection at the center of the Earth.
- phi:
Vector of azimuthal sky coordinate of each injection (radians, Earth-fixed coordinates).
- theta:
Vector of polar sky coordinate of each injection
- psi:
Vector of polarization angle of each injection (radians Earth-fixed coordinates).
Notes:
The coordinate system is explained in ComputeAntennaResponse. It is assumed that the sky positions in the injection file are supplied in this coordinate system. For glitch injections the reported times and angles are those for the injection into the first detector.
Any portion of any signal which lies outside the interval [start_time, start_time+block_time] will be clipped. Otherwise, XINJECTSIGNAL will inject any signal of duration up to block_time without clipping. The edges of long-duration signals will be tapered with a hann window to avoid turn-on/off transients.