Prepare: extract study data