Fixed NaN-related bug in cubelets.py

I fixed another bug in cubelets.py, this time excluding NaNs from the calculation of integrated spectra by replacing np.sum() with np.nansum(), which treats NaNs as zero in the summation.