Skip to content

hessammehr/coalescence

Repository files navigation

Frequency coalescence

X-H + Y <-> X + Y-H

Simulates the coalescence of peaks in an ensemble of variable-frequency oscillators, often encountered with exchanging protons in NMR experiments (also an exercise in using JavaScript generators for signal generation/processing). The 1H signal emitted by the above system depends on which one of X or Y the H is bonded to. With slow exchange (fexchange ≪ | fX-H – fY-H |), two distinct peaks result:

slow exchange spectrum

Fast exchange (fexchange ≫ | fX-H – fY-H |) gives a single peak at the average of fX-H and fY-H:

slow exchange spectrum

Modifying the simulation

npm install
npm run dev # or npm run build

Then go to http://localhost:8000.

TODO

  • Display the (phase-adjusted) real part of the FFT instead of its magnitude.
  • Package fft-asm.js as npm package, then pull it in as a proper dependency.

Credits