imIDs = list(AllimIDs.GStask_ID.astype(int))
else:
    raise Exception("add project to list to get imIDs")
print "number of images included:", len(imIDs)
### load numpy array of user data. Also returns userIDs in a list
(datUser, userIDs) = ihc.get_user_data(imIDs, s["project_short_name"])
### simulate user data from expert data
# (datUser,userIDs) = ihc.simulate_user_data(datExp)

########### Descriptive stats on user OR expert data
# ihc.describe_expert_agreement(datExp,imIDs,expertIDs = expertIDs, project_short_name = project_short_name)

########### Aggregate expert data to get nImages*nMeasures
# use the mean to aggregate experts
print ("*** Expert Aggregation ***")
aggrExp = ihc.bootstrap_consensus(datExp, np.ma.size(datExp, 2), nSamples=1, replace=False, bias_weight=[None, None])

########### Aggregate user data to get nImages*nMeasures*nSamples
# aggregate users by bootstrapping with number of users in original dataset
print ("*** User Aggregation ***")
aggrUser = ihc.bootstrap_consensus(datUser, nUsersPerSample=np.ma.size(datUser, axis=2))
# just get user data without sampling
# aggrUser = ihc.bootstrap_consensus(datUser, nUsersPerSample=np.ma.size(datUser,axis=2), nSamples=1, replace=False)

########### Print information about user data for individual tasks
# ihc.data_print([2659, 2667, 2674, 2662], imIDs=imIDs, datUser=datUser, aggrUser=aggrUser, aggrExp=aggrExp)

########### Describe/plot comparison between expert and user (individual users or consensus or both)
## plot median+-95CI of all users (raw, no corrections applied) against individual expert points
# ihc.plot_image_results_all_users_vs_expert(datExp,datUser,imIDs=imIDs)
## plot median+-95CI of aggrUser against individual expert points