Get network metadata for debugging/visualization.
549{
551
552 metadata[
"fundamental"] = std::to_string(
m_fundamental) +
" Hz";
553 metadata["spectrum"] = [this]() {
556 return "HARMONIC";
558 return "INHARMONIC";
560 return "STRETCHED";
562 return "CUSTOM";
563 default:
564 return "UNKNOWN";
565 }
566 }();
568
569 double avg_amplitude = 0.0;
570 for (
const auto& mode :
m_modes) {
571 avg_amplitude +=
mode.amplitude;
572 }
573 avg_amplitude /= (double)
m_modes.size();
574 metadata["avg_amplitude"] = std::to_string(avg_amplitude);
575
576 metadata["exciter_type"] = [this]() {
579 return "IMPULSE";
581 return "NOISE_BURST";
583 return "FILTERED_NOISE";
585 return "SAMPLE";
587 return "CONTINUOUS";
588 default:
589 return "UNKNOWN";
590 }
591 }();
592
594 metadata[
"coupling_count"] = std::to_string(
m_couplings.size());
595
596 return metadata;
597}
@ 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.