Only calculate mean profiles when necessary