Rename gain to effective_gain
Update tests for effective_gain