Process non filtered data if there is no data filtered in folder (#86)
This commit is contained in:
parent
b21846a834
commit
71e05dd48d
@ -79,9 +79,18 @@ def augmentTRC(config_dict):
|
|||||||
offset = True
|
offset = True
|
||||||
|
|
||||||
# Apply all trc files
|
# Apply all trc files
|
||||||
trc_files = [f for f in glob.glob(os.path.join(pathInputTRCFile, '*.trc')) if 'filt' in f and '_LSTM' not in f]
|
all_trc_files = [f for f in glob.glob(os.path.join(pathInputTRCFile, '*.trc')) if '_LSTM' not in f]
|
||||||
if len(trc_files) == 0:
|
trc_no_filtering = [f for f in glob.glob(os.path.join(pathInputTRCFile, '*.trc')) if
|
||||||
raise ValueError('No filtered trc files found.')
|
'_LSTM' not in f and 'filt' not in f]
|
||||||
|
trc_filtering = [f for f in glob.glob(os.path.join(pathInputTRCFile, '*.trc')) if '_LSTM' not in f and 'filt' in f]
|
||||||
|
|
||||||
|
if len(all_trc_files) == 0:
|
||||||
|
raise ValueError('No trc files found.')
|
||||||
|
if len(trc_filtering) > 0:
|
||||||
|
trc_files = trc_filtering
|
||||||
|
else:
|
||||||
|
trc_files = trc_no_filtering
|
||||||
|
|
||||||
for p, pathInputTRCFile in enumerate(trc_files):
|
for p, pathInputTRCFile in enumerate(trc_files):
|
||||||
pathOutputTRCFile = os.path.splitext(pathInputTRCFile)[0] + '_LSTM.trc'
|
pathOutputTRCFile = os.path.splitext(pathInputTRCFile)[0] + '_LSTM.trc'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user