adaptation of the PI workflow to work with the variance instead of the mean