Update calculate_flux.py