Skip to content

Commit

Permalink
Improved formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
TheChymera committed Apr 25, 2024
1 parent fb03502 commit 3e01f18
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions nwb2bids/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,22 @@ def reposit(in_dir, out_dir):
for var in ("contacts", "probes", "channels"):
var_metadata = metadata[var]
var_metadata = drop_false_keys(var_metadata)
var_metadata_file_path = os.path.join(out_dir, subject_id, session_id, "ephys", subject_id + "_" + var + ".tsv")
var_metadata_file_path = os.path.join(
out_dir,
subject_id,
session_id,
"ephys",
f"{subject_id}_{var}.tsv")
write_tsv(var_metadata, var_metadata_file_path)

bids_path = f"{out_dir}/{metadata['subject']['subject_id']}/{metadata['session']['session_id']}/ephys/{metadata['subject']['subject_id']}_{metadata['session']['session_id']}_ephys.nwb"
shutil.copyfile(nwb_file, bids_path)
bids_path = os.path.join(
out_dir,
metadata['subject']['subject_id'],
metadata['session']['session_id'],
"ephys",
f"{metadata['subject']['subject_id']}_{metadata['session']['session_id']}_ephys.nwb"
)
shutil.copyfile(nwb_file, bids_path_)



Expand Down

0 comments on commit 3e01f18

Please sign in to comment.