# Should zero element be considered to calculate mean when smoothing spectrogram by window?

My (mass spectrometry) spectrogram does not measure the intensity constantly. I obtain the spectrogram, for example,

time(seconds) = [0,1,2,3,4,5,6,7,8,9]
intensity_profile = [0,10,0,0,50,75,0,60,20]


The 0 in intensity is when the machine does not do measurement (but in fact, it has some signal). If the window is 3 seconds and I choose to use mean, should I average only non-zero element?

smooth_intensity_profile = [10,62.5,40]


Or I should count zero as elements for denominator, and the result would be

smooth_intensity_profile = [3.33,41.67,26.67]