From c9b48bc3f83fa5b42016454d90aba9fd62150e29 Mon Sep 17 00:00:00 2001 From: Nick Smith Date: Mon, 28 Jan 2019 22:40:54 -0600 Subject: [PATCH] Allow relative paths with '../' in weights extractor --- fnal_column_analysis_tools/lookup_tools/extractor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fnal_column_analysis_tools/lookup_tools/extractor.py b/fnal_column_analysis_tools/lookup_tools/extractor.py index 5ff96c40e..0602ce1bd 100644 --- a/fnal_column_analysis_tools/lookup_tools/extractor.py +++ b/fnal_column_analysis_tools/lookup_tools/extractor.py @@ -1,4 +1,5 @@ from __future__ import print_function +import os import numpy as np from .evaluator import evaluator @@ -78,7 +79,7 @@ def add_weight_sets(self,weightsdescs): def import_file(self,file): """ cache the whole contents of a file for later processing """ if file not in self._filecache.keys(): - file_dots = file.split('.') + file_dots = os.path.basename(file).split('.') format = file_dots[-1].strip() type = 'default' if len(file_dots) > 2: