Skip to content

Commit

Permalink
feat: ensure true_depth is added to result_00.yaml
Browse files Browse the repository at this point in the history
feat: ensure true_depth is added to result_00.yaml
  • Loading branch information
versey-sherry authored Dec 30, 2021
2 parents be02f1e + 3f7c582 commit 7745e0d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion moseq2_extract/helpers/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,9 @@ def extract_wrapper(input_file, output_dir, config_data, num_frames=None, skip=F
print(e)

status_dict['complete'] = True

if status_dict['parameters'].get('true_depth') is None:
# config_data.get('true_depth') is numpy.float64 and yaml.safe_dump can't represent the object
status_dict['parameters']['true_depth'] = float(config_data.get('true_depth'))
with open(status_filename, 'w') as f:
yaml.safe_dump(status_dict, f)

Expand Down

0 comments on commit 7745e0d

Please sign in to comment.