There are similar questions to mine on this site, but not quite what I am asking (I think). The de Broglie relations for energy and momentum
$$ \lambda = \frac{h}{p}, \\ \nu = E/h .$$
equate a specific frequency and wavelength to a particle, yet we know that a wave packet is a linear combination of an infinite range of frequencies and wavelengths. How is it that we (or nature) choose one frequency and wavelength out of the range? Does this have to do with the collapse of the wave packet when measured? And if so, is the resulting measured frequency a random outcome? Similarly, when an electron jumps from one energy level to another in an atom, it emits a photon of frequency
$$ \ \nu = \Delta E/h .$$
Since the photon is not a pure sinusoidal wave, how can a single frequency be ascribed to the photon?