One point on a phase/group-delay curve. More...
#include <audio_spectrum.hpp>
Public Attributes | |
| double | hz = 0.0 |
| double | magnitude_db_rel_peak = 0.0 |
| Transfer magnitude in dB relative to the curve's own peak transfer magnitude (peak bin = 0 dB, everything else negative) — the gate input. | |
| double | phase_rad = 0.0 |
| Unwrapped transfer phase; NaN unless phase_defined. | |
| double | group_delay_samples = 0.0 |
| -dφ/dω in samples; NaN unless defined. | |
| bool | defined = false |
| Gates group_delay_samples. | |
| bool | phase_defined = false |
| Gates phase_rad. | |
One point on a phase/group-delay curve.
Two gates, because the two measurements have different preconditions. Both are honesty gates: neither field may carry a number the analyzer did not measure, and each is NaN rather than a plausible value when its gate is false.
hz and magnitude_db_rel_peak are always readable — the magnitude IS the gate input, i.e. the evidence for the verdict. Check the matching gate before reading either measurement.
magnitude_db_rel_peak is NOT the same quantity as ResponsePoint::magnitude_db, despite both curves coming from the same Doctor run over the same stimulus. ResponsePoint::magnitude_db from response_relative_to_input is the ABSOLUTE transfer ratio (20*log10(|out|/|in|)), so a processor with 12 dB of passband gain reports +12 there. This field is normalized to the phase curve's OWN peak transfer magnitude (20*log10(|H|/peak|H|)), so that same processor reports 0 here — it is the input to the relative half of the defined gate, and reads 0 dB at the loudest bin whatever the overall gain is. The name carries the distinction because the two are written to sibling artifacts.
| bool pulp::test::audio::PhasePoint::defined = false |
Gates group_delay_samples.
False where the reference bin, the output bin, or the transfer ratio carries too little energy to differentiate — three gates, not one; see measure_group_delay.
| double pulp::test::audio::PhasePoint::group_delay_samples = 0.0 |
-dφ/dω in samples; NaN unless defined.
| double pulp::test::audio::PhasePoint::hz = 0.0 |
| double pulp::test::audio::PhasePoint::magnitude_db_rel_peak = 0.0 |
Transfer magnitude in dB relative to the curve's own peak transfer magnitude (peak bin = 0 dB, everything else negative) — the gate input.
| bool pulp::test::audio::PhasePoint::phase_defined = false |
| double pulp::test::audio::PhasePoint::phase_rad = 0.0 |
Unwrapped transfer phase; NaN unless phase_defined.