Revert "Update trc_Zup_to_Yup.py"

This reverts commit 1a3ca38330.
This commit is contained in:
davidpagnon 2023-02-20 18:42:53 +01:00
parent b82df48e03
commit 04e0a29fad
7 changed files with 9 additions and 9 deletions

View File

@ -77,7 +77,7 @@ def save_to_csv_or_h5(kpt_list, output_folder, video_name, to_csv, to_h5):
if to_csv:
csv_file = os.path.join(output_folder, video_name+'.csv')
df.to_csv(csv_file, sep=',', index=True, lineterminator='\n')
df.to_csv(csv_file, sep=',', index=True, line_terminator='\n')
if to_h5:
h5_file = os.path.join(output_folder, video_name+'.h5')

View File

@ -73,7 +73,7 @@ def trc_Zup_to_Yup_func(*args):
[trc_o.write(line) for line in header]
Q_Yup.insert(0, 'Frame#', frames_col)
Q_Yup.insert(1, 'Time', time_col)
Q_Yup.to_csv(trc_o, sep='\t', index=False, header=None, lineterminator='\n')
Q_Yup.to_csv(trc_o, sep='\t', index=False, header=None, line_terminator='\n')
if __name__ == '__main__':
parser = argparse.ArgumentParser()
@ -81,4 +81,4 @@ if __name__ == '__main__':
parser.add_argument('-o', '--output', required=False, help='trc Yup output file')
args = vars(parser.parse_args())
trc_Zup_to_Yup_func(args)
trc_Zup_to_Yup_func(args)

View File

@ -121,7 +121,7 @@ def trc_from_header_data(Header, Data, combined_path):
with open(combined_path, 'w') as trc_o:
trc_o.write(header_trc+'\n')
Data.to_csv(trc_o, sep='\t', index=False, header=None, lineterminator='\n')
Data.to_csv(trc_o, sep='\t', index=False, header=None, line_terminator='\n')
def trc_combine_func(*args):

View File

@ -74,7 +74,7 @@ def trc_desample_func(*args):
# write trc
with open(trc_desampled_path, 'w') as trc_o:
[trc_o.write(line) for line in header]
Q.to_csv(trc_o, sep='\t', index=False, header=None, lineterminator='\n')
Q.to_csv(trc_o, sep='\t', index=False, header=None, line_terminator='\n')
if __name__ == '__main__':
@ -84,4 +84,4 @@ if __name__ == '__main__':
parser.add_argument('-o', '--output_file', required=False, help='trc desampled output file')
args = vars(parser.parse_args())
trc_desample_func(args)
trc_desample_func(args)

View File

@ -340,7 +340,7 @@ def trc_filter_func(**args):
[trc_o.write(line) for line in header]
Q_filt.insert(0, 'Frame#', frames_col)
Q_filt.insert(1, 'Time', time_col)
Q_filt.to_csv(trc_o, sep='\t', index=False, header=None, lineterminator='\n')
Q_filt.to_csv(trc_o, sep='\t', index=False, header=None, line_terminator='\n')
if __name__ == '__main__':

View File

@ -326,7 +326,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.to_csv(trc_o, sep='\t', index=False, header=None, lineterminator='\n')
Q_filt.to_csv(trc_o, sep='\t', index=False, header=None, line_terminator='\n')
# Recap
recap_filter3d(config, trc_path_out)

View File

@ -154,7 +154,7 @@ def make_trc(config, Q, keypoints_names, f_range):
trc_path = os.path.join(pose3d_dir, trc_f)
with open(trc_path, 'w') as trc_o:
[trc_o.write(line+'\n') for line in header_trc]
Q.to_csv(trc_o, sep='\t', index=True, header=None, lineterminator='\n')
Q.to_csv(trc_o, sep='\t', index=True, header=None, line_terminator='\n')
return trc_path