Dear Brian,

I couldn't reproduce the errors you were getting but I got a different error which I fixed in the attached version of convert2images. Also there was one mistake in your batch - the frequency axis should be specified as a vector, not as a window, so 0.5:1:50 rather than  [0.5. 50]. Unless you want to do within-subject stats you should average the spectral dataset prior to conversion to images and possibly also rescale. I added that to the attached batch that seems to work OK.

Just make sure you are using the latest SPM release from the website. Let me know if you still have any problems.

Best,

Vladimir

On Thu, Oct 22, 2015 at 7:46 PM, Erickson <[log in to unmask]> wrote:
Vladimir,
Thanks for pointing me to that.
Unfortunately when trying to subsequently convert to images, I cannot find a value that works for "time window".

First, when running the TF Spectrum step, there is an option to restrict the time window.
If I leave it at the default [-Inf Inf], reading the produced file with DisplayMEEG->"info" tab reveals "number of time samples: 1 (0 sec, from -.75s to -.75s)."
If I change it to a value like [-100 100] or any other number, DisplayMEEG->"info" tab reveals "number of time samples: 1 (0 sec, from 0s to 0s)."

Then when converting to images, I will get one of two errors.
- If I try to enter a time window, at least one of the two time values will generate: Warning: Could not find an index matching the requested time "X" sec.
- If I leave it on the default [-Inf Inf], it generates: SUMSKIPNAN: DIM argument larger than number of dimensions of x

I think that can't find any combination of values / methods that works here. Your advice greatly appreciated.

Best,
Brian

On Wed, Oct 21, 2015 at 1:44 PM, Vladimir Litvak <[log in to unmask]> wrote:
Dear Brian,

This is definitely possible. You should use the 'Spectrum' option in the TF tool and then you'll only get a single spectrum for the window of interest. It can then be exported to a scalp x frequency image.

Best,

Vladimir

On Wed, Oct 21, 2015 at 12:12 PM, Erickson <[log in to unmask]> wrote:
Dear Vladimir,
I am analyzing resting state EEG data in scalp-frequency space. I have had success with this procedure:

1.) On epoched & preprocessed data, I computed the Hilbert transform.
2.) when running "convert to images", I averaged over the frequency band of interest.
3.) then I entered these scans into the 2nd level design.

However, is it possible to use FFT instead of a time-frequency estimation method?

Since we are not utilizing the time dimension in the eventual SPM, can we drop time with an FFT and reduce the data to 3D (two spatial dimensions and FFT power)? 

This is not as much for a practical reason (besides processing time) as to reduce complexity that must be explained in a review.

Thanks for your time.

Best,
Brian

Brian Erickson
Ph.D. Candidate, ACBS Program
Drexel University Department of Psychology
College of Arts and Sciences