From 73aabbd323bea7bd7d21fd5ec2e45519ab9354fd Mon Sep 17 00:00:00 2001 From: Ronny Eichler Date: Wed, 11 Dec 2019 19:37:29 +0100 Subject: [PATCH] Accept single file feature generation target --- dataman/features/features.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dataman/features/features.py b/dataman/features/features.py index 3df1901..0a953ca 100644 --- a/dataman/features/features.py +++ b/dataman/features/features.py @@ -208,7 +208,11 @@ def main(args): cli_args = parser.parse_args(args) matpath = Path(cli_args.target).resolve() - matfiles = sorted(list(map(Path.resolve, matpath.glob('tetrode??.mat')))) + if matpath.is_file(): + matfiles = [matpath] + else: + matfiles = sorted(list(map(Path.resolve, matpath.glob('tetrode??.mat')))) + logger.debug([mf.name for mf in matfiles]) logger.info('Found {} waveform files'.format(len(matfiles)))