Skip to content

Commit 959b0a3

Browse files
authored
Update SeaStateRegularity.h
1 parent c6f28e4 commit 959b0a3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

bbn_wave_freq_m5atomS3/SeaStateRegularity.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,10 +383,11 @@ void updatePhaseCoherence() {
383383
if (ratio < 0.7f || ratio > 1.3f) return;
384384
}
385385

386-
// Multi-bin extent (adaptive to narrowness)
387-
int K = MAX_K; // always use full span
388-
float STEP = 0.06f; // ≈6 % spacing → covers ~4.3× up/down ⇒ handles 3× f-shift
389-
386+
int K = MAX_K; // keep full span
387+
// Choose target upward span to capture Fenton/cnoidal harmonics (≥5× recommended)
388+
constexpr float TARGET_SPAN_UP = 6.0f; // cover to ~6·ω_used (includes 5th harmonic)
389+
const float r = std::exp(std::log(TARGET_SPAN_UP) / float(K)); // ratio step
390+
390391
if (!bins_init) {
391392
for (int i = 0; i < NBINS; i++) {
392393
bin_c[i] = 1.0f;

0 commit comments

Comments
 (0)