add flux variability test and sampling code