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

FrameDrop.block dimension #200

Closed
dshimaoka opened this issue Aug 5, 2022 · 2 comments
Closed

FrameDrop.block dimension #200

dshimaoka opened this issue Aug 5, 2022 · 2 comments

Comments

@dshimaoka
Copy link
Collaborator

Not sure how this happened, but multiple of my cic record had a weird dimension in frameDrop.block such as:

frDr = get(o.cic.prms.frameDrop,'trial',p.trial,'struct',true);
frDr =

struct with fields:

     data: [21×2 double]
    trial: [21×1 double]
trialTime: [21×1 double]
     time: [21×1 double]
    block: [1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1]
    frame: [21×1 double]

Obviously the right dimension is 21x1. The incorrect dimension causes an error at neurostim/noiseclut.m at line 277:
frDr = structfun(@(x) x(stay,:),frDr,'unif',false);

A simple hack is to add the following lines:
if size(frDr.block,1) < size(frDr.block,2)
frDr.block = frDr.block';
end

bartkrekelberg added a commit that referenced this issue Aug 9, 2022
Block is now returned as a column vector - one row per trial, consistent with other return variables.
@bartkrekelberg
Copy link
Member

@dshimaoka , I committed a bug fix that should solve this. Please pull and try it out.

@dshimaoka
Copy link
Collaborator Author

Splendid!

cnuahs added a commit to cnuahs/neurostim that referenced this issue Sep 1, 2022
This change fixes a bug introduced by commit 1988ab5 (re: klabhub#190)
that causes any changes to the default plugin order, imposed in
cic.run(), to be immediately reverted when handling adaptive
plugins/parameters (see cic.handleAdaptives()).

This change removes the call to c.order(), which reverts the plugin
order, in favour of using c.pluginOrder directly.
bartkrekelberg added a commit that referenced this issue Oct 12, 2022
Fix a plugin (re-)ordering bug (re: #200).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants