Get network metadata for debugging/visualization.
478{
480
481 metadata[
"fundamental"] = std::to_string(
m_fundamental) +
" Hz";
482 metadata["spectrum"] = [this]() {
485 return "HARMONIC";
487 return "INHARMONIC";
489 return "STRETCHED";
491 return "CUSTOM";
492 default:
493 return "UNKNOWN";
494 }
495 }();
497
498 double avg_amplitude = 0.0;
499 for (
const auto& mode :
m_modes) {
500 avg_amplitude +=
mode.amplitude;
501 }
502 avg_amplitude /= (double)
m_modes.size();
503 metadata["avg_amplitude"] = std::to_string(avg_amplitude);
504
505 metadata["exciter_type"] = [this]() {
508 return "IMPULSE";
510 return "NOISE_BURST";
512 return "FILTERED_NOISE";
514 return "SAMPLE";
516 return "CONTINUOUS";
517 default:
518 return "UNKNOWN";
519 }
520 }();
521
523 metadata[
"coupling_count"] = std::to_string(
m_couplings.size());
524
525 return metadata;
526}
@ IMPULSE
Single-sample Dirac impulse (default)
@ FILTERED_NOISE
Spectrally-shaped noise burst.
@ CONTINUOUS
External node as continuous exciter.
@ NOISE_BURST
Short white noise burst.
@ SAMPLE
User-provided excitation waveform.
ExciterType m_exciter_type
std::vector< ModeCoupling > m_couplings
std::vector< ModalNode > m_modes
double m_decay_multiplier
@ STRETCHED
Piano-like stiffness: f, 2.01f, 3.02f, 4.04f...
@ INHARMONIC
Bell-like: f, 2.76f, 5.40f, 8.93f, 13.34f...
@ CUSTOM
User-provided frequency ratios.
@ HARMONIC
Integer harmonics: f, 2f, 3f, 4f...
virtual std::unordered_map< std::string, std::string > get_metadata() const
Get network metadata for debugging/visualization.
std::vector< double > mode(std::span< const double > data, size_t n_windows, uint32_t hop_size, uint32_t window_size)
Mode per window via tolerance-bucketed frequency count.