Back to PLS Help

ERP/MEG Channels
semrich
Posted on 04/17/07 13:00:08
Number of posts: 0
semrich posts:

Forgive me if this is covered in the user guide or in another post, but I can't seem to find the answer to my question.

I am trying to perform PLS on MEG data, but specifically on SAM virtual channel data.  This means that the number of channels and their corresponding names do not match up with any of the pre-specified channel orders.  How can I read in the data when the channel configuration (and their names) does not match.  Do I need to create a .txt with the channels I have in my data file, similar to the ones that are saved when creating a new channel order?

I have tried reading the data both the native-CTF files and .txt files, but neither way has changed the names of the available channels in the edit channel order dialogue  box. Does it even matter if my channel names don't match up?  Is there any additional information needed in the .txt channel order file other than the names/numbers of the channels themselves?

Any help is greatly appreciated.

S-

Replies:

stevens's problem
alina
Posted on 04/18/07 01:31:33
Number of posts: 3
alina replies:

This is not going to help you,but I have the same problem, only the level is different.I have EEG data from an ANT system and I do not succeed to properly set the channel list. The electrodes differ slightly from the BESAThetaPhi standard of PLSGui. For instance, Besa has T7a, T7p, T3/T7 electrodes, while my list contains the T7 electrode. I tried to adjust my list so that it corresponds to PLSgui's list, by chosing from the left panel the most appropriate channels with the ones from my list. For instance, I tried to "approximate" my T7 with T7a, T7p, T3/T7 but I receive, each time, "number of channels does not match the subject data".The number of channels is the same, but probably is the different name from the ANT average file the causes the problem. Sorry for not providing any solution, I am blocked at this novice level. alina


Untitled Post

I'm Online
nlobaugh
Posted on 04/18/07 07:20:43
Number of posts: 229
nlobaugh replies:

Hi everyone..
I will try to have an answer for you later today -

Stephen - I will double check how I set up a similar analysis for a colleague -
Alina - I also use ANT and have not had your problem , so I will recreate your problem and get back to you

In general though, the sensor labels are "meaningless", except to keep track of which sensor maps onto a particular sensor in your world. 

Nancy


Untitled Post
alina
Posted on 04/18/07 13:36:05
Number of posts: 3
alina replies:

Thanks! I did not figure it out yet. I am afraid there is asnother problem in the subject/condition file that bothers PLSgui, not the number of electrodes? From what you said, I infer that it should work if, for instance I select the first "n" electrodes form the left panel, where n is the number of channels I recorded EEG data. I used 32 recording channels, at least this is what ASA/EEProbe reports. I tried to feed the PLSgui with a list of either 32 or 33 electrodes, either matching the actual data or taken randomly from the left panel, and it still reports that "the number of e. does not coincide with the subject data" . I am stuck in this stage :( Thank you very much, Nancy.


ERP/MEG channels - Troubleshooting

I'm Online
nlobaugh
Posted on 04/19/07 15:40:47
Number of posts: 229
nlobaugh replies:

Both Alina and Steve were receiving errors when trying to define their sensor channels in the ERP/MEG module in the PLS GUI.

In one case, the problem arose because the software creating the spatio-temporal output also added a vector containing time information associated with each datapoint.  If your favourite program does the same thing, you can either:
1) tell it not to do that (sometimes easier said than done)
2) specify an extra sensor location, and remove that sensor from the analysis when you make the data/datamat files

In the other case, a binary file was being loaded.  It turns out that the likely culprit was a change in the header structure of the file being loaded relative to what the GUI was expecting.  In this case, the GUI may not know exactly where the sensor data start, and will calculate more (or fewer) channels than specified based on the size of the datafile. 

It's difficult for us to keep on top of all revisions to ERP processing software, and supporting the ability to read in and display all binary formats is not currently planned.  If a binary format "stops working" or "doesn't work", the safest bet is to export your data to ascii (text) format, and there should be no problem.

Also, note that the present implementation of the PLS GUI is expecting averaged data for each subject, rather than continuous data or single-trial data.  We are considering expanding the capabilities to analyze single-trial data, but need to run some tests first.

Nancy



1. Customized Scalp Electrode System; 2. ANT average binary data format; 3. CTF-150 display problem.

I'm Online
jshen
Posted on 04/23/07 19:20:06
Number of posts: 291
jshen replies:

1. Customized Scalp Electrode System

Q:    In my MEG data, the number of channels and their corresponding
    names do not match up with any of the pre-specified system. How
    can I read in my data when channel configuration and names do
    not match?

A:    Up to this version (5.0704231) We only have 4 scalp electrode
    location systems in PLSgui. They are the ones that we are using
    most frequently. There is a way to add any system by yourself,
    as long as you know the electrode names with their corresponding
    x and y locations. Since PLSgui will normalize your x and y
    location to Xmin/Xmax and Ymin/Ymax, you don't need to worry
    about the exact locations, and the relative ones will work.

    Here is the details of how to add a Standard 10-20 EEG System
    with 19 cap electrodes:

    1. First step: Put all electrode names on a piece of grid paper,
       and make sure that they are spatially located appropriately.

    2. Second step: Select an origin for XY coordinates. You can
       pick any point (on or off any electrode) as your origin. For
       example, Cz is a good selection, the most lower left grid is
       also a good selection.

    3. Third step: Use a ruler (or count the grid) to measure the
       x and y location from the origin.

    4. Forth step: Pick any of the 4 PLSgui electrode systems for
       your system. In PLSgui, each system is determined by a
       "erp_loc*.mat" MATLAB file. So we have:
       "erp_loc_besa148.mat", "erp_loc_egi128.mat",
       "erp_loc_egi256.mat", and "erp_loc_ctf150.mat". The default
       system for "Edit Channel Order" window is:
       "erp_loc_besa148.mat". So, it will be convenient for you if
       you pick this one.

    The whole idea to use your own system is to create an electrode
    systems MATLAB file with the same file name as the one used by
    PLSgui. Let's assume you picked "erp_loc_besa148.mat", once you
    save your own "erp_loc_besa148.mat" in the same folder as the
    one you will save session/datamat/result file, PLSgui will load
    your own "erp_loc_besa148.mat", instead of the one from PLSgui
    program folder.

    All 4 PLSgui electrode system MATLAB file in PLSgui contain two
    variables, one is char array "chan_nam", the number of rows is
    the number of channels and the number of columns is the longest
    length of the electrode names; the other one is double array
    "chan_loc", the number of rows is the number of channels and
    it only has two columns. Column 1 is for x values, and column 2
    is for y values. Now continue with this example:

    chan_nam=[
        'Fp1'
        'Fp2'
        'F7 '
        'F3 '
        'Fz '
        'F4 '
        'F8 '
        'T7 '
        'C3 '
        'Cz '
        'C4 '
        'T8 '
        'P7 '
        'P3 '
        'Pz '
        'P4 '
        'P8 '
        'O1 '
        'O2 ']

    chan_loc=[
        -3  10
        3   10
        -8  6
        -5  7
        0   8
        5   7
        8   6
        -10 0
        -7  0
        0   0
        7   0
        10  0
        -8  -6
        -5  -7
        0   -8
        5   -7
        8   -6
        -3  -10
        3   -10]

    %  Assume that your current directory is the one that
    %  you will save session/datamat/result file, then:
    %
    save erp_loc_besa148 chan_loc chan_nam

    Now you have your own system in "Edit Channel Order" window if
    you are under "ERP/BESAThetaPhi" system, and you can also pick
    channels that is used in the ERP data.

(The above information is also updated in http://www.rotman-baycrest.on.ca/pls/FAQ.txt and http://www.rotman-baycrest.on.ca/pls/UserGuide.htm)


2. ANT average binary data format

Q:    Does PLSgui support ANT binary data?

A:    It was able to support ANT average binary data before, and
    "load_ant.m" is still the only explicit MATLAB .m program
    to do that.

    EEGLAB (both version 4&5) has a plugin, which can also load
    ANT average binary data. It is called "read_eep_avr", and is
    compiled in MATLAB mex (or dll) file.

    Here comes the bad news. When you use either "load_ant.m" or
    "read_eep_avr" to load the new ANT average binary data, you
    will probably get some data values that exceed float32 range.
    Obviously, the data loaded is not correct. In this case, you
    will have to use "avr2asc" in "eeprobe_3.3.120" package that
    is provided by the vendor.

    The "load_ant.m" is based on openlib library "cntopenlib.zip",
    which is released by ANT technical support. The result from
    "load_ant.m" is identical to the one from "read_eep_avr". Since
    there is no detail documentation released for ANT's file format,
    PLSgui has to stop supporting ANT average binary data format.

(The above information is also updated in http://www.rotman-baycrest.on.ca/pls/FAQ.txt and http://www.rotman-baycrest.on.ca/pls/UserGuide.htm)


3. CTF-150 display problem

CTF-150 display problem is fixed on April 20, 2007.



Untitled Post
semrich
Posted on 04/23/07 20:39:58
Number of posts: 0
semrich replies:

Hi Jimmy,

Thanks for those details.  That helps a lot.  I have a follow-up though:

In MEG, the data is acquired using the standard 151-channel CTF system.  However, the restuls are transformed into virtual channels, such that the activity that would occur in a given brain region (e.g., motor cortex) is simulated.  Accordingly, these channels have coordinates in 3 dimensions.  The files cannot support x, y and z coordinates of the channels?  How much (if at all) do the locations of the channels affect the results of the PLS analysis?

Thanks,

-Steve


Untitled Post

I'm Online
nlobaugh
Posted on 04/23/07 20:50:34
Number of posts: 229
nlobaugh replies:

Hi Steve...

Simple answer: It matters not at all..  PLS does not need to know which sensor or voxel location the data represent.  What is needed, is that all columns represent the same datapoint across subjects.  If you wanted to, you could randomly order the sensor/timepoint data, and get exactly the same result.  Displaying it might be a bit of a nightmare, however.

=====
All MEG and ERP sensor locations actually have a position in 3D space - we are just converting them to a 2D xy coordinate location or projection to make "flat maps" of the sensors.

So for your virtual channels you can pick any ones you want, as long as you remember what they mean; or create your own as per Jimmy's instructions.

Nancy


ANT's average binary data (.avr file)

I'm Online
jshen
Posted on 05/02/07 17:50:21
Number of posts: 291
jshen replies:

Hi Alina:

I have modified "load_ant.m", so it may be able to load your .avr data. Could you please download PLSgui and try it again?

Thanks,

Jimmy

================================================

Q:    Does PLSgui support ANT average binary data?

A:    Yes. The "load_ant.m" program in PLSgui is based on openlib
    library "cntopenlib.zip" and additional information "avr.txt"
    file that are released by ANT technical support.

    Since January 2004, ANT's average data file has been changed,
    and the history section is included in its header. This info
    is not included in the "cntopenlib.zip"; however, it is in the
    "avr.txt" file released by ANT's support people.

    Some people used "avr2asc" provided by ANT's EEProbe_3.3.120
    to convert ANT's average data to plain text file. However, the
    disadvantage is that the "avr2asc" only supports new version
    of ANT's average data on Linux and Mac platforms, and does not
    work under MATLAB.

    Other programs relied on their "cntopenlib.zip" (e.g. Robert
    Oostenveld's "read_eep_avr" that is used by EEGLAB) can only
    support old version, and they are compiled in mex or dll file.
    You must first use "avrstrip" in EEProbe_3.3.120 to convert
    your new version of ANT's average data to old version before
    you can use "read_eep_avr" to load them.

    The "load_ant.m" is the only explicit .m program so far (April,
    2007) that supports both old & new versions of ANT's average
    data file on any platform.





Login to reply to this topic.

  • Keep in touch

Enter your email above to receive electronic messages from Baycrest, including invitations to programs and events, newsletters, updates and other communications.
You can unsubscribe at any time.
Please refer to our Privacy Policy or contact us for more details.

  • Follow us on social
  • Facebook
  • Instagram
  • Linkedin
  • Pinterest
  • Twitter
  • YouTube

Contact Us:

3560 Bathurst Street
Toronto, Ontario
Canada M6A 2E1
Phone: (416) 785-2500

Baycrest is an academic health sciences centre fully affiliated with the University of Toronto