Fix handling trtrange == None
Add logmean histograms, fix nan handling in logmeans