el66 said:
Doppler effect appears in waves produced by oscillators witch have “peaks” and “hollows”.
Close, but to avoid confusion: a "wave" is by definition a series of alternate positive or negative peaks crossing zero in between. The "zero" might be a mean value such as sound waves whose peaks are relative to the mean air pressure but for EM waves, usually it is positive or negative field values relative to zero.
These peaks can be condensed or diluted by the Doppler effect.
In the Doppler effect, one peak passes a detector (e.g. your ear) but before the next arrives, there is a change of distance between the detector and source so the next peak travels for a longer or shorter time and hence arrives either later or earlier. That difference adds to the original period of the waves to change its received frequency. They are not "condensed or diluted", rather their spacing is altered.
In the light case, a peak represents an amount of photons.
No. The simplest way to think of a photons is as a short burst of waves encapsulated in a form that can only interact as if it was a particle, i.e. all or nothing. It's equivalent to thinking of it as a particle which has an intrinsic phase which changes at a rate given by its angular frequency.
But photons is not only produced by oscillators (i.e. nuclear reactions). Radio oscillators pulsating emit photons “in waves”. Incandescent lamp and most stars (except pulsars and quasars) emit photons continuously and irregularly, not “in waves”.
Light from an incandescent lamp is lots of photons all at random frequencies and phases - the peaks of one photon have no fixed relationship to those of another. Stars and pulsars are the same, the latter like lamps that are switched on for short periods regulary.
Light from a laser is lots of photons all at virtually the same frequency and with a fixed phase relationship, for example you could think of the peaks at the front of one photon being aligned with those at the end of the previous to produce a continuous wave. That's an analogy that has lots of problems, but it's better than your current misunderstanding.
Photons from radio transmitters are correlated like those from lasers but at lower frequencies. Radioactive gamma rays are random like photons from incandescent lamps but at higher frequencies.
But what is frequency meaning for one or a few photons?
Same as for the continuous signal, it is also a measure of energy when considered as a particle.
Provided that the photon have not mass, frequency only means energy. So, by redshift effect photon looses energy. By blueshift effect it gains energy. Where this energy comes from?
If someone throws a stone at you, it hurts more if you run towards it, less if you run away. The impact energy changes. Same if the thrower is running and you stand still. The same happens with photons, they have no mass (because their momentum is the same as the energy and mass is a function of the difference) but they still have energy and energy is frame-dependent. The energy measured by the thrower is not the same as that measured by the target, but the "change" in energy comes from the kinetic energy of the moving body, the target or the thrower depending on your viewpoint. It is a difference rather than a change though.