Update flow.py to despike.