How does a spectrum analyzer works. Example with particular case: eyes [edit]: I reformulated my question to first talk about general spectrum analyzer and then ask about how vision works (which is a particular case of spectrum analyzer as I explain below).
Let's assume we have a sensor that needs to analyze a spectrum of a signal $f(t)$. In theory, to find the Fourier spectrum of a signal, the calculation must occur for an infinite time as given by the following formula:
$$\widehat{f}(\omega)=\int_{-\infty}^{+\infty} d t'  f(t') e^{j \omega t'}$$
Thus, in practice, I guess that to measure the spectrum of a signal, the device doing so will actually compute something like:
$$\widehat{f}(t,\omega)=\int_{-\infty}^{+\infty} d t'  W_t(t') f(t') e^{j \omega t'}$$
Where $t$ is the moment at which I look at the spectrum of the signal, $W_t(t')$ must be at least be function that vanishes for $t'>t$. Then, when I will look at the spectrum, as defined as this last function, it will vary in time.
I just have read that this kind of thing is called time-frequency representation but I don't know much about it.
Now, my question related to it is the following:

*

*How is properly modelled the output of a spectrum analyzer ? It cannot be the mapping $f(t) \rightarrow \widehat{f}(\omega)$ because as explained above it would require to measure for an infinite amount of time. I would like to clarify way to model it in the most clean way.

Now, I introduce my next very related question.
My original question was actually about how eyes/ear do work. And it is very related to my question about sensors. Let me first convince that this question is definitely about physics.
If I see something that is blue, it necesseraly mean that all the process from the light signal $f(t)$ to what I am conscious about "it is blue", my brain was able to extract the information "the frequencies that composes the signal are around $440 nm$". Thus, the brain+eye is basically a spectrum analyzer.
If you do not agree with this, please tell me why. For me if we say that brain+eye is not a spectrum analyzer it means we couldn't see any color as we associate a sensation to a wavelength, and that to know if a wavelength is present we basically have to access the spectrum of the incoming signal.
What disturbs me is that if there is a light blinking, like I turn on and off a red laser. I will still see each time the laser is turned on a red light. And this confuses me a lot. Indeed, by doing so we add some frequencies (to turn on/off the laser adds frequencies in its signal, in a way the light emitted is no longer monochromatic). But in practice any color emitter that blinks, even fast, we always see it the same color.
Thus, in my second question I would like to understand this under a signal processing angle. Why do color always look the same even if something blinks ? As a related question, why by continuously looking at a color, I don't see this color changing. What would that mean in term of mathematical description of the system eyes+brain as being the spectrum analyzer ?
 A: See the question Which transform most closely mimics the human auditory system? on the Signal Processing SE. In short, the ear has a filter bank of gammatone-like filters tuned to different frequencies:

The impulse response function of an individual filter looks something like this:

Notice the impulse response decays rapidly after some finite time.
A: If we can observe a signal for a finite time, we can estimate its frequency approximately, with an uncertainty inversely proportional to the duration of the observationg.
As I understand it, the ear works by the sound waves vibrating certain small structures within the ear, which are resonant at different frequencies. These structures excite nerves that communicate the signal to the brain. If the sound wave is present long enough to excite the structure of the ear and produce a nervous signal to the brain, then we perceive a sound at the frequency associated with the particular structure that generated the nervous signal.
And the eyes work by light exciting chemicals in the rod and cone receptors in our eyes, again triggering a nervous signal to the brain. If there is sufficient light at a given frequency to produce a sufficient photochemical excitation to trigger the nervous signal, then our brain can perceive light. The mechanism by which signals from cone cells are used to produce the perception of color is a bit complicated, but to answer this question, suffice it to say if there is sufficient light present to excite a small number of cone cells, that is enough for us to perceive the light having a certain color.
But also be aware that our vision doesn't distinguish particular wavelengths of light. It only distinguishes the amount by which the light excites three different photoreceptors, which have peak response at three different frequencies, but which actually all have at least a small response pretty much across the whole visible spectrum.
A: Actually, your question is related to the precise details of how the body works, and has nothing to do with physics. The ear does not perform a Fourier transform. It is a long time since I studied it, but the biomechanics is quite complex. Certainly it has nothing to do with FTs. The ear contains multiple sensors sensitive to different frequencies. Iirc there are three separate mechanisms which recognise low medium and high frequencies. For high frequencies in the inner ear, hair cells are thought to resonate at different frequencies.
