arnodelorme / mffmatlabio

MFF Matlab file importer and exporter
GNU General Public License v3.0
11 stars 15 forks source link

Index exceeds array bounds error on downsampled file #41

Closed mamoran66 closed 1 year ago

mamoran66 commented 2 years ago

I have a customer with a 8 GB file. they are unable to load the file, Java heap space error, their heap is set to the max, 4096.

They downsampled from 1000 to 250 s/s and now are receiving a Index exceeds array bounds, line 347 error, see screenshot. I have included the Matlab output as well.

the epochs file does appear to have a problem with the block count, the first block value should be one more than the last block value, this is not the case for this file.

Here is a link to the file:

https://electricalgeodesics.sharefile.com/d-s9b5e0460b2cf4687a47f9a01dfa27367

Screen Shot 2021-12-10 at 3 35 17 PM Screen Shot 2021-12-10 at 3 34 13 PM
arnodelorme commented 2 years ago

I was able to identify and fix the problem which is likely due to discontinuities in the file. Please download the latest version from GitHub and let me know if that fixes the problem.

Arno

On Dec 10, 2021, at 2:09 PM, mamoran66 @.***> wrote:

I have a customer with a 8 GB file. they are unable to load the file, Java heap space error, their heap is set to the max, 4096.

They downsampled from 1000 to 250 s/s and now are receiving a Index exceeds array bounds, line 347 error, see screenshot. I have included the Matlab output as well.

the epochs file does appear to have a problem with the block count, the first block value should be one more than the last block value, this is not the case for this file.

Here is a link to the file:

https://electricalgeodesics.sharefile.com/d-s9b5e0460b2cf4687a47f9a01dfa27367

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

mamoran66 commented 2 years ago

Customer reports the issue is resolved, thank you.

mamoran66 commented 2 years ago

The customer did ask about the discontinuity warnings. Are continuous files preferred? Should the customer instead record without any pauses(only one epoch)?

Thanks,

Mark

arnodelorme commented 2 years ago

I do not think it matters, but if it was me, I would record in continuous mode, just to be super safe. If not, I would double check event latency and data alignment in Netstation vs EEGLAB (which I did already, but never hurt to double check twice).

Arno

On Dec 15, 2021, at 9:52 AM, mamoran66 @.***> wrote:

The customer did ask about the discontinuity warnings. Are continuous files preferred? Should the customer instead record without any pauses(only one epoch)?

Thanks,

Mark

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

jibrjabr commented 2 years ago

Hi I seem to be having a variant of this same issue. Data was downsampled from 1000 to 250 using EGI Netstation Tools. Data for one run of a subject is up here: https://osf.io/s4un6/ EEGLAB_screen_shot_error

jibrjabr commented 1 year ago

Hi all, so I came back to this recently, and might have solved my issue from earlier. The line in question from mff_import() was:

(279) sampleBlock = blockSamples(cont(iBound).firstblock);

When I ran mff_import() on data that had been averaged there was no issue, but I also noticed that the values for cont().firstblock and cont().lastblock were the same (16 conditions, so both were just values 1 through 16). This was not the case for the temporally downsampled data that I was having an issue with. cont().firstblock of the structure went into the thousands, while only cont().lastblock ranged 1 through 96. So that is why I was getting the indexing error. If I changed the line to the following it ran OK.

(279) sampleBlock = blockSamples(cont(iBound).lastblock();

Not sure what is going on in terms of what determines the very different values after temporal downsampling, but I am going to keep going and see if the data looks OK.

mamoran66 commented 1 year ago

Dear Arno.

I wanted to double check how sensor locations are gathered by the plugin. Is the plugin using sensor locations that come with the EEGLab installation: GSN64v2 or GSN 64v2? The other option I see would be reading the coordinates.xml file inside the MFF?

Thanks,

Mark

Mark Moran

Technical Product Manager

[Magstim]https://www.magstim.com/

@.***

www.magstim.comhttps://www.magstim.com

International Office

Spring Gardens, Whitland, Carmarthenshire, SA34 0HR, UK Office: +44 (0) 1994 240798 Fax: +44 (0) 1994 240061

USA Office

Magstim Inc, 1626 Terrace Dr, Roseville,, MN 55113, USA Office: 844-624-7846 Toll Free: 844-MAGSTIM

THIS ELECTRONIC MESSAGE IS INTENDED ONLY FOR THE USE OF THE PARTY TO WHOM IT IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL, AND PROTECTED FROM DISCLOSURE UNDER APPLICABLE LAW. If you are not the addressee, or a person authorised to deliver this message to the addressee, you are hereby notified that any review, disclosure, dissemination, copying or other action based on the content of this communication is not authorised. If you have received this message in error, please immediately notify us by telephone and return all hard copies of it to us at the address below by mail, and immediately and permanently delete it from all of your systems. We will refund postage. Thank you. EMAIL TRANSMISSION CANNOT BE GUARANTEED TO BE SECURE OR ERROR FREE AS INFORMATION COULD BE INTERCEPTED, CORRUPTED, LOST, DESTROYED, ARRIVE LATE OR INCOMPLETE, OR CONTAIN VIRUSES. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of email transmission. If verification is required please request a hard copy version.

arnodelorme commented 1 year ago

Dear Mark,

It is reading the X, Y, and Z coordinates from your file coordinates.xml

Arno

On May 30, 2023, at 8:39 AM, mamoran66 @.***> wrote:

Dear Arno.

I wanted to double check how sensor locations are gathered by the plugin. Is the plugin using sensor locations that come with the EEGLab installation: GSN64v2 or GSN 64v2? The other option I see would be reading the coordinates.xml file inside the MFF?

Thanks,

Mark

Mark Moran

Technical Product Manager

[Magstim]https://www.magstim.com/

@.***

www.magstim.comhttps://www.magstim.com

International Office

Spring Gardens, Whitland, Carmarthenshire, SA34 0HR, UK Office: +44 (0) 1994 240798 Fax: +44 (0) 1994 240061

USA Office

Magstim Inc, 1626 Terrace Dr, Roseville,, MN 55113, USA Office: 844-624-7846 Toll Free: 844-MAGSTIM

THIS ELECTRONIC MESSAGE IS INTENDED ONLY FOR THE USE OF THE PARTY TO WHOM IT IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL, AND PROTECTED FROM DISCLOSURE UNDER APPLICABLE LAW. If you are not the addressee, or a person authorised to deliver this message to the addressee, you are hereby notified that any review, disclosure, dissemination, copying or other action based on the content of this communication is not authorised. If you have received this message in error, please immediately notify us by telephone and return all hard copies of it to us at the address below by mail, and immediately and permanently delete it from all of your systems. We will refund postage. Thank you. EMAIL TRANSMISSION CANNOT BE GUARANTEED TO BE SECURE OR ERROR FREE AS INFORMATION COULD BE INTERCEPTED, CORRUPTED, LOST, DESTROYED, ARRIVE LATE OR INCOMPLETE, OR CONTAIN VIRUSES. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of email transmission. If verification is required please request a hard copy version. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.