Skip to content

Commit

Permalink
format with black
Browse files Browse the repository at this point in the history
  • Loading branch information
bendhouseart committed Nov 15, 2024
1 parent 5a4e1a6 commit 6e00396
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions petdeface/petdeface.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,10 +341,14 @@ def init_single_subject_wf(
if subject_data is None:
raise FileNotFoundError(f"Could not find data for subject sub-{subject_id}")

# we combine the sessions to include and exclude into a single set of sessions to exclude from
# we combine the sessions to include and exclude into a single set of sessions to exclude from
# the set of all sessions
if session:
sessions_to_exclude = list(set(bids_data.get_sessions()) - (set(bids_data.get_sessions()) & set(session)) | set(exclude_session))
sessions_to_exclude = list(
set(bids_data.get_sessions())
- (set(bids_data.get_sessions()) & set(session))
| set(exclude_session)
)
else:
sessions_to_exclude = exclude_session

Expand Down Expand Up @@ -918,8 +922,22 @@ def cli():
required=False,
default=[],
)
parser.add_argument("--session", help="Select only a specific session(s) to include in the defacing workflow", type=str, nargs="+", required=False, default=[])
parser.add_argument("--exclude_session", help="Select a specific session(s) to exclude from the defacing workflow", type=str, nargs="+", required=False, default=[])
parser.add_argument(
"--session",
help="Select only a specific session(s) to include in the defacing workflow",
type=str,
nargs="+",
required=False,
default=[],
)
parser.add_argument(
"--exclude_session",
help="Select a specific session(s) to exclude from the defacing workflow",
type=str,
nargs="+",
required=False,
default=[],
)

arguments = parser.parse_args()
return arguments
Expand Down

0 comments on commit 6e00396

Please sign in to comment.