Skip to content

Commit

Permalink
Merge pull request #207 from stanfordnmbl/default-gender-in-yaml-down…
Browse files Browse the repository at this point in the history
…load

Updating gender_mf field in downloaded sessions' yaml file.
  • Loading branch information
carmichaelong authored Oct 18, 2024
2 parents 0b1de4f + a93c177 commit c3a5aa8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,8 @@ def getMetadataFromServer(session_id,justCheckerParams=False):
session_desc["subjectID"] = session['meta']['subject']['id']
session_desc["mass_kg"] = float(session['meta']['subject']['mass'])
session_desc["height_m"] = float(session['meta']['subject']['height'])
if 'gender' in session['meta']['subject']:
session_desc["gender_mf"] = session['meta']['subject']['gender']
# Before implementing the subject feature, the posemodel was stored
# in session['meta']['subject']. After implementing the subject
# feature, the posemodel is stored in session['meta']['settings']
Expand Down Expand Up @@ -402,6 +404,7 @@ def getMetadataFromServer(session_id,justCheckerParams=False):
session_desc["subjectID"] = subject_info['name']
session_desc["mass_kg"] = subject_info['weight']
session_desc["height_m"] = subject_info['height']
session_desc["gender_mf"] = subject_info['gender']
try:
session_desc["posemodel"] = session['meta']['settings']['posemodel']
except:
Expand Down

0 comments on commit c3a5aa8

Please sign in to comment.