set_data function

Set the trial data