loadStudyData function

Load, structure and check the inputs