Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] do not check id columns for image extensions #860

Merged
merged 1 commit into from
Jan 10, 2024
Merged
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
4 changes: 2 additions & 2 deletions nimare/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,10 +510,10 @@ def _validate_images_df(image_df):
DataFrame with updated paths and columns.
"""
valid_suffixes = [".brik", ".head", ".nii", ".img", ".hed"]

id_columns = set(["id", "study_id", "contrast_id"])
# Find columns in the DataFrame with images
file_cols = []
for col in image_df.columns:
for col in set(image_df.columns) - id_columns:
vals = [v for v in image_df[col].values if isinstance(v, str)]
fc = any([any([vs in v for vs in valid_suffixes]) for v in vals])
if fc:
Expand Down
Loading