Refactored import dependencies.

This commit is contained in:
2024-03-26 13:57:19 +01:00
parent e934ae65d6
commit a58bf4f019
3 changed files with 32 additions and 25 deletions

View File

@ -1,17 +1,13 @@
import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import plotly.express as px
import plotly.graph_objects as go
from plotly.subplots import make_subplots
from igor2.binarywave import load as loadibw
#import h5py
import os
import tempfile
import shutil
import src.g5505_utils as utils
import h5py
import g5505_utils as utils
ROOT_DIR = os.path.abspath(os.curdir)
@ -125,7 +121,6 @@ def read_txt_files_as_dict(filename : str ):
print(line_number, len(column_names ))
break
# Subdivide line into words, and join them by single space.
# I asumme this can produce a cleaner line that contains no weird separator characters \t \r or extra spaces and so on.
list_of_substrings = line.split()

View File

@ -1,17 +1,20 @@
import pandas as pd
import h5py
import sys
import os
#import sys
#from itertools import product
root_dir = os.path.abspath(os.curdir)
sys.path.append(root_dir)
import pandas as pd
import numpy as np
#import g5505_file_reader
import g5505_utils as utils
#import smog_chamber_file_reader
import src.g5505_utils as utils
import input_files.config_file as config_file
import src.hdf5_vis as hdf5_vis
import config_file
import h5py
import yaml
def read_mtable_as_dataframe(filename):
@ -456,8 +459,14 @@ def main():
select_file_keywords = config_file.select_file_keywords #['20220726','2022.07.26']
output_filename_path = os.path.join(config_file.outputfile_dir,config_file.output_filename)
create_hdf5_file_from_filesystem_path(output_filename_path,inputfile_dir,select_dir_keywords,select_file_keywords)
#display_group_hierarchy_on_a_treemap(output_filename_path)
if not os.path.exists(output_filename_path):
create_hdf5_file_from_filesystem_path(output_filename_path,inputfile_dir,select_dir_keywords,select_file_keywords)
# hdf5_vis.display_group_hierarchy_on_a_treemap(output_filename_path)
output_yml_filename_path = hdf5_vis.take_yml_snapshot_of_hdf5_file(output_filename_path)
return output_filename_path, output_yml_filename_path
def main_mtable_h5_from_dataframe():
@ -503,7 +512,6 @@ def main_mtable_h5_from_dataframe():
print(':)')
if __name__ == '__main__':
main()

View File

@ -1,9 +1,13 @@
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import os
import g5505_utils as utils
import numpy as np
import pandas as pd
from igor2.binarywave import load as loadibw
import src.g5505_utils as utils
import h5py
#def read_txt_files_as_dict(filename : str ,instrument_folder : str):
def read_txt_files_as_dict(filename : str ):