What can change a photon's frequency? I found this question: Is it possible to apply force to a light particle? 
As it states, gravity can change the frequency of light by changing its momentum. My question regards other phenomena that could change the frequency of light, and, as commented on the answer there, there are two cases:


*

*The photon remains intact - that means only its frequency changes.

*A process that consumes one photon and produces another at a different frequency.
What I ask myself is whether the propagation of light from one medium to another could somehow change its frequency and whether we can find other phenomena in general (one is gravity) that might change the frequency of a photon.
Some suggestions from the answer of the mentioned question are that the frequency can be changed by the expansion of space, spontaneous pair-production, scattering and red/blue-shifting events. So if you can elaborate on these suggestions regarding the two cases mentioned above, you would help me a lot. 
That is, is possible to change light's frequency regarding the two cases above and are there phenomena like those mentioned that could produce such a change?
Note: I have also found this question, but I ask for a more general treatment than only light propagating in air and I'm concerned with phenomena that might have such effects.
 A: The  photon is an elementary particle.
There are two ways to measure the frequency and therefore the energy of the photon since its energy E=h*nu .

*

*using a diffraction grating which analyses the wavelengths in a beam of light , as below:


This is the spectrum of iron.
Each line is composed of zillions of photons with that frequency. If one sent one photon at a time to the grating , it would slot in the correct location for its wavelength and therefore its frequency would be known.
2)by knowing its interactions with other elementary particles, then from energy conservation its energy will be known and so  its frequency too. This happens in particle physics, where the photon can interact with other elementary particles and  scatter  as in the blue sky, or through Compton scattering, losing  part of its energy and momentum on an electron or nucleus and change its frequency. It can also disappear completely in creating pairs of other elementary particles.
Diffraction gratings have shown changes in the spectra coming from stars and galaxies,  of known atoms compared to the ones in earth, with blue shifts and red shifts.
The analysis of these spectra shows that the change in frequency is due either to the velocity of the star/galaxy with respect to us, or to the effect of a gravitational well. The latter has been measured in on an earth  experiment. When these  are taken into account, an overall  red shift that shows that everything is receding from the earth has led to Hubble's law and the need for an expanding universe.
A: In regards to your question: Can the frequency of light change in propagation from one media to another, the answer is no.  I found a previous response to a similar question that might help you: 

Think of it like this: At the boundary/interface of the medium, the number of waves you send is the number of waves you receive, at the other side, almost instantly. Frequency doesn't change because it depends on travelling of waves across the interface.
But speed and wavelength change as the material on the other side may be different, so now it might have a longer/shorter size of wave and so the number of waves per unit time changes.


A: Gravity can change frequency. A light beam going towards a massive body is blue-shifted by the gravitational field. If it is escaping a gravitational body, then it is red-shifted.

A: Here we need to be careful with the fundamental idea of energy conservation while thinking that photons remain intact and frequency changes or that a process consumes a photon and produces another of a different frequency.
The frequency of a simple pendulum depends only on the length of the string and the change in gravity. In the photon case, it was told frequency also depends on the gravitation field!
