setup_trial function

Setup a generic trial specification