本文整理汇总了Python中hand.Hand.done_with_study_data方法的典型用法代码示例。如果您正苦于以下问题:Python Hand.done_with_study_data方法的具体用法?Python Hand.done_with_study_data怎么用?Python Hand.done_with_study_data使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hand.Hand
的用法示例。
在下文中一共展示了Hand.done_with_study_data方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: WebsocketHandler
# 需要导入模块: from hand import Hand [as 别名]
# 或者: from hand.Hand import done_with_study_data [as 别名]
#.........这里部分代码省略.........
if envelope_obj.count() == 0:
self.mongo_envelopes.insert({
"name": envelope,
"gesture": "",
"gesture duration": 1000,
"allpoints": [],
"individual_points": [],
"user_id": ObjectId(message[1])
})
envelopes = self.mongo_envelopes.find({"user_id": ObjectId(message[1])})
envelopes = bson.json_util.dumps(envelopes).replace(",", "§")
self.write_message("colliders," + gestures + "," + envelopes)
elif message[0] == "study_start_trial":
self.mongo_studies.update({"_id": self.current_study_participant}, {
"$set": {
"trials." + message[1] + ".type": message[2],
"trials." + message[1] + ".optitrack_data": [],
"trials." + message[1] + ".touch_data": [],
"trials." + message[1] + ".timestamp": time.time()
}
})
self.data_fetcher.get_data_for_study(self.current_study_participant, message[1])
self.hand.get_data_for_study(self.current_study_participant, message[1])
if message[2][-6:] == "-noems":
self.arduino.study_no_ems = True
self.start_time = time.time()
elif message[0] == "study_end_trial":
fat_var = self.data_fetcher.done_with_study_data()
self.mongo_studies.update({"_id": self.current_study_participant}, {
"$set": {
"trials." + message[1] + ".time": time.time() - self.start_time,
"trials." + message[1] + ".optitrack_data": fat_var
}
})
self.hand.done_with_study_data()
self.arduino.study_no_ems = False
elif message[0] == "calibrate":
self.arduino.calibration(message)
elif message[0] == "load_study":
data = self.mongo_studies.find_one({"participant_id": message[1]})
self.current_study_participant = data["_id"]
self.mongo_studies.update({"_id": self.current_study_participant}, {"$set": {"name": message[2], "trials": {}}})
self.write_message("study_data," + json.dumps(data['order']).replace(",", "§"))
elif message[0] == "save_channels":
self.mongo_users.update({"_id": ObjectId(message[1])}, {"$set": {
"channels." + message[2]: {
"min": message[3],
"max": message[4]
}
}})
elif message[0] == "door":
if message[1] == "e":
self.hand.door_mode = "enter"
elif message[1] == "k":
self.hand.door_mode = "knock"
elif message[0] == "load_user":