Refactored data_reduction.py
Merge remote-tracking branch 'origin/master'