Compatibility adapter
Compatibility adapter: legacy strain-only view of a joint simulator.
Existing gwmock_noise.NoiseSimulator consumers only know about strain
channels. This adapter wraps any protocol-conformant
:class:~gwmock_noise.JointStrainWitnessSimulator and exposes it through the
legacy NoiseSimulator structural protocol, dropping witness channels,
channel_metadata and provenance from the return value -- the wrapped
joint simulator itself is unchanged and still available for this project's own
pipeline to consume jointly.
StrainOnlyAdapter
¶
Adapts a :class:~gwmock_noise.JointStrainWitnessSimulator to the legacy NoiseSimulator protocol.
Source code in src/gwmock_newtonian_noise/adapter.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
detectors
property
¶
Strain channel names.
duration
property
¶
Nominal generation duration in seconds.
metadata
property
¶
Return the wrapped joint simulator's metadata.
sampling_frequency
property
¶
Sampling frequency in hertz.
seed
property
¶
Seed of the wrapped joint simulator.
__init__(joint_simulator)
¶
Wrap a protocol-conformant joint simulator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
joint_simulator
|
JointStrainWitnessSimulator
|
A simulator satisfying
|
required |
Raises:
| Type | Description |
|---|---|
TypeError
|
If |
Source code in src/gwmock_newtonian_noise/adapter.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |
generate(duration, sampling_frequency, detectors, seed=None)
¶
Generate per-detector strain arrays only, dropping witness channels.
Source code in src/gwmock_newtonian_noise/adapter.py
61 62 63 64 65 66 67 68 69 70 | |
generate_stream(chunk_duration, sampling_frequency, detectors, seed=None)
¶
Yield per-detector strain chunks only, dropping witness channels.
Source code in src/gwmock_newtonian_noise/adapter.py
72 73 74 75 76 77 78 79 80 81 82 83 | |