ooici/ion-functions — pull request #129 by chrisfortin (2014-03-17 19:17:39+00:00)
Title: CIDEVMI-1031: Algorithm Optimization for VEL3D, WMM optimizations-r2

Stuart, Chris,
Hi. While I am following the git-workflow file to generate this REL2.0 pull request, this is my first time, and I am a little trepidacious that I might have made a mistake. In particular, the header of the pull request above ( and the number of captured commits ) seems to indicate that I am trying to push chrisfortin:WMM_Optimizations onto ooici:master, which I don't believe is correct. Should I have selected the target for the pull request ( as REL2.0 ) somewhere?

Contents of the 2 commits associated with my changes:

Added static caching of WMM models to prevent rebuilding the model for every data sample. Moved model instantiation outside of the vectorize call in magnetic_declination (generic_functions.py) to take advantage of the caching, but needed to add an associated version of wmm_declination(_remod) due to the change in functional signature.

Also added a directory 'results' to capture before and after snapshots of the nosetest profiling runs ( for both the functional and performance tests ). For nomenclature, I'm using the test file target of the nosetest, with _INITIAL appended for the before, and _ for the after.

Also, a minor change in generic_functions to avoid repeating cos/sin calculations.

@cwingard Ready for review and merge ( This is my first pull request, so please let know if I've made any mistakes here )
@s-pearce Ready for review and merge