gw.transforms.waveform_transforms.CropMaskStrainRandom
gw.transforms.waveform_transforms.CropMaskStrainRandom(
domain,
f_min_upper=None,
f_max_lower=None,
cropping_probability=1.0,
independent_detectors=True,
independent_lower_upper=True,
deterministic_fmin_fmax=None,
)Apply random cropping of strain, by masking waveform and ASD outside the crop.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| domain | UniformFrequencyDomain | MultibandedFrequencyDomain | Domain of the waveform data, has to be a frequency domain type. | required |
| f_min_upper | Optional[float] | New f_min is sampled in range [domain.f_min, f_min_upper]. Sampling of f_min is uniform in bins (not in frequency) when the frequency domain is not uniform (e.g., MultibandedFrequencyDomain). | None |
| f_max_lower | Optional[float] | New f_max is sampled in range [f_max_lower, domain.f_max]. Sampling of f_max is uniform in bins (not in frequency) when the frequency domain is not uniform (e.g., MultibandedFrequencyDomain). | None |
| cropping_probability | float | probability for a given sample to be cropped | 1.0 |
| independent_detectors | bool | If True, crop boundaries are sampled independently for different detectors. | True |
| independent_lower_upper | bool | If True, the cropping probability is applied to lower and upper boundaries individually. If False, then with a probability of P = cropping_probability both lower and upper cropping is applied, and with 1-P, no cropping is applied from either direction. | True |
| deterministic_fmin_fmax | Optional[list[float | None] | list[list[float | None]]] | If not None, then cropping will be applied with fixed f_min and f_max, as specified by this argument. Can either be a single list [f_min, f_max], or a list of lists [[f_min_1, f_max_1], [f_min_2, f_max_2], …] for the different detectors. | None |
Attributes
| Name | Description |
|---|---|
| cropping_probability | |
| frequencies | |
| independent_detectors | |
| independent_lower_upper | |
| len_domain |