Closed anawas closed 2 years ago
This issue prevents proper scaling of the image, because calculating the mean of the spectrogram with i.data.mean()
gives nan
.
Further investigation on this shows that this is not a bug. The data acquisition stopped at 11:59:57, according to the FITS header:
...
INSTRUME= 'HUMAIN ' / Name of the spectrometer
OBJECT = 'Sun ' / object description
DATE-OBS= '2022/02/16' / Date observation starts
TIME-OBS= '11:45:00.751' / Time observation starts
DATE-END= '2022/02/16' / date observation ends
TIME-END= '11:59:57' / time observation ends
BZERO = 0. / scaling offset
BSCALE = 1. / scaling factor
...
I think we should not try to fill up the missing 3 secs. Thus, when calculating the mean value you can use the numpy.nanmean()
function.
The following lines create a spectrogram with nan values around 12:00: