[FieldTrip] Issue running "ft_freqstatistics" on macOS with Apple silicon

Schoffelen, J.M. (Jan Mathijs) janmathijs.schoffelen at donders.ru.nl
Tue Oct 8 13:40:12 CEST 2024


Nice!

Thanks for the feedback and glad to be of help.

BW,
JM


On 8 Oct 2024, at 11:43, Camilo Castelblanco Riveros <camilo.a.castelblanco.riveros.gr at dartmouth.edu> wrote:

You don't often get email from camilo.a.castelblanco.riveros.gr at dartmouth.edu. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>
It worked!
Thank you for your help and patience with this simple issue, Dr. Schoffelen.

With gratitude,
Camilo
================================
Camilo Castelblanco Riveros (He/His)
Ph.D. Candidate (G3)
Robertson Lab<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.robertsonlab.com%2F&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cdd36dd53ed8b4756e73008dce78df8bf%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638639844148746370%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=kUycIeSqXKVjq4vKkhDUyTPoag3wEOjbvOR8ahSBVxQ%3D&reserved=0> & Bujarski Lab<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dartmouth-hitchcock.org%2Fresearch%2Fsearch-clinical-trials%2Ftrial%2FSTUDY02001606&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cdd36dd53ed8b4756e73008dce78df8bf%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638639844148902641%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=Mca9Oyq9%2BoW%2Bcuxvd7IJ84OJffk6WR8dxWR2ZB30%2Bqg%3D&reserved=0>
Student Interest Group in Neurology (SIGN<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgeiselmed.dartmouth.edu%2Fstudent-gov%2Fstudent-groups%2F&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cdd36dd53ed8b4756e73008dce78df8bf%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638639844148902641%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=7GTAP9XVujvwDP4fe%2FZFtQmDJYiVyFxwMuu9W9FOVSg%3D&reserved=0>) Co-Leader
Diversity Student Advisory Board Member
e: ccastelblanco.gr at dartmouth.edu<mailto:camilo.a.castelblanco.riveros.gr at dartmouth.edu>
Zoom<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdartmouth.zoom.us%2Fmy%2Fccastelblanco&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cdd36dd53ed8b4756e73008dce78df8bf%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638639844149058852%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=BPbsfvHpoCiVS3ALYVdXQAizC9EaqKqQA5c4H3n%2B%2BV0%3D&reserved=0>

[Integrative Neuroscience at Dartmouth (IND) (@DartmouthNeuro) / Twitter][https://jobsearch.dartmouth-hitchcock.org/wp-content/uploads/DH-Bug-e1666020448423.png]


On Mon, Oct 7, 2024 at 11:49 AM Schoffelen, J.M. (Jan Mathijs) via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:
Hi Camilo,

Have you recently updated your fieldtrip version? I think that the mexmaca64 compiled code was added a while back (w.r.t. the spm_bwlabel function it seems that this has been added about 8 months ago, as far as I can see in the repo’s history on github).

Best wishes,
Jan-Mathijs



On 7 Oct 2024, at 17:11, Camilo Castelblanco Riveros via fieldtrip <fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>> wrote:

Hi!

Thanks in advance for your support.

Context:
I am trying to run "ft_freqstatistics" comparing conditions within an individual subject.
Issue:
When running the code, I get the following error:
---
generated 1000 random permutations
computing a parametric threshold for clustering
computing statistic
estimated time per randomization is 0.13 seconds
computing statistic 1000 from 1000

Error using spm_bwlabel (line 27)
spm_bwlabel.c not compiled - see Makefile
---

Troubleshooting:
1. I inspected my fieldtrip SPM toolbox (''...GitHub/fieldtrip/external/spm12'') has the spm_bwlabel files but not the spm_bwlabel.mexmaca64. I think I need the spm_bwlabel.mexmaca64 to run it on my machine; is that correct?
2. Doing some reading, I may need to compile the spm_make_standalone.m file. However, I do not know how to do it in Fieldtrip's path.

My code:
cfg = [];
cfg.parameter = 'powspctrm'; % Specify power spectrum parameter
cfg.method = 'montecarlo'; % Use permutation testing
cfg.statistic = 'depsamplesT'; % Dependent samples t-test
cfg.correctm = 'cluster'; % Use cluster-based correction
cfg.clusteralpha = 0.05; % Threshold for forming clusters
cfg.clusterstatistic = 'maxsum'; % Sum of t-values for defining clusters
cfg.alpha = 0.025; % Significance level for two-tailed test
cfg.tail = 0; % Two-tailed test
cfg.clustertail = 0; % Two-tailed cluster statistics
cfg.numrandomization = 1000; % Number of random permutationcfg.neighbours = []; % No neighborhood structure needed for iEEG
% Design matrix
design = zeros(2, ntrials_low + ntrials_high);
design(1, 1:ntrials_low) = 1; % Assign label 1 to trials in the low condition
design(1, ntrials_low+1:end) = 2; % Assign label 2 to trials in the high condition
design(2, :) = [1:ntrials_low, 1:ntrials_high]; % Assign trial indices
cfg.design = design;
cfg.uvar = 2; % unit of observation (subject)
cfg.ivar = 1; % independent variable (condition)
%7 Compute statistics[stat] = ft_freqstatistics(cfg, TFR_low, TFR_high);

With gratitude,
Camilo
================================
Camilo Castelblanco Riveros (He/His)
Ph.D. Candidate (G3)
Robertson Lab<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.robertsonlab.com%2F&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cdd36dd53ed8b4756e73008dce78df8bf%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638639844149058852%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=QtT7h3BF3RZpnGV8%2BNd3a7Yz3EzcAWa3l3pcpLJT5Qs%3D&reserved=0> & Bujarski Lab<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dartmouth-hitchcock.org%2Fresearch%2Fsearch-clinical-trials%2Ftrial%2FSTUDY02001606&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cdd36dd53ed8b4756e73008dce78df8bf%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638639844149058852%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=apOA2bf8lf%2FSJuMMDH7OSvJg7g67YrLgn9asDhcei2g%3D&reserved=0>
Student Interest Group in Neurology (SIGN<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgeiselmed.dartmouth.edu%2Fstudent-gov%2Fstudent-groups%2F&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cdd36dd53ed8b4756e73008dce78df8bf%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638639844149058852%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=Gl3Yngf3D5qP3DNwZptJmPZnX%2BPHga3kqVr%2B2ZNXvWA%3D&reserved=0>) Co-Leader
Diversity Student Advisory Board Member
e: ccastelblanco.gr at dartmouth.edu<mailto:camilo.a.castelblanco.riveros.gr at dartmouth.edu>
Zoom<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdartmouth.zoom.us%2Fmy%2Fccastelblanco&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cdd36dd53ed8b4756e73008dce78df8bf%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638639844149058852%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=BPbsfvHpoCiVS3ALYVdXQAizC9EaqKqQA5c4H3n%2B%2BV0%3D&reserved=0>

[Integrative Neuroscience at Dartmouth (IND) (@DartmouthNeuro) / Twitter][https://jobsearch.dartmouth-hitchcock.org/wp-content/uploads/DH-Bug-e1666020448423.png]
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cdd36dd53ed8b4756e73008dce78df8bf%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638639844149215154%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=juRpGMh%2FAWmw9sSPR1nbSkmRnrCnAAf4zi1JcUuNk%2Fk%3D&reserved=0>
https://doi.org/10.1371/journal.pcbi.1002202<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cdd36dd53ed8b4756e73008dce78df8bf%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638639844149215154%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=1ObZF1OpkT9boXBcxN3fgkLiNZGk7ZnJwQ7rem%2FRL9w%3D&reserved=0>

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cdd36dd53ed8b4756e73008dce78df8bf%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638639844149215154%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=juRpGMh%2FAWmw9sSPR1nbSkmRnrCnAAf4zi1JcUuNk%2Fk%3D&reserved=0>
https://doi.org/10.1371/journal.pcbi.1002202<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=05%7C02%7Cfieldtrip%40science.ru.nl%7Cdd36dd53ed8b4756e73008dce78df8bf%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638639844149371369%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=D%2F%2BMKbdT8gYtf5imJa%2Bg96X3Nqs2JkWKIWCGnRrsNCM%3D&reserved=0>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20241008/ce329366/attachment.htm>


More information about the fieldtrip mailing list