Reply-To: | | [log in to unmask][log in to unmask]> wrote: > >> Dear Vladimir, >> >> thanks again for your advice on using the history2 script. It works >> perfect for the cropping of the channels, but somehow the assigning of the >> different channel types is not applied. Do you have any idea what is going >> wrong here? >> >> Also, is there a way to determine the window length in each file? So far, >> every time I run the script a gui pops up to ask me about the time window. >> This is slightly different for every subject, so it would be nice to have >> it figured out from the data automatically. I found these lines of code >> >> if ~isfield(S, 'timewin') >> S.timewin = spm_input('Time window (ms)', '+1', 'r', >> num2str(1000*[D.time(1) D.time(end)]), 2); >> end >> >> but somehow I don't have D.time I don't know from where the spm GUI >> figures out the time window. >> >> >> Here is my script: >> >> S = []; >> S.D.fname = file_id(1:end-4); >> S.D = fullfile(pathSubject,file_id); >> >> S.channels = { >> 'EEG 1' >> 'EEG 24' >> 'EEG 32' >> 'EEG 36' >> 'EEG 57' >> 'EEG 70' >> 'EEG 83' >> 'EEG 100' >> 'EEG 104' >> 'EEG 124' >> 'EEG 125' >> 'EEG 128' >> 'EEG VREF' >> 'Resp. Temperatur' >> 'ECG' >> 'Resp. Effort Che' >> 'Resp. Effort Abd' >> 'EMG-Leg' >> 'EDF Annotations' >> }'; >> %% >> D = spm_eeg_crop(S); >> >> >> S = []; >> S.task = 'settype'; >> S.D = fullfile(pathSubject,file_id); >> S.ind = [1 2 3 4 5 6 7 8 9 10 11 12 13]; >> S.type = 'EEG'; >> S.ind = [1 3 11 12]; >> S.type = 'EOG'; >> S.ind = [15 18]; >> S.type = 'EMG'; >> S.ind = [14 16 17]; >> S.type = 'Other'; >> S.save = 1; >> D = spm_eeg_prep(S); >> >> Thank you so much, >> best, >> Laura >> >> Am 8/2/2013 12:01 PM, schrieb Vladimir Litvak: >> >> You can use history2script functionality (see 12.10.2, page 115 in the >> manual). >> >> Best, >> >> Vladimir >> >> >> On Fri, Aug 2, 2013 at 10:16 AM, Laura Tüshaus < >> [log in to unmask]> wrote: >> >>> Dear Vladimir, >>> >>> thanks so much for getting back to me so quickly. spm_eeg_crop is >>> exactly what I´m looking for! Is there a way to select the channels to crop >>> and assign the channel types (EEG, EMG, ...) once and then apply this to >>> all otheëSb |