Closed stephenholleran closed 5 years ago
Shouldn't be called 'apply_calibration' as applying a calibration could mean using the equation y=mx+c. This function adjusts a wind speed which already has a slope and offset applied. It is adjusting the slope and offsets that were applied. Therefore it should be called 'adjust_slope_offset'.
Added tests to this now https://github.com/brightwind-dev/brightwind/tree/5fba1416a2d36242738eaaf3596e42b91a2d5d4c
@Inder95 can you check out the tests and see if they are done correctly? Thanks.
The tests look good and all of them passed. You can add it to the master branch or send me a pull request. You can run the tests by opening the terminal within pycharm itself and run the command:
pytest -svv
I ran them using py.test from the command line.
Already merged with master.
add capability to adjust an anemometer wind speed which requires a new slope and offset applied to that applied by the logger.
bw.apply_calibration(wndspd, current_slope, current_offset, new_slope, new_offset) returns adjusted wind speed