refactor(core): Simplify detrend process
WHY IS THIS CHANGE NEEDED:
- logical steps of computation unclear, therefore unclear if result of computation is what we want
HOW DOES THE CHANGE SOLVE THE PROBLEM:
- replace moving_average() and lines 74-76 with pandas.DataFrame methods -- simplifies code; standardised routines
- rename variables so they are more informative
EVIDENCE THAT COMMIT WORKS:
- generate random DataFrame, original & new implementation produce same outputs
REFERENCES:
- Issue #21 (closed)