You should use spm_eeg_copy to create a new dataset. fname and
fnamedat do not change the names of the files and that's what confuses
SPM. If you are only interested in power there is no reason to save
On Sat, Nov 28, 2009 at 4:48 PM, Amir H Javadi <[log in to unmask]> wrote:
> The question is about "save" method for EEG/MEG data. After calling the
> "save" method SPM opens a window asking for a file name. It was not the case
> previously and it never asked me for a file name. The content of the file is
> as following,
> type: 'single'
> Nsamples: 2100
> Fsample: 512
> timeOnset: -0.1992
> trials: [1x165 struct]
> channels: [1x48 struct]
> data: [1x1 struct]
> fname: 'tf1_efMspm8_SB01, 2_2_40.mat'
> path: 'SB01'
> sensors: [1x1 struct]
> fiducials: [1x1 struct]
> artifacts: [0x0 struct]
> transform: [1x1 struct]
> other: [1x1 struct]
> history: [1x5 struct]
> First of all why it asks to generate this file?. Second. As I'm writing an
> automated processing code, I don't want anything interrupt the program
> asking for anything. How can I avoid this? Is there any flag which I have to
> set/clear before calling the "save" method?
> Previously I performed time-frequency analysis without "phase" analysis.
> Currently I performed the same analysis with "phase" analysis. I don't know
> if there is any connection/dependancy between power and phase file-pairs.
> I'm not sure, if it contributes to this problem. In the following the
> details of the code is brought.
> I've written a code to rename the Time-Frequency output method file names
> into new ones. The renaming part is as following,
> D = spm_eeg_load([BaseFolder FilenameOld]);
> D = fname(D, [FilenameNew '.mat']);
> D = fnamedat(D, [FilenameNew '.dat']);
> The data for each participant is stored in separate folder. The program is
> executed from the main folder which includes all the other folders. It is
> why I've added "BaseFolder" variable in the filename path. The sample
> content of variables is as following,
> BaseFolder = 'SB01/';
> FilenameOld = 'tf1_efMspm8_SB01, 2'
> FilenameNew = 'tf1_efMspm8_SB01, 2_2_40'
> and I call the "save" method as below
> In this way, I have to rename the "power" and "phase" file-pairs separately.
> I'm using MATLAB R2007a and SPM8, recently updated, under Mac OS X. Very
> many thanks.
> Have a good time,