Skip to content

Commit

Permalink
FIX - logger needed to be set as a global variable from main function
Browse files Browse the repository at this point in the history
  • Loading branch information
jstout211 committed May 28, 2024
1 parent 901038b commit 7fa8ef8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions nih2mne/make_meg_bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,9 @@ def main():
else:
subjid = _check_multiple_subjects(args.meg_input_dir)

global logger
global err_logger

logger = get_subj_logger(subjid, log_dir=logger_dir, loglevel=logging.INFO)
err_logger = get_subj_logger(subjid+'_err', log_dir=logger_dir, loglevel=logging.WARN)

Expand Down Expand Up @@ -893,9 +896,10 @@ def main():
#
# Plot QA images
#
out_fids_qa_image = op.join(logger_dir, f'{args.subjid_input}_fids_qa.png')
plot_fids_qa(subjid=args.bids_id, bids_root=args.bids_dir,
outfile=out_fids_qa_image)
if args.ignore_mri_checks != True:
out_fids_qa_image = op.join(logger_dir, f'{args.subjid_input}_fids_qa.png')
plot_fids_qa(subjid=args.bids_id, bids_root=args.bids_dir,
outfile=out_fids_qa_image)

#
# Downstream Processing
Expand Down

0 comments on commit 7fa8ef8

Please sign in to comment.