Right now the functions in measurements/aggregations.py do a lot of validation that isn't tested. We should add tests for it, particular since in the validation tests I've added so far, a there seems to be a fair amount of inconsistency between different functions.