Skip to content

Commit

Permalink
apply changes from structure gui to manual and code
Browse files Browse the repository at this point in the history
new citation for castegnetti et al

git-svn-id: https://svn.code.sf.net/p/pspm/svn/trunk@371 23ec9670-3a1e-4a12-9187-a0ba8bce340d
  • Loading branch information
Tobias Moser committed Oct 25, 2016
1 parent bab86e4 commit cc2d8f3
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 29 deletions.
4 changes: 2 additions & 2 deletions pspm.m
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ function Other_utils_Callback(hObject, eventdata, handles)
cfg_add_module('pspm.tools.extract_segments');
case 9
cfg_add_module('pspm.tools.segment_mean');
case 20
case 10
cfg_add_module('pspm.tools.extract_markerinfo');
case 12
case 11
scr_data_editor();
end;

Expand Down
36 changes: 23 additions & 13 deletions scr_cfg/scr_cfg_import.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,43 +34,52 @@
file.tag = 'file';
file.num = [1 1];
file.filter = '.*\.(mat|MAT)$';
file.help = {['Enter the name of the .mat file that contains the transfer function constants. ' ...
'This file needs to contain the following variables: ''c'' is the transfer constant: data = c * ' ...
'(total conductance in mcS); ''Rs'' is the series resistance in Ohm (usually 0), and ''offset'' any ' ...
'offset in the data (usually 0).']};
file.help = {['Enter the name of the .mat file that contains the ', ...
'transfer function constants. This file needs to contain the ', ...
'following variables: ''c'' is the transfer constant: ', ...
'data = c * (measured total conductance in mcS or total resistance ', ...
'in MOhm); ''Rs'' is the series resistance in Ohm (usually 0), ', ...
'and ''offset'' any offset in the data (stated in data units, ', ...
'usually 0) and optionally, a variable ''recsys'' to whether the ', ...
'recorded signal is proportional to measured ''resistance'' ', ...
'(R, data=R*c=c/G) or from ''conductance'' (G, data=G*c=c/R). (conductance, resistance)']};

transf_const = cfg_entry;
transf_const.name = 'Transfer Constant';
transf_const.tag = 'transf_const';
transf_const.strtype = 'r';
transf_const.num = [1 1];
transf_const.help = {['Constant by which the measured conductance is multiplied ' ...
'to give the recorded signal (and by which the signal needs to be divided to give ' ...
'the original conductance).']};
transf_const.help = {['Constant by which the measured conductance or ', ...
'resistance is multiplied to give the recorded signal ', ...
'(and by which the signal needs to be divided to give the original ', ...
'conductance/resistance): data = c * (measured total conductance ', ...
'in mcS or total resistance in MOhm).']};

offset = cfg_entry;
offset.name = 'Offset';
offset.tag = 'offset';
offset.strtype = 'r';
offset.num = [1 1];
offset.help = {'Fixed offset (signal at 0 conductance).'};
offset.help = {'Fixed offset in data units (i. e. measured signal when ', ...
'true conductance is zero, i.e. when the measurement circuit is open).'};

resistor = cfg_entry;
resistor.name = 'Series Resistor';
resistor.tag = 'resistor';
resistor.strtype = 'r';
resistor.num = [1 1];
resistor.help = {'Resistance of any resistors in series with the subject.'};
resistor.help = {'Resistance of any resistors in series with the ', ...
'subject, given in Ohm.'};

recsys = cfg_menu;
recsys.name = 'Recording System';
recsys.tag = 'recsys';
recsys.values = {'conductance', 'resistance'};
recsys.labels = {'conductance', 'resistance'};
recsys.val = {'conductance'};
recsys.help = {['Choose whether the recorded voltage (U) was ', ...
'calculated from ''resistance'' (R, U=R*c=c/G) or from ''conductance'' , ', ...
'(G, U=G*c=c/R).']};
recsys.help = {['Choose whether the recorded signal is proportional ', ...
'to measured ''resistance'' (R, data=R*c=c/G) or from ''conductance'' ', ...
'(G, data=G*c=c/R).']};

input = cfg_branch;
input.name = 'Input';
Expand All @@ -89,7 +98,8 @@
transfer.name = 'Transfer Function';
transfer.tag = 'transfer';
transfer.values = {file,input,none};
transfer.help = {'Enter the conversion from recorded data to Microsiemens.'};
transfer.help = {['Enter the conversion from recorded data to ', ...
'Microsiemens or Megaohm.']};


%% Datatype dependend items
Expand Down
29 changes: 15 additions & 14 deletions scr_cfg/scr_cfg_merge.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@

%% First file
first_file = cfg_files;
first_file.name = 'First file';
first_file.name = 'First file(s)';
first_file.tag = 'first_file';
first_file.num = [1 Inf];
first_file.help = {['Specify the first of the two files to be ', ...
'merged. The output file will have the name of the first file prepended ', ...
'with an ‘m’.']};
'merged. This can be one file or a set of files. The output file ', ...
'will have the name of the first file prepended with an ''m''.']};

%% Second file
second_file = cfg_files;
second_file.name = 'Second file';
second_file.name = 'Second file(s)';
second_file.tag = 'second_file';
second_file.num = [1 Inf];
second_file.help = {['Specify the second of the two files to be ', ...
'merged. If multiple files are selected, second file must have the ', ...
'same length as first file.']};
second_file.help = {['Specify the second of the two files to be merged. ', ...
'This can be one file or a set of files. This set must have the same ', ...
'length as the set defined as first file(s).']};

%% Data files
datafiles = cfg_branch;
Expand Down Expand Up @@ -84,14 +84,15 @@
merge.val = {datafiles, reference, options};
merge.prog = @scr_cfg_run_merge;
merge.vout = @scr_cfg_vout_merge;
merge.help = {['Allows to merge a second into a first file. ', ...
'Multiple files are allowed and are processed in a sequential ', ...
'manner. Which means the first element of second file is merged into ', ...
'the first element of first file and so on. Therefore first file ', ...
'and second file must have the same number of elements. The files are ', ...
merge.help = {['Allows to merge (i.e. stack) two files that were acquired ', ...
'simultaneously but contain different channels. Multiple files are ', ...
'allowed and are processed in a sequential manner. This means the ', ...
'first element of second set of files is merged into the first ', ...
'element of first set of files and so on. Therefore first set and ', ...
'second set must have the same number of elements. The files are ', ...
'aligned according to the first event of a given marker channel or ', ...
'to the start of the file. The output file consists of an ‘m’ at the ', ...
'beginning and the name of the first file appended. ']};
'to the start of the file. The output file consists of an ''m'' at ', ...
'the beginning and the name of the first file appended. ']};

function vout = scr_cfg_vout_merge(job)
vout = cfg_dep;
Expand Down

0 comments on commit cc2d8f3

Please sign in to comment.