merged calcRTilde with calcFlux and got a 20% speed increase