Skip to content

Commit

Permalink
filenames check
Browse files Browse the repository at this point in the history
  • Loading branch information
joglekara committed Nov 13, 2024
1 parent e26bbbd commit 9f8e56e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tsadar/process/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ def prepare_data(config: Dict) -> Dict:
"""
# load data
custom_path = (config["data"]["filenames"]["epw"] is not None) | (config["data"]["filenames"]["iaw"] is not None)
if custom_path:
custom_path = os.path.dirname(config["data"]["filenames"]["epw"])
if "filenames" in config["data"].keys():
custom_path = (config["data"]["filenames"]["epw"] is not None) | (
config["data"]["filenames"]["iaw"] is not None
)
if custom_path:
custom_path = os.path.dirname(config["data"]["filenames"]["epw"])

[elecData, ionData, xlab, config["other"]["extraoptions"]["spectype"]] = loadData(
config["data"]["shotnum"], config["data"]["shotDay"], config["other"]["extraoptions"], custom_path=custom_path
Expand Down

0 comments on commit 9f8e56e

Please sign in to comment.