Allow NaN representation in TRC exports#211
Allow NaN representation in TRC exports#211ErwanBeurienne wants to merge 1 commit intoperfanalytics:mainfrom
Conversation
Updated the to_csv calls in filtering.py and triangulation.py to use na_rep='NaN' when exporting TRC files. This ensures missing values are consistently represented as 'NaN' in the output files.
|
Unfortunately, NaNs make the marker augmentation LSTM fail :/ For what contexts did you need the nan values? If you do need them, check the parameters in the config file, such as fill_large_gaps_with for example. If any parameter is not clear, feel free to ask me! |
|
Hi David, I don’t use markerAugmentation in my processing pipeline, so I hadn’t encountered this issue. My bad for missing that context. I already set fill_large_gaps_with to 'nan' in the config file, but the resulting TRC file contains empty values instead of 'NaN'. This causes a mismatch between the header and the actual data lines. OpenSim then expects the same number of columns, but empty values shorten the lines, triggering an error when running the kinematics function. |
Updated the to_csv calls in filtering.py and triangulation.py to use na_rep='NaN' when exporting TRC files. This ensures missing values are consistently represented as 'NaN' in the output files.