Tidy up aperture_funcs.py to avoid duplicated code

I was going to work on #161 but noticed that there was some duplicate code in ``aperture_funcs`` that could be simplified. The error calculation is now only done in one place.

I ran the performance benchmarks and the impact is negligible.

cc @larrybradley @cdeil @bsipocz