diff --git a/analysis/oscil.py b/analysis/oscil.py index a3312328..67429254 100644 --- a/analysis/oscil.py +++ b/analysis/oscil.py @@ -4,24 +4,25 @@ import numpy as np -import analysis as anl +from analysis import paths, write + def load_npy(date: str = None): """Returns npy files as dict of numpy arrays with filename as key.""" - date = date if date is not None else anl.paths.top.latest_date() + date = date if date is not None else paths.top.latest_date() fields = {} - for file in os.listdir(anl.paths.data.raw(date)): + for file in os.listdir(paths.data.raw(date)): if file.endswith(".npy"): #TODO: raise FileNotFoundError filename = os.path.splitext(file)[0] - anl.write.prep_dir(anl.paths.spatial.geom_dir(filename, date)) + write.prep_dir(paths.spatial.geom_dir(filename, date)) - fields[filename] = np.load(os.path.join(anl.paths.data.raw(date), file)) + fields[filename] = np.load(os.path.join(paths.data.raw(date), file)) return fields