as_analysis function

Construct an analysis object