testing gain_readnoise_from_random