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

Update some section for easier readability. #25

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update csv_creator_adv.py
  • Loading branch information
Geeks-Sid authored May 10, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 7e90546fc8602ec7dd913ab878952e1f01e5f012
22 changes: 11 additions & 11 deletions BrainMaGe/utils/csv_creator_adv.py
Original file line number Diff line number Diff line change
@@ -200,24 +200,24 @@ def rex_bids_csv(folder_path, save_folder, file_type):

def generate_csv(folder_path, to_save, mode, ftype, modalities):
"""[Function to generate CSV]
[This function takes a look at the data directory and the modes and
generates a csv]
[This function takes a look at the data directory and the modes and generates a csv]
Arguments:
folder_path {[strin]} -- [description]
to_save {[strin]} -- [description]
mode {[string]} -- [description]
ftype {[string]} -- [description]
modalities {[string]} -- [description]
"""
print("Generating ", ftype, ".csv", sep="")
if mode.lower() == "ma":
rex_o4a_csv(folder_path, to_save, ftype, modalities)
elif mode.lower() == "single":
rex_sin_csv(folder_path, to_save, ftype, modalities)
elif mode.lower() == "multi":
rex_mul_csv(folder_path, to_save, ftype, modalities)
elif mode.lower() == "bids":
rex_bids_csv(folder_path, to_save, ftype)
print(f"Generating {ftype}.csv")
modes = {
"ma": rex_o4a_csv,
"single": rex_sin_csv,
"multi": rex_mul_csv,
"bids": rex_bids_csv
}
func = modes.get(mode.lower())
if func:
func(folder_path, to_save, ftype, modalities)
else:
print("Sorry, this mode is not supported")
sys.exit(0)