[FieldTrip] Issue running "ft_freqstatistics" on macOS with Apple silicon
Schoffelen, J.M. (Jan Mathijs)
janmathijs.schoffelen at donders.ru.nl
Mon Oct 7 17:48:29 CEST 2024
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> 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%7C689e2bbe8b2a4e7b373808dce6e77d1b%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638639129107208886%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=pHDWUonF5qTutMW5B2E2cy%2BhD0cnN2B0BbRWl7qSMKM%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%7C689e2bbe8b2a4e7b373808dce6e77d1b%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638639129107208886%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=AnoD7GVYaK8TiABT0eTlUgdnq%2BSb7MbtdnJCj2mPvDI%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%7C689e2bbe8b2a4e7b373808dce6e77d1b%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638639129107208886%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=anr%2BehaNtQCMvlUH69j7SI8AwG7AGnEJ9SXsLCJh8mI%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%7C689e2bbe8b2a4e7b373808dce6e77d1b%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638639129107208886%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=%2BHu5cOQxh9MnoG2TRuQhZfVnNPAv6ThPfUvp4RyNLYc%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://doi.org/10.1371/journal.pcbi.1002202
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20241007/74ef80d8/attachment.htm>
More information about the fieldtrip
mailing list