-
Notifications
You must be signed in to change notification settings - Fork 9
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
[ENH] add a save config function #193
Conversation
fixes #194 |
Codecov Report
@@ Coverage Diff @@
## dev #193 +/- ##
==========================================
+ Coverage 79.93% 81.60% +1.66%
==========================================
Files 29 30 +1
Lines 658 674 +16
==========================================
+ Hits 526 550 +24
+ Misses 132 124 -8
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
3 use cases: The most common: enough info in cfg = setUp();
filename = saveCfg(cfg)
filename =
'/home/remi/github/CPP_BIDS/src/../output/source/sub-001/ses-001/func/sub-001_ses-001_task-testTask_run-001_date-202203181811_cfg.json' Not enough info in cfg.testingDevice = 'mri';
filename = saveCfg(cfg)
filename =
'/home/remi/github/CPP_BIDS/date-202203181809_cfg.json' filename is provided cfg.testingDevice = 'mri';
filename = saveCfg(cfg, fullfile(pwd, 'cfg', 'cfg.json'))
filename =
'/home/remi/github/CPP_BIDS/cfg/cfg.json' |
Once this is merged, this will be incoporated into the different localizers and experiments. |
As usual, I might have done sth wrong but what I got is a change in In this case, it might be annoying also to change cpp-bids function which removes the suffix. I used very similar to what I was using this function, so maybe I did use the new function wrong - at the end of the main script of a fmri experiment:
|
Just to know, did you just grab that function and added it into your experiment code or did you update the whole CPP_BIDS submodule? |
I updated the submodule. |
Are you saying that before you used to have filenames like:
and now you get this?
|
yes exactly. I didn't have time to do a proper check yet. I'll see where the issue stems from this afternoon and write back! |
Don't look further: this is normal. This was changed back there: https://github.com/cpp-lln-lab/CPP_BIDS/pull/186/files?file-filters%5B%5D=.m&show-deleted-files=true&show-viewed-files=true#r832040816 Just added a comment to that old PR to help you track it. The new version CPP_BIDS/src/convertSourceToRaw.m Line 47 in ab06459
|
Will merge this as we sort of need it for our next testing session (not essential but I would prefer to have it) |
Cool! I do not use that
|
And they all lived happily ever after! |
Because
createJson
now only saves a super lightweight version inbold.json
, we have no way of tracking what was used for an experiment which will be annoying for reproducibility.This function should take over and allow some flexibility in terms of output.