Get network metadata for debugging/visualization.
487{
489
490 metadata[
"fundamental"] = std::to_string(
m_fundamental) +
" Hz";
491 metadata["spectrum"] = [this]() {
494 return "HARMONIC";
496 return "INHARMONIC";
498 return "STRETCHED";
500 return "CUSTOM";
501 default:
502 return "UNKNOWN";
503 }
504 }();
506
507 double avg_amplitude = 0.0;
508 for (
const auto& mode :
m_modes) {
509 avg_amplitude +=
mode.amplitude;
510 }
511 avg_amplitude /= (double)
m_modes.size();
512 metadata["avg_amplitude"] = std::to_string(avg_amplitude);
513
514 metadata["exciter_type"] = [this]() {
517 return "IMPULSE";
519 return "NOISE_BURST";
521 return "FILTERED_NOISE";
523 return "SAMPLE";
525 return "CONTINUOUS";
526 default:
527 return "UNKNOWN";
528 }
529 }();
530
532 metadata[
"coupling_count"] = std::to_string(
m_couplings.size());
533
534 return metadata;
535}
@ 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.