gw.injection.Injection
gw.injection.Injection(prior, **gwsignal_kwargs)Produces injections of signals (with random or specified parameters) into stationary Gaussian noise. Output is not whitened.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| prior | PriorDict | Prior used for sampling random parameters. | required |
| gwsignal_kwargs | Arguments to be passed to GWSignal base class. | {} |
Attributes
| Name | Description |
|---|---|
| prior |
Methods
| Name | Description |
|---|---|
| from_posterior_model_metadata | Instantiate an Injection based on a posterior model. The prior, waveform |
| injection | Generate an injection based on specified parameters. |
| random_injection | Generate a random injection. |
from_posterior_model_metadata
gw.injection.Injection.from_posterior_model_metadata(metadata)Instantiate an Injection based on a posterior model. The prior, waveform settings, etc., will all be consistent with what the model was trained with.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| metadata | dict | Dict which you can get via PosteriorModel.metadata | required |
injection
gw.injection.Injection.injection(theta)Generate an injection based on specified parameters.
This is a signal + noise consistent with the amplitude spectral density in self.asd. If self.asd is an ASDDataset, then it uses a random ASD from this dataset.
Data are not whitened.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| theta | dict | Parameters used for injection. | required |
Returns
| Name | Type | Description |
|---|---|---|
| dict | keys: waveform: data (signal + noise) in each detector extrinsic_parameters: {} parameters: waveform parameters asd (if set): amplitude spectral density for each detector |
random_injection
gw.injection.Injection.random_injection()Generate a random injection.
This is a signal + noise consistent with the amplitude spectral density in self.asd. If self.asd is an ASDDataset, then it uses a random ASD from this dataset.
Data are not whitened.
Returns
| Name | Type | Description |
|---|---|---|
| dict | keys: waveform: data (signal + noise) in each detector extrinsic_parameters: {} parameters: waveform parameters asd (if set): amplitude spectral density for each detector |