pyrex.antenna.DipoleAntenna¶
-
class
pyrex.antenna.
DipoleAntenna
(name, position, center_frequency, bandwidth, temperature, resistance, orientation=(0, 0, 1), trigger_threshold=0, effective_height=None, noisy=True, unique_noise_waveforms=10)¶ Class for half-wave dipole antennas.
Stores the attributes of an antenna as well as handling receiving, processing, and storing signals and adding noise. Uses a first-order butterworth filter for the frequency response. Includes a simple threshold trigger.
- Parameters
- namestr
Name of the antenna.
- positionarray_like
Vector position of the antenna.
- center_frequencyfloat
Tuned frequency (Hz) of the dipole.
- bandwidthfloat
Bandwidth (Hz) of the antenna.
- temperaturefloat
The noise temperature (K) of the antenna. Used in combination with resistance to calculate the RMS voltage of the antenna noise.
- resistancefloat
The noise resistance (ohm) of the antenna. Used in combination with temperature to calculate the RMS voltage of the antenna noise.
- orientationarray_like, optional
Vector direction of the z-axis of the antenna.
- trigger_thresholdfloat, optional
Voltage threshold (V) above which signals will trigger.
- effective_heightfloat, optional
Effective length (m) of the antenna. By default calculated by the tuned center_frequency of the dipole.
- noisyboolean, optional
Whether or not the antenna should add noise to incoming signals.
- unique_noise_waveformsint, optional
The number of expected noise waveforms needed for each received signal to have its own noise.
See also
Antenna
Base class for antennas.
- Attributes
- namestr
Name of the antenna.
- positionarray_like
Vector position of the antenna.
- z_axisndarray
Vector direction of the z-axis of the antenna.
- x_axisndarray
Vector direction of the x-axis of the antenna.
- antenna_factorfloat
Antenna factor used for converting electric field values to voltages.
- efficiencyfloat
Antenna efficiency applied to incoming signal values.
- thresholdfloat, optional
Voltage threshold (V) above which signals will trigger.
- effective_heightfloat, optional
Effective length of the antenna. By default calculated by the tuned center_frequency of the dipole.
- filter_coeffstuple of ndarray
Coefficients of the transfer function of the butterworth bandpass filter to be used for frequency response.
- noisyboolean
Whether or not the antenna should add noise to incoming signals.
- unique_noisesint
The number of expected noise waveforms needed for each received signal to have its own noise.
- freq_rangearray_like
The frequency band in which the antenna operates (used for noise production).
- temperaturefloat or None
The noise temperature (K) of the antenna. Used in combination with resistance to calculate the RMS voltage of the antenna noise.
- resistancefloat or None
The noise resistance (ohm) of the antenna. Used in combination with temperature to calculate the RMS voltage of the antenna noise.
- noise_rmsfloat or None
The RMS voltage (V) of the antenna noise. If not
None
, this value will be used instead of the RMS voltage calculated from the values of temperature and resistance.- signalslist of Signal
The signals which have been received by the antenna.
is_hit
Boolean of whether the antenna has been triggered.
is_hit_mc_truth
Boolean of whether the antenna has been triggered by signal.
waveforms
Signal + noise (if
noisy
) for each triggered antenna hit.all_waveforms
Signal + noise (if
noisy
) for all antenna hits.
Methods
apply_response
(signal[, direction, …])Process the complete antenna response for an incoming signal.
clear
([reset_noise])Reset the antenna to an empty state.
directional_gain
(theta, phi)Calculate the (complex) directional gain of the antenna.
frequency_response
(frequencies)Calculate the (complex) frequency response of the antenna.
full_waveform
(times)Signal + noise (if
noisy
) for the given times.is_hit_during
(times)Check if the antenna is triggered in a time range.
make_noise
(times)Creates a noise signal over the given times.
polarization_gain
(polarization)Calculate the (complex) polarization gain of the antenna.
receive
(signal[, direction, polarization, …])Process and store one or more incoming (polarized) signals.
set_orientation
([z_axis, x_axis])Sets the orientation of the antenna.
trigger
(signal)Check if the antenna triggers on a given signal.