Skip to content

Commit

Permalink
Pass opt to function calls
Browse files Browse the repository at this point in the history
This allows to pass options like label_threshold in higher functions. For example cosmo_meeg_chan_neighborhood(ds,'count',4,'label','layout','label_threshold',.99)
  • Loading branch information
Tijl committed Aug 18, 2020
1 parent a431780 commit 56d969f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mvpa/cosmo_meeg_find_layout.m
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
opt=cosmo_structjoin(defaults, varargin);

% get the sensor labels and channel types applicable to this dataset
chantype2senstype=get_dataset_senstypes(ds);
chantype2senstype=get_dataset_senstypes(ds,opt);

% get the single channel type based on the input and available channels
ds_chantype=get_base_chantype(chantype2senstype,opt);
Expand Down Expand Up @@ -182,9 +182,9 @@
sc=cosmo_meeg_senstype_collection();
label=sc.(senstype).label;

function senstype_mapping=get_dataset_senstypes(ds)
function senstype_mapping=get_dataset_senstypes(ds,opt)
% helper function to get supported senstypes
[unused,senstype_mapping]=cosmo_meeg_chantype(ds);
[unused,senstype_mapping]=cosmo_meeg_chantype(ds,opt);
keys=fieldnames(senstype_mapping);

if cosmo_match({'meg_planar'},keys)
Expand Down

0 comments on commit 56d969f

Please sign in to comment.