Do spectrum averaging like GBTIDL regarding nan values.

Also a small typo bug fix in log output.