slight updte to calc_F.m so it is a bit more stable.  Also added a stream so we can have a consistent random number seed (to make debugging easier).