added function to set baryon fraction in snapshot object