Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions src/pybkgmodel/processing.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from functools import reduce
import glob
from pathlib import Path
import inspect
from operator import getitem
import os
Expand Down Expand Up @@ -144,7 +144,19 @@ def __init__(
processing object
"""

self.files = glob.glob(files)
input_files_mask = Path(files).parent
if not input_files_mask.is_dir():
raise FileNotFoundError(
"The configuration key data mask does not point to a valid directory."
)

self.files = [
file_path for file_path in input_files_mask.glob(input_files_mask.name)
]
if len(self.files) == 0:
raise FileNotFoundError(
"No files can be found with the data mask provided in the configuration file."
)
self.runs = tuple(
filter(
lambda r: r.obs_id is not None,
Expand Down
Loading