introduced new gain and many improvements for erg code
Merge branch 'master' of https://github.com/heimel/InVivoTools