added COSMOS noise option to calculate variance function
(#345)