replace nans by empty string in trc for OpenSim compatibility

This commit is contained in:
davidpagnon 2024-04-02 13:34:21 +02:00
parent 71e05dd48d
commit 8075224879
2 changed files with 2 additions and 0 deletions

View File

@ -491,6 +491,7 @@ def filter_all(config):
[trc_o.write(line) for line in header]
Q_filt.insert(0, 'Frame#', frames_col)
Q_filt.insert(1, 'Time', time_col)
# Q_filt = Q_filt.fillna(' ')
Q_filt.to_csv(trc_o, sep='\t', index=False, header=None, lineterminator='\n')
# Recap

View File

@ -241,6 +241,7 @@ def make_trc(config, Q, keypoints_names, f_range, id_person=-1):
#Add Frame# and Time columns
Q.index = np.array(range(0, f_range[1]-f_range[0])) + 1
Q.insert(0, 't', Q.index / frame_rate)
# Q = Q.fillna(' ')
#Write file
if not os.path.exists(pose3d_dir): os.mkdir(pose3d_dir)