diff --git a/instruments/readers/g5505_file_reader.py b/instruments/readers/g5505_file_reader.py index 8b3a9df..a60a12a 100644 --- a/instruments/readers/g5505_file_reader.py +++ b/instruments/readers/g5505_file_reader.py @@ -1,11 +1,14 @@ +import sys import os +root_dir = os.path.abspath(os.curdir) +sys.path.append(root_dir) import numpy as np import pandas as pd import collections from igor2.binarywave import load as loadibw -import src.g5505_utils as utils +import utils.g5505_utils as utils #import src.metadata_review_lib as metadata #from src.metadata_review_lib import parse_attribute @@ -126,8 +129,9 @@ def read_txt_files_as_dict(filename: str, instruments_dir: str = None, work_with # If instruments_dir is not provided, use the default path relative to the module directory if not instruments_dir: # Assuming the instruments folder is one level up from the source module directory - module_dir = os.path.dirname(__file__) - instruments_dir = os.path.join(module_dir, '..', 'instruments') + #module_dir = os.path.dirname(__file__) + #instruments_dir = os.path.join(module_dir, '..', 'instruments') + instruments_dir = os.path.join(root_dir,'instruments') # Normalize the path (resolves any '..' in the path) instrument_configs_path = os.path.abspath(os.path.join(instruments_dir,'text_data_sources.yaml'))