Changed the gain corrections from a single number to slope and an intercept.
The gain corrections vecotor is now a vector of pairs with the first entry being
the slope and the second being the intercept.