Setting gain ranges